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

posted by mittyri  – Russia, 2019-07-21 00:43 (2181 d 22:42 ago) – Posting: # 20416
Views: 25,102

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,430 posts in 4,931 threads, 1,674 registered users;
43 visitors (0 registered, 43 guests [including 11 identified bots]).
Forum time: 23:25 CEST (Europe/Vienna)

To know that we know what we know,
and to know that we do not know what we do not know,
that is true knowledge.    Nicolaus Copernicus

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