On Fri, Jun 14, 2013 at 6:34 PM, Filipe Madureira <
filipe.madure...@sysdevsolutions.com> wrote:

> Hi,
>
> Thanks for the great help.
> I tracked the problem to et_getdigit()
> More precisely to:
> digit = (int)*val;
>
> So, SQLite is assuming that "double" to "int" cast will truncate the
> value. This should be true.
> But in this device this is not happening, so if "val" is 2.55 I get 3 in
> "digit".
>
> Anyone knows why this could happen?
>
> I found something that makes it work correctly.
> If I call (Visual Studio C++):
> _controlfp(_RC_CHOP , _MCW_RC);
>
> it works correctly. But I am a little bit out of my league here.
> Wont this possibly cause other problems somewhere else?
> Isn't the default setting with _RC_NEAR?
> (Note: This call is thread dependent)
>
>
Possibly a bug in Win CE or ARM ?
I came across the post [1] linked below from a QT-related  forum.
Interesting to note is that each of the values (greater than 1.0) whose
digits to the right of the decimal point (fractional part) were greater
than .5 have been returned as the next larger decimal (integer part):

14.5879 has become 15.
1.6189 has become 2.
64.8874 has become 65.

However, values (less than 1.0) whose digits to the right of the decimal
point (fractional part) were greater than .5 have been returned properly:

0.7997 has become .800

[1] http://qt-project.org/forums/viewthread/25060

--
   --
      --
         --Ô¿Ô--
        K e V i N
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to