1

What is the biggest number, which is possible to use with NumberFormatter in PHP with the newest ICU version?

I tested some numbers on 3v4l.org or on viper-7.com and

999899999999999999 was the maximum. I tested it for some other languages, too.

For 999999999999999999 I got nine hundred ninety-nine quadrillion and the the last 15 numbers wasn't spellout.

php code

$formatter = new NumberFormatter('en', NumberFormatter::SPELLOUT);
$formatter->setTextAttribute(NumberFormatter::DEFAULT_RULESET, "%spellout-cardinal");
echo $formatter->format(999899999999999999);

test results

https://3v4l.org/YXU5d for 999899999999999999

http://codepad.viper-7.com/traNvh for 999899999999999999

Edit: First I had 99899999999999999 and now I have updated it to 999899999999999999 with a new nine at the beginning

Grischa
  • 70
  • 8
  • 26
  • haven't you answered your own question? –  Nov 08 '15 at 23:12
  • @Dagon I am not sure with my answer and didn't find a real source. – Grischa Nov 08 '15 at 23:13
  • Number in php is "integer" or "float". Integers: http://stackoverflow.com/a/670668/4621324 also http://php.net/manual/en/language.types.integer.php For floats `The size of a float is platform-dependent, although a maximum of ~1.8e308 with a precision of roughly 14 decimal digits is a common value (the 64 bit IEEE format).` – Axalix Nov 08 '15 at 23:31

0 Answers0