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

MathGroup Archive 2010

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

Search the Archive

Re: Using numbers close to to zero in Mathematica version 6

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109044] Re: Using numbers close to to zero in Mathematica version 6
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Sun, 11 Apr 2010 04:33:04 -0400 (EDT)
  • References: <hpmlbn$9uq$1@smc.vnet.net>

On Apr 9, 12:35 am, "Ted Ersek" <ers... at md.metrocast.net> wrote:
> What does Mathematica version 6 give when the following is evaluated?
> Here (x) is 'zero' with 80 digits of accuracy.
>
>  x = SetAccuracy[0, 80];
> { Abs[x] < 10^-900, Positive[x], Negative[x], NonPositive[x],
> NonNegative[x] }//InputForm
>
> {Sign[x], SetPrecision[x, 20], Sign[0], KroneckerDelta[x] }
>
> UnitStep[{0, 0.0, x}]
>
> Unitize[{0, 0.0, x}]
>
> ----------------------
> I have version 7, but not version 6. I am finishing an update to my
> RootSearch package. Knowing what version 6 returns above will help me mak=
e
> one version of this package that is optimized for Mathematica versions 6 =
and
> 7.
>
> Thanks,
>     Ted Ersek



In[1]:= $Version
Out[1]= 6.0 for Microsoft Windows (32-bit) (June 19, 2007)

In[13]:= ClearAll["Global`*"]
x=SetAccuracy[0,80];
{Abs[x]<10^-900,Positive[x],Negative[x],NonPositive[x],NonNegative[x]}//
InputForm


{Sign[x],SetPrecision[x,20],Sign[0],KroneckerDelta[x]}


UnitStep[{0,0.0,x}]

Out[16]= {0,0,0,1}
Out[17]= {1,1,1}
{False, Positive[0``80.], Negative[0``80.], NonPositive[0``80.],
 NonNegative[0``80.]}

==========================
======

In[1]:=
$Version
Out[1]=
"5.2 for Microsoft Windows (June 20, 2005)"

In[6]:=
x = SetAccuracy[0, 80];
InputForm[{Abs[x] < 10^(-900), Positive[x],
   Negative[x], NonPositive[x], NonNegative[x]}]
{Sign[x], SetPrecision[x, 20], Sign[0],
  KroneckerDelta[x]}
UnitStep[{0, 0., x}]
Unitize[{0, 0., x}]
Out[8]=
{0, 0, 0, 1}
Out[9]=
{1, 1, 1}

Out[10]=
Unitize[{0, 0., 0``80.}]
{False, Positive[0``80.], Negative[0``80.],
  NonPositive[0``80.], NonNegative[0``80.]}

--Nasser


  • Prev by Date: Re: Root again
  • Next by Date: Re: if using Mathematica to solve an algebraic problem
  • Previous by thread: Re: Retrieving orphaned code
  • Next by thread: Functional geometric algorithms