From 1086499080b031f34a219a0d45b6ce6ab2f51475 Mon Sep 17 00:00:00 2001 From: toy <toy> Date: Wed, 23 Apr 2003 20:05:05 +0000 Subject: [PATCH] Describe the return types of decode-float, decode-single-float, and decode-double-float more accurately. (Do we need defoptimizers for these? Might be useful to get at least the exponent range accurately.) --- compiler/float-tran.lisp | 10 +++++++--- compiler/fndb.lisp | 7 +++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/compiler/float-tran.lisp b/compiler/float-tran.lisp index 77a2b1ad0..64ddee487 100644 --- a/compiler/float-tran.lisp +++ b/compiler/float-tran.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.87 2002/03/14 21:30:51 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.88 2003/04/23 20:05:05 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -275,11 +275,15 @@ `(integer 0 (,(ash 1 vm:double-float-digits)))) (defknown decode-single-float (single-float) - (values single-float single-float-exponent (single-float -1f0 1f0)) + (values (single-float 0.5f0 (1f0)) + single-float-exponent + (member -1f0 1f0)) (movable foldable flushable)) (defknown decode-double-float (double-float) - (values double-float double-float-exponent (double-float -1d0 1d0)) + (values (double-float 0.5d0 (1d0)) + double-float-exponent + (member -1d0 1d0)) (movable foldable flushable)) (defknown integer-decode-single-float (single-float) diff --git a/compiler/fndb.lisp b/compiler/fndb.lisp index bf0d02f19..06385e5ce 100644 --- a/compiler/fndb.lisp +++ b/compiler/fndb.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/fndb.lisp,v 1.110 2003/04/23 18:08:49 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/fndb.lisp,v 1.111 2003/04/23 20:05:05 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -301,7 +301,10 @@ (real &optional real) (values float real) (movable foldable flushable explicit-check)) -(defknown decode-float (float) (values float float-exponent float) +(defknown decode-float (float) + (values (float 0.5d0 (1d0)) + float-exponent + (member 1f0 -1f0 -1d0 1d0)) (movable foldable flushable explicit-check)) (defknown scale-float (float float-exponent) float (movable foldable flushable explicit-check)) -- GitLab