News for hackers. Stuff that matters.
Re:C for All by dzdt on Saturday March 24, 2018 @10:47AM (#16666823)
Idiomatic C would say:

  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;
Re:C for All by jcelerier on Saturday March 24, 2018 @12:07PM (#16667293)
> 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.