Formulas for Numbers
Decipad has a collection pre-built formulas that help you work with numbers.
You can use these formulas with tables, formulas and Decipad Advanced Formula blocks.
Rounding numbers
Round a number - round()
The round()
formula gives you a rounded version of a number. Optionally, you can specify the number of decimal places.
Syntax: round( Number, Optional Decimal Precision)
Round a number up - roundup() / ceil()
Rounds the number to the nearest largest integer or number with the given decimal places.
Syntax: roundup( Number, Optional Decimal Precision )
Alternative Syntax: ceil( Number, Optional Decimal Precision )
Round a number down - rounddown() / floor()
Rounds the number to the nearest smallest integer or number with the given decimal places.
Syntax: roundown( Number, Optional Decimal Precision )
Alternative Syntax: floor( Number, Optional Decimal Precision )
Square root - sqrt()
The sqrt()
formula gives you the square root of your number.
Syntax: sqrt( Number )
Take a look at this example, 3 feet
is the square root of 9 square feet
.
Get an absolute number - abs()
The abs()
formula gives you the absolute value of a number.
It is useful when you need to remove the negative sign from a number.
If your number is positive or zero, it stays the same. If it's negative, it removes the negative sign.
Syntax: abs( Number )
Take a look at this example, 20$
is the absolute value of -$20
.
Take a look at this practical example, where you check how much money you would need to get a positive balance back.
Trignometric formulas
Trigonometric formulas relate an angle of a righ-angled triangle with the ratios of two side lengths. Decipad supports adians and degrees. These can be used to triangulate distances for example.
sin() / asin()
cos() / acos()
tan() / atan()
Calculate a factorial - factorial()
Compute factorials with the factorial()
formula. Factorials are commonly used with probabilities.
Natural logarithm - ln()
The ln()
formula gives you the natural logarithmic of a number.
Syntax: ln( Number )