Math Functions

Top  Previous  Next

 

Function

Description

Abs (Number)

Returns the absolute value.

Ceiling (Number)

Rounds the Number up to the closest integer.

Exp (Number)

Returns e (2.71828183) raised to the power of Number.

Floor (Number)

Rounds the Number down to the closest integer.

FormatNumber (Number, "ThousandsSeparator", "DecimalSeparator", NumDecimalPlaces)

This function formats numbers with thousands separators, decimal separators, and decimal places.  The ThousandsSeparator and DecimalSeparator are enclosed in double-quotes.  For example, to make the ThousandsSeparator a comma, you should specify "," as the argument.

Log10 (Number)

Returns the log (base 10) of Number.

Ln (Number)

Returns the natural log of Number.

Power (Number1, Number2)

Returns Number1 raised to the Number2 power.

Round (Number)

Round (Number, NumDecimalPlaces)

Rounds Number to the NumDecimalPlaces places.  If no decimal places are specified, rounds to nearest integer.

RoundToNumber (Number, RoundTo)

RoundToNumber (Number, RoundTo, NumDecimalPlaces)

Rounds Number to the nearest RoundTo value, such as to the nearest 10, 25, 50, 100, 250, 500, 1000, 5000, 10000, etc.

Sqrt (Number)

Returns the square root of Number.

 

NOTE: The parameters above such as "Number" can be an actual number or a question name that evaluates to a number.  For example if Q1 is a numeric question then Round(Q1) will first get the value saved for Q1 and then round it.

Page link: https://www.sawtoothsoftware.com/help/discover/manual/index.html?math_functions.html