Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C uses ^ for bitwise xor and a function for exponentiation, though.


No, 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".


I 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


Oh, 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!


He's explaining that C was not the reason for picking * over ^




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: