4 ms·
C uses ^ for bitwise xor and a function for exponentiation, though.
by shawn_w 11mo ago
C uses ^ for bitwise xor and a function for exponentiation, though.
- vanderZwan 11mo agoHe's explaining that C was not the reason for picking * over ^
- kragen 11mo agoNo, C does not have an exponentiation operator! Possibly you meant "and not a function for exponentiation". I should have said "followed Fortran rather than BASIC".
- shawn_w 11mo agoI meant exactly what I said. C uses a function for exponentiation. Nothing that uses ^ for powers follows C's lead. https://en.cppreference.com/w/c/numeric/math/pow.html https://en.cppreference.com/w/c/numeric/math/pow.html
- kragen 11mo agoOh, I interpreted "a function for exponentiation" as being part of a list of things C uses ^ for. It didn't even occur to me that the sentence had an alternative parsing where it was part of a list of things C uses. C does indeed use a function for exponentiation. And time flies like an arrow!