From: Stephen Adams Date: Sat, 4 Nov 1995 16:57:43 +0000 (+0000) Subject: Added FLO: replacements for CIELING, FLOOR, ROUND and TRUNCATE. X-Git-Tag: 20090517-FFI~5763 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6c1a379b478a4b4e4c450537142856cecfd3eaec;p=mit-scheme.git Added FLO: replacements for CIELING, FLOOR, ROUND and TRUNCATE. --- diff --git a/v8/src/compiler/midend/typerew.scm b/v8/src/compiler/midend/typerew.scm index d9b2f6b5f..3ab848f36 100644 --- a/v8/src/compiler/midend/typerew.scm +++ b/v8/src/compiler/midend/typerew.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: typerew.scm,v 1.8 1995/11/04 04:38:39 adams Exp $ +$Id: typerew.scm,v 1.9 1995/11/04 16:57:43 adams Exp $ Copyright (c) 1994-1995 Massachusetts Institute of Technology @@ -1264,6 +1264,20 @@ MIT in each case. |# (def 'ROUND->EXACT FLO:ROUND->EXACT) (def 'TRUNCATE->EXACT FLO:TRUNCATE->EXACT)) +(let () + (define (def op flo:op) + (define-typerew-unary-variants-type-method op + type:number type:real effect:none + type:flonum type:flonum + type:exact-number type:exact-real) + (define-typerew-unary-variants-replacement-method op + type:flonum type:flonum FLO:op)) + (def 'CEILING FLO:CEILING) + (def 'FLOOR FLO:FLOOR) + (def 'ROUND FLO:ROUND) + (def 'TRUNCATE FLO:TRUNCATE)) + + (define-typerew-unary-variants-type-method 'COS type:number type:number effect:none type:exact-zero type:exact-one