JSPM

  • Created
  • Published
  • Downloads 864
  • Score
    100M100P100Q113977F
  • License MIT

C's math functions implemented in TypeScript/JavaScript

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cmath-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    cmath-js

    Implementations of some of C's math functions in TypeScript/JavaScript.

    Floating-point functions

    • copysign
    • fabs
    • frexp
    • hypot
    • ldexp
    • nextafter
    • pow
    • signbit

    Integer functions

    These accept either a number or a bigint:

    • abs

    Test coverage

    The test coverage is a perfect 100% and enforced by the publishing and pull request verification workflows.

    Contributing

    Contributions are welcomed! Feel free to make a pull request. Please add your name to contributors in package.json and run npm run build-and-verify before submitting your PR. By making a pull request you agree to license your contribution under the CC0 license unless otherwise specified.

    ESLint is used to enforce code quality and consistent formatting (with the help of Prettier). If ESLint complains when you run npm run build-and-verify, you can run npm run lint-fix to apply automatic fixes and and then fix the rest of the errors manually. I recommend configuring your IDE for ESLint and Prettier. If you are using Visual Studio Code, simply installing Microsoft's ESLint extension and the official Prettier extension takes care of that.