[commit: base] master: disable incorrect RULEs for Floats (#5178) (b751723)
Simon Marlow
marlowsd at gmail.com
Tue May 10 12:51:27 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b751723d882e51241f04d6d2ec46fce70f0e0817
>---------------------------------------------------------------
commit b751723d882e51241f04d6d2ec46fce70f0e0817
Author: Simon Marlow <marlowsd at gmail.com>
Date: Tue May 10 10:46:45 2011 +0100
disable incorrect RULEs for Floats (#5178)
>---------------------------------------------------------------
GHC/Base.lhs | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/GHC/Base.lhs b/GHC/Base.lhs
index be1b57b..ba128bf 100644
--- a/GHC/Base.lhs
+++ b/GHC/Base.lhs
@@ -765,9 +765,6 @@ gtInt, geInt, eqInt, neInt, ltInt, leInt :: Int -> Int -> Bool
"plusFloat x 0.0" forall x#. plusFloat# x# 0.0# = x#
"plusFloat 0.0 x" forall x#. plusFloat# 0.0# x# = x#
"minusFloat x 0.0" forall x#. minusFloat# x# 0.0# = x#
-"minusFloat x x" forall x#. minusFloat# x# x# = 0.0#
-"timesFloat x 0.0" forall x#. timesFloat# x# 0.0# = 0.0#
-"timesFloat0.0 x" forall x#. timesFloat# 0.0# x# = 0.0#
"timesFloat x 1.0" forall x#. timesFloat# x# 1.0# = x#
"timesFloat 1.0 x" forall x#. timesFloat# 1.0# x# = x#
"divideFloat x 1.0" forall x#. divideFloat# x# 1.0# = x#
@@ -795,6 +792,12 @@ This gives wrong answer (0) for NaN * 0 (should be NaN):
"timesDouble x 0.0" forall x#. (*##) x# 0.0## = 0.0##
These are tested by num014.
+
+Similarly for Float (#5178):
+
+"minusFloat x x" forall x#. minusFloat# x# x# = 0.0#
+"timesFloat0.0 x" forall x#. timesFloat# 0.0# x# = 0.0#
+"timesFloat x 0.0" forall x#. timesFloat# x# 0.0# = 0.0#
-}
-- Wrappers for the shift operations. The uncheckedShift# family are
More information about the Cvs-libraries
mailing list