Please enable JavaScript to view this site.

This function returns the module of the input value, appropriately modified in the case of a negative input argument.

Syntax

real abs_mod (real value, real step)

value

Is the real unit whose module you want to calculate (can be a generic real expression)

step

Modulator value (can be a generic real expression, but must always give a positive value)

Result

Returns:

Condition

Value

value >= 0

mod(value, step)

Otherwise

mod(value, step) + step

Validity

Rule, Task

Notes

This formula allows the output to construct a "sawtooth" that extends uniformly even for negative values of the input unit

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC