hkval = 50000*.60 valueD = hkval/1000 valueC = int(valueD) if valueC < valueD then print "less" else print "same or more" end if
precision = 1e-5 a = 1 b = 1.0001 if abs(a-b)<precision then print "a and b equal up to ";precision else print "a and b are different" end if b = 1.000001 if abs(a-b)<precision then print "a and b equal up to ";precision else print "a and b are different" end if
precision = 1e-5 hkval = 50000*.60 valueD = hkval/1000 valueC = int(valueD) if valueC < valueD-precision then print "definitely less" else print "approximately same or more" end if
|
30.00000000000000000173472347597680709441192448139190673828125
hkval = 50000*.56 valueD = hkval/1000 valueC = int(valueD) if valueC < valueD then print "less" else print "same or more" end if