JSPM

Found 242 results for floating-point

@stdlib/constants-float64-eps

Difference between one and the smallest value greater than one that can be represented as a double-precision floating-point number.

  • v0.2.2
  • 63.12
  • Published

@stdlib/number-float32-base-to-word

Return an unsigned 32-bit integer corresponding to the IEEE 754 binary representation of a single-precision floating-point number.

  • v0.2.2
  • 57.56
  • Published

math-float64-exponent

Returns an integer corresponding to the unbiased exponent of a double-precision floating-point number.

  • v1.0.0
  • 52.63
  • Published

math-float64-get-high-word

Returns a 32-bit integer corresponding to the more significant 32 bits of a double-precision floating-point number.

  • v1.0.0
  • 52.13
  • Published

math-float64-set-low-word

Sets the less significant 32 bits of a double-precision floating-point number.

  • v1.0.0
  • 42.55
  • Published

sinful-math

Simple, safe floating point math. Based on the Math portion of the sinful.js project at https://github.com/guipn/sinful.js

  • v0.0.1
  • 42.33
  • Published

math-float64-ldexp

Multiplies a double-precision floating-point number by an integer power of two.

  • v1.0.1
  • 41.41
  • Published

math-float64-to-words

Splits a floating-point number into a higher order word and a lower order word.

  • v1.0.0
  • 41.23
  • Published

math-float64-from-words

Creates a double-precision floating-point number from a higher order word and a lower order word.

  • v1.0.0
  • 40.29
  • Published

math-float64-normalize

Returns a normal number `y` and exponent `exp` satisfying `x = y * 2^exp`.

  • v1.0.0
  • 39.82
  • Published

ulp

