Boost logo

Boost :

From: Matt Borland (matt_at_[hidden])
Date: 2025-01-16 18:16:11


> Has there been given any thought to making decimal32 and it's brethren
> "safe" in the sense that Boost.Safe Numerics types are "safe"? Seems to
> me to be a worthy idea given the types of applications that this
> decimal32 would be meant to support.
>

We have not looked into a safe version, but we follow the normal IEEE 754 convention where overflow, underflow, div by 0, etc. result in +/-INF and NAN. I think (but have no tried) that the decimal types fulfill all of the Safe Numerics conceptual requirements for Numeric<T>, and then could be used with Safe Numerics if that safety is desired.

Matt





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk