Is there a Julia function that returns the smallest integer number strictly greater than a given number? For example, if I give 0.5, it returns me 1.0. If I give 1.0, it returns 2.0? ceil() can do the former example for sure, but for the latter example, it just returns me 1.0.
By integer, I mean the Float64 representation of an integer, not any Int type. Thanks!
Not sure if it matters for your use case, but f(x) = floor(Int, x) + 1 would be a bit more robust, as not all integers can be represented as floating point
julia> f(x) = floor(Int, x) + 1
f (generic function with 1 method)
julia> g(x) = floor(x) + 1
g (generic function with 1 method)
julia> 2^53
9007199254740992
julia> f(float(2^53))
9007199254740993
julia> Int(g(float(2^53)))
9007199254740992