Convert Number to Words

Coding Critique is the place to post source code for peer review by other members of DevNetwork. Any kind of code can be posted. Code posted does not have to be limited to PHP. All members are invited to contribute constructive criticism with the goal of improving the code. Posted code should include some background information about it and what areas you specifically would like help with.

Popular code excerpts may be moved to "Code Snippets" by the moderators.

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Kieran Huggins wrote:it's a good thing we got THAT cleared up... :rofl:

Is there a Septillion of anything? Let alone a Vigintillion?

Don't get me wrong - I do think it's good to be prepared, but I just thought it was funny ;-)
If one were calculating the number of molecules or particles on the planet (or some other astronomical body) one could expect to get very large numbers. Granted, the epsilon for such a thing would probably be rather large. Pretty much anything in the astronomic scale could get very large very quickly.


Now I must be off to see if I can make the Kessel run in under twelve parsecs.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

But for those large amounts you never see things like vigintillion: they just use the "e" notation (powers of ten).

I also wonder whether or not you're going to offer support for other languages.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Ambush Commander wrote:But for those large amounts you never see things like vigintillion: they just use the "e" notation (powers of ten).
True, science is often carried out with scientific notation for a reason. ;)
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

:lol: But 10e50 cannot used in number to words conversion.
its funny if you draw a check of 0.0002e5$
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Ambush Commander wrote:But for those large amounts you never see things like vigintillion: they just use the "e" notation (powers of ten).
But don't confuse common logarithm with natural logarithm which really does use e. :)
(#10850)
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Yep. I never understood the choice of "e" for the notation.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Wikipedia's note on the use of "E" : http://en.wikipedia.org/wiki/Scientific ... l_notation
Post Reply