Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

es.math.tanh.js 377B

1234567891011121314
  1. var $ = require('../internals/export');
  2. var expm1 = require('../internals/math-expm1');
  3. var exp = Math.exp;
  4. // `Math.tanh` method
  5. // https://tc39.es/ecma262/#sec-math.tanh
  6. $({ target: 'Math', stat: true }, {
  7. tanh: function tanh(x) {
  8. var a = expm1(x = +x);
  9. var b = expm1(-x);
  10. return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
  11. }
  12. });