Standard mathematical functions.

  1. Each of the following takes a single floating_ point argument. The value is a floating_ point approximation to the value of the corresponding mathematical function.

    exp, ln, log, sqrt, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh.

  2. In each of the following,

    EXPR

    must evaluate to integer or floating_ point. The value is the value of the mathematical function in the same type as the value of

    EXPR

    .

    1. sgn(EXPR)

      . If

      EXPR

      is positive, then 1; if

      EXPR

      is zero, then 0; otherwise -1.

    2. random(EXPR)

      . The value is a number selected at random in the interval from 0 to the value of

      EXPR

      , inclusive. There has been no statistical study made of the generators. Don't depend on them for highly sensitive work.

    3. randomize(EXPR)

      . If EXPR is an integer, this resets the random number generator. This may be used to re-create a sequence of random numbers. On some systems, a non-integer argument resets the random number generator in an uncontrolled fashion.

  3. In each of the following, both occurrences of

    EXPR

    must evaluate to integer, floating_ point, or string. The value of the function is the value of the mathematical function in the same type as was the values of the two occurrences of

    EXPR

    .

    1. max(EXPR, EXPR)

      .

    2. min(EXPR, EXPR)

      .