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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top