(a: bigint, b: bigint, bits: number)
| 68 | |
| 69 | /** Fixed-point divide on the base-2 grid: (a << bits) / b */ |
| 70 | export 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. |
no outgoing calls
no test coverage detected