TMathControl V1.0 Component for Borland Delphi® Copyright ©1996, John Merrit, Analog Species in a Digital World Productions. e-mail: john.merrit@NET4ALL.BE All Rights Reserved. Built in functions and properties of TMathControl: *Trigonometry: sin, cos, tan, arcsin, arccos, arctan; *Hyperbolic: sinh, cosh, tanh, arcsinh, arccosh, arctanh; *Logaritmic: log, ln, alog, exp; *power: x to power y, y-th root of x, 1/x, x², sqrt(x); *Misc. complex number algebra: absolute value, argument, conjugate, a real number -> complex number and vice versa; *Statistic: combinations, permutations, faculty (windows calculator =< 170, mine > 1500!) These functions work on both real and complex numbers (if appropriate). To reduce errormessages, some functions allow input of a complex number while they actually require a real number. The complex part will be omitted in this cases. e.g. Faculty requires a real (actually a positive integer*) number. If you entered the complex number (25,12) and push the faculty button (!), the calculator calculates 25! instead of returning an errormessage. This is the case for the following functions: rad to degrees (R->D), degrees to rad (D->R), faculty (!), combinations (Comb), permutations (Perm). Also, real numbers will be converted to integer (round) when needed i.e. 3.25! will calculate 3!. (!, combinations (Comb), permutations (Perm)) *To make bigger (smaller) calculations possible, a trick has being used to force these functions to work with (the integer part) of a real (extended) number. For example: Using longint as datatype would restrict us to calculate faculties for numbers =< 12. Now, the control is capable of calculating the faculty of a number > 1500. I've never needed this BIG numbers but knowing how for example Newton's Binomium works, it's easy to believe someone has some benefits from them. Controlproperties: *Accuracy: accuracy of calculations (optional, see source code); *MathFunc: function (sin, cos, etc...); Controlevents (speak for themself): Note that the control uses extended datatypes (3.4 * 10-4932 ... 1.1 * 10+4932) so you'll have to do strange things if you want (for example) to make an overflow occur. This has also one drawback: this control (and demoprogram) can't be used on a machine without a mathematical coprocessor, but since we live in 1996, we'll assume that everybody has one... *OnInvalidOp *OnOverflow *OnUnderflow *OnZeroDivide