Skip to content
Snippets Groups Projects
Commit 1a01f811 authored by dtc's avatar dtc
Browse files

Mask the invalid FP exception when evaluating the member/member case

in two-arg-derive-typ, returning a type specify of the type of the
NaN; was having trouble (/ (the (member 0.0)) (the (member 0.0))).
parent cea76a8f
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/srctran.lisp,v 1.69 1998/01/05 05:54:58 dtc Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/srctran.lisp,v 1.70 1998/01/05 18:48:42 dtc Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -1048,10 +1048,17 @@ ...@@ -1048,10 +1048,17 @@
(let* ((x (first (member-type-members x))) (let* ((x (first (member-type-members x)))
(y (first (member-type-members y))) (y (first (member-type-members y)))
(result (with-float-traps-masked (result (with-float-traps-masked
(:underflow :overflow :divide-by-zero) (:underflow :overflow :divide-by-zero
:invalid)
(funcall fcn x y)))) (funcall fcn x y))))
(if result (cond ((null result))
(specifier-type `(member ,result))))) ((float-nan-p result)
(make-numeric-type
:class 'float
:format (type-of result)
:complexp :real))
(t
(specifier-type `(member ,result))))))
((and (member-type-p x) (numeric-type-p y)) ((and (member-type-p x) (numeric-type-p y))
(let* ((x (convert-member-type x)) (let* ((x (convert-member-type x))
(y (if convert-type (convert-numeric-type y) y)) (y (if convert-type (convert-numeric-type y) y))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment