Git Product home page Git Product logo

Comments (2)

PaulRBerg avatar PaulRBerg commented on August 16, 2024

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.

3sGgpQ8H avatar 3sGgpQ8H commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.