For example, say I am writing a program in C++ that numerically computes the roots of the following equation:
exp(-0.7x) + sin(3x) - 1.2x + 0.3546 = 0
A root-finding routine should be able to compute roots to within the machine epsilon. In C++, this value is specified by the language: DBL_EPSILON. C++ also specifies the smallest and largest values that can be held by a float or double variable.
My first draft is to simply copy over the literal constants from C++:
I am also willing to write small code blocks that could compute these values for each machine on which the program is run. That way, a supercomputer might compute results to a higher accuracy than an old, low-level, PC.
BUT, I don't know if such a routine would actually reach the computer, in which case, I would be wasting my time.