From 4a4eba7f7108e1dfa0b69ba045b71e6736ba6058 Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 1 Apr 2003 16:30:37 +0000 Subject: [PATCH] [project @ 2003-04-01 16:30:37 by simonpj] Use INLINE rather than SPECIALISE for ceiling, floor, truncate --- GHC/Float.lhs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/GHC/Float.lhs b/GHC/Float.lhs index 5c30439..71a0e2e 100644 --- a/GHC/Float.lhs +++ b/GHC/Float.lhs @@ -164,14 +164,14 @@ instance RealFrac Float where {-# SPECIALIZE properFraction :: Float -> (Int, Float) #-} {-# SPECIALIZE round :: Float -> Int #-} - {-# SPECIALIZE ceiling :: Float -> Int #-} - {-# SPECIALIZE floor :: Float -> Int #-} - {-# SPECIALIZE properFraction :: Float -> (Integer, Float) #-} - {-# SPECIALIZE truncate :: Float -> Integer #-} + {-# SPECIALIZE properFraction :: Float -> (Integer, Float) #-} {-# SPECIALIZE round :: Float -> Integer #-} - {-# SPECIALIZE ceiling :: Float -> Integer #-} - {-# SPECIALIZE floor :: Float -> Integer #-} + + -- ceiling, floor, and truncate are all small + {-# INLINE ceiling #-} + {-# INLINE floor #-} + {-# INLINE truncate #-} properFraction x = case (decodeFloat x) of { (m,n) -> @@ -328,14 +328,14 @@ instance RealFrac Double where {-# SPECIALIZE properFraction :: Double -> (Int, Double) #-} {-# SPECIALIZE round :: Double -> Int #-} - {-# SPECIALIZE ceiling :: Double -> Int #-} - {-# SPECIALIZE floor :: Double -> Int #-} {-# SPECIALIZE properFraction :: Double -> (Integer, Double) #-} - {-# SPECIALIZE truncate :: Double -> Integer #-} {-# SPECIALIZE round :: Double -> Integer #-} - {-# SPECIALIZE ceiling :: Double -> Integer #-} - {-# SPECIALIZE floor :: Double -> Integer #-} + + -- ceiling, floor, and truncate are all small + {-# INLINE ceiling #-} + {-# INLINE floor #-} + {-# INLINE truncate #-} properFraction x = case (decodeFloat x) of { (m,n) -> -- 1.7.10.4