Skip to main content

Built and signed on GitHub Actions

TypeScript-first implementation of arbitrary precision floating point decimals.

This package works with Node.js, Deno, Bun, BrowsersIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a month ago (0.8.5)

This module contains an implementation of arbitrary precision floating point decimal arithmetic.

Examples

Example 1

import { BigDecimal } from "@joaonmatos/decimal";

BigDecimal.valueOf(2).pow(200).toString(); // "1606938...835301376"
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@joaonmatos/decimal

Import symbol

import * as decimal from "@joaonmatos/decimal";

---- OR ----

Import directly with a jsr specifier

import * as decimal from "jsr:@joaonmatos/decimal";

Add Package

npx jsr add @joaonmatos/decimal

Import symbol

import * as decimal from "@joaonmatos/decimal";

Add Package

yarn dlx jsr add @joaonmatos/decimal

Import symbol

import * as decimal from "@joaonmatos/decimal";

Add Package

pnpm dlx jsr add @joaonmatos/decimal

Import symbol

import * as decimal from "@joaonmatos/decimal";

Add Package

bunx jsr add @joaonmatos/decimal

Import symbol

import * as decimal from "@joaonmatos/decimal";