* Bug in vsum in org-mode table?
@ 2016-04-22 19:00 Kaushal Modi
2016-04-22 19:34 ` Thierry Banel
0 siblings, 1 reply; 6+ messages in thread
From: Kaushal Modi @ 2016-04-22 19:00 UTC (permalink / raw)
To: emacs-org list
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
Hi,
The vsum is putting a sum as "2." instead of "2.0". Here is a simple
example:
|-------|
| Title |
|-------|
| 0.5 |
| 1.5 |
|-------|
| 2. |
|-------|
#+TBLFM: @>$1=vsum(@2..@>>)
Org-mode version 8.3.4 (release_8.3.4-748-g7e320e @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)
Is anyone else able to recreate this?
Thanks.
Kaushal
--
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 609 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug in vsum in org-mode table?
2016-04-22 19:00 Bug in vsum in org-mode table? Kaushal Modi
@ 2016-04-22 19:34 ` Thierry Banel
2016-04-22 20:10 ` Charles Millar
0 siblings, 1 reply; 6+ messages in thread
From: Thierry Banel @ 2016-04-22 19:34 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/html, Size: 1538 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug in vsum in org-mode table?
2016-04-22 19:34 ` Thierry Banel
@ 2016-04-22 20:10 ` Charles Millar
2016-04-22 20:46 ` Kaushal Modi
2016-04-22 22:12 ` Thierry Banel
0 siblings, 2 replies; 6+ messages in thread
From: Charles Millar @ 2016-04-22 20:10 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
On 04/22/2016 03:34 PM, Thierry Banel wrote:
> You can format the result as *2.0* with the *f1* modifier
> (or *f5* to get *2.00000* and so on)
>
> #+TBLFM: @>$1=vsum(@2..@>>)*;f1*
>
In the manual the decimal format %.2f, etc. is shown as an example but
apparently the f2 format is not mentioned.
Is the %.Xf format preferred or is either one OK?
Regards,
Charlie Millar
[-- Attachment #2: Type: text/html, Size: 998 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug in vsum in org-mode table?
2016-04-22 20:10 ` Charles Millar
@ 2016-04-22 20:46 ` Kaushal Modi
2016-04-22 22:12 ` Thierry Banel
1 sibling, 0 replies; 6+ messages in thread
From: Kaushal Modi @ 2016-04-22 20:46 UTC (permalink / raw)
To: Charles Millar, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
Thank you guys. Both of the below worked.
#+TBLFM: @>$1=vsum(@2..@>>);f1
#+TBLFM: @>$1=vsum(@2..@>>);%0.1f
On Fri, Apr 22, 2016 at 4:11 PM Charles Millar <millarc@verizon.net> wrote:
>
> On 04/22/2016 03:34 PM, Thierry Banel wrote:
>
> You can format the result as *2.0* with the *f1* modifier
> (or *f5* to get *2.00000* and so on)
>
> #+TBLFM: @>$1=vsum(@2..@>>)*;f1*
>
> In the manual the decimal format %.2f, etc. is shown as an example but
> apparently the f2 format is not mentioned.
>
> Is the %.Xf format preferred or is either one OK?
>
> Regards,
>
> Charlie Millar
>
--
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 1385 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug in vsum in org-mode table?
2016-04-22 20:10 ` Charles Millar
2016-04-22 20:46 ` Kaushal Modi
@ 2016-04-22 22:12 ` Thierry Banel
2016-04-24 16:41 ` Charles Millar
1 sibling, 1 reply; 6+ messages in thread
From: Thierry Banel @ 2016-04-22 22:12 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/html, Size: 1651 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bug in vsum in org-mode table?
2016-04-22 22:12 ` Thierry Banel
@ 2016-04-24 16:41 ` Charles Millar
0 siblings, 0 replies; 6+ messages in thread
From: Charles Millar @ 2016-04-24 16:41 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 804 bytes --]
On 04/22/2016 06:12 PM, Thierry Banel wrote:
> Le 22/04/2016 22:10, Charles Millar a écrit :
>>
>> On 04/22/2016 03:34 PM, Thierry Banel wrote:
>>> You can format the result as *2.0* with the *f1* modifier
>>> (or *f5* to get *2.00000* and so on)
>>>
>>> #+TBLFM: @>$1=vsum(@2..@>>)*;f1*
>>>
>> In the manual the decimal format %.2f, etc. is shown as an example
>> but apparently the f2 format is not mentioned.
>>
>> Is the %.Xf format preferred or is either one OK?
>>
>> Regards,
>>
>> Charlie Millar
>
> *%.2f* is handy for those who are used to *printf()* syntax (in the C
> language).
> But Calc unlimited precision numbers are converted to double floats
> before applying *%.2f*
> Whereas *f2* operates on Calc numbers without conversion.
Thank you, Thierry.
[-- Attachment #2: Type: text/html, Size: 2082 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-24 16:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22 19:00 Bug in vsum in org-mode table? Kaushal Modi
2016-04-22 19:34 ` Thierry Banel
2016-04-22 20:10 ` Charles Millar
2016-04-22 20:46 ` Kaushal Modi
2016-04-22 22:12 ` Thierry Banel
2016-04-24 16:41 ` Charles Millar
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).