Ok, i've done some more investigating and it appears that in DMD2 a float NaN is 0x7FE00000 (in dword format) but when it initialises a float 'out' parameter it initialises it with 0x7FA00000H. This causes an FPU trap which is where the time is going. This looks like a bug to me. Can anyone confirm? Thanks.