They are both right. It is a matter of how many decimal places you want to
display:
mysql> SELECT 365 * 1.67 * ( 1 - 0.10);
+--+
| 365 * 1.67 * ( 1 - 0.10) |
+--+
| 548.5950 |
+--+
1 row in set (0.00 sec)
my
From: "Alex Keda"
To: mysql@lists.mysql.com;
Sent: 6:37 Piątek 2013-02-15
Subject: MySQL 5.1: incorrect arithmetic calculation
( ... cut ...)
>
> but, my desktop calculator gives the result 548.60
>
1. your desktop calculator is wrong
2. correct result is 548.595, variations (548.59 and 548
- Original Message -
> From: "Alex Keda"
> To: mysql@lists.mysql.com
> Sent: Friday, 15 February, 2013 12:16:18 PM
> Subject: Re: MySQL 5.1: incorrect arithmetic calculation
>
> sorry, I'm too many work... =)
Heh :-) I was thinking, why would that not
15.02.2013 14:43, Johan De Meersman пишет:
- Original Message -
From: "Alex Keda"
mysql> SELECT SUM(`Amount`*`Cost`*(1-`Discont`)) as `Summ` FROM
`WorksCompliteAgregate` WHERE (`ContractID` = 10369 AND `Month` = 497);
Based off the select you printed, this comes to EXACTLY 548.595 f
- Original Message -
> From: "Alex Keda"
>
> mysql> SELECT SUM(`Amount`*`Cost`*(1-`Discont`)) as `Summ` FROM
> `WorksCompliteAgregate` WHERE (`ContractID` = 10369 AND `Month` = 497);
Based off the select you printed, this comes to EXACTLY 548.595 for the first
row and 0 for the seco
15.02.2013 15:07, Alex Keda пишет:
OK. But, how about:
mysql> SELECT 365 * 1.67 * ( 1 - 0.10);
+--+
| 365 * 1.67 * ( 1 - 0.10) |
+--+
| 548.5950 |
+--+
1 row in set (0.00 sec)
mysql>
??
sorry, I'm too many