From a84ff424662be50dd8e704f0acc60222fc5c937c Mon Sep 17 00:00:00 2001 From: Daniel Fischer Date: Sun, 24 Oct 2010 18:50:41 +0000 Subject: [PATCH] Fix typo in floatToDigits The mDn value for powers of 2 >= floatDigits x - 1 was typo'ed, leading to longer than necessary show results in a few cases (e.g. 2.0^852). Corrected in accordance with Burger and Dybvig's paper. --- GHC/Float.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GHC/Float.lhs b/GHC/Float.lhs index aa2a534..e0cc415 100644 --- a/GHC/Float.lhs +++ b/GHC/Float.lhs @@ -600,7 +600,7 @@ floatToDigits base x = if e >= 0 then let be = expt b e in if f == expt b (p-1) then - (f*be*b*2, 2*b, be*b, b) + (f*be*b*2, 2*b, be*b, be) -- according to Burger and Dybvig else (f*be*2, 2, be, be) else -- 1.7.10.4