I tried it on windows for you.   sqlite3.exe v3.21

sqlite> select round(1-0.5);
1
sqlite> select round(2-0.5);
2
sqlite> select round(3-0.5);
3
sqlite> select round(4-0.5);
4
sqlite> select round(5-0.5);
5
sqlite> select round(6-0.5);
6

Maybe the math libarary on the C compiler you are using?
 

-----Original Message-----
From: Nicolas Martin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 28, 2005 2:37 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] round ?

Some strange effect of the round expression :

sqlite> select round(1-0.5);
0
sqlite> select round(2-0.5);
2
sqlite> select round(3-0.5);
2
sqlite> select round(4-0.5);
4
sqlite> select round(5-0.5);
4
sqlite> select round(6-0.5);
6
sqlite>






--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.6/59 - Release Date: 27/07/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.6/59 - Release Date: 27/07/2005
 

Reply via email to