add logic for pure quadratics
This commit is contained in:
47
tester.sh
47
tester.sh
@@ -324,3 +324,50 @@ Polynomial degree: 2
|
||||
Discriminant is strictly negative, the two complex solutions are:
|
||||
4.89898i/6
|
||||
-4.89898i/6"
|
||||
|
||||
run_test \
|
||||
"26. degree 2 pure" \
|
||||
"3 * x^2 + 5 * x^1 - 2 * x^0 = 5 * x" "\
|
||||
Reduced form: -2 * x^0 + 0 * x^1 + 3 * x^2 = 0
|
||||
Polynomial degree: 2
|
||||
Discriminant is strictly positive, the two solutions are:
|
||||
√(2/3)
|
||||
-√(2/3)"
|
||||
|
||||
run_test \
|
||||
"27. degree 2 pure" \
|
||||
"9 * x^2 + 5 * x^1 - 2 * x^0 = 5 * x" "\
|
||||
Reduced form: -2 * x^0 + 0 * x^1 + 9 * x^2 = 0
|
||||
Polynomial degree: 2
|
||||
Discriminant is strictly positive, the two solutions are:
|
||||
(√2)/3
|
||||
-(√2)/3"
|
||||
|
||||
run_test \
|
||||
"28. degree 2 pure" \
|
||||
"3 * x^2 + 5 * x^1 - 4 * x^0 = 5 * x" "\
|
||||
Reduced form: -4 * x^0 + 0 * x^1 + 3 * x^2 = 0
|
||||
Polynomial degree: 2
|
||||
Discriminant is strictly positive, the two solutions are:
|
||||
2/√(3)
|
||||
-2/√(3)"
|
||||
|
||||
|
||||
run_test \
|
||||
"29. degree 2 pure" \
|
||||
"16 * x^2 + 5 * x^1 - 4 * x^0 = 5 * x" "\
|
||||
Reduced form: -4 * x^0 + 0 * x^1 + 3 * x^2 = 0
|
||||
Polynomial degree: 2
|
||||
Discriminant is strictly positive, the two solutions are:
|
||||
1/2
|
||||
-1/2"
|
||||
|
||||
|
||||
run_test \
|
||||
"30. degree 2 pure" \
|
||||
"4 * x^2 + 5 * x^1 - 16 * x^0 = 5 * x" "\
|
||||
Reduced form: -4 * x^0 + 0 * x^1 + 3 * x^2 = 0
|
||||
Polynomial degree: 2
|
||||
Discriminant is strictly positive, the two solutions are:
|
||||
2
|
||||
-2"
|
||||
|
||||
Reference in New Issue
Block a user