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

Home » Public Forums » archive » Re: Floating Underflow/Overflow
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: Floating Underflow/Overflow [message #27247 is a reply to message #27246] Mon, 15 October 2001 07:54 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
bente@uni-wuppertal.de (Kay) writes:

> Hi,
>
> i get Floating Overflow/Underflow error messages during my
> calculations, but the result seems to be correct, can these warnings
> be ignored then?
> I�m calculating a Fermi Distribution (I want a sphere with smooth
> edges and this seemed to be the easiest way) I think, that the results
> get to low for larger radiuses so IDL makes this error message. Is it
> possible to tell IDL to round to zero then or what do i have to do?

Hi Kay--

In all likelihood you can ignore the over- and underflows. You can
use !EXCEPT = 2 to find out where in your program the exceptions are
being created. You can also turn off exceptions using !EXCEPT if that
is crucial.

While I have argued in the past that most people don't need underflow
errors, and that they should be silent, other folks on the newsgroup
have argued that we should strive to avoid them, so such errors should
be printed. Leaving the question of right vs. wrong on error messages
aside for the moment, I indeed think it is important to avoid over and
underflows.

My guess is that you are getting both when you use EXP() in the Fermi
distribution. To avoid this you can use some simple techniques. One
idea is to use thresholding to keep all values in-bounds, like this,
EXP((X) > (-1e-38) < 1e38). That is not really satisfactory though
because sometimes you *want* the effect of an underflow. That is
perhaps best solved using the WHERE() command to locate extremal
values and treat them specially.

Good luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: INTERPOLATE note
Next Topic: Re: bug in contour?

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

Current Time: Fri Oct 10 12:48:09 PDT 2025

Total time taken to generate the page: 1.43708 seconds