Skip to content

Intfinity

Tim Luchterhand requested to merge intfinity into main

integer type that supports infinity and nan. @ehebrard You can try it out if you have the time. In most cases you can plug and play directly. In some others you might have to add some explicit casts. I made some speed test. It uses exactly the same amount of memory as an ordinary integer type and has the same alignment and POD layout. So using it in vectors etc should be exactly as fast as normal integers. Comparisons should also more or less just as fast. Arithmetic operations however are slower (due to a lot of checks to guarantee the type invariants).

Merge request reports