home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / DERIVE.ZIP / ARITH.MTH < prev    next >
Encoding:
Text File  |  1989-04-05  |  926 b   |  40 lines

  1. ; Does operations on numbers like a calculator
  2. 5 (9 - 3) / 2
  3.  
  4. ; Uses exact rational arithmetic
  5. 1/2 + 1/6
  6.  
  7. ; Uses as many digits as necessary for exact arithmetic
  8. 5^99
  9.  
  10. ; Press the Esc key, issue a Factor command, then a Transfer Demo command
  11. 54!
  12.  
  13. ; Returns the principal root of square roots
  14. SQRT 9
  15.  
  16. ; Simplifies fractional powers
  17. (2/27)^(2/3)
  18.  
  19. ; Some of these simplifications are tricky
  20. SQRT (4 - 2 * SQRT (3))
  21. SQRT (5 + SQRT 24) + SQRT (5 - SQRT 24)
  22.  
  23. ; i with a hat represents the imaginary SQRT(-1)
  24. SQRT (-1)
  25.  
  26. ; You can enter i-hat as #i and do complex arithmetic
  27. (1 + 2 #i) (3 + #i)
  28.  
  29. ; Complex denominators are automatically rationalized
  30. (2 + #i) / (#i + 1)
  31.  
  32. ; Fractional powers default to the principal root
  33. (-8)^(1/3)
  34.  
  35. ; Fractional powers of complex numbers are simplified
  36. SQRT (55/36 + 4/3 #i)
  37.  
  38. ; You can enter infinity as inf and combine it with itself or numbers
  39. inf + inf + 5
  40.