[erlang-patches] Fwd: Fix for bsr bug with huge numbers

Lars Hesel Christensen <>
Wed Sep 25 21:06:35 CEST 2013

As this didn't seem to get through the first time, I try again.

Best regards,

---------- Forwarded message ----------
From: Lars Hesel Christensen <>
Date: 2013/9/24
Subject: Fix for bsr bug with huge numbers

Thus pull request fixes a bug in the bsr function, which manifests when a
huge number is shifted a huge number of bits to the right. It simply
returns the number unshifted:

1> 1183140560213014108063589658350 bsr

The commit messages contain more information.

The pull request is here:


This bug was brought to my attention by Kresten Krab Thorup.

Best regards,
Lars Hesel Christensen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130925/18b3a764/attachment.html>

More information about the erlang-patches mailing list