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:
|
|
|
|
import sys
|
|
|
|
print("SKIP")
|
|
|
|
sys.exit()
|
2014-05-01 16:21:43 -04:00
|
|
|
|
|
|
|
print(min(0,1.0))
|
|
|
|
print(min(1.0,0))
|
|
|
|
print(min(0,-1.0))
|
|
|
|
print(min(-1.0,0))
|
|
|
|
|
|
|
|
print(max(0,1.0))
|
|
|
|
print(max(1.0,0))
|
|
|
|
print(max(0,-1.0))
|
|
|
|
print(max(-1.0,0))
|
|
|
|
|
|
|
|
print(min(1.5,-1.5))
|
|
|
|
print(min(-1.5,1.5))
|
|
|
|
|
|
|
|
print(max(1.5,-1.5))
|
|
|
|
print(max(-1.5,1.5))
|
|
|
|
|
|
|
|
print(min([1,2.9,4,0,-1,2]))
|
|
|
|
print(max([1,2.9,4,0,-1,2]))
|
|
|
|
|
|
|
|
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]))
|
|
|
|
|