[Haskell-cafe] Why is toRational a method of Real?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Thu Aug 5 06:04:01 EDT 2010


David Virebayre <dav.vire+haskell at gmail.com> writes:

> On Thu, Aug 5, 2010 at 11:35 AM, Henning Thielemann
> <lemming at henning-thielemann.de> wrote:
>
>> What else shall a rounding function return if not integers?
>
> Getting from 29.84645 to 29.85 isn't rounding ?

Yes it is: http://en.wikipedia.org/wiki/Rounding

Usually, however, we often just want to round something to an integral
value.

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list