Is there an interval arithmetic library in D? I couldn’t find one.

In case I had to write my own, I understand that the IEEE standard floating point arithmetic provides operations for rounding up or down certain operations like summing, subtracting, etc. (thus overriding the default behavior of rounding to nearest representable).

How do I access this functionality in D? At first I thought that std.math.nextDown and nextUp is what I needed, but not so. Apparently these functions return the previous or next representable *after* the calculation has been done.

For example, I would like the value of x+y rounded in the arithmetic towards -\infty, which may or may not be nextDown(x+y).

Any luck?
Thanks for reading!

Reply via email to