Population count: Difference between revisions
m
→{{header|Wren}}: Minor tidy
(added Ol) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 4,573:
{{libheader|Wren-fmt}}
The first part is slightly awkward for Wren as 'native' bit-wise operations are limited to unsigned 32-bit integers and 3^21 exceeds this limit. We therefore need to switch to BigInts just before that point to process the remaining powers.
<syntaxhighlight lang="
import "./fmt" for Fmt
var popCount = Fn.new { |n|
|