2014-05-01 16:21:43 -04:00
|
|
|
# test builtin min and max functions with float args
|
2017-03-08 18:11:05 -05:00
|
|
|
try:
|
|
|
|
min
|
|
|
|
max
|
|
|
|
except:
|
|
|
|
print("SKIP")
|
2017-06-08 00:00:57 -04:00
|
|
|
raise SystemExit
|
2014-05-01 16:21:43 -04:00
|
|
|
|
2017-06-08 10:23:22 -04:00
|
|
|
print(min(0, 1.0))
|
|
|
|
print(min(1.0, 0))
|
|
|
|
print(min(0, -1.0))
|
|
|
|
print(min(-1.0, 0))
|
2014-05-01 16:21:43 -04:00
|
|
|
|
2017-06-08 10:23:22 -04:00
|
|
|
print(max(0, 1.0))
|
|
|
|
print(max(1.0, 0))
|
|
|
|
print(max(0, -1.0))
|
|
|
|
print(max(-1.0, 0))
|
2014-05-01 16:21:43 -04:00
|
|
|
|
2017-06-08 10:23:22 -04:00
|
|
|
print(min(1.5, -1.5))
|
|
|
|
print(min(-1.5, 1.5))
|
2014-05-01 16:21:43 -04:00
|
|
|
|
2017-06-08 10:23:22 -04:00
|
|
|
print(max(1.5, -1.5))
|
|
|
|
print(max(-1.5, 1.5))
|
2014-05-01 16:21:43 -04:00
|
|
|
|
2017-06-08 10:23:22 -04:00
|
|
|
print(min([1, 2.9, 4, 0, -1, 2]))
|
|
|
|
print(max([1, 2.9, 4, 0, -1, 2]))
|
2014-05-01 16:21:43 -04:00
|
|
|
|
2017-06-08 10:23:22 -04:00
|
|
|
print(min([1, 2.9, 4, 6.5, -1, 2]))
|
|
|
|
print(max([1, 2.9, 4, 6.5, -1, 2]))
|
|
|
|
print(min([1, 2.9, 4, -6.5, -1, 2]))
|
|
|
|
print(max([1, 2.9, 4, -6.5, -1, 2]))
|
2014-05-01 16:21:43 -04:00
|
|
|
|