Math.nextAfter, Math.nextDown, Math.nextUp, Math.ulp in javascript (from https://gist.github.com/Yaffle/4654250)

  • v1.0.1
  • 39.12
  • Published

gamp

Provide a four operations calculator API with workaround for the common floating-point issue

  • v0.2.1
  • 38.87
  • Published

math-float64-frexp

Splits a double-precision floating-point number into a normalized fraction and an integer power of two.

  • v1.0.0
  • 38.54
  • Published

fracty

Fracty is a decimal-to-fraction conversion module that solves the many well known problems with decimal-to-fraction conversion modules. Those common problems include overlooking conversion inaccuracies in the IEEE Standard for Floating-Point Arithmetic (I

    • v1.0.12
    • 37.56
    • Published

    proposal-decimal

    Champion-maintained polyfill for the TC39 decimal proposal

    • v20250613.0.0
    • 34.67
    • Published

    @stdlib/number-float64-base-signbit

    Return a boolean indicating if the sign bit for a double-precision floating-point number is on (true) or off (false).

    • v0.2.3
    • 34.01
    • Published

    math-float32-to-binary-string

    Returns a string giving the literal bit representation of a single-precision floating-point number.

    • v1.0.0
    • 33.57
    • Published

    js-precision

    一个基于 Rust + WebAssembly 的高精度计算库,封装了 [`rust_decimal`](https://crates.io/crates/rust_decimal) 实现,支持链式调用、科学计数法和精度控制,适用于前端金融、加密等高精度场景。

    • v0.1.1
    • 33.44
    • Published

    @stdlib/constants-float32-eps

    Difference between one and the smallest value greater than one that can be represented as a single-precision floating-point number.

    • v0.2.2
    • 33.05
    • Published

    @leverj/sinful-math

    Simple, safe floating point math. Based on the Math portion of the sinful.js project at https://github.com/guipn/sinful.js

      • v4.3.1
      • 32.32
      • Published

      @dip1059/safe-math-js

      Safer floating-point math operations in JavaScript that return results we expect, so that 0.1 + 0.2 adds up to 0.3, e.g. Customized and fixed from package '@dfkaye/safe-math'

      • v1.0.0
      • 31.61
      • Published

      @stdlib/number-float32-base-from-word

      Create a single-precision floating-point number from an unsigned integer corresponding to an IEEE 754 binary representation.

      • v0.2.2
      • 28.04
      • Published

      @tonytang-planity/sinful-math

      Simple, safe floating point math. Based on the Math portion of the sinful.js project at https://github.com/guipn/sinful.js

      • v0.0.3
      • 27.43
      • Published

      nstr

      Stringify numbers in JavaScript with smart precision detection

        • v0.1.3
        • 26.61
        • Published

        js-floating-point

        Dead-simple and lightning-fast solution for the floating-point issue in JavaScript

        • v1.0.0
        • 26.33
        • Published

        @stdlib/math-base-special-frexp

        Split a double-precision floating-point number into a normalized fraction and an integer power of two.

        • v0.2.3
        • 25.41
        • Published

        @float-toolkit/core

        Float Toolkit is an NPM package for working with floating-point numbers.

        • v2.1.0
        • 23.05
        • Published

        sinful-math.js

        Simple, safe floating point math. Based on the Math portion of the sinful.js project at https://github.com/guipn/sinful.js

        • v0.0.3
        • 22.06
        • Published

        accurate

        An precision calculation for JavaScript and Node.js. supports numbers, decimals, strings, arrays, matrices and expression. 解决 JavaScript 与 Node.js 精度计算(小数、浮点数计算精度)问题。支持数字、小数、字符串、数组、矩阵和表达式。

        • v1.5.8
        • 21.65
        • Published

        math-float64-nextafter

        Returns the next representable double-precision floating-point number after x toward y.

        • v1.0.0
        • 21.37
        • Published

        @stdlib/number-float32-base-signbit

        Return a boolean indicating if the sign bit for a single-precision floating-point number is on (true) or off (false).

        • v0.2.2
        • 20.56
        • Published

        accurate-core

        An lightweight and high performance precision calculation for JavaScript and Node.js. 解决 JavaScript 与 Node.js 精度计算(小数、浮点数计算精度)问题,轻量级、性能较高。

        • v1.0.6
        • 19.23
        • Published

        @stdlib/constants-float16-eps

        Difference between one and the smallest value greater than one that can be represented as a half-precision floating-point number.

        • v0.2.2
        • 15.46
        • Published

        @dfkaye/safe-math

        Safer floating-point math operations in JavaScript that return results we expect, so that 0.1 + 0.2 adds up to 0.3, e.g.

        • v0.0.17
        • 14.16
        • Published

        @stdlib/utils-real-min

        Return the smallest positive normal value capable of being represented by a numeric real type.

        • v0.2.2
        • 12.77
        • Published

        math-float32-from-bits

        Creates a single-precision floating-point number from a literal bit representation.

        • v1.0.1
        • 12.70
        • Published

        @stdlib/utils-safe-int-min

        Return the minimum safe integer capable of being represented by a numeric real type.

        • v0.2.2
        • 12.70
        • Published

        math-float64-to-binary-string

        Returns a string giving the literal bit representation of a double-precision floating-point number.

        • v1.0.1
        • 12.39
        • Published

        math-float64-bits

        Returns a string giving the literal bit representation of a double-precision floating-point number.

        • v1.0.1
        • 11.57
        • Published

        mathfix

        一个高精度的JavaScript数学计算库,解决浮点数精度问题,包含增强功能如配置管理、国际化、性能优化、日志记录等

        • v1.1.3
        • 11.36
        • Published

        js-big-float

        BigFloat for Javascript

        • v1.0.3
        • 11.04
        • Published

        complex-sqrt

        Floating point complex square root

        • v1.1.1
        • 10.96
        • Published

        math-float32-nextafter

        Returns the next representable single-precision floating-point number after x toward y.

        • v1.0.0
        • 10.91
        • Published

        math-float32-significand

        Returns an integer corresponding to the significand of a single-precision floating-point number.

        • v1.0.0
        • 10.89
        • Published

        math-float64-from-bits

        Creates a double-precision floating-point number from a literal bit representation.

        • v1.0.0
        • 10.74
        • Published

        @lzwme/asmd-calc

        支持浮点数精度的加减乘除四则运算 JS 库。

        • v1.3.4
        • 9.94
        • Published

        math-float32-bits

        Returns a string giving the literal bit representation of a single-precision floating-point number.

        • v1.0.0
        • 8.72
        • Published

        math-float64-get-low-word

        Returns a 32-bit integer corresponding to the less significant 32 bits of a double-precision floating-point number.

        • v1.0.0
        • 8.48
        • Published

        float-operation

        A library of JavaScript tools for floating-point calculation

        • v0.0.3
        • 8.30
        • Published

        const-max-float64

        Maximum double-precision floating-point number.

        • v1.0.1
        • 7.86
        • Published

        const-precision-float64

        Effective number of bits in the significand of a double-precision floating-point number.

        • v1.0.1
        • 6.95
        • Published

        const-max-float32

        Maximum single-precision floating-point number.

        • v1.0.2
        • 6.95
        • Published

        @stdlib/utils-safe-int-max

        Return the maximum safe integer capable of being represented by a numeric real type.

        • v0.2.2
        • 6.91
        • Published

        @stdlib/utils-real-max

        Return the maximum finite value capable of being represented by a numeric real type.

        • v0.2.2
        • 6.23
        • Published

        math-float32-to-word

        Returns an unsigned 32-bit integer corresponding to the IEEE 754 binary representation of a single-precision floating-point number.

        • v1.0.0
        • 6.20
        • Published

        number-as-string

        Precise number scaling and formatting without JavaScript floating-point precision issues

        • v1.0.4
        • 6.19
        • Published

        fix-floats

        A function which fixes floating-point rounding errors in JavaScript

        • v1.1.0
        • 6.16
        • Published

        math-float64-flipsign

        Returns a double-precision floating-point number with the magnitude of x and the sign of x*y.

        • v1.0.0
        • 6.16
        • Published

        quadratic-roots

        Compute the real roots of a quadratic equation in a numerically stable manner

        • v1.0.0
        • 6.10
        • Published

        const-precision-float16

        Effective number of bits in the significand of a half-precision floating-point number.

        • v1.0.0
        • 5.31
        • Published

        math-float64-set-high-word

        Sets the more significant 32 bits of a double-precision floating-point number.

        • v1.0.0
        • 5.20
        • Published

        math-float64-signbit

        Returns a boolean indicating if the sign bit for a double-precision floating-point number is on (true) or off (false).

        • v1.0.0
        • 5.20
        • Published

        const-eps-float64

        Difference between one and the smallest value greater than one that can be represented as a double-precision floating-point number.

        • v1.0.0
        • 5.16
        • Published

        math-float32-frexp

        Splits a single-precision floating-point number into a normalized fraction and an integer power of two.

        • v1.0.0
        • 5.14
        • Published

        const-eps-float16

        Difference between one and the smallest value greater than one that can be represented as a half-precision floating-point number.

        • v1.0.0
        • 5.06
        • Published

        math-float32-signbit

        Returns a boolean indicating if the sign bit for a single-precision floating-point number is on (true) or off (false).

        • v1.0.1
        • 3.93
        • Published

        @stdlib/utils-real-max-cli

        Return the maximum finite value capable of being represented by a numeric real type.

        • v0.2.2
        • 3.93
        • Published

        const-eps-float32

        Difference between one and the smallest value greater than one that can be represented as a single-precision floating-point number.

        • v1.0.0
        • 3.91
        • Published

        math-float32-exponent

        Returns an integer corresponding to the unbiased exponent of a single-precision floating-point number.

        • v1.0.0
        • 3.91
        • Published

        math-float32-from-word

        Creates a single-precision floating-point number from an unsigned integer corresponding to an IEEE 754 binary representation.

        • v1.0.0
        • 3.89
        • Published

        const-precision-float32

        Effective number of bits in the significand of a single-precision floating-point number.

        • v1.0.0
        • 3.82
        • Published

        @stdlib/utils-real-min-cli

        Return the smallest positive normal value capable of being represented by a numeric real type.

        • v0.2.2
        • 3.82
        • Published

        math-float32-normalize

        Returns a normal number `y` and exponent `exp` satisfying `x = y * 2^exp`.

        • v1.0.1
        • 2.35
        • Published

        js-decimals

        For handling floating point numbers in JavaScript without losing precision

        • v1.0.5
        • 2.30
        • Published

        math-float64-epsilon-difference

        Computes the relative difference of two real numbers in units of double-precision floating-point epsilon.

        • v1.0.0
        • 2.29
        • Published

        safe-number-js

        A lightweight JavaScript library for handling numeric precision and large numbers

        • v1.0.0
        • 0.00
        • Published

        red-big-decimals

        leverage BigInt primitive wrapper object to handle handle arbitrary precision floating point numbers in Javascript

        • v0.0.5
        • 0.00
        • Published