RE: Haskell 98 - Standard Prelude - Floating Class
| sinh x = (exp(x) - exp(-x))/2 | cosh x = (exp(x) + exp(-x))/2 ... This looks pretty reasonable to me. We should have default methods for anything we can.
Why not provide defaults for the inverse functions as well? asinh x = log (x + sqrt (1+x*x)) acosh x = log (x + (x+1) * sqrt ((x-1)/(x+1))) atanh x = log ((x+1) / sqrt (1 - x*x)) -- Lennart
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 15 Oct 2001, Lennart Augustsson wrote:
Why not provide defaults for the inverse functions as well?
asinh x = log (x + sqrt (1+x*x)) acosh x = log (x + (x+1) * sqrt ((x-1)/(x+1))) atanh x = log ((x+1) / sqrt (1 - x*x))
That's a good idea too. Is there a reason for defining acosh as above instead of acosh x = log(x + sqrt(x*x-1)) - -- Russell O'Connor roconnor@alumni.uwaterloo.ca <http://www.math.berkeley.edu/~roconnor/> ``This is not a time, as it is never a time, to seek vengeance, but a time to seek the courage to forgive'' -- George W. Bush -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (SunOS) Comment: For info see http://www.gnupg.org iD8DBQE7yv8aZG3em5NXM14RAqO2AJ4hsVYSbtFYgDmjturcQOr/AUbH0ACfTYKw IZA2w18pSxdMAvZrLPoOJLM= =+Pkw -----END PGP SIGNATURE-----
participants (2)
-
Lennart Augustsson -
roconnor@math.berkeley.edu