Next: Category number, Previous: Category zero, Up: Unions of Number Types [Contents][Index]
The category of ones are all numbers which represent a one, that is a multiplicative neutral element. In that sense, the following is always true:
(equal num (* 1 num))
The category’s predicate is onep
.
Return t
if object is a one, nil
otherwise.
As for zeroes, there is a constructor for ones, too, which similarly accepts an arbitrary number and uses that to determine the world of the number. Afterwards it creates and returns the one of that number type.
Return the one of the world number lives in.
(one 23) ⇒ 1 (one 2/3) ⇒ 1 (one 1.4) ⇒ 1.0 (one 1+2i) ⇒ 1+0i (one 1.2+3.4i) ⇒ 1.000000+0.000000i (one 7+14Z) ⇒ 1+14Z (one 7+13Z) ⇒ 1+13Z