
















                                       CLIPMATH

                            The Clipper (tm) Math Library

                                 by Maurice J. Halmos



                                     Version 1.1

                                       May 1992





                                   Serial #1000002

                   Copyright (c) Videosoft/Video-Comp Electr.  1989




































     VideoSoft/Video-Comp                                       CLIPMATH Library



     1 INTRODUCTION


        1.1 Purpose & Registration

             The CLIPMATH library is intended to be a supplement to your Clipper
        run time library.  It contains a collection of math functions not
        included in the standard clipper library.  The library uses C routines,
        for fast performance.  The library functions have been tested in a
        number of 8088, 80286, and 80386 clones.

             This is a shareware program.  As such, it may be freely copied and
        distributed for evaluation.

             If you would like to use it, you must purchase a license.  One
        license per user is required, however, any program you create with it is
        yours to distribute.  The license will be good for all future updates of
        the library, and will allow you to inhibit the copyright notice that you
        get the first time you use the CLIPMATH library.

             Licenses cost $15.  If your are a registered user of the clipper
        (tm) graphics library, CLIPGRAF, then you are entitled to a $5 discount.
        Send check (with a U.S. representation) or cash, and include your name
        and address along with the version and serial number above.

             Send to:

                           VideoSoft/Video-Comp Electr.
                           Maurice J. Halmos
                           15000 Archwood St.
                           Van Nuys, CA 91405
                           USA



        Send comments through written mail to the above address or use E-mail to
        my CompuServe address:  73307,3076












                                         -1-












     VideoSoft/Video-Comp                                       CLIPMATH Library





        1.2 Disclaimer



            The author claims no responsibility for any damages caused by the
        use or misuse of this library.  This product is distributed "as is" with
        no warranty expressed or implied.  The author will not be responsible
        for any losses incurred by the use of this product.  The author reserves
        the right to make modifications at any time.  Prices are subject to
        change without notice.


            Trademarks.

        Clipper is a registered trademark of Nantucket.
        CompuServe is a registered trademark of CompuServe Incorporated.
        IBM is a registered trademark of International Business Machines.
        Lotus is a registered trademark of Lotus Development Corporation.
        Microsoft is a registered trademark of Microsoft Corporation.
        Turbo C is a registered trademark of Borland International.



























                                         -2-












     VideoSoft/Video-Comp                                       CLIPMATH Library





     2 THE MATH LIBRARY

        2.1 Usage

             Assuming that you have written a program, such as the sample pro-
        gram included in this package, MATHDEMO, you must compile and link as
        follows (which is the usual way):

        (Compile the usual way,)

        c:\path1\clipper  c:\path2\mathdemo



        you may use Microsoft Linker Version 5.01 or later
        or QuickC Linker version 4.06 or later - This is faster than Plink86


        c:\path3\link mathdemo,mathdemo,, c:\path1\clipper c:\path1\clipmath


        or Clipper's plink86 - (slower) or RTlink (same speed as Microsoft)

        c:\path3\plink86 FI mathdemo LIB c:\path1\clipper, c:\path1\clipmath
        c:\path3\RTlink FI mathdemo, math50 LIB c:\path1\clipmath

        remember to include math50.obj module for clipper 5.0 compatability.


             Turbo linker, tlink, will not link correctly (I'm not sure why).

        2.2 Running the Mathdemo

             The demonstration program along with this package must be compiled
        and linked as shown in the previous section.  In order to run the
        program you just type its name, "mathdemo".

        2.3 Summary of functions

             The following list contains all the functions that may be used with
        the CLIPMATH library.  Some of the functions return values, while others
        only perform tasks.

        Function Name                  Purpose



                                         -3-












     VideoSoft/Video-Comp                                       CLIPMATH Library



        m_init(regnum)                 Initializes the math library.  Use the
                                       registration number to inhibit the copy-
                                       right notice

           2.3.1 Trigonometric Functions

           Function Name                  Purpose

           m_acos(num)                    Returns the inverse cosine of num in
                                          radians.

           m_asin(num)                    Returns the inverse sine of num in
                                          radians.

           m_atan(num)                    Returns the inverse tangent of num in
                                          radians.

           m_cos(num)                     Returns the cosine of angle num
                                          radians.

           m_pi()                         Returns the value of pi.

           m_hypot(x,y)                   Computes the length of the hypotenuse
                                          of a right triangle, given the length
                                          of the other two sides.

           m_sin(num)                     Returns the sine of angle num radians.

           m_tan(num)                     Returns the tangent of angle num in
                                          radians.

           2.3.2 Power Functions

           Function Name                  Purpose

           m_cosh(num)                    Returns the hyperbolic cosine of num

           m_exp(num)                     Returns the natural number 'e' raised
                                          to the power of num.

           m_log(num)                     Returns the natural log of num.

           m_log10(num)                   Returns the log base 10 of num.

           m_pow(num1,num2)               Returns num1 raised to the power of
                                          num2.



                                         -4-












     VideoSoft/Video-Comp                                       CLIPMATH Library



           m_sinh(num)                    Returns the hyperbolic sine of num.

           m_tanh(num)                    Returns the hyperbolic tangent of num.

           2.3.3 Special Bessel Functions

           m_j0(num)                      Returns the value of the Bessel func-
                                          tion of the first kind of order 0.

           m_j1(num)                      Returns the value of the Bessel func-
                                          tion of the first kind of order 1.

           m_jn(n,num)                    Returns the value of the Bessel func-
                                          tion of the first kind of order n.

           m_y0(num)                      Returns the value of the Bessel func-
                                          tion of the second kind of order 0.

           m_y1(num)                      Returns the value of the Bessel func-
                                          tion of the second kind of order 1.

           m_yn(n,num)                    Returns the value of the Bessel func-
                                          tion of the second kind of order n.

           2.3.4 General Math Functions

           m_abs(num)                     Returns positive value (absolute
                                          value) of num.

           m_floor(num)                   Returns integer rounded down.

           m_fmod(num1,num2)              Returns the floating point remainder
                                          after dividing one floating point num-
                                          bers num1 by num2 (num1/num2).

           m_ceil(num)                    Returns integer rounded up

           m_sqrt(num)                    Returns the square root of num.

           2.3.5 Financial Functions

           Function Name                  Purpose







                                         -5-












     VideoSoft/Video-Comp                                       CLIPMATH Library



           m_fv(paymnt, rate, term)       Calculates the future value for a
                                          given set of installments 'paymnt',
                                          for a number of periods (i.e. months)
                                          'term', at an interest rate per period
                                          'rate'.

           m_pv(paymnt, rate, term)       Calculates the present value (i.e.
                                          what is left to pay from a loan) for a
                                          given payment per period 'paymnt', for
                                          a number of periods (i.e. months)
                                          'term', at an interest rate per period
                                          'rate'.

           m_pmt(prin, rate, term)        Calculates the payments per period
                                          required, in order to pay a principal
                                          amount 'prin' (i.e. a loan), for a
                                          given number of periods (i.e. months)
                                          'term', at an interest rate per period
                                          'rate'.
                                             prin = principal amount of loan
                                             rate = interest rate per period
                                             term = total number of periods


           m_amort(prin, rate, n1, n2)    Calculates the amount of loan princi-
                                          pal still outstanding after a given
                                          number of payments.
                                             prin = principal amount of loan
                                             rate = interest rate per period
                                             n1   = total number of periods
                                             n2   = number of payments
                                          completed.

           m_sf(amt, rate, n)             Sinking fund function.
                                          Calculates the deposit required at the
                                          end of each period which would be
                                          necessary to accumulate a given
                                          amount, assuming a given interest rate
                                          and term.
                                             amt  =  amount to be accumulated
                                             rate = interest rate per period
                                              n   = total number of deposits to
                                          be made.






                                         -6-












     VideoSoft/Video-Comp                                       CLIPMATH Library



                                     3 ORDER FORM

     TO:  Maurice J. Halmos
          Video-Comp Electronics
          15000 Archwood St.
          Van Nuys, CA 91405-4550
          U.S.A.
          (818)988-9848
          CompuServe #: 73307,3076


     From:  Full Name:               ____________________________________

            Company Name (if any):   ____________________________________

            Street Address:          ____________________________________

            City, Sate, Zip:         ____________________________________

            Country:                 ____________________________________

            Phone(s):                ____________________________________
            CompuServe #:            ____________________________________


     Desired Registration & Disks:

     CLIPGRAF ver 2.1a Registration only:     $38 x Qty____ =  $_____

     CLIPMATH ver 1.1 Registration only:      $15 x Qty____ =  $_____
     ($10 only if with CLIPGRAF)

     CLIPGRAF & CLIPMATH Disk (1 for both)    $10              $_____
     (Postage & Handling)
                                              ---------------------------

     TOTAL Enclosed:                                           $_____

     Send Check (with a U.S. branch) or cash (registered mail please).  I am
     sorry that I am unable to accept credit cards, but the low volume of sales
     doesn't allow it.
     When you register, I will send you your registration number to use in your
     program to inhibit the copyright notice.  This will be a simple one sheet
     letter.  If you require the disks sent to you, there is an additional $10
     charge for postage, handling and material.




                                         -7-












     VideoSoft/Video-Comp                                       CLIPMATH Library



                                  Table of Contents

     1 INTRODUCTION .................................................... 1
        1.1 Purpose & Registration ..................................... 1
        1.2 Disclaimer ................................................. 2

     2 THE MATH LIBRARY ................................................ 3
        2.1 Usage ...................................................... 3
        2.2 Running the Mathdemo ....................................... 3
        2.3 Summary of functions ....................................... 3
           2.3.1 Trigonometric Functions ............................... 4
           2.3.2 Power Functions ....................................... 4
           2.3.3 Special Bessel Functions .............................. 5
           2.3.4 General Math Functions ................................ 5
           2.3.5 Financial Functions ................................... 5

     3 ORDER FORM ...................................................... 7
































                                         -ii-






