(fn: (d: typeof Decimal) => string)
| 351 | |
| 352 | // Compute reference values at very high precision (1000 digits) |
| 353 | function highPrecRef(fn: (d: typeof Decimal) => string): string { |
| 354 | const saved = Decimal.precision; |
| 355 | Decimal.set({ precision: 1000 }); |
| 356 | const result = fn(Decimal); |
| 357 | Decimal.set({ precision: saved }); |
| 358 | return result; |
| 359 | } |
| 360 | |
| 361 | const REFS: Record<string, string> = { |
| 362 | 'e': highPrecRef((D) => D.exp(1).toString()), |
no test coverage detected