import std.math.constants : E; import std.math.operations : isClose; import std.math.traits : isIdentical; enum sinh1 = (E - 1.0 / E) / 2; import std.meta : AliasSeq; static foreach (F; AliasSeq!(float, double, real)) { assert(isIdentical(sinh(F(0.0)), F(0.0))); assert(sinh(F(1.0)).isClose(F(sinh1))); }
Calculates the hyperbolic sine of x.