Node-Red configuration
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.asinh.js 538B

123456789101112131415161718192021
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. // eslint-disable-next-line es/no-math-asinh -- required for testing
  4. var $asinh = Math.asinh;
  5. var log = Math.log;
  6. var sqrt = Math.sqrt;
  7. function asinh(x) {
  8. var n = +x;
  9. return !isFinite(n) || n === 0 ? n : n < 0 ? -asinh(-n) : log(n + sqrt(n * n + 1));
  10. }
  11. var FORCED = !($asinh && 1 / $asinh(0) > 0);
  12. // `Math.asinh` method
  13. // https://tc39.es/ecma262/#sec-math.asinh
  14. // Tor Browser bug: Math.asinh(0) -> -0
  15. $({ target: 'Math', stat: true, forced: FORCED }, {
  16. asinh: asinh
  17. });