d = fract(3.0 * d);