(ms?: number)
| 243 | // Median per-call time in **microseconds**. Two significant figures below 10µs |
| 244 | // (so a fast Mathematica op reads `8.3`, not a floored `0`), whole µs above. |
| 245 | const fmtUs = (ms?: number) => { |
| 246 | if (ms == null) return null; |
| 247 | const us = ms * 1000; |
| 248 | if (!(us > 0)) return '0'; |
| 249 | if (us >= 10) return String(Math.round(us)); |
| 250 | if (us >= 1) return us.toFixed(1); |
| 251 | const s = us.toPrecision(2); |
| 252 | return s.includes('.') ? s.replace(/0+$/, '').replace(/\.$/, '') : s; |
| 253 | }; |
| 254 | |
| 255 | // LaTeX for a case. Each case carries a hand-authored `latex` field (authored in |
| 256 | // gen.py, alongside the Unicode `title`) so every formula typesets exactly as |
no test coverage detected