[Haskell] getArgs, maxBound, float division: pure functions?

Ralf Lammel ralfla at microsoft.com
Wed Oct 12 06:18:37 EDT 2005


Just for the record,
Cobol has a long history of specifying local rounding options.
More recently, the options for rounding are elaborated in the context of
adding standard arithmetic.

http://www.cobolportal.com/j4/files/05-0152.doc

Ralf

> -----Original Message-----
> From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org]
On
> Behalf Of Bjorn Lisper
> [...]
> He was very careful to give
> the language a good design also regarding floating-point computations.
His
> design choice, as regards rounding, was to allow the compiler to
choose
> rounding mode by default (thus allowing more freedom for
optimization),
> while providing a set of special arithmetic operators, with specified
> rounding modes, to use when more explicit control is needed.
> 
> He also proposed a special construct "letctrl ... in e", where the
"..."
> are
> a list of directives telling how to interpret and evaluate the
expression
> e. One possible directive is "RoundingMode = ..." to set the rounding
mode
> locally in e. Other directives control, for instance, whether
> optimizations
> like x*0.0 -> 0.0 are allowed in e, whether to force strict evaluation
of
> all subexpressions (so optimizations cannot affect exceptions), to set
> allowed miminum accuracy, etc.
> 
> The language has exception handling (including a "handle" construct to
> catch
> exceptions), which also takes care of floating-point exceptions.



More information about the Haskell mailing list