       How to ensure ( Overflow[] -> Indeterminate )

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

```Recall the thread:  "Are these bugs fixed in Mathematica 8 ?"
found at http://forums.wolfram.com/mathgroup/archive/2010/Dec/msg00260.html

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

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

In:= Off[General::ovfl];
Unprotect[Overflow];
Overflow[]=Indeterminate;

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

In:=  0 <  3-Overflow[]

Out=  0 < Indeterminate

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

Out=  Element[ Indeterminate, Reals ]

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

In:= 0<3-4*\$MaxNumber

Out= True

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

Out= True

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

-- 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?