swh:1:snp:81eadaa089e8253d8469bcef66aa332632c6c669
Tip revision: c1688b374d201c13fb40b4dda2d2a89e34b94ec6 authored by Hans W. Borchers on 23 January 2021, 09:10:02 UTC
version 2.3.3
version 2.3.3
Tip revision: c1688b3
mod.R
##
## m o d . R tests
##
mod <- pracma::mod
rem <- pracma::rem
identical(mod(0, 0), 0)
identical(mod(1, 0), 1)
identical(mod(0, 2), 0)
identical(mod(5, 3), 2)
identical(mod(5, -3), -1)
identical(mod(-5, 3), 1)
identical(mod(-5, -3), -2)
identical(rem(0, 0), NaN)
identical(rem(1, 0), NaN)
identical(rem(0, 2), 0)
identical(rem(5, 3), 2)
identical(rem(5, -3), 2)
identical(rem(-5, 3), -2)
identical(rem(-5, -3), -2)