User Tools

Site Tools


hyperbolic_functions

by Richard Russell, April 2018

BBC BASIC doesn't include the hyperbolic trig functions (sinh, cosh, tanh etc.) as a built-in feature, but they can easily be synthesised as user-defined functions as follows:

      DEF FNsinh(x) = (EXP(x) - EXP(-x)) / 2
      DEF FNcosh(x) = (EXP(x) + EXP(-x)) / 2
      DEF FNtanh(x) = (EXP(x) - EXP(-x)) / (EXP(x) + EXP(-x))
      DEF FNcoth(x) = (EXP(x) + EXP(-x)) / (EXP(x) - EXP(-x))
      DEF FNsech(x) = 2 / (EXP(x) + EXP(-x))
      DEF FNcsch(x) = 2 / (EXP(x) - EXP(-x))
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
hyperbolic_functions.txt · Last modified: 2018/04/17 16:37 by tbest3112