Re: Floor Decimal Math

2008-05-21 Thread Paul DuBois
On May 16, 2008, at 2:42 AM, Adam de Zoete wrote: Thanks for your responses, i thought it was a float problem so i was trying to CAST as a DECIMAL to fix it. It turns out (and the manual does not document this) that casting as decimals doesn't actually work in mysql 4.1.20. ROUND() is need

Re: Floor Decimal Math

2008-05-16 Thread Adam de Zoete
Thanks for your responses, i thought it was a float problem so i was trying to CAST as a DECIMAL to fix it. It turns out (and the manual does not document this) that casting as decimals doesn't actually work in mysql 4.1.20. ROUND() is needed instead. mysql> select ROUND(11.11-FLOOR(11.11),2)>

RE: Floor Decimal Math

2008-05-15 Thread John Trammell
> -Original Message- > From: Adam de Zoete [mailto:[EMAIL PROTECTED] On Behalf Of > Adam de Zoete > Sent: Thursday, May 15, 2008 6:24 AM > To: mysql@lists.mysql.com > Subject: Floor Decimal Math > > Hi, > > I'm running mysql 4.1.20 (Mac OS 10.4.11) and w

RE: Floor Decimal Math

2008-05-15 Thread Jerry Schwartz
rsday, May 15, 2008 7:24 AM >To: mysql@lists.mysql.com >Subject: Floor Decimal Math > >Hi, > >I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't >returning the right answer? Maybe i'm missing something or am i

Re: Floor Decimal Math

2008-05-15 Thread wim . delvaux
On Thursday 15 May 2008 13:24:10 Adam de Zoete wrote: > Hi, > > I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't > returning the right answer? Maybe i'm missing something or am i doing > something wrong? Perhaps it is performing FLOAT and not DECIMAL math. 11.11 is represent

Floor Decimal Math

2008-05-15 Thread Adam de Zoete
Hi, I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't returning the right answer? Maybe i'm missing something or am i doing something wrong? mysql> select (11.11-FLOOR(11.11))>=0.11; ++ | (11.11-FLOOR(11.11))>=0.11 | +--