[Haskell-beginners] How to improve the accuracy of floating point calculation?

Brandon Allbery allbery.b at gmail.com
Wed Feb 6 15:03:48 CET 2013


On Tue, Feb 5, 2013 at 6:04 PM, yi lu <zhiwudazhanjiangshi at gmail.com> wrote:

> Thanks!
> I'll try CReal.
> But can I set *significant figures **myself?*
>

You can't change ghci's output format, but you can do your own output
instead of relying on ghci's.
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Text-Printf.htmlmight
be of interest, or doing it manually with scaling and Prelude.round.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130206/8d15422c/attachment.htm>


More information about the Beginners mailing list