Comments (4)
Both, argument and result are 64.64-bit fixed point numbers, so 1
means 1*2^-64
, and 18446744073709551616
means 18446744073709551616*2^-64
. This number format is used for almost all functions within ABDKMath64x64
library. Where different number format is used, it is stated in docstring.
from abdk-libraries-solidity.
Hey @bgits, you may find useful this number converter developed by @3sGgpQ8H:
https://toolkit.abdk.consulting/math#convert-number
from abdk-libraries-solidity.
What arguments did you try? Due to rounding errors, exp(x)
may return the same value for different arguments in case argument values are close enough.
In my experiments exp(1)=18446744073709551616
but exp(2)=18446744073709551617
, so different results for different arguments.
from abdk-libraries-solidity.
Perhaps I'm misunderstanding the function, my understanding is that is should return e^x
, in which case exp(1) = 2...
, exp(2) = 7...
.
If the intention is as above then the calculation is off, otherwise perhaps a clarification on the function docstring.
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
- exp_2 doesn't work when x is 63 HOT 2
- 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.