* [bug] Negating time changes its value
@ 2012-04-30 14:25 Sebastien Vauban
2012-05-01 17:22 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2012-04-30 14:25 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello,
Taking the opposite of a time (that is, "putting" a minus sign in front of it)
changes its value...
Here, a quick ECM to demonstrate the above:
* Grand total
#+TBLNAME: GrandTot
| Total | 232:11 |
* Other total
#+TBLNAME: OtherTot
| Total | 158:07 |
* Computation
** OK
The "other total time" is to be divided by 2, and substracted from the "grand
total time".
| | Time |
|--------------------------+--------|
| Grand total | 232:11 |
| - Other total / 2 | 79:03 |
|--------------------------+--------|
| = Total to be considered | 153:08 |
#+TBLFM: @2$2=remote(GrandTot,@1$2);T::@3$2=remote(OtherTot,@1$2)/2;T::@4$2=@2-@3;T
That's correct.
** Not OK
However, I would like to clearly state that the amounts do no add, by having a
minus sign in the time column:
| | Time |
|--------------------------+--------|
| Grand total | 232:11 |
| - Other total / 2 | -80:56 |
|--------------------------+--------|
| = Total to be considered | 151:15 |
#+TBLFM: @2$2=remote(GrandTot,@1$2);T::@3$2=-remote(OtherTot,@1$2)/2;T::@4$2=@2+@3;T
Whoops! Not the same results...
Other variations also fail:
| | Time |
|--------------------------+--------|
| Grand total | 232:11 |
| - Other total / 2 | -80:56 |
|--------------------------+--------|
| = Total to be considered | 151:15 |
#+TBLFM: @2$2=remote(GrandTot,@1$2);T::@3$2=remote(OtherTot,@1$2)/-2;T::@4$2=@2+@3;T
or
| | Time |
|--------------------------+--------|
| Grand total | 232:11 |
| - Other total / 2 | -80:56 |
|--------------------------+--------|
| = Total to be considered | 151:15 |
#+TBLFM: @2$2=remote(GrandTot,@1$2);T::@3$2=remote(OtherTot,@1$2)/2*-1;T::@4$2=@2+@3;T
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug] Negating time changes its value
2012-04-30 14:25 [bug] Negating time changes its value Sebastien Vauban
@ 2012-05-01 17:22 ` Bastien
2012-05-02 10:12 ` Sebastien Vauban
0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2012-05-01 17:22 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> Taking the opposite of a time (that is, "putting" a minus sign in
> front of it) changes its value...
Fixed... please confirm.
Thanks *a lot* for reporting this -- this was indeed a nasty bug.
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug] Negating time changes its value
2012-05-01 17:22 ` Bastien
@ 2012-05-02 10:12 ` Sebastien Vauban
0 siblings, 0 replies; 3+ messages in thread
From: Sebastien Vauban @ 2012-05-02 10:12 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Bastien,
Bastien wrote:
> "Sebastien Vauban"
> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> Taking the opposite of a time (that is, "putting" a minus sign in
>> front of it) changes its value...
>
> Fixed... please confirm.
Confirmed. Thanks a lot!
> Thanks *a lot* for reporting this -- this was indeed a nasty bug.
This is the least I could do... Thanks for your help.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-02 10:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-30 14:25 [bug] Negating time changes its value Sebastien Vauban
2012-05-01 17:22 ` Bastien
2012-05-02 10:12 ` Sebastien Vauban
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.