@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 829 B
JavaScript
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
import t from"./../assert/is-nan.js";import o from"./../assert/is-infinite.js";import r from"./pow.js";import s from"./abs.js";import a from"./trunc.js";import m from"./../../../constants/math/float64-max-safe-integer.js";import n from"./../../../constants/math/float64-max-base10-exponent.js";import e from"./../../../constants/math/float64-min-base10-exponent.js";import i from"./../../../constants/math/float64-min-base10-exponent-subnormal.js";var f=t,p=o,j=r,c=s,l=a,x=m,b=n,u=e,h=i,v=x+1,N=1e308;function d(t,o){var r,s;return f(t)||f(o)||p(o)?NaN:p(t)||0===t||o<h||c(t)>v&&o<=0?t:o>b?0*t:o<u?(r=j(10,-(o+b)),p(s=t*N*r)?t:l(s)/N/r):(r=j(10,-o),p(s=t*r)?t:l(s)/r)}var g=d;export default g;
//# sourceMappingURL=truncn.js.map