News for hackers. Stuff that matters.
Re:Do I Really Need a Programming Language? by Evgeniuz on Sunday December 29, 2013 @06:19AM (#6979235)
(((price - 100) / abs(price - 100)) * 25 + 75) / 10

Here you go, simple integer math, no programming necessary :) That said, this isn't optimisation, multiplication and division aren't intrinsically better than branching.

Re:Do I Really Need a Programming Language? by carlob on Sunday December 29, 2013 @10:59AM (#6979935)
x/abs(x) is really sign, which is something you can implement using bitwise oprations.

Your solution fails when price == 100 as sibling pointed out.

Re:Do I Really Need a Programming Language? by jonsen on Sunday December 29, 2013 @07:33AM (#6979380)

  if (price == 100){ ...