Returning the machine epsilon

  • Thread starter Thread starter mao
  • Start date Start date
M

mao

Hello all,

Does anyone knows how to return the machine epsilon using C# or .NET in
general ?

In C++ it's numeric_limits<double>::epsilon() ;

what about the C# equivalent?

Thanks,
Mao
 
mao said:
Does anyone knows how to return the machine epsilon using C# or .NET in
general ?

I believe Double.Epsilon is close to what you're after - but that's not
the *machine* epsilon, it's the epsilon for the double type. Will that
do?
 
Mao,
In addition to Double.Epsilon, there is Single.Epsilon for single precision
floating point numbers.

Hope this helps
Jay
 
Back
Top