`(x1,y1)·(x2,y2)` in `ℤ[√D]`.
( [x1, y1]: [bigint, bigint], [x2, y2]: [bigint, bigint], D: bigint )
| 365 | |
| 366 | /** `(x1,y1)·(x2,y2)` in `ℤ[√D]`. */ |
| 367 | function pellMul( |
| 368 | [x1, y1]: [bigint, bigint], |
| 369 | [x2, y2]: [bigint, bigint], |
| 370 | D: bigint |
| 371 | ): [bigint, bigint] { |
| 372 | return [x1 * x2 + D * y1 * y2, x1 * y2 + y1 * x2]; |
| 373 | } |
| 374 | |
| 375 | function pairKey([x, y]: [bigint, bigint]): string { |
| 376 | return `${x},${y}`; |
no outgoing calls
no test coverage detected