Discuss Scratch
- MushroomGamesETC
-
13 posts
Varibles having imaginary numbers
I know you are going to ignore me.
Hello, I would like to request that variables can store imaginary numbers/imaginary digits
for example,
myVariable = *imaginary number*
- or -
myVariable = 123J
the letter J represents an imaginary digit.
I know this is a “little to advanced for scratch”.
But how is it advanced to be asking?
I would really love to have this feature.
Hello, I would like to request that variables can store imaginary numbers/imaginary digits
for example,
myVariable = *imaginary number*
- or -
myVariable = 123J
the letter J represents an imaginary digit.
I know this is a “little to advanced for scratch”.
But how is it advanced to be asking?
I would really love to have this feature.
- PsychicAura
-
100+ posts
Varibles having imaginary numbers
Imaginary numbers are numbers that you get from taking the square root of negative numbers… I don't think you really know what an “imaginary number” is. Anyways, I don't really know what you're asking. Are you talking about variables being able to store math variables?
- PhoenixAndStuf
-
62 posts
Varibles having imaginary numbers
Edit: Yes, I'm aware that this example is not irrational. What I thought the OP was asking is if there's any way to have decimals that go on forever.
Do you mean irrational numbers? Those are possible, for example:
say (join [Irrational number: ] ((1) / (3)))
With that code, the sprite would say: “Irrational number: 0.3333333333333”
Last edited by PhoenixAndStuf (Nov. 26, 2022 18:25:56)
- PsychicAura
-
100+ posts
Varibles having imaginary numbers
No, that number is rational. Irrational numbers are decimals that go on forever but have no specific pattern, such as pi or the “e” constant. Do you mean irrational numbers? Those are possible, for example:Please fact-check your posts next time.say (join [Irrational number: ] ((1) / (3)))
With that code, the sprite would say: “Irrational number: 0.3333333333333”
Last edited by PsychicAura (Nov. 25, 2022 21:30:44)
- PhoenixAndStuf
-
62 posts
Varibles having imaginary numbers
Please fact-check your posts next time.No, that number is rational. Irrational numbers are decimals that go on forever but have no specific pattern, such as pi or the “e” constant.
Ok, that was just a bad example. The point was that the decimals could go on forever, which is what I believe this person is asking about.
- -ErrorPurpl_157
-
100+ posts
Varibles having imaginary numbers
No, imaginary numbers are square roots of negative numbers, and 0.3 repeating is rational because it’s one divided by three. A demonstration of imaginary numbers is: xi^2 = -(x^2) Do you mean irrational numbers? Those are possible, for example:say (join [Irrational number: ] ((1) / (3)))
With that code, the sprite would say: “Irrational number: 0.3333333333333”
I think that it could be
((x :: grey)i :: operators)x multiplied by i
- donotforgetmycode
-
1000+ posts
Varibles having imaginary numbers
A workaround can be found in this project.
I don't think this is a good idea, because the point of Scratch is to program things yourself, and complex numbers don't have much use in normal games.
I don't think this is a good idea, because the point of Scratch is to program things yourself, and complex numbers don't have much use in normal games.
- selfexplanatory
-
100+ posts
Varibles having imaginary numbers
No, that was a real number. Look up “imaginary number”.Please fact-check your posts next time.No, that number is rational. Irrational numbers are decimals that go on forever but have no specific pattern, such as pi or the “e” constant.
Ok, that was just a bad example. The point was that the decimals could go on forever, which is what I believe this person is asking about.
- MushroomGamesETC
-
13 posts
Varibles having imaginary numbers
No no,
thats not what im talking about.
for example
myVariable = *imaginary number*
the *imaginary number* could be any number, it doesnt matter, its imaginary,
its basically telling the program that this is just a number.
You guys dont get it
thats not what im talking about.
for example
myVariable = *imaginary number*
the *imaginary number* could be any number, it doesnt matter, its imaginary,
its basically telling the program that this is just a number.
You guys dont get it

