MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / fpdiv

Function fpdiv

src/big-decimal/utils.ts:70–72  ·  view source on GitHub ↗
(a: bigint, b: bigint, bits: number)

Source from the content-addressed store, hash-verified

68
69/** Fixed-point divide on the base-2 grid: (a << bits) / b */
70export function fpdiv(a: bigint, b: bigint, bits: number): bigint {
71 return (a << BigInt(bits)) / b;
72}
73
74/**
75 * Fixed-point square root via Newton/Heron iteration on the base-2 grid.

Callers 2

utils.test.tsFile · 0.90
transcendentals.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected