home *** CD-ROM | disk | FTP | other *** search
/ BUG 1 / BUGCD1996_0708.ISO / pc / aplic / mercury / poly.eka < prev    next >
Text File  |  1992-11-03  |  278b  |  13 lines

  1. ; Demo of polynomial root finder.
  2. ; Finds all real and complex roots of a polynomial.
  3.  
  4. ; Find roots to x^3 - x^2 - x - 1 = 0.
  5. f(x) := POLY(x,1,-1,-1,-1)
  6.  
  7. SOLVE f
  8.  
  9. ; Find 10-th roots of unity, solutions to x^10 = 1.
  10. g(x) := POLY(x,1,0,0,0,0,0,0,0,0,0,-1)
  11.  
  12. ; SOLVE g
  13.