diff options
Diffstat (limited to 'testsuite/tests/programs/lennart_range')
4 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/tests/programs/lennart_range/Main.hs b/testsuite/tests/programs/lennart_range/Main.hs new file mode 100644 index 0000000000..c45e4b2b36 --- /dev/null +++ b/testsuite/tests/programs/lennart_range/Main.hs @@ -0,0 +1,24 @@ +{- +Date: Thu, 22 Sep 1994 01:59:49 +0200 +From: Lennart Augustsson <augustss@cs.chalmers.se> +Message-Id: <199409212359.BAA01719@statler.cs.chalmers.se> +To: glasgow-haskell-bugs@dcs.glasgow.ac.uk +Subject: ghc bug + + +Some floating constants that are within the floating range +become wrong, e.g. + + 1.82173691287639817263897126389712638972163e-300::Double + + -- Lennart + +PS. Maybe you use fromRational as defined in the Prelude? +That won't do. It is badly broken, tell me if you want +one that works. +-} + +-- I have turned this into a general test of extreme constants. +-- WDP 94/12 + +main = putStr (shows (1.82173691287639817263897126389712638972163e-300::Double) "\n") diff --git a/testsuite/tests/programs/lennart_range/Makefile b/testsuite/tests/programs/lennart_range/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/programs/lennart_range/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/programs/lennart_range/lennart_range.stdout b/testsuite/tests/programs/lennart_range/lennart_range.stdout new file mode 100644 index 0000000000..5196dcc970 --- /dev/null +++ b/testsuite/tests/programs/lennart_range/lennart_range.stdout @@ -0,0 +1 @@ +1.821736912876398e-300 diff --git a/testsuite/tests/programs/lennart_range/test.T b/testsuite/tests/programs/lennart_range/test.T new file mode 100644 index 0000000000..f308f0039d --- /dev/null +++ b/testsuite/tests/programs/lennart_range/test.T @@ -0,0 +1,6 @@ + +test('lennart_range', + [skip_if_fast, extra_clean(['Main.hi', 'Main.o'])], + multimod_compile_and_run, + ['Main', '']) + |