Skip to content

Fix typemax and friends for overflow

Compare
Choose a tag to compare
@timholy timholy released this 05 Feb 23:28
· 150 commits to master since this release
avoids integer overflow on left shift (#106)

in several places the conversion machinery uses `1<<f`, which is a
problem for `Fixed{Int64, 63}`, and `Fixed{Int32, 31}` on 32-bit machines.

This changes those to `one(widen1(T))<<f`.

Fixes #104.