@@ -758,36 +758,6 @@ tb_decimal_big_int64 (BigBounded (a::Int64)) = tb_decimal a
758tb_decimal_big_word (BigBounded (a::Word)) = tb_decimal a
758tb_decimal_big_word (BigBounded (a::Word)) = tb_decimal a
759tb_decimal_big_word64 (BigBounded (a::Word64)) = tb_decimal a
759tb_decimal_big_word64 (BigBounded (a::Word64)) = tb_decimal a
761−countDigits :: (Integral a) => a -> Int
763− | v0 > max64 = big 20 (v0 `quot` 10000000000000000000)
764− | otherwise = go 1 (fromIntegral v0 :: Word64)
766− max64 = fromIntegral (maxBound :: Word64)
768− | v > max64 = big (k+20) (v `quot` 10000000000000000000)
769− | otherwise = go k (fromIntegral v :: Word64)
774− | v < 1000000000000 =
775− k + if v < 100000000
779− else 4 + fin v 100000
780− else 6 + fin v 10000000
781− else if v < 10000000000
782− then 8 + fin v 1000000000
783− else 10 + fin v 100000000000
784− | otherwise = go (k + 12) (v `quot` 1000000000000)
785− fin v n = if v >= n then 1 else 0
787−t_cd (Big k) = counterexample (show x ++ " /= " ++ show y) (x == y)
788− where x = countDigits k
791tb_hex :: (Integral a, Show a) => a -> Bool
761tb_hex :: (Integral a, Show a) => a -> Bool
792tb_hex = (TB.toLazyText . TB.hexadecimal) `eq` (TL.pack . flip showHex "")
762tb_hex = (TB.toLazyText . TB.hexadecimal) `eq` (TL.pack . flip showHex "")
@@ -889,8 +859,6 @@ shorten n t@(S.Stream arr off len)
889tests :: Test
859tests :: Test
891 testGroup "Properties" [
861 testGroup "Properties" [
892− testProperty "t_cd" t_cd,
894 testGroup "creation/elimination" [
862 testGroup "creation/elimination" [
895 testProperty "t_pack_unpack" t_pack_unpack,
863 testProperty "t_pack_unpack" t_pack_unpack,
896 testProperty "tl_pack_unpack" tl_pack_unpack,
864 testProperty "tl_pack_unpack" tl_pack_unpack,