Comments (2)
Update
It just dawned on me that reverting is the expected behaviour. Max 64x64 is 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, which is 2^63 - 1
(duh, these are signed numbers).
Yet, I keep the issue open because x should not be allowed to get bigger than 0x3f0000000000000000
.
from abdk-libraries-solidity.
It is possible to figure out the exact upper limit for x
beyond which the exp_2
function will throw and use it in the require
statement, however this limit will make the code harder to read and the limit could become incorrect after further optimizations. Setting such precise limit would reduce gas cost only for x
values in the narrow range between the true limit and 0x400000000000000000
. Doesn't seem worth doing.
from abdk-libraries-solidity.
Related Issues (20)
- hardhat compiler cannot parse pragma HOT 2
- Support for solidity ^0.7.0 HOT 1
- Update for solidity 0.8 HOT 3
- Expand the documentation to explain the inner mathematical logic HOT 1
- Release for Solidity 0.8 support HOT 4
- I want to implement 4.pow(0.5) HOT 2
- Convert 64x64 to string? HOT 1
- Cube root functions would be useful HOT 1
- Display the Import HOT 3
- "library was called directly" error HOT 2
- Incorrect hardcoded value of 0x8 in sqrtu function (should be 0x4) HOT 1
- Some codes need optimization HOT 1
- Convert quadrouple precision float to readable decimal string HOT 2
- How would frexp work for ABDKMathQuad in solidity
- Additional Power Function for Signed 64.64 Fixed Point Numbers
- Add license HOT 5
- Deploy to npm HOT 5
- Widen the pragma HOT 2
- Open to license changes? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abdk-libraries-solidity.