Help with converting seemingly irrational decimals to nice denominators

I know you! Your from Scratch! Welcome to Snap!

Welcome to the forums!
Does this help?:

I recognize you too!

I'm so glad to see you on Snap! Now! How's it going for you?

No, sorry. That topic discusses floating numbers, while my problem is less technical.

Fine, I suppose. Question: Why does gobo have an antler in Snap?

Snap! was based on Scratch's source code.

I always thought Gobo looked strange enough. Anyway, I kind of hijacked my own thread.

You can delete posts by clicking the three dots and clicking the delete button.

That's helpful to know in the future. Thanks!

Once you've computed that sqrt(3), you're not going to get an exact answer to any later computation that depends on it. There are a couple of things you can do:

  1. Easy but not quite what you want: You can round the answer to some number of decimal places. Let's say you want three digits after the decimal point; you can say

  2. Hard but perfect: Start by loading the bignums library. Invent a representation for exact square roots, e.g.,
    and build your own SQUARE function that recognizes those things and returns the exact result. Also you'll need your own arithmetic operators in general so that, for example,

    And so on. There would be a lot of little pieces to this solution.

That's not an antler; it's a Greek letter lambda. See Why is the snap logo a lambda?

No. BYOB, the predecessor of Snap!, was based on Scratch 1.4's source code. But Snap! is an entirely separate program. See You ripped off Scratch!

Ahh, got it. Thanks!

Not such a huge surprise. Pretty much every kid with access to a computer runs across Scratch these days, either at school or from friends.

I was just pointing out that I had met them from Scratch.

Snap!'s mascot is called Alonzo, named after Alonzo Church, and is basically Gobo with an antler.

Thanks for the reply.

If you rotate Alonzo to face straight up, the "antler" is a Greek Lambda λ mirrored horizontally.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.