Next: , Previous: , Up: Unions of Number Types   [Contents][Index]


63.3.12 The category ‘one

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.

Function: onep object

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.

Function: one number

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