1# test the math functions that return ints
2
3try:
4    import math
5except ImportError:
6    print("SKIP")
7    raise SystemExit
8
9for fun in (math.ceil, math.floor, math.trunc):
10    for x in (-1.6, -0.2, 0, 0.6, 1.4, float("inf"), float("nan")):
11        try:
12            print(fun(x))
13        except (ValueError, OverflowError) as e:
14            print(type(e))
15