mirror of
https://gitee.com/he3db/he3pg.git
synced 2024-12-10 08:07:35 +08:00
107 lines
1.5 KiB
Plaintext
107 lines
1.5 KiB
Plaintext
---
|
|
--- Testing cube output in scientific notation. This was put into separate
|
|
--- test, because has platform-depending output.
|
|
---
|
|
SELECT '1e27'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e+27)
|
|
(1 row)
|
|
|
|
SELECT '-1e27'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e+27)
|
|
(1 row)
|
|
|
|
SELECT '1.0e27'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e+27)
|
|
(1 row)
|
|
|
|
SELECT '-1.0e27'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e+27)
|
|
(1 row)
|
|
|
|
SELECT '1e+27'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e+27)
|
|
(1 row)
|
|
|
|
SELECT '-1e+27'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e+27)
|
|
(1 row)
|
|
|
|
SELECT '1.0e+27'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e+27)
|
|
(1 row)
|
|
|
|
SELECT '-1.0e+27'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e+27)
|
|
(1 row)
|
|
|
|
SELECT '1e-7'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e-07)
|
|
(1 row)
|
|
|
|
SELECT '-1e-7'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e-07)
|
|
(1 row)
|
|
|
|
SELECT '1.0e-7'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e-07)
|
|
(1 row)
|
|
|
|
SELECT '-1.0e-7'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e-07)
|
|
(1 row)
|
|
|
|
SELECT '1e-300'::cube AS cube;
|
|
cube
|
|
----------
|
|
(1e-300)
|
|
(1 row)
|
|
|
|
SELECT '-1e-300'::cube AS cube;
|
|
cube
|
|
-----------
|
|
(-1e-300)
|
|
(1 row)
|
|
|
|
SELECT '1234567890123456'::cube AS cube;
|
|
cube
|
|
-------------------------
|
|
(1.234567890123456e+15)
|
|
(1 row)
|
|
|
|
SELECT '+1234567890123456'::cube AS cube;
|
|
cube
|
|
-------------------------
|
|
(1.234567890123456e+15)
|
|
(1 row)
|
|
|
|
SELECT '-1234567890123456'::cube AS cube;
|
|
cube
|
|
--------------------------
|
|
(-1.234567890123456e+15)
|
|
(1 row)
|
|
|