> Using pow for a small integer power is a no-no: less efficient and less accurate.
Using pow for a small integer power compiles into the exact same code: https://godbolt.org/g/CjoHdJ
Re:C for All
by stochastic_monk on Saturday March 24, 2018 @03:59PM
(#16668565)
Only for 1 or 2, unless you turn on --fast-math.
Re:C for All
by tejasmanohar on Sunday March 25, 2018 @04:08PM
(#16674269)
Using pow for a small integer power is a no-no: less efficient and less accurate.
I think you missed the point.
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 :