17 Apr 2012 16:51
type of SB-EXT infinities
Tamas K Papp <tkpapp <at> gmail.com>
2012-04-17 14:51:51 GMT
2012-04-17 14:51:51 GMT
Sorry if this is a stupid question, but why is (typep sb-ext:double-float-positive-infinity 'double-float) true? DOUBLE-FLOAT is a subtype of FLOAT, and the spec says that "A float is a mathematical rational (but not a Common Lisp rational) of the form s*f*b^e-p, where s is +1 or -1, the sign" Clearly infinity isn't. This makes harmless-looking code like (typecase f (float (decode-float f))) when f is an IEEE infinity. Don't get me wrong, I am happy that SBCL has IEEE infinities, but if I read the standard correctly they can't be a subtype of float. (The issue came up because I am working on a compatibility library that would allow portable treatment if infinities.) Best, Tamas ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second(Continue reading)
RSS Feed