/* Additional functions which can be used in Heta platforms can be added to index file by include ./qsp-functions.heta; */ // hyperbolic functions #defineFunction sinh { arguments: [x], math: "0.5 * (exp(x) - exp(-x))" }; #defineFunction cosh { arguments: [x], math: "0.5 * (exp(x) + exp(-x))" }; #defineFunction tanh { arguments: [x], math: "(exp(2 * x) - 1) / (exp(2 * x) + 1)" }; #defineFunction sech { arguments: [x], math: "1 / cosh(x)" }; #defineFunction csch { arguments: [x], math: "1 / sinh(x)" }; #defineFunction coth { arguments: [x], math: "1 / tanh(x)" }; // inverse hyperbolic functions #defineFunction arcsinh { arguments: [x], math: "ln(x + sqrt(x^2 + 1))" }; #defineFunction arccosh { arguments: [x], math: "ln(x + sqrt(x^2 - 1))" }; #defineFunction arctanh { arguments: [x], math: "0.5 * ln((1 + x) / (1 - x))" }; #defineFunction arcsech { arguments: [x], math: "ln((1 + sqrt(1 - x^2)) / x)" }; #defineFunction arccsch { arguments: [x], math: "ln(1 / x + sqrt(1 + 1 / x^2))" }; #defineFunction arccoth { arguments: [x], math: "0.5 * ln((x + 1) / (x - 1))" };