如何打印大于3,999的罗马数字?

Mar*_*ann 1 format common-lisp roman-numerals

我想打印几个数字作为罗马数字但是

(format t "~@R~%" 4000)
Run Code Online (Sandbox Code Playgroud)

导致SBCL 1.3.20中的以下错误以及使用ccl的类似错误:

Number too large to print in Roman numerals: 4,000
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "new-repl-thread" RUNNING {100503D2B3}>)
Run Code Online (Sandbox Code Playgroud)

我没有在Hyperspec中找到有关此限制的任何信息,也不知道罗马人的数字只有3,999.

是否有现成的解决方案可以打印大于3,999的罗马数字?

sds*_*sds 6

罗马人没有就大量代表问题达成共识.CL实施者在解决争议时表示反对,特别是因为Romans使用的两种方法("apostrophus"和"vinculum")不适合在TTY上用ASCII表示.

PS.3.999可以近似为IV:-)