GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Spell(3) User Contributed Perl Documentation Spell(3)

Number::Spell - Perl extension for spelling out numbers

  use Number::Spell;
  my $str=spell_number(519252);

Number::Spell provides functionality for spelling out numbers. Currently only integers are supported.

By default Number::Spell does American formatting, but can be configured to do European formatting by calling it with the "Format => 'eu'" option:

        spell_number( ...  , Format => 'eu');

American and European formatting differ in how they represent numbers one billion and above.

        number          :       20000000000 (2 * 10^11)
        American format :       twenty billion
        European format :       twenty thousand million

With American formatting (default) Number::Spell should work for integers to

        nine hundred ninety nine vigintillion nine hundred ninety nine 
        novemdecillion nine hundred ninety nine octodecillion nine hundred 
        ninety nine septendecillion nine hundred ninety nine sexdecillion nine 
        hundred ninety nine quindecillion nine hundred ninety nine 
        quattuordecillion nine hundred ninety nine tredecillion nine hundred 
        ninety nine duodecillion nine hundred ninety nine undecillion nine 
        hundred ninety nine decillion nine hundred ninety nine nonillion nine 
        hundred ninety nine octillion nine hundred ninety nine septillion nine 
        hundred ninety nine sextillion nine hundred ninety nine quintillion nine 
        hundred ninety nine quadrillion nine hundred ninety nine trillion nine 
        hundred ninety nine billion nine hundred ninety nine million nine 
        hundred ninety nine thousand nine hundred ninety nine

and in European formatting mode is should be valid up-to

        nine hundred ninety nine thousand nine hundred ninety nine vigintillion 
        nine hundred ninety nine thousand nine hundred ninety nine 
        novemdecillion nine hundred ninety nine thousand nine hundred ninety 
        nine octodecillion nine hundred ninety nine thousand nine hundred 
        ninety nine septendecillion nine hundred ninety nine thousand nine 
        hundred ninety nine sexdecillion nine hundred ninety nine thousand nine 
        hundred ninety nine quindecillion nine hundred ninety nine thousand 
        nine hundred ninety nine quattuordecillion nine hundred ninety nine 
        thousand nine hundred ninety nine tredecillion nine hundred ninety nine 
        thousand nine hundred ninety nine duodecillion nine hundred ninety nine 
        thousand nine hundred ninety nine undecillion nine hundred ninety nine 
        thousand nine hundred ninety nine decillion nine hundred ninety nine 
        thousand nine hundred ninety nine nonillion nine hundred ninety nine 
        thousand nine hundred ninety nine octillion nine hundred ninety nine 
        thousand nine hundred ninety nine septillion nine hundred ninety nine 
        thousand nine hundred ninety nine sextillion nine hundred ninety nine 
        thousand nine hundred ninety nine quintillion nine hundred ninety nine 
        thousand nine hundred ninety nine quadrillion nine hundred ninety nine 
        thousand nine hundred ninety nine trillion nine hundred ninety nine 
        thousand nine hundred ninety nine billion nine hundred ninety nine 
        thousand nine hundred ninety nine million nine hundred ninety nine 
        thousand nine hundred ninety nine

        o   more formatting options.  i.e. option to get "1500" to spell as 
                 "fifteen hundred" instead of "one thousand five hundred"
        o   support for even larger numbers
        o   support for taking input as a Math::BigInt, Math::BigInteger
        o   support for taking numbers in scientific notation
        o   foreign language support
        o   support for real numbers (including Math::BigFloat)
        o   ability to convert from a "spelled" number to an arithmetic number

Les Howard, les@lesandchris.com

perl(1).
2000-03-11 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.