XGitHub

Scientific Notation

Numora always expands scientific notation to decimal notation. This is automatic and cannot be disabled. Expansion uses string arithmetic, so there is no floating-point precision loss.

typescript
import { NumoraInput } from 'numora'

const input = new NumoraInput(container, {
  decimalMaxLength: 18,
})

// Paste or type any of these - all are expanded automatically:
// "1.5e-7"   → "0.00000015"
// "2e+5"     → "200000"
// "1.23e-4"  → "0.000123"
// "5e3"      → "5000"
// "-1.5e-7"  → "-0.00000015"  (with enableNegative: true)
// "1.5e-18"  → "0.0000000000000000015"  (no precision loss)

Both e and E are supported. The expanded value is then processed through the rest of the sanitization pipeline and formatted according to your configuration.