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

posted by mittyri – Russia, 2019-07-20 22:43  – Posting: # 20416
Views: 1,098

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:

Activity
 Mix view
Bioequivalence and Bioavailability Forum |  Admin contact
19,892 posts in 4,215 threads, 1,364 registered users;
online 7 (0 registered, 7 guests [including 7 identified bots]).
Forum time (Europe/Vienna): 23:38 CEST

I have no opinion about ‘incurred samples’ –
an expression which has no easily understandable
meaning for me in the English language.    Nick Holford

The BIOEQUIVALENCE / BIOAVAILABILITY FORUM is hosted by
BEBAC Ing. Helmut Schütz
HTML5