~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/r/func_math.result

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
407
407
a DIV 2
408
408
0
409
409
DROP TABLE t1;
 
410
CREATE TABLE t1 (a DOUBLE);
 
411
INSERT INTO t1 VALUES (-1.1), (1.1),
 
412
(-1.5), (1.5),
 
413
(-1.9), (1.9),
 
414
(-2.1), (2.1),
 
415
(-2.5), (2.5),
 
416
(-2.9), (2.9),
 
417
# Check numbers with absolute values > 2^53 - 1 
 
418
# (see comments for MAX_EXACT_INTEGER)
 
419
(-1e16 - 0.5), (1e16 + 0.5),
 
420
(-1e16 - 1.5), (1e16 + 1.5);
 
421
SELECT a, ROUND(a) FROM t1;
 
422
a       ROUND(a)
 
423
-1.1    -1
 
424
1.1     1
 
425
-1.5    -2
 
426
1.5     2
 
427
-1.9    -2
 
428
1.9     2
 
429
-2.1    -2
 
430
2.1     2
 
431
-2.5    -2
 
432
2.5     2
 
433
-2.9    -3
 
434
2.9     3
 
435
-1e16   -10000000000000000
 
436
1e16    10000000000000000
 
437
-1.0000000000000002e16  -10000000000000002
 
438
1.0000000000000002e16   10000000000000002
 
439
DROP TABLE t1;
410
440
End of 5.0 tests
411
441
SELECT 1e308 + 1e308;
412
442
1e308 + 1e308