EVM+
EIP: Decimal math for EVM. If EVM is a basic calculator, EVM+ is a scientific calculator.
Screenshots






Problem Statement
This EIP adds decimal float OPCODEs for arithmetic (DECADD, DECNEG, DECMUL, DECINV) and expression of all elementary functions (DECEXP, DECLN, DECSIN). All decimal values upto the maximal precision allowed by a int256 coefficient and exponent are represented exactly, as c*10^q. All implemented algorithms converge for all inputs given enough precision, as chosen by the user. All calculations are deterministic and gas is embedded bottom-up. Allowing high precision decimal elementary functions invites the worlds of mathematical finance, machine learning, science, digital art, games and others to Ethereum. The implementation is functional.
Solution
golang, fork of geth, GCP VM for public EVM+ node, Yul for smart contracts (Black-Scholes and Neuron), bottom-up gas calculation by wrapping uint256 lib, decimal math, Taylor series of exp and sin, continued fractions expansion of ln, scaling of ln input to interval ]0, 2], ethers.js and geth console for testing, all on stream.
Hackathon
ETHOnline 2023
2023
Prizes
- 🏆
🏆 ETHOnline 2023 Finalist
Contributors
- obscuren
3951 contributions
- karalabe
2586 contributions
- fjl
1369 contributions
- holiman
683 contributions
- tgerring
569 contributions
- zelig
377 contributions
- rjl493456442
368 contributions
- CJentzsch
226 contributions
- MariusVanDerWijden
224 contributions
- debris
212 contributions
- gballet
181 contributions
- zsfelfoldi
176 contributions
- ucwong
103 contributions
- s1na
97 contributions
- jsvisa
96 contributions
- nonsense
95 contributions
- janos
81 contributions
- lightclient
55 contributions
- gluk256
53 contributions
- acud
53 contributions
- renaynay
47 contributions
- gavofyork
44 contributions
- Arachnid
42 contributions
- aaronbuchwald
37 contributions
- vbuterin
34 contributions
- s7v7nislands
33 contributions
- holisticode
33 contributions
- cubedro
32 contributions
- ligi
31 contributions
- matthalp
29 contributions