Commit 89671835 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Use letters to allow output to be matched up with the code more easily

parent 2a019438
......@@ -5,30 +5,30 @@ main =
unlines
[ -- just for fun, we show the floats to
-- exercise the code responsible.
show (float_list :: [Float])
, show (double_list :: [Double])
'A' : show (float_list :: [Float])
, 'B' : show (double_list :: [Double])
-- {Float,Double} inputs, {Int,Integer} outputs
, show ((map ceiling float_list) :: [Int])
, show ((map ceiling float_list) :: [Integer])
, show ((map ceiling double_list) :: [Int])
, show ((map ceiling double_list) :: [Integer])
, show ((map floor float_list) :: [Int])
, show ((map floor float_list) :: [Integer])
, show ((map floor double_list) :: [Int])
, show ((map floor double_list) :: [Integer])
, show ((map truncate float_list) :: [Int])
, show ((map truncate float_list) :: [Integer])
, show ((map truncate double_list) :: [Int])
, show ((map truncate double_list) :: [Integer])
, 'C' : show ((map ceiling float_list) :: [Int])
, 'D' : show ((map ceiling float_list) :: [Integer])
, 'E' : show ((map ceiling double_list) :: [Int])
, 'F' : show ((map ceiling double_list) :: [Integer])
, 'G' : show ((map floor float_list) :: [Int])
, 'H' : show ((map floor float_list) :: [Integer])
, 'I' : show ((map floor double_list) :: [Int])
, 'J' : show ((map floor double_list) :: [Integer])
, 'K' : show ((map truncate float_list) :: [Int])
, 'L' : show ((map truncate float_list) :: [Integer])
, 'M' : show ((map truncate double_list) :: [Int])
, 'N' : show ((map truncate double_list) :: [Integer])
{-
, show ((map round float_list) :: [Int])
-}
, show ((map round float_list) :: [Integer])
, show ((map round double_list) :: [Int])
, show ((map round double_list) :: [Integer])
, show ((map properFraction float_list) :: [(Int,Float)])
, show ((map properFraction float_list) :: [(Integer,Float)])
, show $ head ((map properFraction double_list) :: [(Int,Double)])
, 'O' : show ((map round float_list) :: [Integer])
, 'P' : show ((map round double_list) :: [Int])
, 'Q' : show ((map round double_list) :: [Integer])
, 'R' : show ((map properFraction float_list) :: [(Int,Float)])
, 'S' : show ((map properFraction float_list) :: [(Integer,Float)])
, 'T' : show (head ((map properFraction double_list) :: [(Int,Double)]))
{-
, show ((map properFraction double_list) :: [(Integer,Double)])
-}
......
[0.0,-0.0,1.1,2.8,3.5,4.5,-1.0,-2.9999995,-3.5,-4.5,1000012.0,123.456,100.25,102.5,1.2e-3,-1.2e-7,17000.0,-1.7e-4,1.5e-7,3.1415927,1.18088e11,1.2111e14]
[0.0,-0.0,1.1,2.8,3.5,4.5,-1.0000000001,-2.9999995,-3.50000000001,-4.49999999999,1000012.0,123.456,100.25,102.5,1.2e-3,-1.2e-7,17000.0,-1.7e-4,1.5e-7,3.141592653589793,1.18088e11,1.2111e14]
[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,2123882496,511705088]
[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118087999488,121109999517696]
[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,2123883008,512187392]
[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118088000000,121110000000000]
[0,0,1,2,3,4,-1,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,2123882496,511705088]
[0,0,1,2,3,4,-1,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118087999488,121109999517696]
[0,0,1,2,3,4,-2,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,2123883008,512187392]
[0,0,1,2,3,4,-2,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118088000000,121110000000000]
[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,2123882496,511705088]
[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,2123883008,512187392]
[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,2123883008,512187392]
[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
[(0,0.0),(0,0.0),(1,0.100000024),(2,0.79999995),(3,0.5),(4,0.5),(-1,0.0),(-2,-0.9999995),(-3,-0.5),(-4,-0.5),(1000012,0.0),(123,0.45600128),(100,0.25),(102,0.5),(0,1.2e-3),(0,-1.2e-7),(17000,0.0),(0,-1.7e-4),(0,1.5e-7),(3,0.14159274),(2123882496,0.0),(511705088,0.0)]
[(0,0.0),(0,0.0),(1,0.100000024),(2,0.79999995),(3,0.5),(4,0.5),(-1,0.0),(-2,-0.9999995),(-3,-0.5),(-4,-0.5),(1000012,0.0),(123,0.45600128),(100,0.25),(102,0.5),(0,1.2e-3),(0,-1.2e-7),(17000,0.0),(0,-1.7e-4),(0,1.5e-7),(3,0.14159274),(118087999488,0.0),(121109999517696,0.0)]
(0,0.0)
A[0.0,-0.0,1.1,2.8,3.5,4.5,-1.0,-2.9999995,-3.5,-4.5,1000012.0,123.456,100.25,102.5,1.2e-3,-1.2e-7,17000.0,-1.7e-4,1.5e-7,3.1415927,1.18088e11,1.2111e14]
B[0.0,-0.0,1.1,2.8,3.5,4.5,-1.0000000001,-2.9999995,-3.50000000001,-4.49999999999,1000012.0,123.456,100.25,102.5,1.2e-3,-1.2e-7,17000.0,-1.7e-4,1.5e-7,3.141592653589793,1.18088e11,1.2111e14]
C[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,2123882496,511705088]
D[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118087999488,121109999517696]
E[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,2123883008,512187392]
F[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118088000000,121110000000000]
G[0,0,1,2,3,4,-1,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,2123882496,511705088]
H[0,0,1,2,3,4,-1,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118087999488,121109999517696]
I[0,0,1,2,3,4,-2,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,2123883008,512187392]
J[0,0,1,2,3,4,-2,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118088000000,121110000000000]
K[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,2123882496,511705088]
L[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
M[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,2123883008,512187392]
N[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
O[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
P[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,2123883008,512187392]
Q[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
R[(0,0.0),(0,0.0),(1,0.100000024),(2,0.79999995),(3,0.5),(4,0.5),(-1,0.0),(-2,-0.9999995),(-3,-0.5),(-4,-0.5),(1000012,0.0),(123,0.45600128),(100,0.25),(102,0.5),(0,1.2e-3),(0,-1.2e-7),(17000,0.0),(0,-1.7e-4),(0,1.5e-7),(3,0.14159274),(2123882496,0.0),(511705088,0.0)]
S[(0,0.0),(0,0.0),(1,0.100000024),(2,0.79999995),(3,0.5),(4,0.5),(-1,0.0),(-2,-0.9999995),(-3,-0.5),(-4,-0.5),(1000012,0.0),(123,0.45600128),(100,0.25),(102,0.5),(0,1.2e-3),(0,-1.2e-7),(17000,0.0),(0,-1.7e-4),(0,1.5e-7),(3,0.14159274),(118087999488,0.0),(121109999517696,0.0)]
T(0,0.0)
[0.0,-0.0,1.1,2.8,3.5,4.5,-1.0,-2.9999995,-3.5,-4.5,1000012.0,123.456,100.25,102.5,1.2e-3,-1.2e-7,17000.0,-1.7e-4,1.5e-7,3.1415927,1.18088e11,1.2111e14]
[0.0,-0.0,1.1,2.8,3.5,4.5,-1.0000000001,-2.9999995,-3.50000000001,-4.49999999999,1000012.0,123.456,100.25,102.5,1.2e-3,-1.2e-7,17000.0,-1.7e-4,1.5e-7,3.141592653589793,1.18088e11,1.2111e14]
[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118087999488,121109999517696]
[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118087999488,121109999517696]
[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118088000000,121110000000000]
[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118088000000,121110000000000]
[0,0,1,2,3,4,-1,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118087999488,121109999517696]
[0,0,1,2,3,4,-1,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118087999488,121109999517696]
[0,0,1,2,3,4,-2,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118088000000,121110000000000]
[0,0,1,2,3,4,-2,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118088000000,121110000000000]
[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
[(0,0.0),(0,0.0),(1,0.100000024),(2,0.79999995),(3,0.5),(4,0.5),(-1,0.0),(-2,-0.9999995),(-3,-0.5),(-4,-0.5),(1000012,0.0),(123,0.45600128),(100,0.25),(102,0.5),(0,1.2e-3),(0,-1.2e-7),(17000,0.0),(0,-1.7e-4),(0,1.5e-7),(3,0.14159274),(118087999488,0.0),(121109999517696,0.0)]
[(0,0.0),(0,0.0),(1,0.100000024),(2,0.79999995),(3,0.5),(4,0.5),(-1,0.0),(-2,-0.9999995),(-3,-0.5),(-4,-0.5),(1000012,0.0),(123,0.45600128),(100,0.25),(102,0.5),(0,1.2e-3),(0,-1.2e-7),(17000,0.0),(0,-1.7e-4),(0,1.5e-7),(3,0.14159274),(118087999488,0.0),(121109999517696,0.0)]
(0,0.0)
A[0.0,-0.0,1.1,2.8,3.5,4.5,-1.0,-2.9999995,-3.5,-4.5,1000012.0,123.456,100.25,102.5,1.2e-3,-1.2e-7,17000.0,-1.7e-4,1.5e-7,3.1415927,1.18088e11,1.2111e14]
B[0.0,-0.0,1.1,2.8,3.5,4.5,-1.0000000001,-2.9999995,-3.50000000001,-4.49999999999,1000012.0,123.456,100.25,102.5,1.2e-3,-1.2e-7,17000.0,-1.7e-4,1.5e-7,3.141592653589793,1.18088e11,1.2111e14]
C[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118087999488,121109999517696]
D[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118087999488,121109999517696]
E[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118088000000,121110000000000]
F[0,0,2,3,4,5,-1,-2,-3,-4,1000012,124,101,103,1,0,17000,0,1,4,118088000000,121110000000000]
G[0,0,1,2,3,4,-1,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118087999488,121109999517696]
H[0,0,1,2,3,4,-1,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118087999488,121109999517696]
I[0,0,1,2,3,4,-2,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118088000000,121110000000000]
J[0,0,1,2,3,4,-2,-3,-4,-5,1000012,123,100,102,0,-1,17000,-1,0,3,118088000000,121110000000000]
K[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
L[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
M[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
N[0,0,1,2,3,4,-1,-2,-3,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
O[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118087999488,121109999517696]
P[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
Q[0,0,1,3,4,4,-1,-3,-4,-4,1000012,123,100,102,0,0,17000,0,0,3,118088000000,121110000000000]
R[(0,0.0),(0,0.0),(1,0.100000024),(2,0.79999995),(3,0.5),(4,0.5),(-1,0.0),(-2,-0.9999995),(-3,-0.5),(-4,-0.5),(1000012,0.0),(123,0.45600128),(100,0.25),(102,0.5),(0,1.2e-3),(0,-1.2e-7),(17000,0.0),(0,-1.7e-4),(0,1.5e-7),(3,0.14159274),(118087999488,0.0),(121109999517696,0.0)]
S[(0,0.0),(0,0.0),(1,0.100000024),(2,0.79999995),(3,0.5),(4,0.5),(-1,0.0),(-2,-0.9999995),(-3,-0.5),(-4,-0.5),(1000012,0.0),(123,0.45600128),(100,0.25),(102,0.5),(0,1.2e-3),(0,-1.2e-7),(17000,0.0),(0,-1.7e-4),(0,1.5e-7),(3,0.14159274),(118087999488,0.0),(121109999517696,0.0)]
T(0,0.0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment