halculator A simple calculator written in Haskell

Function Index

Currently the following functions are implemented:

Operators

  • +
  • -
  • *
  • /
  • ^

Misc

  • sum (sum of all elements in stack)
  • prod (product of all elements in stack)
  • ! (factorial)
  • nCr (n choose r)
  • abs
  • .. (range between two values)

Constants

  • pi
  • e

Functions with Exponents

  • exp
  • log (logarithm with respect to Euler constant e)
  • ln (alias for log)
  • sqrt
  • logBase (Logarithm of x with respect to base y)

Trigonomitry and Hyperbolics

  • sin
  • cos
  • tan
  • asin
  • acos
  • atan
  • sinh
  • cosh
  • tanh
  • asinh
  • acosh
  • atanh

Control

  • swp (swap the first two elements in stack)
  • cpy (copy first element)
  • rot (rotate stack one element to the left)
  • rotl (alias for rot)
  • rotr (rotate stack one element to the right)
  • clr (clear stack)
  • del (remove first element from stack)