From: Ted Ersek on 9 Apr 2010 03:35 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 make one version of this package that is optimized for Mathematica versions 6 and 7. Thanks, Ted Ersek
From: Albert Retey on 10 Apr 2010 06:54 Am 09.04.2010 09:35, schrieb Ted Ersek: > 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}] > This is on Windows XP with the 32bit version of Mathematica 6.0.2: In[1]:= x = SetAccuracy[0, 80]; {Abs[x] < 10^-900, Positive[x], Negative[x], NonPositive[x], NonNegative[x]} // InputForm Out[1]//InputForm= {False, Positive[0``80.], Negative[0``80.], NonPositive[0``80.], NonNegative[0``80.]} In[2]:= {Sign[x], SetPrecision[x, 20], Sign[0], KroneckerDelta[x]} Out[2]= {0, 0, 0, 1} In[3]:= UnitStep[{0, 0.0, x}] Out[3]= {1, 1, 1} In[4]:= Unitize[{0, 0.0, x}] Out[4]= {0, 0, 0} hth, albert
|
Pages: 1 Prev: evaluate the floor s to yield a number Next: Plot and advanced filling |