Mathematical Routines

From RAD Studio
Jump to: navigation, search

Go Up to API Categories Index

This topic lists all mathematical routines used in the Delphi runtime library.

Constants used in math routines

The following table lists all the constants used in mathematical routines found in Delphi:

Routine Description

System.Math.Infinity

Represents positive infinity.

System.Math.MaxComp

Defines the maximum absolute value for a Comp variable.

System.Math.MaxDouble

Defines the maximum absolute value for a Double variable.

System.Math.MaxExtended

Defines the maximum absolute value for an Extended variable.

System.Math.MaxSingle

Defines the maximum absolute value for a Single variable.

System.Math.MinComp

Defines the smallest absolute value for a Comp variable.

System.Math.MinDouble

Defines the smallest absolute value for a Double variable.

System.Math.MinExtended

Defines the smallest absolute value for an Extended variable.

System.Math.MinSingle

Defines the smallest absolute value for a Single variable.

System.Math.NaN

Represents a value that cannot be represented as a valid number.

Math.NegativeValue (see Math Constants)

Defines a negative number that results from using Sign.

System.Math.NegInfinity

Represents negative infinity.

Math.PositiveValue (see Math Constants)

Defines a positive number that results from using Sign.

Math.ZeroValue (see Math Constants)

Defines a zero-value number that results from using Sign.

Arithmetic routines

The following table lists the arithmetic routines found in Delphi:

Routine Description

System.Abs

Returns an absolute value.

System.Math.Ceil

Rounds variables up toward positive infinity.

System.Math.DivMod

Returns the result of an integer division, including the remainder.

System.Exp

Returns the exponential of X.

System.Math.Floor

Rounds variables toward negative infinity.

System.Math.Frexp

Separates the Mantissa and Exponent of X.

System.Int

Returns the integer part of a real number.

System.Math.IntPower

Calculates the integral power of a base value.

System.Math.IsInfinite

Indicates when a variable or expression represents an infinite value.

System.Math.IsNan

Indicates when a variable or expression does not evaluate to a numeric value.

System.Math.IsZero

Indicates when a floating-point variable or expression evaluates to zero, or very close to zero.

System.Math.Ldexp

Calculates X times (2 to the power of P).

System.Math.LnXP1

Returns the natural log of (X+1).

System.Math.Log10

Calculates log base 10.

System.Math.Log2

Calculates log base 2.

System.Math.LogN

Calculates the log of X for a specified base.

System.Math.Max

Returns the greater of two numeric values (Delphi only).

System.Math.MaxIntValue

Returns the largest signed value in an integer array.

System.Math.MaxValue

Returns the largest signed value in an array.

System.Math.Mean

Returns the average of all values in an array.

System.Math.Min

Returns the lesser of 2 numeric values (Delphi only).

System.Math.MinIntValue

Returns the smallest signed value in an integer array.

System.Math.MinValue

Returns the smallest signed value in an array.

System.Odd

Returns true if the argument is an odd number.

System.Math.Power

Raises Base to any power.

System.Round

Returns the value of X rounded to the nearest whole number.

System.Math.RoundTo

Rounds a floating-point value to a specified digit or power of 10 using "Banker's rounding".

System.Math.Sign

Indicates whether a numeric value is positive, negative, or zero.

System.Math.SimpleRoundTo

Rounds a floating-point value to a specified digit or power of 10 using asymmetric arithmetic rounding.

System.Sqr

Returns the square of a number.

System.Sqrt

Returns the square root of X.

System.Math.Sum

Returns the sum of the elements in an array.

System.Math.SumInt

Returns the sum of the elements in an integer array.

System.Math.SumOfSquares

Returns the sum of the squared values from a data array.

System.Math.SumsAndSquares

Returns the sum of the values and the sum of the squared values in an array.

System.Trunc

Truncates a real number to an integer.



Trigonometric routines

The following table lists the trigonometric routines found in Delphi:

Routine Description

System.Math.ArcCos

Calculates the inverse cosine of a given number.

System.Math.ArcCosh

Calculates the inverse hyperbolic cosine of a given number.

System.Math.ArcCot

Calculates the inverse cotangent of a given number.

System.Math.ArcCotH

Calculates the inverse hyperbolic cotangent of a given number.

System.Math.ArcCsc

Calculates the inverse cosecant of a given number.

System.Math.ArcCscH

Calculates the inverse hyperbolic cosecant of a given number.

System.Math.ArcSec

Calculates the inverse secant of a given number.

System.Math.ArcSecH

Calculates the inverse hyperbolic secant of a given number.

System.Math.ArcSin

Calculates the inverse sine of a given number.

System.Math.ArcSinh

Calculates the inverse hyperbolic sine of a given number.

System.ArcTan

Calculates the arc tangent of a given number.

System.Math.ArcTan2

Calculates the arc tangent angle and quadrant of a given number.

System.Math.ArcTanh

Calculates the inverse hyperbolic tangent of a given number.

System.Math.Cosecant

Returns the cosecant of an angle.

System.Math.Cosh

Calculates the hyperbolic cosine of an angle.

System.Math.Cot

Calculates the cotangent of an angle.

System.Math.Cotan

Calculates the cotangent of an angle.

System.Math.CotH

Calculates the hyperbolic cotangent of an angle.

System.Math.Csc

Returns the cosecant of an angle.

System.Math.CscH

Returns the hyperbolic cosecant of an angle.

System.Math.CycleToDeg

Converts an angle measurement from cycles to degrees.

System.Math.CycleToGrad

Converts an angle measurement from cycles to grads.

System.Math.CycleToRad

Converts an angle measurement from cycles to radians.

System.Math.DegToCycle

Returns the value of a degree measurement expressed in cycles.

System.Math.DegToGrad

Returns the value of a degree measurement expressed in grads.

System.Math.DegToRad

Returns the value of a degree measurement expressed in radians.

System.Math.GradToCycle

Converts grad measurements to cycles.

System.Math.GradToDeg

Converts grad measurements to degrees.

System.Math.GradToRad

Converts grad measurements to radians.

System.Math.Hypot

Calculates the length of the hypotenuse.

System.Pi

Returns 3.1415926535897932385.

System.Math.RadToCycle

Converts radians to cycles.

System.Math.RadToDeg

Converts radians to degrees.

System.Math.RadToGrad

Converts radians to grads.

System.Math.Sec

Calculates the secant of an angle.

System.Math.Secant

Calculates the secant of an angle.

System.Math.SecH

Calculates the hyperbolic secant of an angle.

System.Sin

Returns the sine of the angle in radians.

System.Math.SinCos

Returns the sine and cosine of an angle.

System.Math.Sinh

Returns the hyperbolic sine of an angle.

System.Math.Tan

Returns the tangent of X.

System.Math.Tanh

Returns the hyperbolic tangent of X.

System.Trunc

Truncates a real number to an integer.


See Also