Fix invert under MSVC

The problem is that before VS 2012 MS compiler ignores explicit casts to double when all members of expression have float type.