3 ms·
> There is no `f32::checked_add` You don't need it. You get +- inf on overflow and can decide what to do then. It's also not hard to pre-check before ops if th
by SideQuark 2y ago
> There is no `f32::checked_add`
You don't need it. You get +- inf on overflow and can decide what to do then. It's also not hard to pre-check before ops if they will succeed if you want to pay the price (same as integers, or any language libs that do the same). In general these ops are expensive and rarely needed.
Making a checked math lib is not terribly hard.