1
@node Numbers, Sequences and Arrays and Hash Tables, Top, Top
8
If NUMBER is zero, returns NUMBER; else returns (/ NUMBER (ABS NUMBER)).
13
@defun LOGNOT (integer)
16
Returns the bit-wise logical NOT of INTEGER.
21
@defvr {Constant} MOST-POSITIVE-SHORT-FLOAT
23
The short-float closest in value to positive infinity.
28
@defun INTEGER-DECODE-FLOAT (float)
31
Returns, as three values, the integer interpretation of significand F,
32
the exponent E, and the sign S of the given float, so that
34
FLOAT = S * F * B where B = (FLOAT-RADIX FLOAT)
36
F is a non-negative integer, E is an integer, and S is either 1 or -1.
41
@defun MINUSP (number)
44
Returns T if NUMBER < 0; NIL otherwise.
49
@defun LOGORC1 (integer1 integer2)
52
Returns the logical OR of (LOGNOT INTEGER1) and INTEGER2.
57
@defvr {Constant} MOST-NEGATIVE-SINGLE-FLOAT
59
Same as MOST-NEGATIVE-LONG-FLOAT.
64
@defvr {Constant} BOOLE-C1
66
Makes BOOLE return the complement of INTEGER1.
71
@defvr {Constant} LEAST-POSITIVE-SHORT-FLOAT
73
The positive short-float closest in value to zero.
78
@defun BIT-NAND (bit-array1 bit-array2 &optional (result-bit-array nil))
81
Performs a bit-wise logical NAND on the elements of BIT-ARRAY1 and
83
Puts the results into a new bit array if RESULT-BIT-ARRAY is NIL, into
84
BIT-ARRAY1 if RESULT-BIT-ARRAY is T, or into RESULT-BIT-ARRAY otherwise.
88
@defun INT-CHAR (integer)
91
Performs the inverse of CHAR-INT. Equivalent to CODE-CHAR in GCL.
96
@defun CHAR-INT (char)
99
Returns the font, bits, and code attributes as a single non-negative integer.
100
Equivalent to CHAR-CODE in GCL.
105
@defvr {Constant} LEAST-NEGATIVE-SINGLE-FLOAT
107
Same as LEAST-NEGATIVE-LONG-FLOAT.
112
@defun /= (number &rest more-numbers)
115
Returns T if no two of its arguments are numerically equal; NIL otherwise.
120
@defun LDB-TEST (bytespec integer)
123
Returns T if at least one of the bits in the specified bytes of INTEGER is 1;
129
@defvr {Constant} CHAR-CODE-LIMIT
131
The upper exclusive bound on values produced by CHAR-CODE.
136
@defun RATIONAL (number)
139
Converts NUMBER into rational accurately and returns it.
146
The floating-point number that is appropriately equal to the ratio of the
147
circumference of the circle to the diameter.
155
Returns the sine of RADIANS.
160
@defvr {Constant} BOOLE-ORC2
162
Makes BOOLE return LOGORC2 of INTEGER1 and INTEGER2.
167
@defun NUMERATOR (rational)
170
Returns as an integer the numerator of the given rational number.
175
@defun MASK-FIELD (bytespec integer)
178
Extracts the specified byte from INTEGER.
183
@deffn {Special Form} INCF
191
Adds the number produced by DELTA (which defaults to 1) to the number
200
Returns the hyperbolic sine of NUMBER.
205
@defun PHASE (number)
208
Returns the angle part of the polar representation of a complex number.
209
For non-complex numbers, this is 0.
214
@defun BOOLE (op integer1 integer2)
217
Returns an integer produced by performing the logical operation specified by
218
OP on the two integers. OP must be the value of one of the following
220
BOOLE-CLR BOOLE-C1 BOOLE-XOR BOOLE-ANDC1
221
BOOLE-SET BOOLE-C2 BOOLE-EQV BOOLE-ANDC2
222
BOOLE-1 BOOLE-AND BOOLE-NAND BOOLE-ORC1
223
BOOLE-2 BOOLE-IOR BOOLE-NOR BOOLE-ORC2
224
See the variable docs of these constants for their operations.
229
@defvr {Constant} SHORT-FLOAT-EPSILON
231
The smallest positive short-float that satisfies
232
(not (= (float 1 e) (+ (float 1 e) e))).
237
@defun LOGORC2 (integer1 integer2)
240
Returns the logical OR of INTEGER1 and (LOGNOT INTEGER2).
245
@defvr {Constant} BOOLE-C2
247
Makes BOOLE return the complement of INTEGER2.
252
@defun REALPART (number)
255
Extracts the real part of NUMBER.
261
@defvr {Constant} BOOLE-CLR
263
Makes BOOLE return 0.
268
@defvr {Constant} BOOLE-IOR
270
Makes BOOLE return LOGIOR of INTEGER1 and INTEGER2.
275
@defun FTRUNCATE (number &optional (divisor 1))
278
Values: (quotient remainder)
279
Same as TRUNCATE, but returns first value as a float.
287
Returns T if X and Y are EQ, or if they are numbers of the same type with
288
the same value, or if they are character objects that represent the same
289
character. Returns NIL otherwise.
294
@defun LOG (number &optional base)
297
Returns the logarithm of NUMBER in the base BASE. BASE defaults to the base
298
of natural logarithms.
303
@defvr {Constant} DOUBLE-FLOAT-NEGATIVE-EPSILON
305
Same as LONG-FLOAT-NEGATIVE-EPSILON.
310
@defun LOGIOR (&rest integers)
313
Returns the bit-wise INCLUSIVE OR of its arguments.
318
@defvr {Constant} MOST-NEGATIVE-DOUBLE-FLOAT
320
Same as MOST-NEGATIVE-LONG-FLOAT.
325
@defun / (number &rest more-numbers)
328
Divides the first NUMBER by each of the subsequent NUMBERS.
329
With one arg, returns the reciprocal of the number.
334
@defvar *RANDOM-STATE*
336
The default random-state object used by RAMDOM.
349
@defvr {Constant} LEAST-NEGATIVE-DOUBLE-FLOAT
351
Same as LEAST-NEGATIVE-LONG-FLOAT.
356
@defun FCEILING (number &optional (divisor 1))
359
Same as CEILING, but returns a float as the first value.
364
@defvr {Constant} MOST-POSITIVE-FIXNUM
366
The fixnum closest in value to positive infinity.
371
@defun BIT-ANDC1 (bit-array1 bit-array2 &optional (result-bit-array nil))
374
Performs a bit-wise logical ANDC1 on the elements of BIT-ARRAY1 and
376
Puts the results into a new bit array if RESULT-BIT-ARRAY is NIL, into
377
BIT-ARRAY1 if RESULT-BIT-ARRAY is T, or into RESULT-BIT-ARRAY otherwise.
385
Returns the tangent of RADIANS.
390
@defvr {Constant} BOOLE-NAND
392
Makes BOOLE return LOGNAND of INTEGER1 and INTEGER2.
400
Returns the hyperbolic tangent of NUMBER.
408
Returns the arc sine of NUMBER.
413
@defun BYTE (size position)
416
Returns a byte specifier. In GCL, a byte specifier is represented by
417
a dotted pair (<size> . <position>).
422
@defun ASINH (number)
425
Returns the hyperbolic arc sine of NUMBER.
430
@defvr {Constant} MOST-POSITIVE-LONG-FLOAT
432
The long-float closest in value to positive infinity.
437
@deffn {Macro} SHIFTF
442
(shiftf @{place@}+ newvalue)
445
Evaluates all PLACEs and NEWVALUE in turn, then assigns the value of each
446
form to the PLACE on its left. Returns the original value of the leftmost
452
@defvr {Constant} LEAST-POSITIVE-LONG-FLOAT
454
The positive long-float closest in value to zero.
459
@defun DEPOSIT-FIELD (newbyte bytespec integer)
462
Returns an integer computed by replacing the specified byte of INTEGER with
463
the specified byte of NEWBYTE.
468
@defun BIT-AND (bit-array1 bit-array2 &optional (result-bit-array nil))
471
Performs a bit-wise logical AND on the elements of BIT-ARRAY1 and BIT-ARRAY2.
472
Puts the results into a new bit array if RESULT-BIT-ARRAY is NIL, into
473
BIT-ARRAY1 if RESULT-BIT-ARRAY is T, or into RESULT-BIT-ARRAY otherwise.
478
@defun LOGNAND (integer1 integer2)
481
Returns the complement of the logical AND of INTEGER1 and INTEGER2.
486
@defun BYTE-POSITION (bytespec)
489
Returns the position part (in GCL, the cdr part) of the byte specifier.
494
@deffn {Macro} ROTATEF
502
Evaluates PLACEs in turn, then assigns to each PLACE the value of the form to
503
its right. The rightmost PLACE gets the value of the leftmost PLACE.
509
@defun BIT-ANDC2 (bit-array1 bit-array2 &optional (result-bit-array nil))
512
Performs a bit-wise logical ANDC2 on the elements of BIT-ARRAY1 and
514
Puts the results into a new bit array if RESULT-BIT-ARRAY is NIL, into
515
BIT-ARRAY1 if RESULT-BIT-ARRAY is T, or into RESULT-BIT-ARRAY otherwise.
520
@defun TRUNCATE (number &optional (divisor 1))
523
Values: (quotient remainder)
524
Returns NUMBER/DIVISOR as an integer, rounded toward 0. The second returned
525
value is the remainder.
530
@defvr {Constant} BOOLE-EQV
532
Makes BOOLE return LOGEQV of INTEGER1 and INTEGER2.
537
@defvr {Constant} BOOLE-SET
539
Makes BOOLE return -1.
544
@defun LDB (bytespec integer)
547
Extracts and right-justifies the specified byte of INTEGER, and returns the
553
@defun BYTE-SIZE (bytespec)
556
Returns the size part (in GCL, the car part) of the byte specifier.
561
@defvr {Constant} SHORT-FLOAT-NEGATIVE-EPSILON
563
The smallest positive short-float that satisfies
564
(not (= (float 1 e) (- (float 1 e) e))).
569
@defun REM (number divisor)
572
Returns the second value of (TRUNCATE NUMBER DIVISOR).
577
@defun MIN (number &rest more-numbers)
580
Returns the least of its arguments.
588
Calculates e raised to the power NUMBER, where e is the base of natural
594
@defun DECODE-FLOAT (float)
597
Returns, as three values, the significand F, the exponent E, and the sign S
598
of the given float, so that
600
FLOAT = S * F * B where B = (FLOAT-RADIX FLOAT)
602
S and F are floating-point numbers of the same float format as FLOAT, and E
609
@defvr {Constant} LONG-FLOAT-EPSILON
611
The smallest positive long-float that satisfies
612
(not (= (float 1 e) (+ (float 1 e) e))).
617
@defun FROUND (number &optional (divisor 1))
620
Same as ROUND, but returns first value as a float.
625
@defun LOGEQV (&rest integers)
628
Returns the bit-wise EQUIVALENCE of its arguments.
633
@defvr {Constant} MOST-NEGATIVE-SHORT-FLOAT
635
The short-float closest in value to negative infinity.
640
@defun BIT-NOR (bit-array1 bit-array2 &optional (result-bit-array nil))
643
Performs a bit-wise logical NOR on the elements of BIT-ARRAY1 and BIT-ARRAY2.
644
Puts the results into a new bit array if RESULT-BIT-ARRAY is NIL, into
645
BIT-ARRAY1 if RESULT-BIT-ARRAY is T, or into RESULT-BIT-ARRAY otherwise.
650
@defun CEILING (number &optional (divisor 1))
653
Returns the smallest integer not less than or NUMBER/DIVISOR. Returns the
654
remainder as the second value.
659
@defvr {Constant} LEAST-NEGATIVE-SHORT-FLOAT
661
The negative short-float closest in value to zero.
674
@defun <= (number &rest more-numbers)
677
Returns T if arguments are in strictly non-decreasing order; NIL otherwise.
682
@defun IMAGPART (number)
685
Extracts the imaginary part of NUMBER.
693
Returns T if X is an integer (fixnum or bignum); NIL otherwise.
698
@defun ASH (integer count)
701
Shifts INTEGER left by COUNT places. Shifts right if COUNT is negative.
706
@defun LCM (integer &rest more-integers)
709
Returns the least common multiple of the arguments.
717
Returns the cosine of RADIANS.
722
@deffn {Special Form} DECF
730
produced by DELTA (which defaults to 1) from the number in
736
@defun ATAN (x &optional (y 1))
738
Returns the arc tangent of
744
@defvr {Constant} BOOLE-ANDC1
746
Makes BOOLE return LOGANDC1 of INTEGER1 and INTEGER2.
753
Returns the hyperbolic cosine of
759
@defun FLOAT-RADIX (float)
762
Returns the representation radix (or base) of the floating-point
768
@defun ATANH (number)
771
Returns the hyperbolic arc tangent of NUMBER.
776
@defun EVENP (integer)
779
if INTEGER is even. Returns NIL if INTEGER is odd.
784
@defun ZEROP (number)
786
Returns T if NUMBER = 0; NIL
795
Returns T if X is a floating-point number; NIL otherwise.
800
@defun SXHASH (object)
803
Computes a hash code for OBJECT and returns it as an integer.
808
@defvr {Constant} BOOLE-1
810
Makes BOOLE return INTEGER1.
815
@defvr {Constant} MOST-POSITIVE-SINGLE-FLOAT
817
Same as MOST-POSITIVE-LONG-FLOAT.
822
@defun LOGANDC1 (integer1 integer2)
825
Returns the logical AND of (LOGNOT INTEGER1) and INTEGER2.
830
@defvr {Constant} LEAST-POSITIVE-SINGLE-FLOAT
832
Same as LEAST-POSITIVE-LONG-FLOAT.
840
Returns T if X is a complex number; NIL otherwise.
845
@defvr {Constant} BOOLE-AND
847
Makes BOOLE return LOGAND of INTEGER1 and INTEGER2.
852
@defun MAX (number &rest more-numbers)
855
Returns the greatest of its arguments.
860
@defun FLOAT-SIGN (float1 &optional (float2 (float 1 float1)))
863
Returns a floating-point number with the same sign as FLOAT1 and with the
864
same absolute value as FLOAT2.
869
@defvr {Constant} BOOLE-ANDC2
871
Makes BOOLE return LOGANDC2 of INTEGER1 and INTEGER2.
876
@defun DENOMINATOR (rational)
879
Returns the denominator of RATIONAL as an integer.
884
@defun FLOAT (number &optional other)
887
Converts a non-complex number to a floating-point number. If NUMBER is
888
already a float, FLOAT simply returns NUMBER. Otherwise, the format of
889
the returned float depends on OTHER; If OTHER is not provided, FLOAT returns
890
a SINGLE-FLOAT. If OTHER is provided, the result is in the same float format
896
@defun ROUND (number &optional (divisor 1))
899
Rounds NUMBER/DIVISOR to nearest integer. The second returned value is the
905
@defun LOGAND (&rest integers)
908
Returns the bit-wise AND of its arguments.
913
@defvr {Constant} BOOLE-2
915
Makes BOOLE return INTEGER2.
920
@defun * (&rest numbers)
923
Returns the product of its arguments. With no args, returns 1.
928
@defun < (number &rest more-numbers)
931
Returns T if its arguments are in strictly increasing order; NIL otherwise.
936
@defun COMPLEX (realpart &optional (imagpart 0))
939
Returns a complex number with the given real and imaginary parts.
944
@defvr {Constant} SINGLE-FLOAT-EPSILON
946
Same as LONG-FLOAT-EPSILON.
951
@defun LOGANDC2 (integer1 integer2)
954
Returns the logical AND of INTEGER1 and (LOGNOT INTEGER2).
959
@defun INTEGER-LENGTH (integer)
962
Returns the number of significant bits in the absolute value of INTEGER.
967
@defvr {Constant} MOST-NEGATIVE-FIXNUM
969
The fixnum closest in value to negative infinity.
974
@defvr {Constant} LONG-FLOAT-NEGATIVE-EPSILON
976
The smallest positive long-float that satisfies
977
(not (= (float 1 e) (- (float 1 e) e))).
982
@defun >= (number &rest more-numbers)
985
Returns T if arguments are in strictly non-increasing order; NIL otherwise.
990
@defvr {Constant} BOOLE-NOR
992
Makes BOOLE return LOGNOR of INTEGER1 and INTEGER2.
1000
Returns the arc cosine of NUMBER.
1005
@defun MAKE-RANDOM-STATE (&optional (state *random-state*))
1008
Creates and returns a copy of the specified random state. If STATE is NIL,
1009
then the value of *RANDOM-STATE* is used. If STATE is T, then returns a
1010
random state object generated from the universal time.
1015
@defun EXPT (base-number power-number)
1018
Returns BASE-NUMBER raised to the power POWER-NUMBER.
1023
@defun SQRT (number)
1026
Returns the principal square root of NUMBER.
1031
@defun SCALE-FLOAT (float integer)
1034
Returns (* FLOAT (expt (float-radix FLOAT) INTEGER)).
1039
@defun ACOSH (number)
1042
Returns the hyperbolic arc cosine of NUMBER.
1047
@defvr {Constant} MOST-NEGATIVE-LONG-FLOAT
1049
The long-float closest in value to negative infinity.
1054
@defvr {Constant} LEAST-NEGATIVE-LONG-FLOAT
1056
The negative long-float closest in value to zero.
1061
@defun FFLOOR (number &optional (divisor 1))
1064
Same as FLOOR, but returns a float as the first value.
1069
@defun LOGNOR (integer1 integer2)
1072
Returns the complement of the logical OR of INTEGER1 and INTEGER2.
1077
@defun PARSE-INTEGER (string &key (start 0) (end (length string)) (radix 10) (junk-allowed nil))
1080
Parses STRING for an integer and returns it.
1085
@defun + (&rest numbers)
1088
Returns the sum of its arguments. With no args, returns 0.
1093
@defun = (number &rest more-numbers)
1096
Returns T if all of its arguments are numerically equal; NIL otherwise.
1104
Returns T if X is any kind of number; NIL otherwise.
1109
@defvr {Constant} MOST-POSITIVE-DOUBLE-FLOAT
1111
Same as MOST-POSITIVE-LONG-FLOAT.
1116
@defun LOGTEST (integer1 integer2)
1119
Returns T if LOGAND of INTEGER1 and INTEGER2 is not zero; NIL otherwise.
1124
@defun RANDOM-STATE-P (x)
1127
Returns T if X is a random-state object; NIL otherwise.
1132
@defvr {Constant} LEAST-POSITIVE-DOUBLE-FLOAT
1134
Same as LEAST-POSITIVE-LONG-FLOAT.
1139
@defun FLOAT-PRECISION (float)
1142
Returns the number of significant radix-B digits used to represent the
1143
significand F of the floating-point number, where B = (FLOAT-RADIX FLOAT).
1148
@defvr {Constant} BOOLE-XOR
1150
Makes BOOLE return LOGXOR of INTEGER1 and INTEGER2.
1155
@defun DPB (newbyte bytespec integer)
1158
Returns an integer computed by replacing the specified byte of INTEGER with
1167
Returns the absolute value of NUMBER.
1172
@defun CONJUGATE (number)
1175
Returns the complex conjugate of NUMBER.
1180
@defun CIS (radians)
1183
Returns e raised to i*RADIANS.
1188
@defun ODDP (integer)
1191
Returns T if INTEGER is odd; NIL otherwise.
1196
@defun RATIONALIZE (number)
1199
Converts NUMBER into rational approximately and returns it.
1204
@defun ISQRT (integer)
1207
Returns the greatest integer less than or equal to the square root of the
1208
given non-negative integer.
1213
@defun LOGXOR (&rest integers)
1216
Returns the bit-wise EXCLUSIVE OR of its arguments.
1221
@defun > (number &rest more-numbers)
1224
Returns T if its arguments are in strictly decreasing order; NIL otherwise.
1229
@defun LOGBITP (index integer)
1232
Returns T if the INDEX-th bit of INTEGER is 1.
1237
@defvr {Constant} DOUBLE-FLOAT-EPSILON
1239
Same as LONG-FLOAT-EPSILON.
1244
@defun LOGCOUNT (integer)
1247
If INTEGER is negative, returns the number of 0 bits. Otherwise, returns
1248
the number of 1 bits.
1253
@defun GCD (&rest integers)
1256
Returns the greatest common divisor of INTEGERs.
1261
@defun RATIONALP (x)
1264
Returns T if X is an integer or a ratio; NIL otherwise.
1269
@defun MOD (number divisor)
1272
Returns the second result of (FLOOR NUMBER DIVISOR).
1277
@defun MODF (number)
1280
Returns the integer and fractional part of a floating point number mod 1.0.
1285
@defvr {Constant} BOOLE-ORC1
1287
Makes BOOLE return LOGORC1 of INTEGER1 and INTEGER2.
1292
@defvr {Constant} SINGLE-FLOAT-NEGATIVE-EPSILON
1294
Same as LONG-FLOAT-NEGATIVE-EPSILON.
1299
@defun FLOOR (number &optional (divisor 1))
1302
Returns the largest integer not larger than the NUMBER divided by DIVISOR.
1303
The second returned value is (- NUMBER (* first-value DIVISOR)).
1308
@defun PLUSP (number)
1311
Returns T if NUMBER > 0; NIL otherwise.
1316
@defun FLOAT-DIGITS (float)
1319
Returns the number of radix-B digits used to represent the significand F of
1320
the floating-point number, where B = (FLOAT-RADIX FLOAT).
1325
@defun RANDOM (number &optional (state *random-state*))
1328
Generates a uniformly distributed pseudo-random number between zero
1329
(inclusive) and NUMBER (exclusive), by using the random state object STATE.