next up previous contents index
Next: Conversion Functions Up: Scalar Functions Previous: Predicates

Arithmetic Functions

a + b {(a, a) tex2html_wrap_inline9939 a :: (a in number)}
  Returns the sum of the two arguments.

a - b {(a, a) tex2html_wrap_inline9941 a :: (a in number)}
  Subtracts the second argument from the first.

-v {a tex2html_wrap_inline9943 a :: (a in number)}
  Negates a number.

abs(x) {a tex2html_wrap_inline9945 a :: (a in number)}
  Returns the absolute value of the argument.

diff(x, y) {(a, a) tex2html_wrap_inline9947 a :: (a in number)}
  Returns the absolute value of the difference of the two arguments.

max(a, b) {(a, a) tex2html_wrap_inline9949 a :: (a in ordinal)}
  Returns the argument that is greatest (closest to positive infinity).

min(a, b) {(a, a) tex2html_wrap_inline9951 a :: (a in ordinal)}
  Returns the argument that is least (closest to negative infinity).

v * d {(a, a) tex2html_wrap_inline9953 a :: (a in number)}
  Returns the product of the two arguments.

v / d {(a, a) tex2html_wrap_inline9955 a :: (a in number)}
  Returns v divided by d. If the arguments are integers, the result is truncated towards 0.

rem(v, d) {(int, int) tex2html_wrap_inline9957 int}
  Returns the remainder after dividing v by d. The following examples show rem does for negative arguments: rem(5,3) = 2, rem(5,-3) = 2, rem(-5,3) = -2, and rem(-5,-3) = -2.

lshift(a, b) {(int, int) tex2html_wrap_inline9959 int}
  Returns the first argument logically shifted to the left by the integer contained in the second argument. Shifting will fill with 0-bits.

rshift(a, b) {(int, int) tex2html_wrap_inline9961 int}
  Returns the first argument logically shifted to the right by the integer contained in the second argument. Shifting will fill with 0-bits or the sign bit, depending on the implementation.

sqrt(v) {float tex2html_wrap_inline9963 float}
  Returns the square root of the argument. The argument must be nonnegative.

isqrt(v) {int tex2html_wrap_inline9965 int}
  Returns the greatest integer less than or equal to the exact square root of the integer argument. The argument must be nonnegative.

ln(v) {float tex2html_wrap_inline9967 float}
  Returns the natural log of the argument.

log(v, b) {(float, float) tex2html_wrap_inline9969 float}
  Returns the logarithm of v in the base b.

exp(v) {float tex2html_wrap_inline9971 float}
  Returns e raised to the power v.

expt(v, p) {(float, float) tex2html_wrap_inline9973 float}
  Returns v raised to the power p.

sin(v) {float tex2html_wrap_inline9975 float}
  Returns the sine of v, where v is in radians.

cos(v) {float tex2html_wrap_inline9977 float}
  Returns the cosine of v, where v is in radians.

tan(v) {float tex2html_wrap_inline9979 float}
  Returns the tangent of v, where v is in radians.

asin(v) {float tex2html_wrap_inline9981 float}
  Returns the arc sine of v. The result is in radians.

acos(v) {float tex2html_wrap_inline9983 float}
  Returns the arc cosine of v. The result is in radians.

atan(v) {float tex2html_wrap_inline9985 float}
  Returns the arc tangent of v. The result is in radians.

sinh(v) {float tex2html_wrap_inline9987 float}
  Returns the hyperbolic sine of v ( tex2html_wrap_inline9989 ).

cosh(v) {float tex2html_wrap_inline9991 float}
  Returns the hyperbolic cosine of v ( tex2html_wrap_inline9993 ).

tanh(v) {float tex2html_wrap_inline9995 float}
  Returns the hyperbolic tangent of v ( tex2html_wrap_inline9997 ).



next up previous contents index
Next: Conversion Functions Up: Scalar Functions Previous: Predicates



Jonathan Hardwick
Tue Nov 28 13:57:00 EST 1995