FInally amanged to reproduce - just as i thought , atof is locale specific. in the meanwhile (until the fix) to make it work correctly, change the format in settings->language®ion->regional settings->united kingdom (reboot). i will fix it by replacing atof with atof_l so that you will not have to change the regional settings. Thanks for everyone that assisted in finding this issue!