Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

wrong value for pi?



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



Messages sorted by: Reverse Date, Date, Thread, Author