2014-05-01 21:21:43 +01:00
|
|
|
# test builtin min and max functions with float args
|
2017-03-08 23:11:05 +00:00
|
|
|
try:
|
|
|
|
min
|
|
|
|
max
|
|
|
|
except:
|
|
|
|
print("SKIP")
|
2017-06-08 05:00:57 +01:00
|
|
|
raise SystemExit
|
2014-05-01 21:21:43 +01:00
|
|
|
|
2017-06-08 15:23:22 +01:00
|
|
|
print(min(0, 1.0))
|
|
|
|
print(min(1.0, 0))
|
|
|
|
print(min(0, -1.0))
|
|
|
|
print(min(-1.0, 0))
|
2014-05-01 21:21:43 +01:00
|
|
|
|
2017-06-08 15:23:22 +01:00
|
|
|
print(max(0, 1.0))
|
|
|
|
print(max(1.0, 0))
|
|
|
|
print(max(0, -1.0))
|
|
|
|
print(max(-1.0, 0))
|
2014-05-01 21:21:43 +01:00
|
|
|
|
2017-06-08 15:23:22 +01:00
|
|
|
print(min(1.5, -1.5))
|
|
|
|
print(min(-1.5, 1.5))
|
2014-05-01 21:21:43 +01:00
|
|
|
|
2017-06-08 15:23:22 +01:00
|
|
|
print(max(1.5, -1.5))
|
|
|
|
print(max(-1.5, 1.5))
|
2014-05-01 21:21:43 +01:00
|
|
|
|
2017-06-08 15:23:22 +01:00
|
|
|
print(min([1, 2.9, 4, 0, -1, 2]))
|
|
|
|
print(max([1, 2.9, 4, 0, -1, 2]))
|
2014-05-01 21:21:43 +01:00
|
|
|
|
2017-06-08 15:23:22 +01: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 21:21:43 +01:00
|
|
|
|