MathGroup Archive 2001

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

Search the Archive

MathSource Package Corrected

  • To: mathgroup at
  • Subject: [mg26664] MathSource Package Corrected
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Wed, 17 Jan 2001 00:47:18 -0500 (EST)
  • Sender: owner-wri-mathgroup at

> In october 2000 I posted a package on MathSourec that allows one to easily
> enable and disable the behavior provided by the RealOnly package. I called
> the package SwitchableRealOnly and posted it at 
> Besides allowing one to enable or disable the RealOnly behavior I tried to
> correct a problem explained in the comments of the original RealOnly
> package.  Once the original RealOnly package is loaded Roots and Solve
> will indicate that 
( x^3+6x^2-9*0 ) 
> has non-real roots but the three roots are actually real. After loading my
> earlier version of SwitchableRealOnly on my PC, Solve and Roots don't
> indicate that the roots in the above case are non-real.  However, I
> recently learend that after installing the package on a Mac, Solve and
> Roots would indicate the roots are non-real. It turns out the problem is
> due to the way I tried to decide if a root is probably real. In my first
> version of the package I used (N[Im[#]]==0 &) to determine if a root is
> probably real. However that uses machine precesion arithmatic and the
> results are different on various platforms, and is certainly not full
> proof on any computer. I posted an improved version which avoids machine
> precision arithmatic by using (Im[#]==0 &) to determine if a number is
> probably real. 
> The improved package can be down loaded from

Ted Ersek

Down load Mathematica tips, tricks from

  • Prev by Date: Re: Name of a list
  • Next by Date: Re: Partial Differential Equation
  • Previous by thread: Re: Q: How change font in legend?
  • Next by thread: Palette to Highlight and Substitute Same Subexpressions?