GitHub
github.com › MikeMcl › decimal.js
GitHub - MikeMcl/decimal.js: An arbitrary-precision Decimal type for JavaScript · GitHub
Used under the hood by math.js · Includes a TypeScript declaration file: decimal.d.ts ·
Author MikeMcl
Mikemcl
mikemcl.github.io › decimal.js
decimal.js API
An arbitrary-precision Decimal type for JavaScript.
GitHub
github.com › MikeMcl › decimal.js › issues › 68
TypeScript the Decimal type is decimal.Decimal instead of Decimal · Issue #68 · MikeMcl/decimal.js
November 16, 2017 - When I import Decimal.js in my TypeScript project, the type is decimal.Decimal instead of decimal. This is how I imported decimal.js: import * as Decimal from 'decimal.js'; and this is how I have to use it: private value: string | decima...
Published Nov 16, 2017
npm
npmjs.com › package › decimal.js
decimal.js - npm
» npm install decimal.js
Published Jul 06, 2025
Version 10.6.0
Author Michael Mclaughlin
Repository https://github.com/MikeMcl/decimal.js
GitHub
github.com › Agrora › decimal-js
GitHub - Agrora/decimal-js: DecimalJS is an arbitrary precision floating point arithmetic library based on PHP's bcmath extension.
You don't need to install any typings. import Decimal from '@agrora/decimal'; // Create a new decimal from a string const decimal = Decimal.from('0.2'); // Use add() to add another decimal to it const sum = decimal.add('0.1'); // Log the result ...
Author Agrora
GitHub
github.com › MikeMcl › decimal.js-light
GitHub - MikeMcl/decimal.js-light: The light version of decimal.js, an arbitrary-precision Decimal type for JavaScript.
The light version of decimal.js, an arbitrary-precision Decimal type for JavaScript. - MikeMcl/decimal.js-light
Starred by 405 users
Forked by 49 users
Languages JavaScript 99.8% | HTML 0.2%
GitHub
github.com › MikeMcl › bignumber.js
GitHub - MikeMcl/bignumber.js: A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic · GitHub
A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic - MikeMcl/bignumber.js
Author MikeMcl
GitHub
github.com › aholstenson › numeric-types
GitHub - aholstenson/numeric-types: Numeric types for JavaScript and TypeScript
import { Decimal, multiply } from ... are available for TypeScript: import { AbstractDecimal, Decimal } from 'numeric-types/decimal'; const decimal: AbstractDecimal<any> = Decimal.fromNumber(0.1); These operations are available ...
Author aholstenson
GitHub
github.com › royNiladri › js-big-decimal
GitHub - royNiladri/js-big-decimal: Work with large numbers on the client side with high precision.
var bigDecimal = require('js-big-decimal'); For typescript, use · import bigDecimal = require('js-big-decimal'); For web, when used with script tag, a variable on Window object is created.
Starred by 166 users
Forked by 26 users
Languages TypeScript 96.1% | JavaScript 3.9%
GitHub
github.com › aidy-jenkins › decimalize
GitHub - aidy-jenkins/decimalize: JS decimal expressions library written in TypeScript
Starred by 7 users
Forked by 2 users
Languages TypeScript
npm
npmjs.com › package › decimal.js-light
decimal.js-light - npm
Also, in this library the e property of a Decimal is the base 10000000 exponent, not the base 10 exponent as in decimal.js. Use the exponent method to get the base 10 exponent. ... See the documentation for further information. TypeScript type declaration file contributed by TANAKA Koichi.
» npm install decimal.js-light
Published Sep 30, 2020
Version 2.5.1
Author Michael Mclaughlin
Repository https://github.com/MikeMcl/decimal.js-light
GitHub
github.com › MikeMcl › decimal.js › blob › master › decimal.d.ts
decimal.js/decimal.d.ts at master · MikeMcl/decimal.js
// import {Decimal} from "decimal.js" // //import Decimal from "decimal.js" // // let r: Decimal.Rounding = Decimal.ROUND_UP; // let c: Decimal.Configuration = {precision: 4, rounding: r}; // Decimal.set(c); // let v: Decimal.Value = '12345.6789'; // let d: Decimal = new Decimal(v); // //let d: Decimal.Instance = new Decimal(v); // // The use of compiler option `--strictNullChecks` is recommended.
Author MikeMcl
Hacker News
news.ycombinator.com › item
Show HN: dnum − A small TypeScript library to handle decimal numbers | Hacker News
July 19, 2023 - Creating a new index in between two indices and comparing two indices are both O(N), but the cute part is that the standard string comparison in JavaScript just works · You just encode the digits after the decimal point. As in for "0.15" you encode "15". Except you do it in a big base, and ...
GitHub
github.com › MikeMcl › decimal.js-extensions › blob › master › evaluate › README.md
decimal.js-extensions/evaluate/README.md at master · MikeMcl/decimal.js-extensions
See math.js for a much more powerful and full-featured expression parser and math library. import Decimal from 'decimal.js'; import { evaluate } from 'decimal.js-extensions-evaluate'; evaluate.extend(Decimal); let result = Decimal.evaluate('0.1 + 0.2'); console.log(result); // '0.3' console.log(result instanceof Decimal); // true Decimal.precision = 30; result = Decimal.eval('2sin(x)', { x: 3, sin: n => n.sin() }); console.log(result); // '0.282240016119734444201489605616' console.log(Decimal.eval.expression); // '2*sin(x)'
Author MikeMcl