Get your formal profanity on!

Here's my nasty remark of the day...

1
2
3
4
5
6
7
8
9
#include<iostream>
#include<cmath>

int main()
{
  double i = sqrt(-1);
  double x = i/0;
  std::cout << x;
}


Note, if you don't get how the title is related to this, by formal profanity I mean a "swear word" in a formal language, which is mathematics, computer languages etc. So in this case I "swore" in mathematics and expressed it in C++. Programming languages are formal languages too so doesn't necessarily have to be math related.
ei pi = -2
Continuing on from Mats:

This one is not a profanity, but a fact:

i i = the real number 1.0 / (sqrt(e pi) )

This is from arguably the best mathematician of all time - Euler. Not to say that there were plenty of others who did great things, like Gauss' proving of the fundamental theorem of algebra, as just one example.

@Austin

Your "profanities" are programming ones, not math.

I reckon (from my relatively uneducated POV) it could be quite tough to come up with a math profanity. Even 4 =7 yields a boolean value of false. However, I am not by any stretch a mathematician, so there are bound to be plenty of people who could demonstrate how wrong I am.

Btw I have the book "The Mathematical Universe ", by William Dunham, PhD.
Well I would call them math profanities as well, as many typical math teachers won't discuss then. You are clearly into higher math than most go to, so it's make sense for you to view it differently.I was alwaystaught dividing by zero was impossible, it just equaled undefined. If I questioned it and asked if it was actually infinity, they just dismissed me and ignored the question. So I think you could call it a math profanity. Obviously it wasn't that simple but there is certainly more to dividing by zero then undefined,

Edit: By more complicated than that, I mean dividing by zero does not simply equal infinity.
Last edited on
Hi Austin,

At your age (from your profile), it is most likely that you have only been introduced to a relatively small subset of mathematical ideas. The same is true for me too, in a relative sense - I am much older than you, and certainly don't claim to be a mathematician - there is vast amounts of stuff I don't know. But that doesn't stop from having an interest, but it doesn't mean that I practice what I have an interest in.

I guess the reason I don't see things like x/0 as a "profanity" is because maths has a term for these things - this particular one is infinity, inverse is x/infinity = 0. The maths constant i (a complex number) is defined as being sqrt(-1.0) There is a whole branch of maths that deals with complex numbers.

The thing is, programming languages operators at least, work with real values, unless they are overloaded. But some of the math library functions (am thinking the trig functions) return things that mean NaN (not a number) and infinity. I presume that these are mainly used to detect errors. Then there are libraries that will actually do complex math, but I haven't bothered to see if they can do calculus with them or not. I haven't tried this, but I have a vague idea that the compiler will return NaN or other values for ordinary statements as well. Like if one does this:

double a = 1.0 / 0.0;

It might be possible to compare the value of variable a with NaN. I am not sure, I don't normally mess with this sort of thing.

A remarkable thing about Euler's (pronounced "Oiler" - he was an Italian) equation is that it provides a link between the most important constants in maths - 0, 1, e, pi, i. I paraphrased that from Dunham's book.

The equation, before Mats intentionally abused :+D it for the purposes of this topic, is:

Euler wrote:
e i pi + 1 = 0


Any way, I have to go now, hopefully I have provided some food for thought !!

EDIT: Perhaps I should have said that 1/infinity is infinitesimally close to zero. But x/0 is infinity though - do a graph of a/x where a is any constant value. The smaller x is, the bigger y is.
Last edited on
I'm curious what school of mathematics says x/0 = infinity. I've only gotten through calculus and have always been told it is undefined. I know the limit of C/x as x approaches 0 approaches infinity, but that's not the same thing.
I'm curious what school of mathematics says x/0 = infinity. I've only gotten through calculus and have always been told it is undefined. I know the limit of C/x as x approaches 0 approaches infinity, but that's not the same thing.


As far as I know it's not infinity in any school. I was just using x/0 and the infinity theory as an example of how terrible teachers can be. They wouldn't even discuss it with me.

As far as I know it really can't be determined (not even as infinity) based on this. (There are other reasons but this is a simple one and I like simple chat when it comes to math as I'm really bad at communicating anything math related beyond mid-algebra)

If x/0 always yields infinity, then we can say

1/0 = 2/0

as 1/0 = ∞ and 2/0 = ∞

Then this would mean

0 x ∞ = 1
0 x ∞ = 2

1 = 0 x ∞ = 2

As you can probably tell immediately that doesn't work.

x/0 really is as far as I know, undefined.

Mats and TheIdeasMan, you have commited a horrendous crime!

You forgot to post a relevant XKCD comic!

http://xkcd.com/179/

@TheIdeasMan
- 0


Wow, wow, wow, hold on a second, I do not get that one bit! Shouldn't it be like this regardless of it being signed?

- 0 = 0

Can't lie I have no clue on that.

TheIdeasMan wrote:
the most important constants in maths - 0, 1, e, pi, i.


