Math

Mathematical functions and operators.

Arithmetic Operators

The following native arithmetic operators are available directly on any of the dsl.Operable instances:

Operator

Description

+

Addition

-

Subtraction

*

Multiplication

/

Division

%

Modulus

Examples

>>> ETL = Student.select(Student.surname, Student.score * Student.level * 0.32)

Mathematical Functions

class forml.io.dsl.function.Abs(arg: dsl.Operable)[source]

Return the absolute value.

Examples

>>> ETL = Student.select(Student.surname, function.Abs(Student.level - 5))
class forml.io.dsl.function.Ceil(arg: dsl.Operable)[source]

Return the value rounded up to the nearest integer.

Examples

>>> ETL = Student.select(Student.surname, function.Ceil(Student.score))
class forml.io.dsl.function.Floor(arg: dsl.Operable)[source]

Return the value rounded down to the nearest integer.

Examples

>>> ETL = Student.select(Student.surname, function.Floor(Student.score))