Population count: Difference between revisions

m
(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="ecmascriptwren">import "./big" for BigInt
import "./fmt" for Fmt
 
var popCount = Fn.new { |n|
9,485

edits