MathGroup Archive 1997

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

Search the Archive

Re: Precision in own functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7838] Re: [mg7746] Precision in own functions
  • From: David Withoff <withoff>
  • Date: Mon, 14 Jul 1997 03:01:19 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

> Dear all,
> 
> I wrote a numerical funktion on Mathematika 2.2 and want to evaluate it with
>  a higher precision then 16. Trying with SetPrecision and SetAccuracy made
>  no better results (even not longer results i.e with more digits as it happens
>  when you applie SetPrecision) 
> Searching the error I found out that
>  if you subtrackt two equal numbers with High Precision 
>  say  N[1/3,40]-N[3/9,40] Mathematika gives 0. 10^-41 with a precision of 0.  
> 
> Is there a possibility to avoid this? For my intresst an exact 0 or 0 with 
> the desired precision (40 in the example) would do it.
>  
> Yves Drexlmeier
> drexl at mathematik.uni-kl.de

Subtracting N[1/3, 40] from itself gives a result with no significant
digits, so the precision (the number of significant digits) will be zero.
The precision of zero is always zero, since zero never has any significant
digits.  You can artificially raise the accuracy (the number of known
digits to the right of the decimal point) of zero using SetAccuracy, but
there is no mathematical justification for doing so in this example.  If
you want to get some result other than the result that you get by default,
then perhaps the first question to ask is whether or not such a result
is mathematically meaningful.

Dave Withoff
Wolfram Research


  • Prev by Date: Re: multiple ListPlot3D help required
  • Next by Date: Re: C f-format-like output in Mma
  • Previous by thread: Precision in own functions
  • Next by thread: 2d-interpolation on non-equidistant data grid ?