Code: Select all

```
function sinh(x)
sinh = (exp(x) - exp(-x)) / 2
end function
function cosh(x)
cosh = (exp(x) + exp(-x)) / 2
end function
function tanh(x)
tanh = sinh(x) / cosh(x)
end function
```

I've received a query by email about calculating hyperbolic trig functions (e.g. sinh, cosh, tanh). They are easily implemented as user-defined functions as follows:

Richard.

Code: Select all

```
function sinh(x)
sinh = (exp(x) - exp(-x)) / 2
end function
function cosh(x)
cosh = (exp(x) + exp(-x)) / 2
end function
function tanh(x)
tanh = sinh(x) / cosh(x)
end function
```