Hi, I've solved the problem at last. One thing I didn't know that creating DirectX device will lower float point precision, it is written in their documentation... So creating DX app and running float calculations is no, no... :) On the other hand one might use D3DCREATE_FPU_PRESERVE flag, to avoid this problem at cost of perfomance. For my mapping software it didn't influence perfomance at all.
D3DCREATE_FPU_PRESERVE Forces Direct3D to not change the floating-point unit control word, running the pipeline using the precision of the calling thread. Without this flag, Direct3D defaults to setting the floating-point unit to single-precision round-to-nearest mode. Using this flag with the floating-point unit in double-precision mode will reduce Direct3D performance. Perhaps will save someones day or two.. On Thu, 26 Jul 2007 19:35:13 +0300, JJ <[EMAIL PROTECTED]> wrote: > First, I have to say that it is likely another "memory leak" (mine) type > unobvious bug, it happens only once specific place in my program calls SQLite > with date/time function. I can't imagine how memory leak would cause > arithmetics to go bizzare, only perhaps something with floating point flags > in cpu (and thats far more than I am willing to know :)) > It seems that other compilers did job better. > > I've placed this into sqlite3WinCurrentTime() for test, in comments are bad > results I am getting. > > ft.dwHighDateTime = 29872031; > ft.dwLowDateTime = 49589324; > now = ((double)ft.dwHighDateTime) * 4294967296.0; // > 1.2829940050506547e+017 > rez = (now + ft.dwLowDateTime); // 1.2829940050506547e+017 > rez = (now + ft.dwLowDateTime)/864000000000.0; // 148494.67187500000 > rez = (now + ft.dwLowDateTime)/864000000000.0 + 2305813.5; // > 2454308.2500000000 > > System info: > Brand = Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz > Family = 6 > Model = 15 > Stepping = 6 > > And here is compiler logo/options as run in msvc2007: > > 1>Compiling... > 1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for > 80x86 > 1>Copyright (C) Microsoft Corporation. All rights reserved. > 1>cl /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "OS_WIN" /D > "NO_TCL" /D "DB_SQLITE_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_WINDLL" > /Gm /EHa /RTC1 /MTd /fp:strict /fp:except /Fo"Debug\\" /Fd"Debug\vc80.pdb" > /W3 /c /ZI /TC .\sqlite\where.c > > Hope anything usefull for you. > > On Tue, 24 Jul 2007 23:49:28 +0300, Trevor Talbot <[EMAIL PROTECTED]> wrote: > >> On 7/24/07, JJ <[EMAIL PROTECTED]> wrote: >> > >> Would you be willing to post a small test case (or send to me >> privately)? Along with the exact compiler version and CPU. I very >> much want to figure out exactly what this problem is, since it's >> supposed to work. >> > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------