29 messages in com.mysql.lists.win32Re: ROUND - OS-independent workaraoun...| From | Sent On | Attachments |
|---|---|---|
| Peter Holm | 04 Apr 2001 19:12 | |
| David Peoples | 04 Apr 2001 22:13 | |
| Ralph Mason | 04 Apr 2001 22:48 | |
| René Tegel | 04 Apr 2001 23:10 | |
| Sinisa Milivojevic | 05 Apr 2001 03:55 | |
| David Patte | 05 Apr 2001 04:05 | |
| Cynic | 05 Apr 2001 04:17 | |
| Thimble Smith | 05 Apr 2001 11:26 | |
| Ralph Mason | 05 Apr 2001 13:00 | |
| Tim Endres | 05 Apr 2001 13:32 | |
| Pete Harlan | 05 Apr 2001 19:43 | |
| Jupiter wekwa Punungwe | 06 Apr 2001 00:08 | |
| Luc Van der Veken | 06 Apr 2001 01:36 | |
| Jupiter wekwa Punungwe | 06 Apr 2001 06:49 | |
| Jupiter wekwa Punungwe | 06 Apr 2001 07:19 | |
| Pete French | 06 Apr 2001 07:52 | |
| Thimble Smith | 06 Apr 2001 07:59 | |
| dpa...@relativedata.com | 06 Apr 2001 08:05 | |
| Pete French | 06 Apr 2001 08:58 | |
| René Tegel | 06 Apr 2001 09:17 | |
| Tim Endres | 06 Apr 2001 09:42 | |
| Pete French | 06 Apr 2001 10:25 | |
| Tim Endres | 06 Apr 2001 11:20 | |
| Luc Van der Veken | 09 Apr 2001 01:55 | |
| Peter Holm | 11 Apr 2001 09:12 | |
| René Tegel | 11 Apr 2001 09:31 | |
| René Tegel | 11 Apr 2001 09:34 | |
| René Tegel | 12 Apr 2001 11:08 | |
| Luc Van der Veken | 13 Apr 2001 00:53 |
| Subject: | Re: ROUND - OS-independent workaraound? (dazed and confused)![]() |
|---|---|
| From: | René Tegel (teg...@dubaron.com) |
| Date: | 04/12/2001 11:08:41 AM |
| List: | com.mysql.lists.win32 |
hi,
you're quite right, negative will do wrong rounding.
select if(f<0, -floor(-f+0.5), floor(f+0.5)) from thetable;
works fine.... or is floor() OS dependent as well?
regards,
rene
----- Original Message ----- From: "Ralph Mason" <ralp...@telogis.com> To: "René Tegel" <teg...@dubaron.com> Sent: Thursday, April 12, 2001 5:11 AM Subject: Re: ROUND - OS-independent workaraound? (dazed and confused)
Unless f is < 0.
Then this function fails.
You could use a udf.
----- Original Message ----- From: "René Tegel" <teg...@dubaron.com> To: "René Tegel" <teg...@dubaron.com>; "Peter Holm" <PHo...@gmx.de>; <win...@lists.mysql.com> Sent: Thursday, April 12, 2001 4:34 AM Subject: Re: ROUND - OS-independent workaraound? (dazed and confused)
well, this example should be: select floor(1.5 + 0.5); since mysql has some problems with the space between the function name and the parameters...
----- Original Message ----- From: "René Tegel" <teg...@dubaron.com> To: "Peter Holm" <PHo...@gmx.de>; <win...@lists.mysql.com> Sent: Wednesday, April 11, 2001 6:32 PM Subject: Re: ROUND - OS-independent workaraound? (dazed and confused)
select floor (f + 0.5); will do the trick.




