floating-point math is always more complex than you think it is [Software]

posted by mittyri – Russia, 2019-07-21 00:43 (1971 d 12:05 ago) – Posting: # 20416
Views: 22,536

Hi ElMaestro,

Match(6, 6.001, 0.01)


❝ Ugly as hell :vomit:, and will not work well if you get into extreme binary representations.


take a look at
if (Abs(x - y) <= absTol * Max(1.0f, Abs(x), Abs(y)))
the description is here

One may consider ULP, pros and cons described here

Kind regards,
Mittyri

Complete thread:

UA Flag
Activity
 Admin contact
23,336 posts in 4,902 threads, 1,666 registered users;
56 visitors (1 registered, 55 guests [including 5 identified bots]).
Forum time: 11:48 CET (Europe/Vienna)

Biostatistician. One who has neither the intellect for mathematics
nor the commitment for medicine but likes to dabble in both.    Stephen Senn

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5