Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.6.10
-
None
Description
When we use round function on float or double not working correctly
SELECT ROUND(CAST(118.5 AS FLOAT)),ROUND(CAST(118.5 AS double)) ,ROUND(118.5 )
MariaDB [(none)]> SELECT ROUND(CAST(118.5 AS FLOAT)),ROUND(CAST(118.5 AS double)) , ROUND(118.5 );
|
+-----------------------------+------------------------------+---------------+
|
| ROUND(CAST(118.5 AS FLOAT)) | ROUND(CAST(118.5 AS double)) | ROUND(118.5 ) |
|
+-----------------------------+------------------------------+---------------+
|
| 118 | 118 | 119 |
|
+-----------------------------+------------------------------+---------------+
|
|
119 is the correct value.