How to translate this Math Formula in Haskell or Python? (Was translated in PHP) How to translate this Math Formula in Haskell or Python? (Was translated in PHP) php php