replaced integer bitshift by ldexp()