Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2): Difference between revisions
Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) (view source)
Revision as of 17:16, 16 August 2023
, 10 months agoReformatted the output.
m (Minor correction.) |
m (Reformatted the output.) |
||
Line 6,761:
public final class ContinuedFractionArithmeticG2 {
public static void main(String[] aArgs) {
test("[
new NG( new NG4(2, 1, 0, 2), new R2cf(22, 7) ));
test("[
test("[1; 5, 2]
test("Divide [] by [3; 7]",▼
▲ test("[1;5,2] - [3;7]", new NG( new NG8(0, 1, -1, 0, 0, 0, 0, 1), new R2cf(13, 11), new R2cf(22, 7) ),
▲ test("Divide [] by [3;7]",
new NG( new NG8(0, 1, 0, 0, 0, 0, 1, 0), new R2cf(22 * 22, 7 * 7), new R2cf(22,7)) );
test("([0; 3, 2] + [1; 5, 2]) * ([0; 3, 2] - [1; 5, 2])",
new NG( new NG8(1, 0, 0, 0, 0, 0, 0, 1),
new NG( new NG8(0, 1, 1, 0, 0, 0, 0, 1),
Line 6,993 ⟶ 6,992:
{{ out }}
<pre>
Testing: [3; 7] + [0; 2]
3 1 1 1 4
3 1 1 1 4
Testing: [1; 5, 2] * [3; 7]
3 1 2 2
3 1 2 2
Testing: [1; 5, 2] - [3; 7]
-1 -1 -24 -1 -2
-1 -1 -24 -1 -2
Testing: Divide [] by [3; 7]
3 7
Testing: ([0; 3, 2] + [1; 5, 2]) * ([0; 3, 2] - [1; 5, 2])
-1 -3 -5 -1 -2 -1 -26 -3
-1 -3 -5 -1 -2 -1 -26 -3
|