LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
aparsloe <[log in to unmask]>
Mon, 26 May 2014 20:36:49 +1200
text/plain (25 lines)
For a fraction,

\fp_eval:n { 1/9000000000000000 } -> 0.0000000000000001111111111111111

displays the 16 significant digits after a long run of zeros. In that 
spirit I find it disconcerting that for  sin(pi)

\fp_eval:n { sin(pi)  } -> 0.0000000000000002384626433832795

as if the 16 nonzero digits after the run of zeros are the significant 
ones. They are actually the 16 significant figures of \fp_eval:n {sin(pi 
- 0.0000000000000001)}, and "noise" as far as sin(pi) is concerned. For 

\fp_eval:n { cos(pi/2)  } -> 0.0000000000000006192313216916398

The 16 apparently significant figures are those from \fp_eval:n { 
cos(pi/2 - .0000000000000001) }

Rounding the cosine to 16 figures gives a 6 in the last place, which 
seems large to me. Perhaps sin and cos and their fellows should be given 
the exact value 0  at the appropriate multiples of pi/2?

Andrew Parsloe