[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Underspecification of ~R



    Date: Fri, 5 Dec 86 21:57:09 MST
    From: shebs%utah-orion@utah-cs.arpa (Stanley T. Shebs)

    ... I would prefer to see "minus four" and have an error for
    negative cardinals, since "minus fourth" sounds pretty strange!

(dolist (power '(-4 -2 0 2 4))
  (format t "~A to the ~:R power~%" "X" power))
X to the minus fourth power
X to the minus second power
X to the zeroth power
X to the second power
X to the fourth power

Doesn't sound strange to me.

    Sandra suggests "a lot" as the right way
    to print large integers, while I favor "many" (consider the New Guinea
    tribes whose number system is "one", "two", "three", "many").  There should
    also be a definite bound on integer size (I would make it low;  "five
    decillion" also looks pretty strange).  Finally, keep in mind that Americans
    and Britons do things differently above one million - perhaps the time
    zone returned by get-decoded-time should be used to decide whether to
    print "billion" or "milliard" (which do Canadians use anyway?).

Security in obscurity?  Some systems (e.g. Symbolics) punt after certain
limits.

(dotimes (i 10)
  (format t "10^~D ~@R~%" i (expt 10 i)))10^0 I
10^1 X
10^2 C
10^3 M
10^4 10000
10^5 100000
10^6 1000000
10^7 10000000
10^8 100000000
10^9 1000000000

(do ((i 8 (+ i 2))) ((> i 50))
  (format t "10^~D ~R~%" i (expt 10 i)))
10^8 one hundred million
10^10 ten billion
10^12 one trillion
10^14 one hundred trillion
10^16 ten quadrillion
10^18 one quintillion
10^20 one hundred quintillion
10^22 ten sextillion
10^24 one septillion
10^26 one hundred septillion
10^28 ten octillion
10^30 one nonillion
10^32 one hundred nonillion
10^34 ten decillion
10^36 one undecillion
10^38 one hundred undecillion
10^40 ten duodecillion
10^42 one times ten to the forty-second power
10^44 one hundred times ten to the forty-second power
10^46 ten times ten to the forty-fifth power
10^48 one times ten to the forty-eighth power
10^50 one hundred times ten to the forty-eighth power

One could possibly claim no "reasonable" program would be working
properly (or was given proper inputs) if it ever tried to make such
large numbers intelligible.

    Of course, the : and @ options could just be omitted...

						    stan the obscure