- PsychicAura
-
100+ posts
Varibles having imaginary numbers
It's actually you that don't get it. You probably haven't learned it yet, but “imaginary numbers” are actually numbers that you get from taking the square root of a negative number. It's usually represented by No no,i. I think the word you're looking for here is “variables”, which can be any letter that you want, and is usually in algebraic math problems. Just google “imaginary numbers”. Also google up “math variables”.
thats not what im talking about.
for example
myVariable = *imaginary number*
the *imaginary number* could be any number, it doesnt matter, its imaginary,
its basically telling the program that this is just a number.
You guys dont get it
Last edited by PsychicAura (Nov. 26, 2022 00:46:48)
- ajskateboarder
-
1000+ posts
Varibles having imaginary numbers
I think the OP wants to be able to add a number variable which can distinguish numbers from strings. I'm pretty sure the OP knows what an imaginary number is, but he can't think of a different name for what he's suggesting.It's actually you that don't get it. You probably haven't learned it yet, but “imaginary numbers” are actually numbers that you get from taking the square root of a negative number. It's usually represented by No no,i. I think the word you're looking for here is “variables”, which can be any letter that you want, and is usually in algebraic math problems. Just google “imaginary numbers”. Also google up “math variables”.
thats not what im talking about.
for example
myVariable = *imaginary number*
the *imaginary number* could be any number, it doesnt matter, its imaginary,
its basically telling the program that this is just a number.
You guys dont get it
- 7salad3salad
-
1000+ posts
Varibles having imaginary numbers
Guys, i think they mean that J can be any digit 0-9
Last edited by 7salad3salad (Nov. 26, 2022 03:27:42)
- medians
-
1000+ posts
Varibles having imaginary numbers
They mean j as the sqrt(-1) I think. Guys, i think they mean that J can be any digit 0-9
- 7salad3salad
-
1000+ posts
Varibles having imaginary numbers
See this quote by them:They mean j as the sqrt(-1) I think. Guys, i think they mean that J can be any digit 0-9
No no,
thats not what im talking about.
for example
myVariable = *imaginary number*
the *imaginary number* could be any number, it doesnt matter, its imaginary,
its basically telling the program that this is just a number.
You guys dont get it
Last edited by 7salad3salad (Nov. 26, 2022 04:24:16)
- medians
-
1000+ posts
Varibles having imaginary numbers
But then they say it’s imaginary, and telling it’s a number.. wait wha-See this quote by them:They mean j as the sqrt(-1) I think. Guys, i think they mean that J can be any digit 0-9No no,
thats not what im talking about.
for example
myVariable = *imaginary number*
the *imaginary number* could be any number, it doesnt matter, its imaginary,
its basically telling the program that this is just a number.
You guys dont get it
- 7salad3salad
-
1000+ posts
Varibles having imaginary numbers
Basically i think its just a placeholder that represents any digit.But then they say it’s imaginary, and telling it’s a number.. wait wha-See this quote by them:They mean j as the sqrt(-1) I think. Guys, i think they mean that J can be any digit 0-9No no,
thats not what im talking about.
for example
myVariable = *imaginary number*
the *imaginary number* could be any number, it doesnt matter, its imaginary,
its basically telling the program that this is just a number.
You guys dont get it
- PkmnQ
-
1000+ posts
Varibles having imaginary numbers
I think they mean any number as in any number before the j, as in 1j, 2j, 3j. No no,
thats not what im talking about.
for example
myVariable = *imaginary number*
the *imaginary number* could be any number, it doesnt matter, its imaginary,
its basically telling the program that this is just a number.
You guys dont get it
Which would make sense why they say imaginary numbers.
- 8bitrkt
-
500+ posts
Varibles having imaginary numbers
what if you did this? (based on what the OP said)
Also, as stated “imaginary numbers” already exist, I think “placeholder numbers” makes more sense.
set [variable v] to [j]does that make the operators non-deterministic?
set [other variable v] to ((variable)+(2))
Also, as stated “imaginary numbers” already exist, I think “placeholder numbers” makes more sense.
- Minoru07
-
100+ posts
Varibles having imaginary numbers
ok first off, you dont understand what imaginary numbers are. simply put, an Imaginary number is sqrt(-1). i is used to represent it (although i guess u could use j if u wanted but idk why u would). if a number is sqrt(-144) it would be 12i, and i^2 is -1 and i^3 is -i and i^4 is 1. so they r a special type of number, but lets be honest, 99 percent of scratchers dont need to use them, and those who do could find a workaround. so no support
Last edited by Minoru07 (Nov. 26, 2022 17:34:32)
- 8bitrkt
-
500+ posts
Varibles having imaginary numbers
read the whole discussion, ok first off, you dont understand what imaginary numbers are. simply put, an Imaginary number is sqrt(-1). i is used to represent it (although i guess u could use j if u wanted but idk why u would). if a number is sqrt(-144) it would be 12i, and i^2 is -1 and i^3 is -i and i^4 is 1. so they r a special type of number, but lets be honest, 99 percent of scratchers dont need to use them, and those who do could find a workaround. so no supportimaginary numbers are the sqrt of a negative, but the OP probably didn't know imaginary numbers already exist, and used imaginary numbers as the name for their suggestion.
Last edited by 8bitrkt (Nov. 26, 2022 17:38:35)