7 ms·
True for IEE754 floating point operations, which are constrained to valid bit patterns. An operation on an invalid pattern - can happen with uninitialised memor
by TheOtherHobbes 9d ago
True for IEE754 floating point operations, which are constrained to valid bit patterns. An operation on an invalid pattern - can happen with uninitialised memory - throws an exception.
Otherwise, no.
- uecker 9d agoThis is still not type checking, it accepts whenever the bit pattern is a valid for floating point even when it originally was used as another type.
- Dylan16807 9d agoWhat do you mean by invalid patterns? Signalling NaNs? I wouldn't really call those invalid, but also that's only about one in a thousand bit patterns. If it kicks in less than 1% of the time it's not really "type checking".