Machine Epsilon
viewed 4942 times and licensed 171 times
Returns the round off unit for double precision arithmetic.
Controller:
CodeCogs
Interface
#include <codecogs/computing/lowlevel/machine_epsilon.h>
using namespace Computing::Lowlevel;
| double | machine_epsilon ()[inline]
Returns the round off unit for double precision arithmetic. |
Use the following HTML code to embed the calculators within other websites:
| Name | HTML Code |
|---|
machine_epsilon
Returns the round off unit for double precision arithmetic. | |
Machine Epsilon
The machine epsilon,

is defined as the smallest positive number such that

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.
You must login to leave a messge