[Info-vax] Floating Point, Machine Epsilon, Rust, Swift, Etc (was: Re: VMS Software Q1 '23 Update)
Dan Cross
cross at spitfire.i.gajendra.net
Thu Feb 2 17:44:51 EST 2023
In article <tre863$ecn5$1 at dont-email.me>,
Arne Vajhøj <arne at vajhoej.dk> wrote:
>On 2/1/2023 11:52 AM, Stephen Hoffman wrote:
>> Swift has a deliberately-obscurely-named equivalent to machine epsilon,
>> as do some other languages.
>
>The reality is that a relevant epsilon for floating point comparison
>depends on the context.
>
>When I am exposed to the problem then it is typical regarding
>testing for convergence of iterative algorithms. Is Xt
>the same as Xt-1.
>
>And the right epsilon depends on the scale of the data.
I interpreted Stephen Hoffman's mention of epsilon as
referring to the constant (e.g., in IEEE754 floating
point). This is well defined for each representation.
https://en.wikipedia.org/wiki/Machine_epsilon
- Dan C.
More information about the Info-vax
mailing list