[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New issue: LCM-NO-ARGUMENTS
- To: email@example.com
- Subject: New issue: LCM-NO-ARGUMENTS
- From: gls@Think.COM
- Date: Mon, 17 Oct 88 14:54:49 EDT
References: CLtL p. 202
Related issues: none
Edit history: Version 1, Guy Steele 10/17/88
CLtL incorrectly states that (lcm) should return infinity, and
therefore specifies that giving lcm no arguments is an error.
In point of mathematical fact, 1 is the identity for the lcm operation.
Proposal (LCM-NO-ARGUMENTS:1): Define (lcm) to return the integer 1.
Examples: (lcm) => 1
Test Cases: (lcm) => 1
Currently the behavior in this case is implementation-dependent.
Rationale: Doing what is mathematically right.
KCL signals an error.
Lucid Lisp returns 1.
Symbolics Common Lisp returns 1.
Cost to Implementors: Pretty small (one-line fix).
Cost to Users: None.
Cost of non-adoption: Continued embarassment for Steele.
Performance impact: Negligible.
Benefits: Correct handling of a seldom-used boundary case.
Esthetics: Mild improvement.
Discussion: Mentioned in Steele's December 1985 "clarifications".