The calculation sees "5.2" as 52...

From looking at the code, it appears that the value of num1 & 2 is only changed when number buttons are pressed, and not the decimal point.

The addDot function only adds the decimal to the display_txt field. It needs to alter the value of num1S or num2S to be factored in.