Closed st-U00F6-pa closed 8 months ago
Also, surprisingly, this issue appears to be not present when the resulting number has two or more zeros in a row. That way, dividing 2.2002 by 2 results in a proper 1.1001, while 2.202 / 2 is still 1.11
interesting, I'll have to look into it, it might be trimming 0's a bit too much
Description
When dividing one base-10 number by another base-10 number, if the result number has any zeros in the decimal part, they don't appear in the
num
array for some reason. For example, dividing number 2.202 (num:[2,2,0,2],dec:3,pol:1,base:10
) by 2.0 (num:[2,0],dec:1,pol:1,base:10
) results in a number 1.11 and not 1.101.Screenshots
2.202 / 2.0 is 1.101, while the other digits are correct, zeros appear to be missing
3.141592 / 2.0 is 1.570796
How to reproduce
arr_math:setup
/data modify storage arr_math:in var1 set value {dec:3,num:[2,2,0,2],pol:1,base:10}
/data modify storage arr_math:in var2 set value {dec:1,num:[2,0],pol:1,base:10}
arr_math:divide
/data get storage arr_math:main out
I know the work on the pack might be discontinued, but I'm really hoping for a fix, because otherwise the pack is a treasure :>