				Derivative Tool
				
				Version 1.01

				By Wout Klingens



Disclaimer & copyright
This program is Copyright (C) 1993, 1994 by Wouter C. M. Klingens, All Rights
Reserved.

It is provided as shareware with the following limitations:

Shareware means in short: try it before you buy it. That means that if you are
satisfied with the program, you must register it. See for more information
about this subject the chapter 'Registration information'. Shareware means
also, that you may distribute this unregistered version of Derivative Tool 
freely, in fact, you are encouraged to do so with the limitation, that you also
supply this document 'README.TXT', 'ORDER.FRM', 'REGSITES.TXT' with it.
There is no warranty or claim of fitness or reliability. The program is
distributed AS IS, and as such the author shall not be held liable for any loss
of data, down time, loss of revenue or any other direct or indirect damage or
claims caused by this program.




Written by me:

W. C. M. Klingens (Wout Klingens)
Rudyard Kiplingerf 205
3315 AJ Dordrecht
The Netherlands.

Internet e-mail address: wkling@knoware.nl


How does it work.
=================
Just fine. Simply program the lines:

uses td6; {uses dt7 for Turbo Pascal v7}
var
  s,t : string;
  error : boolean
begin
  t := 'sech(sin(x))';
  s := derive(t,error);
  if not error then
    writeln(s)
  else
    writeln('Expression too complex')
end.

Compile and run. Ready! See also the file 'TEST.PAS'.

The declaration is:
Function Derive (s : String; Var AError : Boolean) : String;


A few notes:
- Only 'x' will be identified as a variable. All others will be treated as
  constants.
- IN THE COMPILED UNIT ENCLOSED IS A 'BUG' WHICH ENSURES AN STRING RESULT 
  ONCE EVERY 11 TIMES, ENCOURAGING YOU TO REGISTER. If you like Derivative
  Tool then register. The 'nagging' will be over.
- No syntax checking is done. However, if a syntax is not correct, this will
  cause a stack overflow. The whole thing is recursive, of course.
- Stack overflow has been taken care of by use of the SPTR function. I do not
  guarantee however that this will always work. If such an event happens, then
  error will become TRUE.
- No error detection is made regarding to the length of the resulting string.
  In most cases the standard string length of 255 bytes should be enough.
  Longer string results should cause a stack overflow.
- Extensive error prevention is your responsibility. This could be done by
  means of FINIT if you use a math coprocessor or by use of an error handler
  that stores the entire stack, before a possible error occurs. There are
  several good handlers available in the public domain.
- Some calculation is done. For instance x^3.0E-5 will result in:
  3.0E-5*x^(-9.9997000000E-01). Well..., if you don't like that, then order
  the source code and change it...
  The source code is partly written in Dutch. Shouldn't be a very big problem
  though.
  Furthermore, I wrote this code several years ago. Not being too smart then,
  I didn't add any comments. Maybe in a future version, if enough interest
  exists.
- The source code consists of 2 units, the derivative unit and a filter unit 
  with utilities for for instance bracketing and unbracketing of expressions.

Implemented operators.
----------------------
+ : adding.
- : substraction.
* : multiplication.
/ : division.
^ : power.

Implemented functions, syntax and meaning.
------------------------------------------
ln 		: natural logarithm
tan		: tangent
cos		: cosine
sec		: secant
abs		: absolute value
sin 		: sine
sqrt		: square root
sech		: hyperbolic secant
tanh		: hyperbolic tangent
cosh		: hyperbolic cosine
sinh		: hyperbolic sine
cosec		: cosecant
cotan		: cotangent
cotanh     	: hyperbolic cotangent
cosech		: hyperbolic cosech
arcsec 		: inverse secant
arccos        	: inverse cosine
arcsin         	: inverse sine
arctan         	: inverse tangent
arcsech  	: inverse hyperbolic secant
arctanh     	: inverse hyperbolic tangent
arccosh       	: inverse hyperbolic cosine
arcsinh       	: inverse hyperbolic sine
arccotan	: inverse cotangent
arccosec    	: inverse cosecant
arccotanh    	: inverse hyperbolic cotangent
arccosech   	: inverse hyperbolic cosecant

Examples of valid expressions:
x
sin(x)
sin(arctanh(x))
x^2+7*x+12
1/x
sin(x)^2
e^x
e^(x+1.0E-3)  Watch the upper and lowercase of the e!!
pi*arccosh(x)

-----------------------------------------------------------------------------

Registration information.

Derivative Tool is distributed as shareware. This means that you may use
Derivative Tool for 21 days to evaluate its usefulness. If at the end of that
time you are satisfied with Derivative Tool as a product, you must register it.
The registration fee is US$35,-. For that money you will receive a version
without the 'registration encouragements' mentioned earlier.
If you would like to receive the source code, then the registration fee will
be US$50,-.
As an incentive for registration, you gain the right to free updates up to
Derivative Tool version 2.99 except for shipping costs.
From Derivative Tool version 3.0 up, you will be charged with a small update
fee plus shipping costs.
If you have an Internet e-mail address, you will be notified by e-mail if a
new version is released.

Cheques or Postal Orders should be made out to

W. C. M. Klingens

and sent to

W. C. M. Klingens
Rudyard Kiplingerf 205
3315 AJ Dordrecht
The Netherlands

German users may also order their copy at the German registration site.

Please fill out the order form to be found in the file 'ORDER.FRM' and send
it along with your cheque or Postal Order to the above address.

For Dutch users it will be a little easier:

Maak op gironummer 2769871 t.n.v. mij f50,- over voor de units of f75,- voor
de source code onder vermelding van "Derivative Tool", en u krijgt binnen
14 dagen uw geregistreerde versie thuis. Wilt u in ieder geval wel het
registratieformulier opsturen?

By the way. If you have any suggestions or questions regarding Derivative Tool, please
feel free to contact me, preferrably by e-mail. I will answer your mail as
soon as I can.

The author,

Wout Klingens.

