Previous Next


                                    APPENDIX B


                    B   Operators in Type 4
                            Functions
    This appendix summarizes the PostScript operators that can appear in a type 4
    function, as discussed in Section 3.9.4, “Type 4 (PostScript Calculator) Func-
    tions.” For details on these operators, see the PostScript Language Reference, Third
    Edition.


B.1 Arithmetic Operators

           num1 num2       add sum                      Return num1 plus num2
           num1 num2       sub difference               Return num1 minus num2
           num1 num2       mul product                  Return num1 times num2
           num1 num2       div quotient                 Return num1 divided by num2
               int1 int2   idiv quotient                Return int1 divided by int2 as an integer
               int1 int2   mod remainder                Return remainder after dividing int1 by int2
                  num1     neg num2                     Return negative of num1
                  num1     abs num2                     Return absolute value of num1
                  num1     ceiling num2                 Return ceiling of num1
                  num1     floor num2                   Return floor of num1
                  num1     round num2                   Round num1 to nearest integer
                  num1     truncate num2                Remove fractional part of num1
                    num    sqrt real                    Return square root of num
                   angle   sin real                     Return sine of angle degrees
                   angle   cos real                     Return cosine of angle degrees
              num den      atan angle                   Return arc tangent of num/den in degrees
         base exponent     exp real                     Raise base to exponent power
                    num    ln real                      Return natural logarithm (base e)
                    num    log real                     Return common logarithm (base 10)
                    num    cvi int                      Convert to integer
                    num    cvr real                     Convert to real



                                            989

Previous Next