Skip to content

Math

Basic math operations: abs, ceil, floor, power, round.

5 modules

ModuleDescription
Valor absolutoObtener valor absoluto de un numero
TechoRedondear numero hacia arriba al entero mas cercano
PisoRedondear numero hacia abajo al entero mas cercano
Potencia/ExponenteElevar numero a una potencia
Redondear numeroRedondear numero a decimales especificados

Modules

Valor absoluto

math.abs

Obtener valor absoluto de un numero

Parameters:

NameTypeRequiredDefaultDescription
numbernumberYes-Number to process

Output:

FieldTypeDescription
resultnumberValor absoluto
originalnumberValor absoluto

Example: Absolute of negative number

yaml
number: -5

Example: Absolute of positive number

yaml
number: 3.14

Techo

math.ceil

Redondear numero hacia arriba al entero mas cercano

Parameters:

NameTypeRequiredDefaultDescription
numbernumberYes-Number to process

Output:

FieldTypeDescription
resultnumberValor techo
originalnumberValor techo

Example: Ceiling positive number

yaml
number: 3.2

Example: Ceiling negative number

yaml
number: -2.7

Piso

math.floor

Redondear numero hacia abajo al entero mas cercano

Parameters:

NameTypeRequiredDefaultDescription
numbernumberYes-Number to process

Output:

FieldTypeDescription
resultnumberValor piso
originalnumberValor piso

Example: Floor positive number

yaml
number: 3.7

Example: Floor negative number

yaml
number: -2.3

Potencia/Exponente

math.power

Elevar numero a una potencia

Parameters:

NameTypeRequiredDefaultDescription
basenumberYes-Base number
exponentnumberYes-Power to raise to

Output:

FieldTypeDescription
resultnumberResultado de base elevada al exponente
basenumberResultado de base elevada al exponente
exponentnumberResultado de base elevada al exponente

Example: Square a number

yaml
base: 5
exponent: 2

Example: Cube root

yaml
base: 27
exponent: 0.333333

Redondear numero

math.round

Redondear numero a decimales especificados

Parameters:

NameTypeRequiredDefaultDescription
numbernumberYes-Number to process
decimalsnumberNo0Number of decimal places

Output:

FieldTypeDescription
resultnumberValor redondeado
originalnumberValor redondeado
decimalsnumberValor redondeado

Example: Round to integer

yaml
number: 3.7

Example: Round to 2 decimal places

yaml
number: 3.14159
decimals: 2

Released under the Apache 2.0 License.