https en wikipedia orgwikifloorandceilingfunctions return the floor of x as an integral param x the number return the largest integer x import math allfloorn math floorn for n in 1 1 0 0 1 1 1 1 1 0 1 0 1000000000 true return the floor of x as an integral param x the number return the largest integer x import math all floor n math floor n for n in 1 1 0 0 1 1 1 1 1 0 1 0 1_000_000_000 true
def floor(x: float) -> int:
    
    return int(x) if x - int(x) >= 0 else int(x) - 1


if __name__ == "__main__":
    import doctest

    doctest.testmod()