[Info-vax] Floating Point (was: Re: DCL's flaws (both scripting and UI))
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Sat Jan 31 14:05:03 EST 2015
On 2015-01-31 18:42:41 +0000, John Reagan said:
> Ada has T'MODEL_EPSILON, Pascal has EPSREAL, Fortran has EPSILON() to
> help you in this area. It isn't the same as "almost equal", but you
> can do something like
>
> ABS(A-B) <= EPSILON
>
> or such.
The C float.h include file contains the epsilon values (FLT_EPSILON,
DBL_EPSILON, LDBL_EPSILON), and C++ at least as far back as C++98 has
std::numeric_limits<T>::epsilon().
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list