Fibonacci word: Difference between revisions
m
→{{header|jq}}: simplify
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|jq}}: simplify) |
||
Line 2,054:
# entropy in bits of the input string
def entropy:
(explode | map( [.] | implode ) | counter | [ .[] | . *
| ((length|log) - ($sum / length)) / (2|log) ;</syntaxhighlight>
'''Pretty printing''':
|