Fmod - script and chart function

fmod() is a generalized modulo function that returns the remainder part of the integer division of the first argument (the dividend) by the second argument (the divisor). The result is a real number. Both arguments are interpreted as real numbers, that is, they do not have to be integers.


fmod(a, b)

Return data type: numeric


Argument Description
a Dividend
b Divisor

Examples and results:  

Examples Results

fmod( 7,2 )

Returns 1

fmod( 7.5,2 )

Returns 1.5

fmod( 9,3 )

Returns 0

fmod( -4,3 )

Returns -1

fmod( 4,-3 )

Returns 1

fmod( -4,-3 )

Returns -1

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?