Actually, it is a constant: piDecimalExpansion :: String.

A translation from piDecimalExpansion :: String to pi :: Floating a => a is already well defined via read :: Read a => String -> a

Any definition of pi in the Floating class that differs from (read piDecimalExpansion) is erroneous. I propose the above as the default definition of pi.

Dan Weston

ok wrote:
Someone wrote about pi:

| But it is just a numerical constant, no need to put it into a class, and
nothing to do with the type_classing of related functions. "e" is not
std. defined, and it doesn't kill people who use exponentials.

But it *isn't* "A" numerical constant.
It is a *different* constant for each instance of Floating.
In this respect, it's not unlike floatRange, which is just "a"
constant (a pair of integers), but is different for each
RealFloat instance.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe




_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to