Commander

@Everyone

Uh oh, I didn’t think the tau function would stir up such a dispute, The reason I added it was manily because we are learning about it in school for some reason, and I thought someone could make a cool formula with it. But you don’t have to use it, guys. :slight_smile:

EDIT: I’m guessing I shouldn’t add phi, either?

@Prynok well dont worry. I wont call it a dispute, but rather an interesting discussion between gentlemen! And i would even add: thanks for triggering it!

We already have math.pi

But useful little functions might include sin, cos, tan etc using degrees instead of radians (eg math.sin requires radians, which is easy to forget until you start getting rubbish results!). If you want to really twist your mind, try doing it using closures (see sin example at bottom of page)

http://www.lua.org/pil/6.1.html

But I would keep adding stuff you’re learning about. It doesn’t matter if nobody else wants them. It doesn’t matter if they are obvious. Just have fun and explore. And you just might find something that’s really interesting…

http://calvinethobbes.free.fr/images/lastcalvin.gif

@ignatz i am a total fan of Calvin&Hobbes! Everything is perfect in this comics: exquisite sensitiivity of the drawing, humor, and intelligence. So much above anything else. Since Little Nemo.

pi is in the standard library because it is used a lot. It is quicker to include it than for just about every graphical program to start with math.pi = math.atan(1)*4. I don’t know how much one would use the golden ratio in normal graphics. It’s aesthetic value is somewhat dubious (I defy you to tell the difference between a rectangle with ratio φ and one with ratio 1.6, or even 1.5 at a distance) so it’s unlikely to be used as much as π. For comparison, the base of the natural logarithm is not defined in the standard library.

However, from a pedagogical point of view then you should put in as many as you are learning about and for each then you should design a little program that uses it. That’s a great way to solidify your understanding of the concept behind it.

(But I would echo @dave1707’s first post about functions versus constants. These are definitely constants and not functions.)

To reply to @dave1707’s other post, you are right that it is us who name things, but the implication that the things we name are arbitrary is incorrect. One reason that we name things is to make calculations simpler and then the thing that we name tends to be the thing that occurs most. But there is a deeper reason for naming things: to encapsulate a concept. As far as calculation is concerned, there is no difference between π/2, π, or 2π. But with regard to concepts then π/2 encapsulates a concept that is far deeper than π or 2π, namely orthogonality. Knowing when two quantities are orthogonal is far, far more useful than knowing when they point in the same or opposite directions. For example, the fact that the pure signals, aka the exponential functions e2k iπ t/N, are orthogonal means that the energy of a sum of such functions can be computed from the coefficients in the sum. Without orthogonality there’s no such easy computation.

So while arguments over π versus 2π may seem frivolous, they needn’t be. The Celts, amongst others, held that to know something’s true name was to have power over it. They were right.

e2k i? t/N …mmm… Or e 2? i k t/N ? ( :wink: just kidding)

@Jmv38 Oh blast! I was pretty sure that <sup>...</sup> wouldn’t work but thought it worth trying, and then forgot to preview the post. I meant e^{2 k i pi t/N}.

@Andrew_Stacey that was clear for me that you meant that. I was only fooling around about the position of x2, never mind!