MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

How to ensure ( Overflow[] -> Indeterminate )

  • To: mathgroup at
  • Subject: [mg114705] How to ensure ( Overflow[] -> Indeterminate )
  • From: "Ted Ersek" <ersekt at>
  • Date: Mon, 13 Dec 2010 03:54:41 -0500 (EST)

Recall the thread:  "Are these bugs fixed in Mathematica 8 ?" 
found at

There we discussed cases where some (many?) functions in  Mathematica 8 
treat any Overflow as a positive real number.   Fortunately one rarely gets an 
overflow in Mathematica because $MaxNumber is a very large value. 
However, if you ever do get an Overflow you can't have faith in any
computation that 
makes use of your Overflow[]. 

Until Mathematica can work with an overflow reliably we are better of using
the following.

In[1]:= Off[General::ovfl];

Well at first that seems to work for me using 
    $Version  =  "7.0 for Microsoft Windows (32-bit) (January 30, 2009)."

In[4]:=  0 <  3-Overflow[]

Out[4]=  0 < Indeterminate

In[5]:= Element[ 3-Overflow[],Reals ]

Out[5]=  Element[ Indeterminate, Reals ]

Bu wait it only works in simple cases. Consider the next two examples.

In[6]:= 0<3-4*$MaxNumber

Out[6]= True

In[7]:= Element[($MaxNumber (-0.664-0.747 I))^4,Reals]

Out[7]= True 

Does anyone know how we can ensure an Overflow[] is always converted to

-- Ted Ersek --

  • Prev by Date: Re: Silly Problem/Resolution
  • Next by Date: How to create a notebook outside of Mathematica?
  • Previous by thread: Getting the code of a glyph
  • Next by thread: How to create a notebook outside of Mathematica?