Activity log for bug #308940

Date Who What changed Old value New value Message
2008-12-17 12:21:59 Nikodemus Siivola bug added bug
2008-12-17 12:22:35 Nikodemus Siivola sbcl: status New Confirmed
2008-12-17 12:22:35 Nikodemus Siivola sbcl: importance Undecided Medium
2008-12-17 12:22:35 Nikodemus Siivola sbcl: statusexplanation
2008-12-17 12:47:24 Nikodemus Siivola sbcl: importance Medium Low
2008-12-17 19:27:36 Nikodemus Siivola description (reported by Ariel Badichi on sbcl-devel 2007-01-09) 407a: In sbcl-1.0.1 on Linux x86, (defun foo () (loop for n from (expt 2 1024) do (handler-case (coerce n 'single-float) (simple-type-error () (format t "Got here.~%") (return-from foo))))) (foo) causes an infinite loop, where handling the error would be expected. 407b: In sbcl-1.0.1 on Linux x86, (defun bar () (loop for n from (expt 2 1024) do (handler-case (format t "~E~%" (coerce n 'single-float)) (simple-type-error () (format t "Got here.~%") (return-from bar))))) fails to compile, with Too large to be represented as a SINGLE-FLOAT: ... from 0: ((LABELS SB-BIGNUM::CHECK-EXPONENT) ...) 1: ((LABELS SB-BIGNUM::FLOAT-FROM-BITS) ...) 2: (SB-KERNEL:%SINGLE-FLOAT ...) 3: (SB-C::BOUND-FUNC ...) 4: (SB-C::%SINGLE-FLOAT-DERIVE-TYPE-AUX ...) These are now fixed, but (COERCE HUGE 'SINGLE-FLOAT) still signals a type-error at runtime. The question is, should it instead signal a floating-point overflow, or return an infinity? (reported by Ariel Badichi on sbcl-devel 2007-01-09) 407a: In sbcl-1.0.1 on Linux x86, (defun foo () (loop for n from (expt 2 1024) do (handler-case (coerce n 'single-float) (simple-type-error () (format t "Got here.~%") (return-from foo))))) (foo) causes an infinite loop, where handling the error would be expected. 407b: In sbcl-1.0.1 on Linux x86, (defun bar () (loop for n from (expt 2 1024) do (handler-case (format t "~E~%" (coerce n 'single-float)) (simple-type-error () (format t "Got here.~%") (return-from bar))))) fails to compile, with Too large to be represented as a SINGLE-FLOAT: ... from 0: ((LABELS SB-BIGNUM::CHECK-EXPONENT) ...) 1: ((LABELS SB-BIGNUM::FLOAT-FROM-BITS) ...) 2: (SB-KERNEL:%SINGLE-FLOAT ...) 3: (SB-C::BOUND-FUNC ...) 4: (SB-C::%SINGLE-FLOAT-DERIVE-TYPE-AUX ...) These are now fixed, but (COERCE HUGE 'SINGLE-FLOAT) still signals a type-error at runtime. The question is, should it instead signal a floating-point overflow, or return an infinity? See also #309070.
2008-12-17 19:27:49 Nikodemus Siivola description (reported by Ariel Badichi on sbcl-devel 2007-01-09) 407a: In sbcl-1.0.1 on Linux x86, (defun foo () (loop for n from (expt 2 1024) do (handler-case (coerce n 'single-float) (simple-type-error () (format t "Got here.~%") (return-from foo))))) (foo) causes an infinite loop, where handling the error would be expected. 407b: In sbcl-1.0.1 on Linux x86, (defun bar () (loop for n from (expt 2 1024) do (handler-case (format t "~E~%" (coerce n 'single-float)) (simple-type-error () (format t "Got here.~%") (return-from bar))))) fails to compile, with Too large to be represented as a SINGLE-FLOAT: ... from 0: ((LABELS SB-BIGNUM::CHECK-EXPONENT) ...) 1: ((LABELS SB-BIGNUM::FLOAT-FROM-BITS) ...) 2: (SB-KERNEL:%SINGLE-FLOAT ...) 3: (SB-C::BOUND-FUNC ...) 4: (SB-C::%SINGLE-FLOAT-DERIVE-TYPE-AUX ...) These are now fixed, but (COERCE HUGE 'SINGLE-FLOAT) still signals a type-error at runtime. The question is, should it instead signal a floating-point overflow, or return an infinity? See also #309070. (reported by Ariel Badichi on sbcl-devel 2007-01-09) 407a: In sbcl-1.0.1 on Linux x86, (defun foo () (loop for n from (expt 2 1024) do (handler-case (coerce n 'single-float) (simple-type-error () (format t "Got here.~%") (return-from foo))))) (foo) causes an infinite loop, where handling the error would be expected. 407b: In sbcl-1.0.1 on Linux x86, (defun bar () (loop for n from (expt 2 1024) do (handler-case (format t "~E~%" (coerce n 'single-float)) (simple-type-error () (format t "Got here.~%") (return-from bar))))) fails to compile, with Too large to be represented as a SINGLE-FLOAT: ... from 0: ((LABELS SB-BIGNUM::CHECK-EXPONENT) ...) 1: ((LABELS SB-BIGNUM::FLOAT-FROM-BITS) ...) 2: (SB-KERNEL:%SINGLE-FLOAT ...) 3: (SB-C::BOUND-FUNC ...) 4: (SB-C::%SINGLE-FLOAT-DERIVE-TYPE-AUX ...) These are now fixed, but (COERCE HUGE 'SINGLE-FLOAT) still signals a type-error at runtime. The question is, should it instead signal a floating-point overflow, or return an infinity? See also bug #309070.