Advertisement
Guest User

Python FastArithmeticUnitTest

a guest
Apr 14th, 2015
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. import FastArithmetic, time
  2.  
  3. fam = FastArithmetic.FastArithmetic()
  4.  
  5. print("Addition: -9223372036854775808 + -9223372036854775808...")
  6. time.clock()
  7. print("Result:", fam.add(-9223372036854775808, -9223372036854775808))
  8. e=time.clock()
  9. print("Elapsed time:", e)
  10. print()
  11.  
  12. fam.reset()
  13.  
  14. print("Subtraction: -6 - -9223372036854775808...")
  15. e -= time.clock()
  16. print("Result:", fam.subtract(-6, -9223372036854775808))
  17. print("Elapsed time:", e)
  18. print()
  19.  
  20. fam.reset() #almost forgot to reset my fam!
  21.  
  22. print("Multiplication: -9223372036854775808 * 1...")
  23. e -= time.clock()
  24. print("Result:", fam.multiply(-9223372036854775808, 1))
  25. print("Elapsed time:", e)
  26. print()
  27.  
  28. input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement