Don't care if you've seen it or not; it's algebra. A system is two or more separate equations, not a statement of equality between three or more terms. The not equal sign (!=) is really an equal sign with a forward slash/solidus (/) through it when written. a = b = c is an algebraic equation. Now, logically....
Imperative programming isn't an algebraic system. Just because the same/similar symbols and/or operators are used in two different contexts doesn't mean that it "logically" follows that they must behave the same in both. It isn't really fair of you to keep saying things like this. Or at the very least, it certainly isn't productive.
Yes, I understand that, but to be honest I'm not getting the science of the coding. Why is gcd defined as its own seperate function apart from the main function?
I don't know what you'd be suggesting on the contrary. Actually, I'd like to know where you're coming from, since you want C to be very mathematically sound I don't understand the mathematical meaning of defining a function "inside" another one (although this is very common in functional programming and indirectly, OOP as well as in other places)
If you define gcd as gcd(b, a % b), a) how is that defining the gcd function by using gcd within the gcd function and b) why not just gcd(a, b) if a = a % b; b < a? How is that recursion just using the mod function?
gcd isn't being defined as JUST gcd(b, a % b), it's being defined as:
gcd(a, 0) = a
gcd(a, b) = gcd(b, a % b)
I don't really understand the conceptual problem with this, recursive definitions are normal in mathematics (not just programming), you should read up more if this isn't clear to you. I wouldn't say something like that if you didn't come off as such a know it all to begin with, of course (even though it's apparent you don't know as much as you want everyone to think)...
I know what the friggin' statement means. Now, I must admit, I am not that surprised by the sciences of what is compiled into machine language would contain algebraic sacrifices for humanly interpreted (thus what humans have foolishly designed machines to interpret in compilation at least) logic. I suppose I will have to live with this foolishness, then.
Yes yes, machine design is foolish because it doesn't fit your half-baked notion of mathematical beauty. You'll never get far in the real world with that attitude, where there are practical concerns with every model and implementation.
Don't like that first way; I will still attempt to follow algebraic standards. Of course, in mathematics, if x = -x, then x must be 0.
That's irrelevant because the C = operator means assignment, not equality (the == operator). If you don't like it you can use a language with different operators, although that's a remarkably petty thing to be so concerned with (then again..)
The second way I like better; it mentions the absolute value function directly, although it is merely another example of an algebraically illogical 'reassignment' like the first example.
You'd be better off using a functional programming language if you're that concerned with such "illogical" things. Unfortunately you won't be able to do many things which make computers interesting devices. Languages like C are imperative. There's a sense of time and state, as in the real world.
I must ask, what are the options available in the iostream compilation that are not available in header cstdlib? Let these be just basic functions, for more complex ones I will learn to use cstdlib instead of just iostream alone in future tutorials.
I really don't understand what you're saying and don't want to risk guessing wrong with you. Try asking in a much more straightforward way.