Continued fraction/Arithmetic/G(matrix ng, continued fraction n): Difference between revisions
Content added Content deleted
m (Minor adjustment.) |
m (Reformatted output.) |
||
Line 5,021: | Line 5,021: | ||
public static void main(String[] aArgs) { |
public static void main(String[] aArgs) { |
||
List<CFData> cfData = List.of( |
List<CFData> cfData = List.of( |
||
new CFData("[1; 5, 2] + 1/ |
new CFData("[1; 5, 2] + 1 / 2 ", new int[] { 2, 1, 0, 2 }, (CFIterator) new R2cfIterator(13, 11) ), |
||
new CFData("[3; 7] + 1/ |
new CFData("[3; 7] + 1 / 2 ", new int[] { 2, 1, 0, 2 }, (CFIterator) new R2cfIterator(22, 7) ), |
||
new CFData("[3; 7] divided by 4 ", new int[] { 1, 0, 0, 4 }, (CFIterator) new R2cfIterator(22, 7) ), |
new CFData("[3; 7] divided by 4 ", new int[] { 1, 0, 0, 4 }, (CFIterator) new R2cfIterator(22, 7) ), |
||
new CFData("sqrt(2) ", new int[] { 0, 1, 1, 0 }, (CFIterator) new ReciprocalRoot2() ), |
new CFData("sqrt(2) ", new int[] { 0, 1, 1, 0 }, (CFIterator) new ReciprocalRoot2() ), |
||
Line 5,172: | Line 5,172: | ||
{{ out }} |
{{ out }} |
||
<pre> |
<pre> |
||
[1; 5, 2] + 1/ |
[1; 5, 2] + 1 / 2 -> 1 1 2 7 |
||
[3; 7] + 1/ |
[3; 7] + 1 / 2 -> 3 1 1 1 4 |
||
[3; 7] divided by 4 -> 0 1 3 1 2 |
[3; 7] divided by 4 -> 0 1 3 1 2 |
||
sqrt(2) -> 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 |
sqrt(2) -> 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 |