Re: better atan function? (sheepishly " ... nevermind ...") [message #20313] |
Thu, 01 June 2000 00:00 |
R
Messages: 4 Registered: May 2000
|
Junior Member |
|
|
<bjackel@phys.ucalgary.ca> wrote in message
news:3935EEC5.135226B2@phys.ucalgary.ca...
> Hi Bob
> (...snip...)
> What made you suspect problems with atan?
>
>
> Brian
Firstly, thanks for the response.
Secondly, ARGH!
I had a "float()" cast buried deep in an "argument()" function
that was lopping off my precision. To quote the immortal bard "Do'h".
There is nothing like posting a question to the entire world to make you
discover an obvious and stupid error in your code.
This error was hidden by the fact that you can do the following in IDL.
IDL> print,double(5.12345679)/double(5.12345678),format='(f40.30) '
1.000000000000000000000000000000
where, the numbers are "read in" as single precision and then
cast to double precision. I misread this as performing the action
on two double precision numbers. One should do the following:
IDL> print,(5.12345679d)/(5.12345678d),format='(f40.30)'
1.000000001951807200000000000000
Liam, thanks for the link.
Cheers,
bob the currently sober
PS Have you checked out www.Napster.com? Wow eh? You can
meaningfully use the term "terrabytes of fun".
|
|
|