josdejong/mathjs
在 GitHub 查看math.floor returns apparently wrong value for BigNumbers; possibly implement distinct epsilon for BigNumber operations?
Open
#2,608 创建于 2022年6月27日
featurehelp wanted
仓库指标
- Star
- (13,832 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
hello,math floor maybe wrong
case 1: math.floor(math.bignumber("1234567890123456.9951").mul( math.bignumber(100)),0).toString()
is wrong , accept '123456789012345699' but '123456789012345700'
case2: math.floor(math.bignumber("1234567890123456.9951").mul( math.bignumber(100)),1).toString() is ok , value is : '123456789012345699.5'