3 ms·
> will break naive min/max calculations which start accumulator with +/-inf. Wouldn't the equivalent pattern just be to start at +/- typemax(Posit) or whatever
by improbable22 7y ago
> will break naive min/max calculations which start accumulator with +/-inf.
Wouldn't the equivalent pattern just be to start at +/- typemax(Posit) or whatever? As you would for integers, which lack infinity.
- DubiousPusher 7y agoI think this person is saying that it should break existing code not the pattern. The solution seems simple to me though. Whatever syntax programmers are using to initialize floats to +/-inf, make that ensure to posit min and max as well.