comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Puzzle with floating point underflow
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Puzzle with floating point underflow [message #26472 is a reply to message #26334] Thu, 23 August 2001 08:29 Go to previous messageGo to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
What is probably happening here is that the floating point system stored the
result in denormalized form in an attempt to do the best thing it could in
this underflow situation. In denormalized form, the number is shifted right
within the mantissa, while still using the maximum magnitude allowed in the
exponent. This is trading off precision for range, but it is always better
to keep the exponent correct, if possible. Note that the precision
maintained in your example is less than the usual 5 or 6 decimal digits.

"Martin Schultz" <martin.schultz@dkrz.de> wrote in message
news:ylwwv3v1bdw.fsf@faxaelven.dkrz.de...
>
> Hi all,
>
>
> How can a float number be something e-42 if the system says it can only
> represent numbers down to 1.e-38 in a float????????
>
> test= 8.1047657d-42
> IDL> tmp=float(test)
> % Program caused arithmetic error: Floating underflow
> % Detected at MGS_RGRID::REGRID 203
/pf/m/m218003/home/IDL/lib/mgs_newobjects
> /mgs_rgrid__define.pro
> IDL> help,tmp
> TMP FLOAT = 8.10511e-42
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fortran + IDL
Next Topic: Reading a very large ascii data file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 00:01:51 PDT 2025

Total time taken to generate the page: 0.00979 seconds