>>I want to subtract 4e-12 from 10.

That's *way* below the numeric resolution your PC can handle, the minimum is described as 'numeric_limits::epsilon

()', e.g.

#include <iostream>

#include <limits>

using namespace std;

cout << "The epsilon for double is " <<

numeric_limits<double>::epsilon() << endl;

That's *way* below the numeric resolution your PC can handle, the minimum is described as 'numeric_limits::epsilon

()', e.g.

#include <iostream>

#include <limits>

using namespace std;

cout << "The epsilon for double is " <<

numeric_limits<double>::ep