myceil¶
-
cosmo_utils.utils.stats_funcs.
myceil
(x, base=10)[source] [edit on github]¶ Determines the upper-bound interger for a given number with a given base.
Parameters: x : float
Number to be approximated to closest number to
base
base : float
Base used to calculate the closest largest number
Returns: y : float
Closest float number to
x
, i.e. upper-bound floatExamples
>>> myceil(12, 10) 20.0
>>> myceil(12.05, 1.) 13.0
>>> myceil(12.05, 0.5) 12.5