t439.py 873 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import math
  2. print "\nmath.exp(x)"
  3. print math.exp(0)
  4. print math.exp(1)
  5. print math.exp(5)
  6. print math.exp(-5)
  7. print math.exp(12.3)
  8. print math.exp(-21.3)
  9. print "\nmath.log(x[,base])"
  10. print math.log(1.0)
  11. print math.log(2.718281828459045)
  12. print math.log(148.4131591025766)
  13. print math.log(0.006737946999085467)
  14. print math.log(219695.9886721379)
  15. print math.log(0.000004551744463083231)
  16. print math.log(8,2)
  17. print math.log(16,4)
  18. print math.log(12345,78)
  19. print "\nmath.log10(x)"
  20. print math.log10(10)
  21. print math.log10(100.0)
  22. print math.log10(12324334.8592)
  23. print math.log10(0.0001)
  24. print "\nmath.pow(x,y)"
  25. print math.pow(3,5.0)
  26. print math.pow(3,-5.0)
  27. print math.pow(-3.0,5)
  28. print math.pow(-3.0,-5.0)
  29. print math.pow(0.0,0.0)
  30. print "\nmath.sqrt(x)"
  31. print math.sqrt(4)
  32. print math.sqrt(100.0)
  33. print math.sqrt(124.4)
  34. print math.sqrt(0)
  35. print "\nconstants"
  36. print math.pi
  37. print math.e