10

bignumber小数问题

 3 years ago
source link: https://learnblockchain.cn/question/2248
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
bignumber小数问题 | 登链社区 | 技术问答

bignumber小数问题

有2个BigNumber类型的变量A=6426369264413, B=12568645538404793765271

按照熊大大的方法设置了小数位数,可是计算的精度确出现问题

A.div(B)输出的是5点几几几,正确的应该是0.几几几.......

熊大大这个是错误什么造成的,应该怎么处理这样的错误

Tiny熊 - 布道者 22小时前

  擅长:智能合约,以太坊

不知道, 不应该是BigNumber吧, 你使用错误吧。

最好看官方文档。

您需要登录后才可以回答问题,登录 或者 注册

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK