
Dear friends, What is the Haskell equivlent of log_b(a)? To clarify, log of 36 to the base 1.5. Sincerely Matthew J. Williams

Am Sonntag, 8. März 2009 01:30 schrieb Matthew J. Williams:
Dear friends,
What is the Haskell equivlent of log_b(a)? To clarify, log of 36 to the base 1.5.
Sincerely Matthew J. Williams
Prelude> :i logBase class (Fractional a) => Floating a where ... logBase :: a -> a -> a ... -- Defined in GHC.Float Prelude> logBase 1.5 36 8.838045165405818 Cheers, Daniel

"Matthew J. Williams"
Dear friends,
What is the Haskell equivlent of log_b(a)? To clarify, log of 36 to the base 1.5.
I know it's probably bad style (because there is a specific function for this) and also likely less efficient, I prefer to use this: log a / log b Unless performance is significant, I find that more elegant than logBase. Greets, Ertugrul. -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://blog.ertes.de/
participants (3)
-
Daniel Fischer
-
Ertugrul Soeylemez
-
Matthew J. Williams