From: panne Date: Mon, 12 Jun 2000 19:57:40 +0000 (+0000) Subject: [project @ 2000-06-12 19:57:40 by panne] X-Git-Tag: Approximately_9120_patches~4268 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=68f826d67a21e11fe79b923d632632299ff050f2;p=ghc-hetmet.git [project @ 2000-06-12 19:57:40 by panne] Print only the first 6 characters of the result's decimal representation, this "solves" the problem that without optimization 0.46920002 was printed and 0.4692 with -O. Perhaps this could be turned into a test for constant folding, but this was probably not the test writer's intention. --- diff --git a/ghc/tests/codeGen/should_run/cg018.hs b/ghc/tests/codeGen/should_run/cg018.hs index b230b00..02220c8 100644 --- a/ghc/tests/codeGen/should_run/cg018.hs +++ b/ghc/tests/codeGen/should_run/cg018.hs @@ -3,7 +3,9 @@ import PrelGHC( Float# ) import PrelFloat -main = putStr (shows (selectee1 + selectee2) "\n") +-- This test is a little bit numerically unstable, so compare only a small prefix. +-- Otherwise you get slightly different results with and without optimization. +main = putStrLn (take 6 (shows (selectee1 + selectee2) "")) data Tfo = Tfo Float# Float# Float# Float# Float# Float# Float# Float# Float# Float# Float# Float#