RosettaCodeData/Task/Pathological-floating-point-problems/Jq/pathological-floating-point-problems-1.jq

10 lines
208 B
Text
Raw Permalink Normal View History

2025-02-27 18:35:13 -05:00
# A (naive) limitless generator
2023-07-01 11:58:00 -04:00
def v:
2025-02-27 18:35:13 -05:00
[2, -4]
| recurse( [.[1], 111 - (1130 / .[1]) + 3000 / (.[0] * .[1])] )
| .[0];
[limit(100; v)]
| (3, 4, 5, 6, 7, 8, 20, 30, 50, 100) as $i
| [$i, .[$i - 1]]