Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

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[1]:= 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[4]:= FullSimplify[ FourierTransform[x[t,a,b],t,w], And[ 0<a, 0<b,
> Element[w,Reals]] ]
>
> Out[4]=  ((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[5]:= Off[General::ovfl,General::unfl];
>              SlightlyNegative= -$MinNumber/10;
>              VeryNegative= -10*$MaxNumber;
>              BigComplex=($MaxNumber (-0.664-0.747 I))^4;
>             {SlightlyNegative,VeryNegative,BigComplex}
>
> Out[9]=  {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.
>
>
> In[10]:=  {Head[SlightlyNegative], Head[VeryNegative], Head[BigComplex]}
>
> Out[10]=  {Real , Real , Real}
>
    (* Mathematica 8: same result *)
>
>
> In[11]:=  { NumericQ[SlightlyNegative], NumberQ[SlightlyNegative],
>                    NumericQ[VeryNegative], NumberQ[VeryNegative] }
>
> Out[11]= {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[12]:=  {Sign[VeryNegative], Sign[SlightlyNegative], Sign[BigComplex]}
>
> Out[12]=  {1, 1, 1 }
>
    (* Mathematica 8 * )
{1, 0, 1}
>
>
> In[13]:   Map[0<#&, {SlightlyNegative, VeryNegative, BigComplex} ]
>
> Out[13]=  {True, True, True}

    (* Mathematica 8: same result *)

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

>
> In[15]:=  Im[BigComplex]
>
> Out[15]=  0
>
    (* Mathematica 8: same result *)
>
> In[16]:=    VeryNegative + Exp[5.0*^323228465]
>
> Out[16]=   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[16]:= 10^80000<  Exp[1.5*^-323228465]
>
> Out[16]= 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 ?