prb-math icon indicating copy to clipboard operation
prb-math copied to clipboard

Use consistent bases in the constant powers of two

Open PaulRBerg opened this issue 3 years ago • 0 comments
trafficstars

In the PRBMath.sol contract, the msb function defines the powers of two as 2**n (in base 10), whereas sqrt defines them using hexadecimal notation 0x10... (base 16).

It would be nice if we used the same base for all constant powers of two used in this contract.

This would have made it easier to spot the error explained in https://github.com/paulrberg/prb-math/issues/97.

PaulRBerg avatar Jul 03 '22 11:07 PaulRBerg