[FEATURES] Interval Constants #1198
jtlap
started this conversation in
Done & Done!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
floating constants as pi are never exact, and their representation are chosen to be the nearest representable floating point value to the intended mathematical constant.
This means that depending of the constant and/or the precision, the IEE754 typed value can be greater or less than the exact value.
In particular the constant representing pi is greater/less than the mathematical value according to the type float/double of representation.
I propose that for each eve floating object constant can use two decorators downward and upward than return a value such that (if c is the eve object constant of type T and mc the mathematical intended value) downward(c)<=mc<=upward(c) will always be true.
Of course one of these two values is c.
One use case is for defining function on open or closed bounded intervals without putting the foot in the wrong place.
Beta Was this translation helpful? Give feedback.
All reactions