Do the division once:

d = 1.0 / d;

And then multiply.