Skip to main content

Math Functions

Add the ap_Math, Math to your uses clause in custom scripting to gain access to these functions

| ArcCos | Calculates the inverse cosine of a given number.
| ArcCosh | Calculates the inverse hyperbolic cosine of a given number.ArcCot | Calculates the inverse cotangent of a given number.ArcCotH | Calculates the inverse hyperbolic cotangent of a given number.ArcCsc | Calculates the inverse cosecant of a given number.ArcCscH | Calculates the inverse hyperbolic cosecant of a given number.ArcSec | Calculates the inverse secant of a given number.ArcSecH | Calculates the inverse hyperbolic secant of a given number.ArcSin | Calculates the inverse sine of a given number.ArcSinh | Calculates the inverse hyperbolic sine of a given number.ArcTan2 | Calculates the arctangent angle and quadrant of a given number.ArcTanh | Calculates the inverse hyperbolic tangent of a given number.Ceil | Rounds variables up toward positive infinity.ClearExceptions | Clears floating-point number's cumulative exception flags and raises cumulative floating-point number's exceptions if RaisePending is True.ClearFPUExceptions | Clears all exception bits in the FPU status word.ClearSSEExceptions | Clears all exception bits in the SSE’s MXCSR register.CompareValue | Returns the relationship between two numeric values.Cosecant | Returns the cosecant of an angle.Cosh | Calculates the hyperbolic cosine of an angle.Cot | Calculates the cotangent of an angle.Cotan | Calculates the cotangent of an angle.CotH | Calculates the hyperbolic cotangent of an angle.Csc | Returns the cosecant of an angle.CscH | Returns the hyperbolic cosecant of an angle.CycleToDeg | Converts an angle measurement from cycles to degrees.CycleToGrad | Converts an angle measurement from cycles to grads.CycleToRad | Converts an angle measurement from cycles to radians.DegNormalize |DegToCycle | Returns the value of a degree measurement expressed in cycles.DegToGrad | Returns the value of a degree measurement expressed in grads.DegToRad | Returns the value of a degree measurement expressed in radians.DivMod | Returns the result of an integer division, including the remainder.DoubleDecliningBalance | Calculates the depreciation of an asset using the double-declining balance method.EnsureRange | Returns the closest value to a specified value within a specified range.Floor | Rounds variables toward negative infinity.FMod | Returns the remainder of ANumerator / ADenominator (like mod in integers) with the same sign as ANumerator.Frexp | Separates the Mantissa and Exponent of XFutureValue | Calculates the future value of an investment.GetExceptionMask | Returns the current floating-point exception mask.GetExceptions | Retrieves the set of active floating-point exceptions.GetFPUExceptionMask | Returns the set of masked FPU floating-point arithmetic exceptions.GetFPURoundMode | Gets the Intel FPU's rounding mode.GetPrecisionMode | Returns the Intel FPU precision control mode.GetRoundMode | Returns the current floating-point rounding mode.GetSSEExceptionMask | Returns the set of masked Intel SSE arithmetic exceptions.GetSSERoundMode | Gets the Intel SSE's rounding mode.GradToCycle | Converts grad measurements to cycles.GradToDeg | Converts grad measurements to degrees.GradToRad | Converts grad measurements to radians.Hypot | Calculates the length of the hypotenuse.IfThen | Conditionally returns one of two specified values.InRange | Indicates whether a value falls within a specified range.InterestPayment | Calculates the interest portion of a loan payment.InterestRate | Returns the interest rate required to increase PresentValue to FutureValue.InternalRateOfReturn | Calculates the internal rate of return for an investment.IntPower | Calculates the integral power of a base value.IsInfinite | Indicates when a variable or expression represents an infinite value.IsNan | Indicates when a variable or expression does not evaluate to a numeric value.IsZero | Indicates when a floating-point variable or expression evaluates to zero, or very close to zero.Ldexp | Calculates X times (2 to the power of P).LnXP1 | Returns the natural log of (X+1)Log10 | Calculates log base 10.Log2 | Calculates log base 2.LogN | Calculates the log of X for a specified base.Max | Returns the greater of two numeric values.MaxIntValue | Returns the largest signed value in an integer array.MaxValue | Returns the largest signed value in an array.Mean | Returns the average of all values in an array.MeanAndStdDev | Calculates the mean and standard deviation of array elements.Min | Returns the lesser of two numeric values.MinIntValue | Returns the smallest signed value in an integer array.MinValue | Returns smallest signed value in an array.MomentSkewKurtosis | Calculates the mean, variance, skew, and kurtosis.NetPresentValue | Calculates the current value from an array of estimated cash flow values.Norm | Returns the Euclidean 'L-2' norm.NumberOfPeriods | Returns the number of payment periods for an investment.Payment | Calculates a fully amortized payment.PeriodPayment | Returns the principal amount from a full payment.Poly | Evaluates a uniform polynomial of one variable at the value X.PopnStdDev | Calculates the population standard deviation.PopnVariance | Calculates the population variance.Power | Raises Base to any Exponent power.PresentValue | Calculates the present value of an investment.RadToCycle | Converts radians to cycles.RadToDeg | Converts radians to degrees.RadToGrad | Converts radians to grads.RaiseExceptions | Raises cumulative floating-point number's exceptions.RandG | Generates random numbers with Gaussian distribution.RandomFrom | Returns a randomly selected element from an array.RandomRange | Returns a random integer from a specified range.RoundTo | Rounds a floating-point value to a specified digit or power of ten using "Banker's rounding".SameValue | Indicates whether two floating-point values are (approximately) equal.Sec | Calculates the secant of an angle.Secant | Calculates the secant of an angle.SecH | Calculates the hyperbolic secant of an angle.SetExceptionMask | Sets the exception mask for the floating-point exceptions.SetExceptions | Sets the floating-point exceptions specified in Exceptions.SetFPUExceptionMask | Sets the floating-point exception masks TFPUExceptionMask in the Intel FPU control word.SetFPURoundMode | Sets the Intel X87 FPU's rounding mode.SetPrecisionMode | Sets the Intel FPU precision control mode.SetRoundMode | Sets the rounding mode for floating-point calculations.SetSSEExceptionMask | Sets the floating-point exception masks TSSEExceptionMask in the Intel SSE’s MXCSR register.SetSSERoundMode | Sets the Intel SSE's rounding mode.Sign | Indicates whether a numeric value is positive, negative, or zero.SimpleRoundTo | Rounds a floating-point value to a specified digit or power of ten using symmetric arithmetic rounding.SinCos | Returns sine and cosine of an angle.Sinh | Returns the hyperbolic sine of an angle.SLNDepreciation | Returns the straight-line depreciation allowance of an asset.StdDev | Returns the sample standard deviation for elements in an array.Sum | Returns the sum of the elements in an array.SumInt | Returns the sum of the elements in an integer array.SumOfSquares | Returns the sum of the squared values from a data array.SumsAndSquares | Returns the sum of the values and the sum of the squared values in an array.SYDDepreciation | Calculates depreciation for an asset.Tan | Returns the tangent of X.Tanh | Returns the hyperbolic tangent of X.TotalVariance | Returns the statistical variance from an array of values.Variance | Calculates statistical sample variance from an array of data. | |