File: Roots.mesa
Last edited by Bier on July 29, 1984 4:39:54 pm PDT
Copyright © 1984 by Xerox Corporation. All rights reserved.
Contents: The quadratic formula etc.
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.