Roots of a quadratic function: Difference between revisions
Content added Content deleted
(Add implementation in K) |
m (→{{header|K}}: Add comment) |
||
Line 1,430: | Line 1,430: | ||
===K6=== |
===K6=== |
||
{{works with|ngn/k}} |
{{works with|ngn/k}} |
||
<syntaxhighlight lang="k"> / |
<syntaxhighlight lang="k"> / naive method |
||
/ sqr[x] and sqrt[x] must be provided |
|||
quf:{[a;b;c]; s:sqrt[sqr[b]-4*a*c];(-b+s;-b-s)%2*a} |
quf:{[a;b;c]; s:sqrt[sqr[b]-4*a*c];(-b+s;-b-s)%2*a} |
||