Haste bug in reading floating point numbers

22 views
Skip to first unread message

David Sands

unread,
Dec 14, 2015, 5:31:42 AM12/14/15
to chalmer...@googlegroups.com
Hi

Don't sweat about problems with haste plotting points incorrectly – there is a confirmed bug in the implementation of read at type Float and Double which is no doubt used internally in several places 

main
    = alert
    $ show
    $ [ read (show n) :: Float
        | n <- [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7]
      ]

prints

[1.0, 1.1, 1.5, 1.3, 1.75, 1.5, 2.0, 1.7]
Reply all
Reply to author
Forward
0 new messages