TurboWarp / extensions

User-contributed unsandboxed extension gallery for TurboWarp
https://extensions.turbowarp.org/
MIT License
107 stars 217 forks source link

[new extension] Big Number #1527

Open qxsck opened 2 weeks ago

qxsck commented 2 weeks ago

High precision operation, support decimals.

mcnole25 commented 2 weeks ago

Why does 1/3*3 equal 0.9999999999... rather than 1?

CST1229 commented 2 weeks ago

Why does 1/3*3 equal 0.9999999999... rather than 1?

Because division only has 100 digits of decimal precision.

PPPDUD commented 2 weeks ago

Seems a little similar to BigInts, perhaps consider merging with that extension instead?

qxsck commented 2 weeks ago

为什么 1/3*3 等于 0.9999999999...而不是 1?

maybe i can add round?

Skyhigh173 commented 1 week ago

I suggest the extension name to be "precise numbers" since "Big Number" is commonly referred as number greater than 1.79e308

qxsck commented 1 week ago

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

qxsck commented 4 days ago

Why does 1/3*3 equal 0.9999999999... rather than 1?

image

qxsck commented 4 days ago

some new blocks: image set precision

image math including abs,ceil,floor,trunc,max,min,round,random