QESBPCSMath Unit Types Routines |
Description
This is designed to work in Borland Delphi 6 CLX and above, Borland C++ Builder 6 CLX and above, and Borland Kylix 2 and above. Most if not all features will work in Kylix 1 but it is not currently supported.
Supplies various optimised and flexible Math Routines, including support for Special Functions. Use of BASM to get better FPU performance is done in a number of routines. We have also tried to minimise the amount of division and math function calls as the FPU is not as good at these as it is Addition, Multiplication etc.
No dependency on the Delphi Math unit.
Copyright © 1999-2002 ESB Consultancy
v2.3 - 14 September 2002
Types |
TESBRoundingType | Different ways in which the Maths Processor will handle Rounding. |
Routines |
AdjustAngleDegree | Adjusts a value in Degrees, so that it lies in between 0 and 360. |
AdjustAngleRad | Adjusts a value in Radians, so that it lies in between 0 and 2 * Pi. |
Beta | Returns Beta(X,Y) using a Series Expansion for 1/Gamma (X) as defined in Abramowitz & Stegun. |
BuildFromParts | Returns an Extended constructed from a Mantissa and Exponent base 10. |
CompareFloat | Returns -1 if X1 < X2, 0 if they are the same, 1 if X1 > X2. |
DecLim | Decrements Value but won't go below specified Limit. |
Deg2DMS | Converts Degrees as Decimal into Degrees/Minutes/Seconds. |
Deg2Grad | Converts Degrees into Gradients. |
Deg2Rad | Converts Degrees into Radians. |
DMS2Deg | Converts Degrees/Minutes/Seconds into Degrees as Decimal. |
ESBArcCos | Given a Value returns the Angle whose Cosine it is, in Radians. |
ESBArcCosDeg | Given a Value returns the Angle whose Cosine it is, in Degrees. |
ESBArcCosec | Given a Value returns the Angle whose Cosecant it is, in Radians. |
ESBArcCosecDeg | Given a Value returns the Angle whose Cosecant it is, in Degrees. |
ESBArCosech | Returns the inverse hyperbolic cosecant of X. |
ESBArCosh | Returns the inverse hyperbolic cosine of X. |
ESBArCoth | Returns the inverse hyperbolic cotangent of X. |
ESBArcSec | Given a Value returns the Angle whose Secant it is, in Radians. |
ESBArcSecDeg | Given a Value returns the Angle whose Secant it is, in Degrees. |
ESBArcSin | Given a Value returns the Angle whose Sine it is, in Radians. |
ESBArcSinDeg | Given a Value returns the Angle whose Sine it is, in Degrees. |
ESBArcTan | Returns the ArcTangent of Y / X - Result is in Radians. |
ESBArcTanDeg | Returns the ArcTangent of Y / X - Result is in Degrees. |
ESBArcTanDeg2 | Given a Value returns the Angle whose Tangent it is, in Degrees. |
ESBArSech | Returns the inverse hyperbolic secant of X. |
ESBArSinh | Returns the inverse hyperbolic sine of X. |
ESBArTanh | Returns the inverse hyperbolic tangent of X. |
ESBCeil | |
ESBCosDeg | Returns Cosine of Angle given in Degrees. |
ESBCosec | Returns CoSecant of the Angle given in Radians. |
ESBCosecDeg | Returns Cosecant of Angle given in Degrees. |
ESBCosech | Returns the hyperbolic cosecant of X. |
ESBCosh | Returns the hyperbolic cosine of X. |
ESBCot | Returns CoTangent of the Angle given in Radians. |
ESBCotDeg | Returns Cotangent of Angle given in Degrees. |
ESBCoth | Returns the hyperbolic cotangent of X. |
ESBDistance | Returns the straight line Distance between (X1, Y1) and (X2, Y2) |
ESBFloor | Returns the Floor of X, ie Integral Value Below. |
ESBIntPower | Raises Values to an Integer Power. |
ESBLog10 | Returns Logarithm of X to Base 10. |
ESBLog2 | Returns Logarithm of X to Base 2. |
ESBLogBase | Returns Logarithm of X to Given Base. |
ESBMod | Returns Floating Point Modulus, given as X - ESBFloor ( X / Y ) * Y. |
ESBRem | Returns Floating Point Remainder, given as X - Int ( X / Y ) * Y. |
ESBSec | Returns Secant of the Angle given in Radians. |
ESBSecDeg | Returns Secant of Angle given in Degrees. |
ESBSech | Returns the hyperbolic secant of X. |
ESBSign | Returns the Sign of the Value. |
ESBSinCos | Fast Computation of Sin and Cos, where Angle is in Radians. |
ESBSinCosDeg | Fast Computation of Sin and Cos, where Angle is in Degrees. |
ESBSinDeg | Returns Sine of Angle given in Degrees. |
ESBSinh | Returns the hyperbolic sine of X. |
ESBTan | Returns Tangent of Angle given in Radians. |
ESBTanDeg | Returns Tangent of Angle given in Degrees. |
ESBTanh | Returns the hyperbolic tangent of X. |
ExtractParts | Returns an Extended as its Mantissa and Exponent base 10. |
FloatIsNegative | Returns True if X is Negative, ie X < -ESBTolerance. |
FloatIsPositive | Returns True if X is Positive, ie X > ESBTolerance. |
FloatIsZero | Returns True if X is within ESBTolerance of 0. |
Gamma | Returns Gamma(X) using a Series Expansion for 1/Gamma (X) as defined in Abramowitz & Stegun. |
GCD | Returns the Greatest Common (Positive) Divisor (GCD)of two Integers. |
Get87ControlWord | Returns the 80x87 Control Word. |
GetRoundingType | Get the Current Rounding Type. |
Grad2Deg | Converts Gradients into Degrees. |
Grad2Rad | Converts Gradients into Radians. |
GreaterFloat | Returns True if X1 > X2. |
Hermite | Returns a Hermite Polynomial of order N evaluated at X. |
ILog2 | Calculate the integer part of the logarithm base 2 of an integer. |
IncLim | Increments Value but won't go above specified Limit. |
IncompleteBeta | Returns the Incomplete Beta Ix(P, Q), where 0 <= X <= 1 and P and Q are positive. |
IntPow | Calculate any float to non-negative integer power. |
InverseGamma | Returns 1/Gamma(X) using a Series Expansion as defined in Abramowitz & Stegun. |
ISqrt | ISqrt (I) computes INT (SQRT (I)), that is, the integral part of the square root of integer I. |
LCM | Returns the Least Common Multiple of two Integers. |
LesserFloat | Returns True if X1 < X2. |
LnBeta | Returns the Natural Logarithm of Beta(X,Y) using a LnGamma (X) as defined above. |
LnGamma | Logarithm to base e of the gamma function. |
MaxWXYZ | Returns the Maximum of 4 Values. |
MaxXY | Returns the Maximum of 2 Values. |
MaxXYZ | |
MinWXYZ | Returns the Minimum of 4 Values. |
MinXY | |
MinXYZ | Returns the Minimum of 3 Values. |
Pow2 | Calculate 2 to the given floating point power. |
Rad2Deg | Converts Radians into Degrees. |
Rad2Grad | Converts Radians into Gradients. |
RelativePrime | If two Integers are Relative Prime to each other then GCD (X, Y) = 1. |
RoundDP | Returns X rounded to the given number of Decimal Places. |
SameFloat | Returns True if X1 and X2 are within a "small" value of each other. |
Set87ControlWord | Sets the 80x87 Control Word. |
SetRoundingType | Allows you to change the Current Rounding Type. |
SignXY | Returns the FORTRAN type SIGN of the Values - basically it returns a value with the Magnitude of X and the Sign of Y. |
SolveQuadratic | Solves a Quadratic Equation of the form AX^2 + BX + C = 0. |
SumOfSeries | Algebraically calculates the sum of a series. |
TenToY | Returns 10^Y - handles all cases. |
TwoToY | Returns 2^Y - handles all cases. |
XtoY | Returns X^Y - handles all cases (except those mentioned below). |
|