mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
8a5283cf4e
Optimized to avoid Math.sqrt by squaring the threshold (sqrt(x) < 1000 => x < 1000000) and caching zr*zr/zi*zi to avoid redundant computation. 29% faster than naive version. Co-authored-by: Claude <noreply@anthropic.com>