Discuss Scratch

MushroomGamesETC
Scratcher
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.
PsychicAura
Scratcher
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
Scratcher
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
Scratcher
100+ posts

Varibles having imaginary numbers

PhoenixAndStuf wrote:

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”
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. Please fact-check your posts next time.

Last edited by PsychicAura (Nov. 25, 2022 21:30:44)

PhoenixAndStuf
Scratcher
62 posts

Varibles having imaginary numbers

PsychicAura wrote:

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. Please fact-check your posts next time.

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
Scratcher
100+ posts

Varibles having imaginary numbers

PhoenixAndStuf wrote:

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”
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)

I think that it could be
((x :: grey)i :: operators)
x multiplied by i
donotforgetmycode
Scratcher
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.
selfexplanatory
Scratcher
100+ posts

Varibles having imaginary numbers

PhoenixAndStuf wrote:

PsychicAura wrote:

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. Please fact-check your posts next time.

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.
No, that was a real number. Look up “imaginary number”.
MushroomGamesETC
Scratcher
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
PsychicAura
Scratcher
100+ posts

Varibles having imaginary numbers

MushroomGamesETC wrote:

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
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 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”.

Last edited by PsychicAura (Nov. 26, 2022 00:46:48)

ajskateboarder
Scratcher
1000+ posts

Varibles having imaginary numbers

PsychicAura wrote:

MushroomGamesETC wrote:

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
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 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”.
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.
7salad3salad
Scratcher
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
Scratcher
1000+ posts

Varibles having imaginary numbers

7salad3salad wrote:

Guys, i think they mean that J can be any digit 0-9
They mean j as the sqrt(-1) I think.
7salad3salad
Scratcher
1000+ posts

Varibles having imaginary numbers

medians wrote:

7salad3salad wrote:

Guys, i think they mean that J can be any digit 0-9
They mean j as the sqrt(-1) I think.
See this quote by them:

MushroomGamesETC wrote:

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
Scratcher
1000+ posts

Varibles having imaginary numbers

7salad3salad wrote:

medians wrote:

7salad3salad wrote:

Guys, i think they mean that J can be any digit 0-9
They mean j as the sqrt(-1) I think.
See this quote by them:

MushroomGamesETC wrote:

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
But then they say it’s imaginary, and telling it’s a number.. wait wha-
7salad3salad
Scratcher
1000+ posts

Varibles having imaginary numbers

medians wrote:

7salad3salad wrote:

medians wrote:

7salad3salad wrote:

Guys, i think they mean that J can be any digit 0-9
They mean j as the sqrt(-1) I think.
See this quote by them:

MushroomGamesETC wrote:

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
But then they say it’s imaginary, and telling it’s a number.. wait wha-
Basically i think its just a placeholder that represents any digit.
PkmnQ
Scratcher
1000+ posts

Varibles having imaginary numbers

MushroomGamesETC wrote:

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
I think they mean any number as in any number before the j, as in 1j, 2j, 3j.
Which would make sense why they say imaginary numbers.
8bitrkt
Scratcher
500+ posts

Varibles having imaginary numbers

what if you did this? (based on what the OP said)
set [variable v] to [j]
set [other variable v] to ((variable)+(2))
does that make the operators non-deterministic?

Also, as stated “imaginary numbers” already exist, I think “placeholder numbers” makes more sense.
Minoru07
Scratcher
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
Scratcher
500+ posts

Varibles having imaginary numbers

Minoru07 wrote:

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
read the whole discussion, imaginary 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)

Powered by DjangoBB