Hi all, 1) I tried to set the precision for the spreadsheet calculation to p20 like mentioned in the Org info manual "3.5.2 Formula syntax for Calc": I got | 0.1666666700000000 | #+TBLFM: $1 = 1 / 2 * 3; %.16f p20 but I expect | 0.1666666666666667 | #+TBLFM: $1 = 1 / 2 * 3; %.16f p20 What am I missing? org-version is the current 6.34c, GNU Emacs version is 21.1.1 Thanks, Michael
On Feb 26, 2010, at 9:16 PM, Michael Brand wrote: > Hi all, > > > 1) I tried to set the precision for the spreadsheet calculation to > p20 like mentioned in the Org info manual "3.5.2 Formula syntax for > Calc": > I got > > | 0.1666666700000000 | > #+TBLFM: $1 = 1 / 2 * 3; %.16f p20 > > but I expect > > | 0.1666666666666667 | > #+TBLFM: $1 = 1 / 2 * 3; %.16f p20 You need p20f20 p20 is for internal computation, f20 for youput, and the table gets the value through output. Confusing, yes.... HTH - Carsten > > What am I missing? org-version is the current 6.34c, GNU Emacs > version is 21.1.1 > > > Thanks, > Michael > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten
Carsten Dominik wrote:
> You need p20f20
>
> p20 is for internal computation, f20 for youput, and the table
> gets the value through output. Confusing, yes....
| 0.1666666666666667 |
#+TBLFM: $1 = 1 / 2 * 3; %.16f p20 f20
like expected. But instead of
| 0.166666666666666660 |
#+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20
which I get I would expect
| 0.166666666666666667 |
#+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20
Hi Michael,
these are the internals of calc, about which I cannot do much.
- Carsten
On Feb 26, 2010, at 10:12 PM, Michael Brand wrote:
> Carsten Dominik wrote:
>> You need p20f20
>> p20 is for internal computation, f20 for youput, and the table
>> gets the value through output. Confusing, yes....
>
> | 0.1666666666666667 |
> #+TBLFM: $1 = 1 / 2 * 3; %.16f p20 f20
>
> like expected. But instead of
>
> | 0.166666666666666660 |
> #+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20
>
> which I get I would expect
>
> | 0.166666666666666667 |
> #+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20
- Carsten
Carsten Dominik wrote: > these are the internals of calc, about which I cannot do much. But | 0.16666666666666666667 | #+TBLFM: $1 = 1 / 2 * 3; p20 f20 shows that the internals of calc are ok, isn't it? > Michael Brand wrote: >> But instead of >> >> | 0.166666666666666660 | >> #+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20 >> >> which I get I would expect >> >> | 0.166666666666666667 | >> #+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20
On Feb 26, 2010, at 10:58 PM, Michael Brand wrote: > Carsten Dominik wrote: >> these are the internals of calc, about which I cannot do much. > > But > > | 0.16666666666666666667 | > #+TBLFM: $1 = 1 / 2 * 3; p20 f20 > > shows that the internals of calc are ok, isn't it? Hi Michael, you are completely right, I was wrong. The other issue that is playing into this is that when using a printf format specifier, the number is first converted into a Lisp number, which is a double, with 16 significant digits... At this step, the additional digits are lost. Maybe you find this interesting enough so that I can persuade you to write a FAQ entry about these issues? :-) - Carsten > >> Michael Brand wrote: >>> But instead of >>> >>> | 0.166666666666666660 | >>> #+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20 >>> >>> which I get I would expect >>> >>> | 0.166666666666666667 | >>> #+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20 - Carsten
Carsten Dominik wrote:
> when using a printf format specifier, the number
> is first converted into a Lisp number, which is
> a double, with 16 significant digits
Thanks for the clarification.
> Maybe you find this interesting enough so that I can
> persuade you to write a FAQ entry about these issues? :-)
Yes, within a few days I will come back with this and/or a texinfo patch for
the Org info manual, at least chapter "3.5.2 Formula syntax for Calc".
Hi Carsten Michael Brand wrote: > Yes, within a few days I will come back with this and/or a texinfo patch > for the Org info manual, at least chapter "3.5.2 Formula syntax for Calc". The patch below is my proposal for the manual. Please feel free to improve it. I also played around quite a bit with the precision settings and will put the resulting examples into the Worg FAQ. But I would like to postpone my Worg FAQ update because its link to the manual would be confusing before the manual update itself will have been made. Is there a small issue with the behavior of the section link http://orgmode.org/manual/index.html#Top ? With Firefox 3.0.5 it sometimes jumps to where the html source fragment <a name="Top"></a> lies like expected but sometimes it jumps to where the html source fragment <link title="Top" rel="start" href="#Top"> lies which could be annoying. Michael patch for org.texi, `---' file was taken from org-version 6.34c: ============================================================================= --- a/doc/org.texi 2010-01-18 00:10:46.000000000 +0100 +++ b/doc/org.texi 2010-03-02 20:00:00.000000000 +0100 @@ -2128,8 +2128,11 @@ @code{org-calc-default-modes}. @example -p20 @r{switch the internal precision to 20 digits} -n3 s3 e2 f4 @r{normal, scientific, engineering, or fixed display format} +p20 @r{set the internal Calc calculation precision to 20 digits} +n3 s3 e2 f4 @r{Normal, scientific, engineering, or fixed} + @r{format of the result of Calc passed back to Org.} + @r{Calc formatting is unlimited in precision as} + @r{long as the Calc calculation precision is greater.} D R @r{angle modes: degrees, radians} F S @r{fraction and symbolic modes} N @r{interpret all fields as numbers, use 0 for non-numbers} @@ -2139,8 +2142,16 @@ @end example @noindent -In addition, you may provide a @code{printf} format specifier to -reformat the final result. A few examples: +Unless you use large integer numbers or high-precision-calculation +and -display for floating point numbers you may alternatively provide a +@code{printf} format specifier to reformat the Calc result after it has been +passed back to Org instead of letting Calc already do the +formatting@footnote{The @code{printf} reformatting is limited in precision +because the value passed to it is converted into an @code{integer} or +@code{double}. The @code{integer} is limited in size by truncating the +signed value to 32 bits. The @code{double} is limited in precision to 64 +bits overall which leaves approximately 16 significant decimal digits.}. +A few examples: @example $1+$2 @r{Sum of first and second field} =============================================================================
Hi Michael,
very nice, thanks, I have applied the patch.
- Carsten
On Mar 2, 2010, at 9:15 PM, Michael Brand wrote:
> Hi Carsten
>
> Michael Brand wrote:
>> Yes, within a few days I will come back with this and/or a texinfo
>> patch for the Org info manual, at least chapter "3.5.2 Formula
>> syntax for Calc".
>
> The patch below is my proposal for the manual. Please feel free to
> improve it.
>
> I also played around quite a bit with the precision settings and
> will put the resulting examples into the Worg FAQ. But I would like
> to postpone my Worg FAQ update because its link to the manual would
> be confusing before the manual update itself will have been made.
>
> Is there a small issue with the behavior of the section link
> http://orgmode.org/manual/index.html#Top ?
> With Firefox 3.0.5 it sometimes jumps to where the html source
> fragment
> <a name="Top"></a>
> lies like expected but sometimes it jumps to where the html source
> fragment
> <link title="Top" rel="start" href="#Top">
> lies which could be annoying.
>
> Michael
>
>
> patch for org.texi, `---' file was taken from org-version 6.34c:
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- a/doc/org.texi 2010-01-18 00:10:46.000000000 +0100
> +++ b/doc/org.texi 2010-03-02 20:00:00.000000000 +0100
> @@ -2128,8 +2128,11 @@
> @code{org-calc-default-modes}.
>
> @example
> -p20 @r{switch the internal precision to 20 digits}
> -n3 s3 e2 f4 @r{normal, scientific, engineering, or fixed display
> format}
> +p20 @r{set the internal Calc calculation precision to 20
> digits}
> +n3 s3 e2 f4 @r{Normal, scientific, engineering, or fixed}
> + @r{format of the result of Calc passed back to Org.}
> + @r{Calc formatting is unlimited in precision as}
> + @r{long as the Calc calculation precision is greater.}
> D R @r{angle modes: degrees, radians}
> F S @r{fraction and symbolic modes}
> N @r{interpret all fields as numbers, use 0 for non-
> numbers}
> @@ -2139,8 +2142,16 @@
> @end example
>
> @noindent
> -In addition, you may provide a @code{printf} format specifier to
> -reformat the final result. A few examples:
> +Unless you use large integer numbers or high-precision-calculation
> +and -display for floating point numbers you may alternatively
> provide a
> +@code{printf} format specifier to reformat the Calc result after it
> has been
> +passed back to Org instead of letting Calc already do the
> +formatting@footnote{The @code{printf} reformatting is limited in
> precision
> +because the value passed to it is converted into an @code{integer} or
> +@code{double}. The @code{integer} is limited in size by truncating
> the
> +signed value to 32 bits. The @code{double} is limited in precision
> to 64
> +bits overall which leaves approximately 16 significant decimal
> digits.}.
> +A few examples:
>
> @example
> $1+$2 @r{Sum of first and second field}
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
>
- Carsten
On Mar 11, 2010, at 10:29 AM, Eric S Fraga wrote:
> On Thu, 11 Mar 2010 07:28:38 +0100, Carsten Dominik <carsten.dominik@gmail.com
> > wrote:
>>
>> Hi,
>>
>> is anyone able to reproduce this? I am not, so far....
>>
>> - Carsten
>>
>> Begin forwarded message:
>>
>>> From: Michael Brand <michael.brand@alumni.ethz.ch>
>>> Date: March 5, 2010 9:38:56 AM GMT+01:00
>>> To: Carsten Dominik <carsten.dominik@gmail.com>
>>> Subject: Re: [Orgmode] Precision setting for spreadsheet calculation
>>>
>>> Carsten Dominik wrote:
>>>> Which is the link where you click on to make this happen?
>>> New version complete:
>>>
>>> Is there a small issue with the behavior of the section link
>>> http://orgmode.org/manual/index.html#Top ?
>>> It sometimes jumps to the rendered text line
>>> `Next: Introduction, Previous: (dir), Up: (dir)' (the anchor,
>>> expected)
>>> and sometimes to
>>> `The Org Manual' (top of page, wrong)
>>> with Firefox 3.0.5, 3.6 and Windows Explorer 8.0
>>>
>>> When checking http://orgmode.org/manual/index.html at the W3C
>>> validator there are some errors and warnings but I can not help
>>> because I am not a HTML expert:
>>> http://validator.w3.org/check?uri=http%3A%2F%2Forgmode.org%2Fmanual%2Findex.html&charset=(detect+automatically)&doctype=Inline&group=0
>>
>> - Carsten
>
> Carsten,
>
> I can (sort of consistently) reproduce this:
>
> - go to http://orgmode.org/manual/
>
> - click on "12.5 HTML export" (I'm having some problems with HTML
> export; more on this anon) which takes you to
>
> http://orgmode.org/manual/HTML-export.html#HTML-export
>
> - click on Exporting at the top which takes you to
>
> http://orgmode.org/manual/Exporting.html#Exporting
>
> - click on Top which now takes you to
>
> http://orgmode.org/manual/index.html#Top
>
> and which is not what was expected, I guess (although it *is* what I
> would have expected...).
This is where it should go and what I would expect. I guess I am
still not getting what the problem is. Michael?
- Carsten
On Thu, 11 Mar 2010 12:35:42 +0100, Carsten Dominik <carsten.dominik@gmail.com> wrote: > > > On Mar 11, 2010, at 10:29 AM, Eric S Fraga wrote: > > > On Thu, 11 Mar 2010 07:28:38 +0100, Carsten Dominik > > <carsten.dominik@gmail.com > wrote: > >> > >> Hi, > >> > >> is anyone able to reproduce this? I am not, so far.... > >> > >> - Carsten > >> > >> Begin forwarded message: > >> > >>> From: Michael Brand <michael.brand@alumni.ethz.ch> > >>> Date: March 5, 2010 9:38:56 AM GMT+01:00 > >>> To: Carsten Dominik <carsten.dominik@gmail.com> > >>> Subject: Re: [Orgmode] Precision setting for spreadsheet calculation > >>> > >>> Carsten Dominik wrote: > >>>> Which is the link where you click on to make this happen? > >>> New version complete: > >>> > >>> Is there a small issue with the behavior of the section link > >>> http://orgmode.org/manual/index.html#Top ? > >>> It sometimes jumps to the rendered text line > >>> `Next: Introduction, Previous: (dir), Up: (dir)' (the anchor, > >>> expected) > >>> and sometimes to > >>> `The Org Manual' (top of page, wrong) > >>> with Firefox 3.0.5, 3.6 and Windows Explorer 8.0 > >>> > >>> When checking http://orgmode.org/manual/index.html at the W3C > >>> validator there are some errors and warnings but I can not help > >>> because I am not a HTML expert: > >>> http://validator.w3.org/check?uri=http%3A%2F%2Forgmode.org%2Fmanual%2Findex.html&charset=(detect+automatically)&doctype=Inline&group=0 > >> > >> - Carsten > > > > Carsten, > > > > I can (sort of consistently) reproduce this: > > > > - go to http://orgmode.org/manual/ > > > > - click on "12.5 HTML export" (I'm having some problems with HTML > > export; more on this anon) which takes you to > > > > http://orgmode.org/manual/HTML-export.html#HTML-export > > > > - click on Exporting at the top which takes you to > > > > http://orgmode.org/manual/Exporting.html#Exporting > > > > - click on Top which now takes you to > > > > http://orgmode.org/manual/index.html#Top > > > > and which is not what was expected, I guess (although it *is* what I > > would have expected...). > > This is where it should go and what I would expect. I guess I am > still not getting what the problem is. Michael? I guess one point is that Top takes you to different places in the index.html file. If I go from http://orgmode.org/manual/Exporting.html by clicking on Top, I get placed at the manually created index of topics the top line displayed (which is not the first line of the page, if you understand what I mean) is the one with Next etc. If I follow the procedure above, I get placed on the same page but at the actual top of that page which is the (automatically generated?) table of contents. Either destination within index.html is obviously fine (at least to me!). I guess Michael's query must have been due to the fact that depending on where you click from, you get placed in a different place in the index.html file? HTH, eric
Eric S Fraga wrote: > Either destination within index.html is obviously fine (at least to > me!). I guess Michael's query must have been due to the fact that > depending on where you click from, you get placed in a different place > in the index.html file? Almost yes. Even the _same_ section_link can take you to different places at different times. Only now I found the probably easiest way to reproduce: start with http://orgmode.org/manual/index.html and repeat these two steps as many times as you like 1) click `1 Introduction' (or any other first level node) in the frame on the left side 2) click any `Top' (`1 Introduction' has two of them) in the frame on the right side or `Org Mode Manual' in the frame on the left side Every second time doing these steps I am taken to the info_node_navigation `Next: Introduction, Previous: (dir), Up: (dir)' This is what I expect since following a `Top' from a info_node_navigation should take you simply to a info_node_navigation again in my opinion. But every other second time I am taken to `The Org Manual' This is only the very top of the whole page but not the HTML_anchor <a name="Top"></a>
On Thu, 11 Mar 2010 14:49:28 -0500, Nick Dokos <nicholas.dokos@hp.com> wrote: > > Michael Brand <michael.brand@alumni.ethz.ch> wrote: [...] > > o I visit http://orgmode.org/manual/index.html > o I click `1 Introduction' in the frame on the left side. > o I click 'Previous: Top' in the Navigation line - I don't see a "frame > on the right side" at all. > > Repeating the last two steps ad nauseam always takes me to the same place: > the Navigation line above "Org Mode Manual"; it never takes me to the very > top "The Org Manual". I also tried other first level nodes with the same > results. > > Firefox 3.0.18 on Ubuntu 8.10 (Jaunty). > > HTH, > Nick In case this is a useful data point, I am using Firefox 3.5.5 on Debian.
On 10-03-02 9:15 PM, Michael Brand wrote: > I also played around quite a bit with the precision settings and will > put the resulting examples into the Worg FAQ. But I would like to > postpone my Worg FAQ update because its link to the manual would be > confusing before the manual update itself will have been made. I added http://orgmode.org/worg/org-faq.php#table-high-precision and http://orgmode.org/worg/org-faq.php#table-float-fraction
On Apr 18, 2010, at 3:41 PM, Michael Brand wrote:
> On 10-03-02 9:15 PM, Michael Brand wrote:
>> I also played around quite a bit with the precision settings and will
>> put the resulting examples into the Worg FAQ. But I would like to
>> postpone my Worg FAQ update because its link to the manual would be
>> confusing before the manual update itself will have been made.
>
> I added
> http://orgmode.org/worg/org-faq.php#table-high-precision
> and
> http://orgmode.org/worg/org-faq.php#table-float-fraction
Hi Michael,
this is really very useful, I learned a lot from reading these two new
FAQs.
Thank you for your efforts.
- Carsten