File: Roots.mesa
Last edited by Bier on January 28, 1987 2:28:13 pm PST
Copyright © 1984 by Xerox Corporation. All rights reserved.
Contents: The quadratic formula etc.
DIRECTORY
Complex,
Rope;
Roots: CEDAR 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.