如何打印大于 3,999 的罗马数字?
How to print roman numerals greater than 3,999?
我想将几个数字打印为罗马数字,但是
(format t "~@R~%" 4000)
导致 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}>)
我在 Hyperspec 中没有找到有关此限制的任何信息,并且不知道罗马人只有 3,999 以内的数字。
是否有现成的解决方案可以将大于 3,999 的数字打印为罗马数字?
罗马人在 large number representation 上没有达成共识。 CL 实现者对解决争议持异议,特别是因为罗马人使用的两种方法("apostrophus" 和 "vinculum")都不适合在 TTY 上以 ASCII 表示。
PS。 3.999
可以近似为 IV
;-)
我想将几个数字打印为罗马数字,但是
(format t "~@R~%" 4000)
导致 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}>)
我在 Hyperspec 中没有找到有关此限制的任何信息,并且不知道罗马人只有 3,999 以内的数字。
是否有现成的解决方案可以将大于 3,999 的数字打印为罗马数字?
罗马人在 large number representation 上没有达成共识。 CL 实现者对解决争议持异议,特别是因为罗马人使用的两种方法("apostrophus" 和 "vinculum")都不适合在 TTY 上以 ASCII 表示。
PS。 3.999
可以近似为 IV
;-)