Index finite lists of positive integers: Difference between revisions
Index finite lists of positive integers (view source)
Revision as of 19:33, 31 January 2024
, 4 months ago→{{header|jq}}: C implementation limits
m (→jq: clarify) |
(→{{header|jq}}: C implementation limits) |
||
Line 568:
=={{header|jq}}==
'''Works with jq''' within the limits of jq's support for large integer arithmetic
'''Works with jaq within the limits of jaq's support for large integers'''
Line 587 ⟶ 588:
For example: 1 2 3 => 11 011 0011 => 110110011 => 110011011 => 10011011
The Go implementation of jq supports indefinitely large integers and so,
The C implementation
the `tonumber` filter retains precision allowing seamless translation between strings and numbers.
For this reason, in the Fibonacci-based approach, the encoded bitstring is not converted to a decimal number.
The following is slightly more verbose than it need be but for the sake of compatibility with jaq. Also note that trivial
|