lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


you may consider to always run the Lua state with the same FPU precision settings.
This would frexp() operate consistently in both threads.

-- Oliver
'luai_hashnum'  FAILS to generate a DETERMINISTIC hash value for identical keys when executed non-concurrently on separate threads.

It is the fault of different precision controls being set on different threads, one of which is automatically set to 24 bits when using DirectX without
the D3DCREATE_FPU_PRESERVE flag.  (But not strictly limited to DX, anyone wanting to increase floating point performance
with the sacrifice of precision).