The perfect calculator

I created a calculator that calculates the first 500 perfect squares in less than 10 seconds

You gonna post a link?

shoot sorry https://snap.berkeley.edu/project?username=clowestick&projectname=the%20perfect%20calculator

Much less than 10 seconds if you use turbo mode.

But it looks like almost all the code is about positioning the sprite! The actual squaring of the number is just ((var1) × (var1)). You didn't even make a SQUARE function to hide the multiplication in the toplevel script.

Funny (original) way to end the execution !

add this in sprite(2)
image

Sometimes making things simple is more effective than going like (picture).
Yes i'm aware most of the code is positioning. I have limited space and positioning was hard due to how the write command works. Although I may be some amatuer and the calculations aren't complex it is meant to be effective and is there really too big of a difference between var1*var1 and var1^2. Yeah i know its not great, the perfect calculator is just a play on words.

oh heck no

forgot to add picture (don't use this please)(it was a mess up of my first attempt of using lists to add more room)(it turns snap into "Aw Snap!"
dod script pic

I'm amused that you reject that small difference, but are happy to use the much bigger time to position a sprite and type out a text. :~)

If you're making a pun on purpose, your program should display perfect numbers (equal to the sum of its factors; the first one is 6 (1+2+3)). They're very sparse; iirc the next one is 28 and the one after that is in the ten thousands.

print(6,28,496,8128)
wait(100)secs
print(33550336)

could you tell me the difference if the numbers are the same

I'm sorry, I'm confused. What difference are you talking about? Between what and what?

v1*v1 and v1^2

because my username is calculator, i just had to try making my own (lol)

can calculate roughly 530 perfect squares in normal mode, and roughly 18000 in turbo mode.

it tried optimizing the printing to various "grid spaces" feature your project had.
anyways, cool project!

Thanks my calculator can calculate up to the integer limit but i don't have enough space. I like your usage of your space and its really cool and creative you can use snippets of my code if you want!

i revised it and heres it going much farther but it does cut off

warp->74207

Oh, I see. No difference, really. One might be trivially faster than the other, but I'm not sure.

https://oeis.org/A000396
[EDIT: the primary thing I want to show you is the list of the first few perfect numbers]