Roger,
You can always write your own Round() function and have it
round exactly the way you want.
To round up on a decimal digit 5 use:
mysql> select truncate(1.235+0.005,2) rounded;
+-+
| rounded |
+-+
|1.24 |
+-+
1 row in set (0.00 sec)
To round down
Hi all,
ROUND decimal value is the mis-understood between MySQL internal
function and another environment/programming. I found that MySQL-Round is
correct within the suitable of itself (you can say it correct in C library
or other word it correct in technical term), but it did not use
* Gordon
> This round discussion has nothing to do with floating point
> approximations.
well...
> Most round routines are statistically biased on the high side. The MySQL
> round is statistically correct. The more accurate rounding rule is
As far as I can tell, there is no "MySQL round"... as
This round discussion has nothing to do with floating point
approximations.
Most round routines are statistically biased on the high side. The MySQL
round is statistically correct. The more accurate rounding rule is
If digit following the column you are rounding is a 5
I
[obfilter: mysql database]
Roger Baklund wrote:
> * Benjamin Pflugmann
>>Think the other way around: If the other option is to have no floating
>>point type at all, a "not perfect" one may be good enough for many
>>cases.
> I agree, to some extent, but a growing number of users are 'normal peo
* Benjamin Pflugmann
> On Fri, Mar 01, 2002 at 07:10:10PM +0100,
> [EMAIL PROTECTED] wrote:
> > ...but as long as 0.55-0.5 != 0.05 I will call it a bug. It may be well
> > known and hard to fix, but that does not make the expression right. :)
>
> Well, IMHO no, a bug is an unexpected flaw.
I have
Hi.
On Fri, Mar 01, 2002 at 07:10:10PM +0100, [EMAIL PROTECTED] wrote:
[...]
> ...but as long as 0.55-0.5 != 0.05 I will call it a bug. It may be well
> known and hard to fix, but that does not make the expression right. :)
Well, IMHO no, a bug is an unexpected flaw.
The imperfection of the flo
* Benjamin Pflugmann
[me about round(2.55,1) -> 2.5 or 2.6 on different platforms.]
> I would argue whether that is a bug... it is inconsistent on different
> platforms, but it is consistent with the behaviour of other programs
> on the same platform. You always break the one or the other thing.
Hi.
On Fri, Mar 01, 2002 at 01:14:43PM +0100, [EMAIL PROTECTED] wrote:
> Hi,
>
> there are a couple of bugs related to the round() function. (See the thread
> 'Can somebody help me with "round (columna,columnb) "?')
>
> One bug is already well known and documentet, it is related to different C