I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
get GPL
COST (GBP)
this unit 0.00
sub units 0.00
+
0

Machine Epsilon

viewed 5069 times and licensed 215 times
Returns the round off unit for double precision arithmetic.
Controller: CodeCogs

Interface

C++

Machine Epsilon

 
doublemachine_epsilon )[inline]
The machine epsilon, \inline  \epsilon is defined as the smallest positive number such that \inline 1.0 + \epsilon is not equal to 1.0.

Example 1

#include <codecogs/computing/lowlevel/machine_epsilon.h>
#include <iostream>
#include <iomanip>
int main()
{
  std::cout << "epsilon = ";
  std::cout << std::setprecision(15) << Computing::Lowlevel::machine_epsilon();
  std::cout << std::endl;
  return 0;
}
Output:
epsilon = 2.22044604925031e-016

References

SUBSET, a C++ library of combinatorial routines, http://www.csit.fsu.edu/~burkardt/cpp_src/subset/subset.html

Returns

the round off unit for double precision arithmetic
Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.