Oddly enough dart does not have hyperbolic functions built-in (yet?).
double tanh(double X) { return -1.0 + 2.0 / (1 + pow(e, (-2 * X))); }