Usage of double.epsilon

  • Thread starter Thread starter Schizoid Man
  • Start date Start date
S

Schizoid Man

Hi,

I am trying to perform a series of high-precision calculations and am trying
to use double.epsilon (rather Math.Sqprt(double.epsilon)) as an error
tolerance check.

However, this check fails every time. Is it no possible for me to use this
value when calculating, for example, a forward difference?

Thanks,
Schiz
 
Hi,

I am trying to perform a series of high-precision calculations and am trying
to use double.epsilon (rather Math.Sqprt(double.epsilon)) as an error
tolerance check.

However, this check fails every time. Is it no possible for me to use this
value when calculating, for example, a forward difference?

Thanks,
Schiz

Yes, you can not use this values, because it represents least
sensitive bits in double calculations, it means that this is not a
precise, so when fall down to comparison, you will get always false
results, because all operations on that value going to loose las
significant bits on value, so result is always be false on any
arithmetic operation (you cannot use arithmetic operation on a value,
technically equals to 0 because of limitation of stored value bits
equals to 32, 48, 56, or 64) You can use 128 or more bit values in
calculations, if you use SIMD extensions as an MMX/XMM/SSE/SSE2/SSE3.
Currently, there is no direct support of these data types in .NET
(except .NET C++ inline assembly extensions)
 
Schizoid said:
Hi,

I am trying to perform a series of high-precision calculations and am
trying to use double.epsilon (rather Math.Sqprt(double.epsilon)) as an
error tolerance check.

However, this check fails every time. Is it no possible for me to use
this value when calculating, for example, a forward difference?

Since double.epsilon is defined as the smallest non-zero magnitude that can be
represented, the diffference between it and any other value can never be less
than itself except by being zero (by definition). So it is totally unsuitable
for checking tolerance as you propose to use it.

Do you really need greater than 64 bit precision? If so, you will need a good
general multi-precision emulation package or maybe extended (128-bit) floating
point would do.

But if this is coming from engineering rather than theoretical math, probably
you should just consult a text on numerical analysis for standard convergence
checking techniques.

-rick-
 
Back
Top