WHAT?
WHAT?
discrim = b² - 4ac; // Standard notation
float discrim = pow(b, 2) - 4*a*c; // C
float discrim = b \ 2 - 4*a*c; // C∀
I would argue that these are presented here in descending order of readability.Also its typing rules are really complicated; apply it to two integers and magically you are thrown into the floating-point world where you can never be completely certain of anything, but if you use an unsigned exponent then you stay safely in integer-land.
int a = 1;
int *b = &a;
int c = a ** b;
// Am I casting b to an int (returning it's address) and exponenting it or am I derefrencing b and multiplying it's result with a?'||' and '&&' are distinct tokens in C as far as i know, i.e. not handled as two consecutive '|'s or '&'s.
So your example would unambiguously be parsed as "a to the b:th power". Whereas the other case would need explicit parens:
int c = a * (*b);
Similar example for &: int a = 1;
int b = 1 && a; /* 1 LOGICAL_AND a */
int c = 1 & (&a); /* 1 AND address of a */Hmm I'm pretty sure practically every programming languages have it. It usually looks like "!=" or "<>".
The even more obscure logical XNOR is usually denoted "==" or "="
I assume there's a double asterisk there, and it's being eaten by the formatter?
float discrim = b*b - 4*a*c;
Using pow for a small integer power is a no-no: less efficient and less accurate.I agree that \ is an awkward choice. A Fortran-like double asterisk ∗∗ is out because of ambiguity with pointers; single caret ^ out because it is already reserved for bitwise xor. Maybe double caret ^^ or asterisk-caret ∗^ could be used? That would read okay :
double discrim = b^^2 - 4*a*c;
double discrim = b*^2 - 4*a*c;Using pow for a small integer power compiles into the exact same code: https://godbolt.org/g/CjoHdJ
Using pow for a small integer power is a no-no: less efficient and less accurate.
I think you missed the point.