Diophantine linear system solving: Difference between revisions
Content deleted Content added
Thundergnat (talk | contribs) m syntax highlighting fixup automation |
|||
Line 536: | Line 536: | ||
=={{header|C}}== |
=={{header|C}}== |
||
{{trans|FreeBASIC}} |
{{trans|FreeBASIC}} |
||
<syntaxhighlight lang="c"> |
|||
<lang c> |
|||
// Subject: Solution of an m x n linear Diophantine system |
// Subject: Solution of an m x n linear Diophantine system |
||
// A*x = b using LLL reduction. |
// A*x = b using LLL reduction. |
||
Line 976: | Line 976: | ||
printf("loop %ld\n", tl); |
printf("loop %ld\n", tl); |
||
} |
} |
||
</syntaxhighlight> |
|||
</lang> |
|||
{{out}} |
{{out}} |
||
<pre>The results are exactly the same as those described in the task assignment.</pre> |
<pre>The results are exactly the same as those described in the task assignment.</pre> |
||
=={{header|FreeBASIC}}== |
=={{header|FreeBASIC}}== |
||
< |
<syntaxhighlight lang="freebasic"> |
||
'Subject: Solution of an m x n linear Diophantine system |
'Subject: Solution of an m x n linear Diophantine system |
||
' A*x = b using LLL reduction. |
' A*x = b using LLL reduction. |
||
Line 1,315: | Line 1,315: | ||
print "loop"; tl |
print "loop"; tl |
||
End Sub |
End Sub |
||
</syntaxhighlight> |
|||
</lang> |
|||
=={{header|Phix}}== |
=={{header|Phix}}== |
||
You can run this online [http://phix.x10.mx/p2js/LLLHnf.htm here]. |
You can run this online [http://phix.x10.mx/p2js/LLLHnf.htm here]. |
||
<!--< |
<!--<syntaxhighlight lang="phix">(phixonline)--> |
||
<span style="color: #000080;font-style:italic;">-- |
<span style="color: #000080;font-style:italic;">-- |
||
-- demo\rosetta\Diophantine_linear_system_solving.exw |
-- demo\rosetta\Diophantine_linear_system_solving.exw |
||
Line 1,670: | Line 1,670: | ||
<span style="color: #0000FF;">?</span><span style="color: #008000;">"done"</span> |
<span style="color: #0000FF;">?</span><span style="color: #008000;">"done"</span> |
||
<span style="color: #0000FF;">{}</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">wait_key</span><span style="color: #0000FF;">()</span> |
<span style="color: #0000FF;">{}</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">wait_key</span><span style="color: #0000FF;">()</span> |
||
<!--</ |
<!--</syntaxhighlight>--> |
||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
Line 1,681: | Line 1,681: | ||
A reasonably faithful translation though I've made some slight changes to the way data is input. |
A reasonably faithful translation though I've made some slight changes to the way data is input. |
||
< |
<syntaxhighlight lang="ecmascript">import "./ioutil" for Input |
||
import "./complex" for Complex |
import "./complex" for Complex |
||
import "./trait" for Stepped |
import "./trait" for Stepped |
||
Line 2,015: | Line 2,015: | ||
main.call(sw) |
main.call(sw) |
||
System.print() |
System.print() |
||
}</ |
}</syntaxhighlight> |
||
{{out}} |
{{out}} |