File: Roots.mesa
Last edited by Bier on August 1, 1985 0:26:53 am PDT
Copyright © 1984 by Xerox Corporation. All rights reserved.
Contents: The quadratic formula etc.
DIRECTORY
Complex,
Rope;
Roots: DEFINITIONS =
BEGIN
RootArray: TYPE = ARRAY [1..4] OF Vec;
LinRoots: TYPE = ARRAY [1..2] OF Vec;
CubeRoots: TYPE = ARRAY [1..3] OF Vec;
QuarticRoots: TYPE = ARRAY [1..4] OF Vec;
Vec: TYPE = Complex.VEC;
RealQuartic: PROC [a, b, c, d, e: REAL] RETURNS [roots: ARRAY[1..4] OF REAL, rootCount: NAT];
For polynomial ax4 + bx3 + cx2 + dx + e = 0.
TestQuad: PROC [filename: Rope.ROPE];
TestCubic: PROC [filename: Rope.ROPE];
TestQuartic: PROC [filename: Rope.ROPE];
END.