RPMG (version 2.2-3)

fmod: Floating point remainer function

Description

extract remainder for floating point numbers

Usage

fmod(k, m)

Value

returns remainder after dividing out the divisor part:

j = floor(k/m)

a = k-m*j

return(a)

Arguments

k

floating point number

m

divisor number

Author

Jonathan M. Lees <jonathan.lees@unc.edu>

Examples

Run this code

###  degrees after removing extraneous 2*pi
j = 540.23
fmod(j, 360)

Run the code above in your browser using DataLab