Fibonacci word: Difference between revisions

m
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 | [ .[] | . * (.|log) ] | add) as $sum
| ((length|log) - ($sum / length)) / (2|log) ;</syntaxhighlight>
'''Pretty printing''':
2,472

edits