Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A bug on ceil function?

A following code

from math import ceil

val = (3**38 / (2*3 - 1) - 1) / 2
print(ceil(val) - val)

return

38/5

But this is weird since the value should be $< 1$ by the definition of the ceil function.