       Re: Are these bugs fixed in Mathematica 8 ?

• To: mathgroup at smc.vnet.net
• Subject: [mg114571] Re: Are these bugs fixed in Mathematica 8 ?
• From: Murray Eisenberg <murray at math.umass.edu>
• Date: Wed, 8 Dec 2010 06:40:48 -0500 (EST)

```Mathematica 8.0.0 results shown below.

On 12/7/2010 6:47 AM, Ted Ersek wrote:
>
> Below are some bugs in Mathematica 7 that I reported to Wolfram Research
> tech-support,
> and I was wondering if they are fixed in version 8.
> ----------------------------------------------------
>
> In:= SetOptions[ FourierTransform, FourierParameters->{1,1} ];
>          x[t_,a_,b_] :=
> ((t+a/2)*UnitStep[t+a/2]-(t-a/2)*UnitStep[t-a/2])*b/(2*a);
>          Plot[ x[t,20,24], {t,-12,12} ]
>
>         (* Graphic not shown *)
>
>
> In:= FullSimplify[ FourierTransform[x[t,a,b],t,w], And[ 0<a, 0<b,
> Element[w,Reals]] ]
>
> Out=  ((I/2)*b*E^((I/2)*a*w))/w

(* Mathematica 8 *)
(b*Pi*DiracDelta[w])/2 + (I*b*Sin[(a*w)/2])/(a*w^2)

>
>
> It seems to me the previous result should be
>        2*I*b/(a*w^2)*Sin[a*w/2]+ Pi*b*DiracDelta[w]
>
> Notice the above setting for FourierParameters.
>
> (* -------------------------------------------------- *)
>
> In:= Off[General::ovfl,General::unfl];
>              SlightlyNegative= -\$MinNumber/10;
>              VeryNegative= -10*\$MaxNumber;
>              BigComplex=(\$MaxNumber (-0.664-0.747 I))^4;
>             {SlightlyNegative,VeryNegative,BigComplex}
>
> Out=  {Underflow[], Overflow[], Overflow[]}
>
>
> I agree that the results above lead to underflow and overflow.
> However, I was surprised by the result of the next two cells.
> Although the next two output cells are mostly by design since the
> documentation for Overflow says
> "Overflow[] is considered a Real number."  The documentation for Underflow
> is similar.
>
>
>
> Out=  {Real , Real , Real}
>
(* Mathematica 8: same result *)
>
>
> In:=  { NumericQ[SlightlyNegative], NumberQ[SlightlyNegative],
>                    NumericQ[VeryNegative], NumberQ[VeryNegative] }
>
> Out= {True, True, True, True}

(* Mathematica 8: same result *)

>
> Mathematica 7 represents any overflow as Overflow[], and any underflow as
> Underflow[].
> As a result any information on the sign[_], and Arg[_] of such a results are
> lost.
> The documentation doesn't mention that some built-in functions consider any
> overflow
> or underflow a positive real number :-(
> This leads to incorrect results below.
>
>
> In:=  {Sign[VeryNegative], Sign[SlightlyNegative], Sign[BigComplex]}
>
> Out=  {1, 1, 1 }
>
(* Mathematica 8 * )
{1, 0, 1}
>
>
> In:   Map[0<#&, {SlightlyNegative, VeryNegative, BigComplex} ]
>
> Out=  {True, True, True}

(* Mathematica 8: same result *)

>
> In:=  Element[BigComplex, Reals]
>
> Out=  True
>
(* Mathematica 8: same result *)

>
> In:=  Im[BigComplex]
>
> Out=  0
>
(* Mathematica 8: same result *)
>
> In:=    VeryNegative + Exp[5.0*^323228465]
>
> Out=   Overflow[]
>

(* Mathematica 8: same result *)

>
> In the previous line we are computing  Overflow[] + Overflow[].
> Even if Mathematica would keep track of the sign of an overflow, it would
> not
> know which has larger magnitude, so the result should be Indeterminate.
>
>
> The next result is most outrageous because Exp[1.5*^-323228465] is very
> close to 1.
>
>
> In:= 10^80000<  Exp[1.5*^-323228465]
>
> Out= True

(* Mathematica 8: same result *)

Note also:

Exp[1.5*^-323228465]
Overflow[]

--
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

```

• Prev by Date: Re: Foo /: Plus[b_Foo] := b
• Next by Date: Re: paclet type documentation / cpu usage w. Help Browser
• Previous by thread: Are these bugs fixed in Mathematica 8 ?
• Next by thread: Re: Are these bugs fixed in Mathematica 8 ?