Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Variable Limit
- MathWizz
- Scratcher
100+ posts
Variable Limit
There is no limit on the number of variables.
running Chromium 42.0.2311.90 with Flash Player 15.0.0.189 on Arch Linux 3.19.5-1-ck
MathWizz — JsScratch && sb.js & Amber (coming soon! maybe)
- comp09
- Scratcher
1000+ posts
Variable Limit
Variables aren't limited - you can insert a million single characters into a list, and use the list block
(list :: list)to insert it into a variable. The
(join [hello] [world])block however has an artificial limit of 10240 characters.
Last edited by comp09 (Oct. 11, 2015 13:18:10)
- herohamp
- Scratcher
1000+ posts
Variable Limit
Ya I can find Grahams Number! Variables aren't limited - you can insert a million single characters into a list, and use the list block(list :: list)to insert it into a variable. The(join [hello] [world])block however has an artificial limit of 10240 characters.
- PullJosh
- Scratcher
1000+ posts
Variable Limit
Things tend to get wonky once you get working with massive numbers.Ya I can find Grahams Number! Variables aren't limited - you can insert a million single characters into a list, and use the list block(list :: list)to insert it into a variable. The(join [hello] [world])block however has an artificial limit of 10240 characters.
Just keep that in mind.
- NickyNouse
- Scratcher
1000+ posts
Variable Limit
If you're talking about numbers, eventually they switch to E notation, which loses accuracy but keeps the size of the number. Then, when you get to a number with like 60+ 0's (or something, I haven't actually checked) it says “Infinity”
Edit: oop, ninja'd
Edit: oop, ninja'd
Last edited by NickyNouse (Oct. 14, 2015 22:02:11)
- PullJosh
- Scratcher
1000+ posts
Variable Limit
Yeah, Graham's Number will definitely be passing the “Infinity” mark. If you're talking about numbers, eventually they switch to E notation, which loses accuracy but keeps the size of the number. Then, when you get to a number with like 60+ 0's (or something, I haven't actually checked) it says “Infinity”
Doing this is difficult even with a powerful typed language. With a supercomputer. For a really long time.
- thisandagain
- Forum Moderator
500+ posts
Variable Limit
What is the max limit for a normal variable.
Today, the *value* of variables in Scratch are generally limited to what are called “double-precision floats”. This value is defined in the technical standards for Floating-Point Arithmetic provided by the Institute of Electrical and Electronics Engineers (IEEE) as “IEEE 754”. What is interesting about this is that the value can vary from computer to computer depending on architecture. The shorter answer to your question is that the maximum value for a variable in Scratch is approximately 1.79e+308. As @PullJosh mentioned though, when working with really large numbers things can get a little wonky. ;-)
You can read all about IEEE 754 here:
https://en.wikipedia.org/wiki/IEEE_floating_point
You can read all about the Double-Precision Floating Point Format here:
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
- herohamp
- Scratcher
1000+ posts
Variable Limit
Thank youWhat is the max limit for a normal variable.
Today, the *value* of variables in Scratch are generally limited to what are called “double-precision floats”. This value is defined in the technical standards for Floating-Point Arithmetic provided by the Institute of Electrical and Electronics Engineers (IEEE) as “IEEE 754”. What is interesting about this is that the value can vary from computer to computer depending on architecture. The shorter answer to your question is that the maximum value for a variable in Scratch is approximately 1.79e+308. As @PullJosh mentioned though, when working with really large numbers things can get a little wonky. ;-)
You can read all about IEEE 754 here:
https://en.wikipedia.org/wiki/IEEE_floating_point
You can read all about the Double-Precision Floating Point Format here:
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
- CatsUnited
- Scratcher
1000+ posts
Variable Limit
How many digits are in Graham's Number though? Yeah, Graham's Number will definitely be passing the “Infinity” mark.
Doing this is difficult even with a powerful typed language. With a supercomputer. For a really long time.
bottom text
- liam48D
- Scratcher
1000+ posts
Variable Limit
thisHow many digits are in Graham's Number though? Yeah, Graham's Number will definitely be passing the “Infinity” mark.
Doing this is difficult even with a powerful typed language. With a supercomputer. For a really long time.
For some reason if you leave out the apostrophe Google says 10, which is obviously wrong.
I read this; it was pretty interesting and I think it summed up how big Graham's Number is pretty well.
202e-202e-202e-202e-202e UNI-CODE~~~~~
- CatsUnited
- Scratcher
1000+ posts
Variable Limit
this; it was pretty interesting and I think it summed up how big Graham's Number is pretty well.Ouch gives me headaches. There are far larger numbers though. I read
</offtopic>
Last edited by CatsUnited (Oct. 19, 2015 10:18:13)
bottom text
- Discussion Forums
- » Advanced Topics
- » Variable Limit