zsh-workers
 help / color / mirror / code / Atom feed
* wrong value for pi?
@ 2008-07-30 12:54 Julius Plenz
  2008-07-30 13:13 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Julius Plenz @ 2008-07-30 12:54 UTC (permalink / raw)
  To: zsh-workers

Hi!

Playing around, I noticed that Z-Shell wrongly evaluates the
expression "4.0*atan(1)" (which is equal to pi):

    zsh> zmodload zsh/mathfunc
    zsh> typeset -F 48 pi='4.0*atan(1)'
    zsh> echo $pi
    3.141592653589793115997963468544185161590576171875
                     ^- here the first error occurs

Is this indended, a bug or just owing to some sort of optimization or some C
library's shortcomings?

Julius


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-02  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-30 12:54 wrong value for pi? Julius Plenz
2008-07-30 13:13 ` Peter Stephenson
2008-08-02  0:54   ` Vincent Lefevre

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).