How do I get to haskell to output numbers NOT in scientific notation?

前端 未结 2 878
夕颜
夕颜 2020-12-18 21:18

I have a some items that I want to partition in to a number of buckets, such that each bucket is some fraction larger than the last.

items = 500
chunks = 5
i         


        
相关标签:
2条回答
  • 2020-12-18 22:07
    > putStrLn $ Numeric.showFFloat Nothing 1e40 ""
    10000000000000000000000000000000000000000.0
    
    0 讨论(0)
  • 2020-12-18 22:09

    Try printf. e.g.:

    > import Text.Printf
    > printf "%d\n" (23::Int)
    23
    > printf "%s %s\n" "Hello" "World"
    Hello World
    > printf "%.2f\n" pi
    3.14
    
    0 讨论(0)
提交回复
热议问题