josdejong/mathjs

math.floor returns apparently wrong value for BigNumbers; possibly implement distinct epsilon for BigNumber operations?

Aberta

#2.608 aberto em 27 de jun. de 2022

 (12 comentários) (0 reação) (0 responsável)JavaScript (1.314 forks)batch import
featurehelp wanted

Métricas do repositório

Stars
 (15.065 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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'

Guia do colaborador