I didn't mean negative 0 literally - the hyphen is just a joiner between the sentence and the list of constants. I could have just as easily used -> or even a : would have been the best . If I had meant negative zero (an arguably crazy concept), I would not have put a space between them.

Btw, formulae involving ∞ don't seem to follow the normal rules: ∞ + x = ∞

naraku9333's statement is more accurate than what I said. As I alluded to earlier, there is vast amounts that I don't know plus considerable amounts I have forgotten or need reminding about :+)

Maybe x/0 is undefined because ∞ is not a precisely defined value either: that is, undefined.

Also, teachers may have been unwilling to discuss this, because it leads to a huge discussion that would have derailed their lesson plan.

Excellent cartoon - LOL
TheIdeasMan:
didn't mean negative 0 literally - the hyphen is just a joiner between the sentence and the list of constants. I could have just as easily used -> or even a : would have been the best . If I had meant negative zero (an arguably crazy concept), I would not have put a space between them.

Btw, formulae involving ∞ don't seem to follow the normal rules: ∞ + x = ∞

naraku9333's statement is more accurate than what I said. As I alluded to earlier, there is vast amounts that I don't know plus considerable amounts I have forgotten or need reminding about :+)

Maybe x/0 is undefined because ∞ is not a precisely defined value either: that is, undefined.

Also, teachers may have been unwilling to discuss this, because it leads to a huge discussion that would have derailed their lesson plan.

Excellent cartoon - LOL


Oh I see, lol, although after googling apparently there is some info/use of it.

http://www.johndcook.com/blog/2010/06/15/why-computers-have-signed-zero/

Wikipedia article: http://en.wikipedia.org/wiki/Signed_zero

Somewhat interesting I'd say.

No it doesn't, it can be hard at times to know what you can and can't do with infinity, since in truth it isn't actually a number. I'm not sure if infinity is considered an imaginary number or a complex number?

I'm not sure if that's valid at all or not, but I actually have a much better math teacher this year so I believe I can ask her before school about this. She went pretty high in math (Majored in it I think) so I'm doubtful she couldn't tell me something.


Austin J wrote:
I'm not sure if infinity is considered an imaginary number or a complex number?


No, imaginary numbers involve the constant i which is sqrt(-1) . Complex numbers are like a coordinate on a graph where the x axis is a real number and the y axis is an imaginary number. Probably best to google it.

Undefined is a different idea altogether: meaning that there is no definition.

Any way, all this is probably ahead of you at school.
Any way, all this is probably ahead of you at school.


That doesn't mean I wont' try to learn it. I learn a lot outside of my schooling mate ;). Good example would be the fact that there is literally no classes whatsoever for programming. I've stayed studious on my own terms for about 8 months though and have managed to learn a lot. (Still a lot to learn but I feel the fact I haven't quit like many my age would shows my point)


No, imaginary numbers involve the constant i which is sqrt(-1) . Complex numbers are like a coordinate on a graph where the x axis is a real number and the y axis is an imaginary number. Probably best to google it.

Undefined is a different idea altogether: meaning that there is no definition.


Ok thanks for clearing that all up. I'm curious though what do you think shows x/0 is undefined and not infinity if my way doesn't work?


This is quite interesting for a basic overview of zero and it's issues:

http://www.youtube.com/watch?v=BRRolKTlF6Q
Well Numberphile's video should have explained much. 1/0 has never been equal to infinity, it is not a number/value , it is a phenomenon/behaviour of equations/curve , this video is also appropriate
http://youtube.com/watch?v=elvOZm0d4H0
Last edited on
Austin J wrote:
I learn a lot outside of my schooling mate ;)


Good on you - that is excellent.

I'm curious though what do you think shows x/0 is undefined and not infinity if my way doesn't work?


Is it because x/0 is undefined and so is infinity?

There are other ways of arriving at in infinity: tan 90 degrees; radius of a straight line is infinity.

http://xkcd.com/505/
well x/a means how many a (max) can x hold. For example, how many song can a 2GB flash drive hold, suppose a song is 2MB on average? 2x1024 / 2 = 1024 songs is your answer.

then 1/0 means how many zeroes 1 can hold, in maximum... Well that's clearly undefined or unknown. 1 can hold a trillion zeroes, true, but is it maximum yet? 1 can hold a centillion zeroes, true; 1 can hold a googolplex zeroes, true... Infinity zeros? No. Because it's doesn't matter how many zeroes you add, the sum will be zero and zero only. Thus, 1/0 = infinity is wrong. 2/0 = infinity is also wrong. 0 is one monstrous number in math.

Another proof it's undefined:
1/x when x get closer and closer to zero, but still greater than zero, is appx. positive infinity.
1/x when x get closer and closer to zero, but still less than zero, is appx. negative infinity.
Pos. inf. and neg. inf. is very very distant. Then if x is zero, is it pos. inf or neg. inf.? Or none? It's undefined :/

Last edited on
Topic archived. No new replies allowed.