How to say big numbers in English: Common Lisp
Ruslan Spivak - - September 12, 2007When i was describing notations and representation of numbers in Erlang(and Python) i forgot to mention very cool feature of format function in Common Lisp, with which i got acquainted exploring highly-recommended Practical Common Lisp book.
This feature is ~R directive which knows how to say really big numbers in English words.
Here is the example (I use SBCL + SLIME):
CL-USER> (format nil "~R" 1604872898756737459538) "one sextillion six hundred four quintillion eight hundred seventy-two quadrillion eight hundred ninety-eight trillion seven hundred fifty-six billion seven hundred thirty-seven million four hundred fifty-nine thousand five hundred thirty-eight"
Categories: Blogs Ruslan Spivak
Erlang on Twitter
» doni_erlang (Dony Erlangga): RT @DetikTour: Salam Kenal RT @doni_erlang Ini udh di bandara aku nya by “@BybyHassan: @doni_erlang @ekri… http://t.co/PYRbeo5q0g #tiket …
» mitaaryn (KMAryanie♬TATA): erlang, ryan, dan pajri hahahhaha
» jspahrsummers (Justin Spahr-Summers): RT @glenn1you0: One of erlang’s endearing features might just be that it hasn’t suffered the indignity of being ported to the jvm.
» skatterbean (Jay Baird): RT @glenn1you0: One of erlang’s endearing features might just be that it hasn’t suffered the indignity of being ported to the jvm.
» la_luna_azul (Hiroaki Sano): @oranie 息抜きにerlangのソース読みませんか???
» Erlang_Cielers (Erlang G Sebastian): @indahtriutami14 km msih smp tah .. Pasti klas 3 yaa :)
» indahtriutami14 (indah tri utami): Di SMPN 5karawang barat . Ohgtu RT”@Erlang_Cielers: @indahtriutami14 emang skolah dmn gtu ? Lagi tduran ja nih :)”
» GJane_ (Gabrielle Jane): @ErlAng_fei @laurentiusjojo @eva_marcella sakit akuuu:]xx badanku meriang :| :(
» Erlang_Cielers (Erlang G Sebastian): @indahtriutami14 emang skolah dmn gtu ? Lagi tduran ja nih :)
» skyherder (Sky Herder): Темы выпуска: настройка Claws Mail, каррирование и генерация UUID в Erlang, как в Linux заблокировать экран перед... http://t.co/B8zbjY7qN9
Statistics
Number of aggregated posts: 10650
Most recent article: May 20, 2013
Latest comments
» Moraru on This is Why You Spent All that Time Learning to Program: It is true that computer science was a pain in the back at time that i’ve had to learn it…
» Commercial hand dryers on Couchbase Meetup at new HQ: Buy online from here where you will get so much of variety in Commercial hand dryers for people. If you…
» Fort McMurray Homes on Motivated Reasoning and Erlang vs Python vs Node: I don’t really understand why this post is motivational? I don’t even see a post, just a title. Fort McMurray…