Smallest numbers: Difference between revisions
Content added Content deleted
Line 162:
The integer precision of stedolan jq is insufficient for this task.<lang jq>
# if the input and $b are integers, then gojq will preserve precision
def power($b): . as $a | reduce range(0; $b) as $i (1; . * $a);
Line 170 ⟶ 167:
def smallest_k:
tostring as $n
| first(
</lang>
<lang jq>
|