tests/sign.r

library(float)

x = c(1, 2, -1, -2, 0, 100, -100, 0)
s = fl(x)

test = all.equal(sign(x), sign(s))
stopifnot(isTRUE(test))

Try the float package in your browser

Any scripts or data that you put into this service are public.

float documentation built on Feb. 16, 2023, 6:43 p.m.