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

Safe arithmetic

Results 7 ds-math issues
Sort by recently updated
recently updated
newest added

Faster way to check if a value is even or odd, modulus "%" is quite expensive and an easily be replaced using bitwise operation

Hey, just played around with ds-math, cool stuff! In Remix however, the `rpow(x, n)` function always returns `0` and seems broken. Any idea why? Thanks!

With Truffle search `node_modules` path for imports, a `package.json` would be handy.

The description of the `sub` function makes mention of an overflow. When two values are substracted, an underflow can only occur. This is a very minor change and simply submitted...

Comment of `rmul` uses `WAD`, not `RAY`.

It would be helpful if this were made into a library using Solidity's `library`.