In my case I just used

Unit Maths

if GetPrecisionMode = pmsingle then SetPrecisionMode(pmDouble);