home *** CD-ROM | disk | FTP | other *** search
/ Prima Shareware 3 / DuCom_Prima-Shareware-3_cd1.bin / PROGRAMO / C / CALCDLL / CALC.TXT < prev    next >
Encoding:
Text File  |  1995-08-29  |  3.0 KB  |  102 lines

  1. Mathematical Calculator (version 1.02)
  2. ===========================================================
  3. ⌐ 1995 by: Guido Ahle & Karsten Jakuschona
  4.  
  5. This DLL (CALC.DLL) provides some of 'C' routines that allow you to incorporate
  6. mathematical expression evaluation into your programs. For example, using
  7. these routines you can evaluate such expressions as:
  8.  
  9. Examples:
  10. 100 / 5 * / (1 + 2)
  11. LN( PI )
  12. ...
  13.  
  14. Further features: Assignment of variables (e.g.: X = 5 )
  15.  
  16. Supported functions:
  17. sin(X)
  18. cos(X)
  19. tan(X)
  20. asin(X)
  21. acos(X)
  22. atan(X)
  23. sinh(X)
  24. cosh(X)
  25. tanh(X)
  26. exp(X)
  27. ln(X)
  28. log(X)
  29. sqrt(X)
  30. floor(X)
  31. ceil(X)
  32. abs(X)
  33. hypot(X, Y)
  34. deg(X)
  35. rad(X)
  36.  
  37. Command:
  38. CLR (Erases all variables).
  39. This function erases all user-defined variables.
  40.  
  41. Operator Precedence:
  42. This routine handles the following "operators" in the following priority:
  43. 1) Anything enclosed in ()'s as well as variables and functions.
  44. 2) Unary + and - signs
  45. 3) "To the power of" symbol: ^
  46. 4) Times (*), divide (/), and modulus (%)
  47. 5) Plus (+) and minus (-)
  48. 6) Assignments (=)
  49.  
  50. Function call:
  51. ComputeString( char far * expr, double far * result )
  52. This function evaluates the expression and passes back the result.  If the
  53. evaluation is successful, a value of CERR_OK (0) is returned.
  54.  
  55. Other error codes:
  56. CERR_OK            0        No Error
  57. CERR_UNBALAN        1        Not allowed parenthesis
  58. CERR_UNKNOWN        2        Undefined variable
  59. CERR_DOMAIN        3        Out of domain area
  60. CERR_NOARG        4        Function without arguments
  61. CERR_MAXVARS        5        No further variables available
  62. CERR_SYNTAX        6        Syntax error
  63. CERR_NUMARGS        7        Not enough arguments defined
  64. CERR_DIVZERO        8        Division by zero
  65. CERR_EMPTY        9        Undefined expresion
  66. CERR_BADFUNC        10      Undefined function
  67.  
  68. Pricing and registration:
  69. The DLL is distributed as a shareware program.  You have 
  70. the right to test this program for four weeks. You are allowed 
  71. to copy this unregistered package and give it to any other person,
  72. as long as it is not modified in any way. 
  73.  
  74. After the trial period, If you find it useful and want to keep using it,
  75. You are obliged to register your copy.
  76.  
  77. This software may NOT be used for commercial purpose without registration. 
  78.  
  79. Disclaimer
  80. The program has been tested to keep it as bug-free.  But we still 
  81. declare that it is supplied "As is"  without warranty of any kind. 
  82. You use it at your own risk.   We accept no responsibility for
  83. any damage or loss, physical, financial, or otherwise, that may
  84. result from the use.
  85.  
  86. If these terms are not acceptable to you, then you have NO license 
  87. to use or test CALC.DLL. You should IMMEDIATELY DELETE it from
  88. your disks.
  89.  
  90. Please send check payable to us and the following order to:
  91.     Karsten Jakuschona & Guido Ahle 
  92.     University of Paderborn - Germany
  93.     Department of mechanical engineering
  94.     33095 Paderborn
  95.     Germany
  96.     Email Address: jjaku1@cik.uni-paderborn.de
  97.  
  98.  
  99. ---> Single user not for commercial purpose:           $10
  100. ---> Single user for commercial purpose:        $25
  101. ---> Company, group, and/or for commercial purpose:    $150
  102.