Updated a, b, k and i to be doubles to support wider range of input. Floating point numbers should be written with ','. Atleast on this machine