Math Functions
math.fmod()
Compute the floating-point remainder with the dividend's sign, unlike the divisor-sign convention of %.
Formal Syntax & Structure
python syntaxpython
math.fmod(x, y, /)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | real number | Input real value. |
| y | real number | Second real value. |
Return Value
float
Floating-point result; finite precision and domain restrictions apply.
Working Example
Example Snippetpython
import mathprint(math.fmod(-11, 4))