Cyclotomic polynomial: Difference between revisions
→{{header|jq}}: task2(10)
m (→{{header|jq}}) |
(→{{header|jq}}: task2(10)) |
||
(One intermediate revision by the same user not shown) | |||
Line 3,120:
end;
{cpIndex:1, summary: {"1": 1}, todo: [range(2;
| until(.todo|length == 0;
if .cpIndex|is_prime then . else register(.cpIndex) end
| .cpIndex += 1)
| .summary
| (keys | sort_by(tonumber)[]) as $key
| "CP[\(.[$key]|lpad(5))] has a coefficient with magnitude \($key)"
;
Line 3,131:
task1(30),
"",
task2(
</syntaxhighlight>
{{output}}
Line 3,177:
CP[ 6545] has a coefficient with magnitude 8
CP[ 6545] has a coefficient with magnitude 9
CP[10465] has a coefficient with magnitude 10
CP[10465] has a coefficient with magnitude 11
CP[10465] has a coefficient with magnitude 12
CP[10465] has a coefficient with magnitude 13
CP[10465] has a coefficient with magnitude 14
</pre>
|