#haskell - Sat 7 Apr 2007 between 14:06 and 14:10

NY Lost Funds



beelsebobarse
is there a function that will "show" a float/double guarenteeing not to use exponential form
monochromshowFFloat
beelsebob> showFFloat (3E9)
yip__> showFFloat (3E9)
lambdabotadd an instance declaration for (Fractional (Maybe Int))
beelsebobo.O
kpreid@type 3E9
sorear> show 3.984759038475394857329487562398756E94857
lambdabotforall t. (Fractional t) => t
ghc: failed with error code 9
beelsebob> showFFloat 3000000000
yip__> showFFloat Nothing (3E9) ""
sorearOh!
lambdabotadd an instance declaration for (Num (Maybe Int))
"3000000000.0"
beelsebob@type showFFloat
lambdabotforall a. (RealFloat a) => Maybe Int -> a -> String -> String
beelsebobwhat's the Maybe Int for?
the exponant required?
sorear@tell dons > show 3.984759038475394857329487562398756E94857
lambdabotConsider it noted.
beelsebob> showFFloat (Just 2) 3000000000 ""
monochrom@doc showFFloat
lambdabot"3000000000.00"
showFFloat not available
beelsebobah, decimal places
monochromRTFD
beelsebob> showFFloat Nothing 3000000000 "jam'
lambdabotImproperly terminated string
beelsebob> showFFloat Nothing 3000000000 "jam'
lambdabotImproperly terminated string
beelsebob> showFFloat Nothing 3000000000 "jam"
lambdabot"3000000000.0jam"
beelsebobdamn it
type fail
okay
cool, that's good :)
yip__if i have an optional string value, should i use Maybe String, or just String, and have the empty string represent Nothing?
monochromWith >99% likelihood, better with Maybe String.

Page: 2 9 16 23 30 37 44 51 58 

IrcArchive

NY Lost Funds