extensions
extensions copied to clipboard
[new extension] Big Decimal
High precision operation, support decimals.
Why does 1/3*3 equal 0.9999999999... rather than 1?
Why does 1/3*3 equal 0.9999999999... rather than 1?
Because division only has 100 digits of decimal precision.
Seems a little similar to BigInts, perhaps consider merging with that extension instead?
为什么 1/3*3 等于 0.9999999999...而不是 1?
maybe i can add round?
I suggest the extension name to be "precise numbers" since "Big Number" is commonly referred as number greater than 1.79e308
I suggest the extension name to be "precise numbers" since "Big Number" is commonly referred as number greater than 1.79e308
Big Number is relative to BigInt, one is an integer and the other is a number that includes decimals
Why does 1/3*3 equal 0.9999999999... rather than 1?
some new blocks:
set precision
math including abs,ceil,floor,trunc,max,min,round,random
imo it should name Big Decimal
imo it should name
Big Decimal
https://github.com/TurboWarp/extensions/pull/1527#issuecomment-2180956131 i think Big Number is suitable
Big Decimal would clarify difference from Big Int
Big Decimal would clarify difference from Big Int
maybe if you think bignumber is easily confused with bignumber.js, and bigdecimal is more suitable, then it should indeed be changed, but I don't want to change the extension ID but only the name
Big Decimal would clarify difference from Big Int
also, can I ask when merge it?
Big Decimal would clarify difference from Big Int
also, can I ask when merge it?
On a day that doesn't include the letter "A"
So, on a Tuesnight.
Big Decimal would clarify difference from Big Int
also, can I ask when merge it?
On a day that doesn't include the letter "A"
what
On a day that doesn't include the letter "A"
does changing your language counts?
image
You reimplemented big.js or bigdecimal. Consider using existed libraries instead.
exponent with decimals, pick random and a few more doesn't seem to work as intended it gives stuff far from the exact one. One exampls is 25^0.5 it returns 1 instead of 5
forever.