ceiling_n {lazy.irtx} | R Documentation |
Return the Ceiling and Power of the Input using Radix (Base) of n
ceiling_n(x, n = 10)
x |
input vector, x > 0 |
n |
Radix or Base |
When n=10
0 <= x < 10, ceiling_n(x)$val=10, ceiling_n(x)$power=1
10 <= x < 100, ceiling_n(x)$val=100, ceiling_n(x)$power=2
100 <= x < 1000, ceiling_n(x)$val=1000, ceiling_n(x)$power=3
When n=2
0 <= x < 2, ceiling_n(x,2)$val=2, ceiling_n(x,2)$power=1
2 <= x < 4, ceiling_n(x,2)$val=4, ceiling_n(x,2)$power=2
4 <= x < 8, ceiling_n(x,2)$val=8, ceiling_n(x,2)$power=3
A list of:
power The power
val The value of ceiling = n^power
ceiling_n( c(1,9,10,99,100) ) ceiling_n( c(1,2,3,4,7,8,15,16), n=2 )