[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sin() function in IDL 4.0.1

In article <311F6435.143A@eso.org>, Miska Le Louarn  <lelouarn@eso.org> wrote:
>I just found an interesting behaviour of the sine function:
>when I ask IDL (4.0.1) to calculate sin(pi) here is what I get:
>IDL> print,sin(!Dpi) 
>   1.2246064e-16             ; This should be 0.0000... (?)

If you want to see something even more interesting, try this...

IDL> plot,sin(dindgen(1000)*!Dpi)

or even worse...

IDL> plot,sin(dindgen(1000)*1e20*!Dpi)

This is quite troublesome.