Continued fraction/Arithmetic/Construct from rational number: Difference between revisions
Content added Content deleted
(J solution.) |
m (→{{header|J}}) |
||
Line 280: | Line 280: | ||
(,. }.@:}:@:((,r2cf__CF)Until(_-:{:))@:(8[create__CF/)&.>)1 2;3 1;23 8;13 11;22 7;14142136 10000000;_151 77 |
(,. }.@:}:@:((,r2cf__CF)Until(_-:{:))@:(8[create__CF/)&.>)1 2;3 1;23 8;13 11;22 7;14142136 10000000;_151 77 |
||
⚫ | |||
Output |
|||
Note 'output' |
|||
┌─────────────────┬─────────────────────────────────┐ |
┌─────────────────┬─────────────────────────────────┐ |
||
│1 2 │0 2 │ |
│1 2 │0 2 │ |
||
Line 298: | Line 298: | ||
└─────────────────┴─────────────────────────────────┘ |
└─────────────────┴─────────────────────────────────┘ |
||
) |
) |
||
⚫ | |||
=={{header|Mathematica}}== |
=={{header|Mathematica}}== |