extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[new extension] Big Decimal

Open qxsck opened this issue 1 year ago • 19 comments

High precision operation, support decimals.

qxsck avatar Jun 10 '24 05:06 qxsck

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

mcnole25 avatar Jun 10 '24 21:06 mcnole25

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

Because division only has 100 digits of decimal precision.

CST1229 avatar Jun 10 '24 21:06 CST1229

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

PPPDUD avatar Jun 11 '24 18:06 PPPDUD

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

maybe i can add round?

qxsck avatar Jun 14 '24 11:06 qxsck

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

Skyhigh173 avatar Jun 20 '24 14:06 Skyhigh173

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 avatar Jun 20 '24 15:06 qxsck

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

image

qxsck avatar Jun 25 '24 06:06 qxsck

some new blocks: image set precision

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

qxsck avatar Jun 25 '24 06:06 qxsck

imo it should name Big Decimal

FurryR avatar Jul 04 '24 11:07 FurryR

imo it should name Big Decimal

https://github.com/TurboWarp/extensions/pull/1527#issuecomment-2180956131 i think Big Number is suitable

qxsck avatar Jul 04 '24 11:07 qxsck

Big Decimal would clarify difference from Big Int

GarboMuffin avatar Jul 05 '24 01:07 GarboMuffin

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

qxsck avatar Jul 05 '24 01:07 qxsck

Big Decimal would clarify difference from Big Int

also, can I ask when merge it?

qxsck avatar Jul 05 '24 01:07 qxsck

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"

LilyMakesThings avatar Jul 05 '24 03:07 LilyMakesThings

So, on a Tuesnight.

CubesterYT avatar Jul 05 '24 03:07 CubesterYT

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

qxsck avatar Jul 05 '24 03:07 qxsck

On a day that doesn't include the letter "A"

does changing your language counts?

fath11 avatar Jul 06 '24 23:07 fath11

big-decimal image

qxsck avatar Jul 08 '24 12:07 qxsck

You reimplemented big.js or bigdecimal. Consider using existed libraries instead.

FurryR avatar Jul 31 '24 09:07 FurryR

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

Ender-Studio avatar Aug 30 '24 13:08 Ender-Studio

forever.

qxsck avatar Jun 09 '25 14:06 qxsck