(rational x)  Function: RATIONAL produces a rational number for any real numeric argument. This is more efficient than RATIONALIZE, but it assumes that floatingpoint is completely accurate, giving a result that isn't as pretty.

 Mentioned in:
CLtL2  12.1. Precision, Contagion, and Coercion
CLtL2  12.5. Irrational and Transcendental Functions
CLtL2  12.5.1. Exponential and Logarithmic Functions
CLtL2  12.6. Type Conversions and Component Extractions on Numbers
CLtL2  2.1. Numbers
CLtL2  2.1.2. Ratios
CLtL2  2.1.4. Complex Numbers
CLtL2  2.15. Overlap, Inclusion, and Disjointness of Types
CLtL2  4.5. Type Specifiers That Specialize
CLtL2  4.8. Type Conversion Function
CLtL2  4.9. Determining the Type of an Object
HyperSpec  12.1.3 Rational Computations
HyperSpec  12.1.3.1 Rule of Unbounded Rational Precision
HyperSpec  12.1.4.1 Rule of Float and Rational Contagion
HyperSpec  12.1.4.1.1 Examples of Rule of Float and Rational Contagion
HyperSpec  2.3.2.1 Syntax of a Rational
HyperSpec  Function RATIONAL, RATIONALIZE
HyperSpec  System Class RATIONAL
Successful Lisp  chapter14

 
(rationalp object)  Function: Return true if OBJECT is a RATIONAL, and NIL otherwise.

 Mentioned in:
CLtL2  12.2. Predicates on Numbers
CLtL2  6.2.2. Specific Data Type Predicates
HyperSpec  Function RATIONALP

 
rationals  
 Mentioned in:
HyperSpec  12.1.3.2 Rule of Canonical Representation for Rationals
HyperSpec  12.1.5.3 Rule of Canonical Representation for Complex Rationals
HyperSpec  12.1.5.3.1 Examples of Rule of Canonical Representation for Complex Rationals

 
(rationalize x)  Function: Converts any REAL to a RATIONAL. Floats are converted to a simple rational representation exploiting the assumption that floats are only accurate to their precision. RATIONALIZE (and also RATIONAL) preserve the invariant: (= x (float (rationalize x) x))

 Mentioned in:
CLtL2  12.6. Type Conversions and Component Extractions on Numbers
CLtL2  4.8. Type Conversion Function
HyperSpec  Function RATIONAL, RATIONALIZE

 
alexandria.0.dev:negativerational  Type: Type specifier denoting the rational range from inf to 0.

 
 
alexandria.0.dev:positiverational  Type: Type specifier denoting the rational range from 0 to +inf.

 
 
(alexandria.0.dev:positiverationalp n)  Undocumented

 
 
(alexandria.0.dev:negativerationalp n)  Undocumented

 
 
alexandria.0.dev:nonnegativerational  Type: Type specifier denoting the rational range from 0 to +inf.

 
 
alexandria.0.dev:nonpositiverational  Type: Type specifier denoting the rational range from inf to 0.

 
 
(alexandria.0.dev:nonnegativerationalp n)  Undocumented

 
 
(alexandria.0.dev:nonpositiverationalp n)  Undocumented

 
 