[Haskell-beginners] rational exponents
Christopher Howard
christopher.howard at frigidcode.com
Wed Sep 7 22:25:05 CEST 2011
Hi. I'm working with simple functions involving rational exponents. I
noticed that the (**) function seems to do okay with negative powers,
but that something else is needed for rational exponents:
Prelude> 2 ** (-2)
0.25
Prelude> 8 ** (1/3)
2.0
Prelude> 8 ** (2/3)
3.9999999999999996
Would there be a module meant for that sort of thing? I spent some time
in Hoogle and Hackage looking around, but nothing obvious stood out.
--
frigidcode.com
theologia.indicium.us
More information about the Beginners
mailing list