From 46d96c7fd8afc09351929f095a1510cc56f088d5 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Tue, 12 Nov 1991 16:11:22 +0000 Subject: [PATCH] Added RESULT-TYPE-FLOAT-CONTAGION. --- compiler/knownfun.lisp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/compiler/knownfun.lisp b/compiler/knownfun.lisp index df58457a6..3fdcbd63f 100644 --- a/compiler/knownfun.lisp +++ b/compiler/knownfun.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/knownfun.lisp,v 1.12 1991/10/08 15:49:28 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/knownfun.lisp,v 1.13 1991/11/12 16:11:22 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -225,6 +225,19 @@ (when cont (continuation-type cont)))) +;;; RESULT-TYPE-FLOAT-CONTAGION -- Interface +;;; +;;; Derive the result type according to the float contagion rules, but +;;; always return a float. This is used for irrational functions that preserve +;;; realness of their arguments. +;;; +(defun result-type-float-contagion (call) + (declare (type combination call)) + (reduce #'numeric-contagion (combination-args call) + :key #'continuation-type + :initial-value (specifier-type 'single-float))) + + ;;; SEQUENCE-RESULT-NTH-ARG -- Internal ;;; ;;; Return a closure usable as a derive-type method for accessing the N'th -- GitLab