[Haskell-cafe] exact-pi (Was: ANN: dimensional-1.0 for statically checked physical dimensions)
douglas.mcclean at gmail.com
Mon Nov 2 19:56:57 UTC 2015
Yes, if you wish. However you might run into surprises because the Floating
class defines pi polymorphically, and the Floating instance for ExactPi
uses exactly pi. We are also considering adding exact evaluation of
trignonmetric functions at those points in the domain that can be exactly
represented. As long as you are aware of this issue you can use it for any
other transcendental function you might be more interested in.
You could also consider copying the entire thing but changing the:
instance Floating ExactPi where
pi = Exact 1 1
instance Floating ExactSomethingElse where
pi = Approximate pi
If this related type would be useful to you and you have a suggested name
for it, I can add it to the library?
On Mon, Nov 2, 2015 at 2:49 PM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:
> On Mon, 2 Nov 2015, Douglas McClean wrote:
> * Exact conversion factors between units are available, even when those
>> conversion factors involve multiples of pi,
>> thanks to the exact-pi library
> Since pi is transcendental with respect to the rational numbers, I can use
> exact-pi for any other transcendental number, can't I?
J. Douglas McClean
(781) 561-5540 (cell)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe