Support for fixed point calculations?  

  RSS

Rholand
(@roland)
Active Member
Joined:5 months  ago
Posts: 12
14/06/2018 8:55 am  

Hello the situation for arithmetic in the EVM and Solidity is pretty dire. We only have positive integers and no checks for overflow calculations. Will Rholang have fixed point calculation in the rational number space from the beginning and handle overflows? 

I want to point out that Chris Reitwiessner from the Solidity  Team argues against overflows because this would stuck some smart contracts. An argument I do not follow.  https://github.com/ethereum/solidity/issues/796


ReplyQuote
Mike Stay
(@stay)
Member Moderator
Joined:5 months  ago
Posts: 19
14/06/2018 5:52 pm  

Rholang currently uses signed 32-bit integers, but we know that's terrible for a lot of reasons.  Before test net we'll replace those with ℤ, the ring of all integers.  You can build fixed point as a library on top of that if you want.


ReplyQuote
Rholand
(@roland)
Active Member
Joined:5 months  ago
Posts: 12
14/06/2018 6:36 pm  

Interesting, basically you can compute with arbitrary large integers?  ℤ without limits? Only the costs and the hardware can stop a multiplication?


ReplyQuote
  
Working

Please Login or Register