|
||||
0001 -- 0002 -- Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group 0003 -- 0004 -- 0005 -- FLOAT8 0006 -- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/float8.sql 0007 0008 CREATE TABLE FLOAT8_TBL(f1 double) USING parquet; 0009 0010 -- PostgreSQL implicitly casts string literals to data with floating point types, but 0011 -- Spark does not support that kind of implicit casts. 0012 INSERT INTO FLOAT8_TBL VALUES (double(' 0.0 ')); 0013 INSERT INTO FLOAT8_TBL VALUES (double('1004.30 ')); 0014 INSERT INTO FLOAT8_TBL VALUES (double(' -34.84')); 0015 INSERT INTO FLOAT8_TBL VALUES (double('1.2345678901234e+200')); 0016 INSERT INTO FLOAT8_TBL VALUES (double('1.2345678901234e-200')); 0017 0018 -- [SPARK-28024] Incorrect numeric values when out of range 0019 -- test for underflow and overflow handling 0020 SELECT double('10e400'); 0021 SELECT double('-10e400'); 0022 SELECT double('10e-400'); 0023 SELECT double('-10e-400'); 0024 0025 -- [SPARK-28061] Support for converting float to binary format 0026 -- test smallest normalized input 0027 -- SELECT float8send('2.2250738585072014E-308'::float8); 0028 0029 -- [SPARK-27923] Spark SQL insert there bad inputs to NULL 0030 -- bad input 0031 -- INSERT INTO FLOAT8_TBL VALUES (''); 0032 -- INSERT INTO FLOAT8_TBL VALUES (' '); 0033 -- INSERT INTO FLOAT8_TBL VALUES ('xyz'); 0034 -- INSERT INTO FLOAT8_TBL VALUES ('5.0.0'); 0035 -- INSERT INTO FLOAT8_TBL VALUES ('5 . 0'); 0036 -- INSERT INTO FLOAT8_TBL VALUES ('5. 0'); 0037 -- INSERT INTO FLOAT8_TBL VALUES (' - 3'); 0038 -- INSERT INTO FLOAT8_TBL VALUES ('123 5'); 0039 0040 -- special inputs 0041 SELECT double('NaN'); 0042 SELECT double('nan'); 0043 SELECT double(' NAN '); 0044 SELECT double('infinity'); 0045 SELECT double(' -INFINiTY '); 0046 -- [SPARK-27923] Spark SQL insert there bad special inputs to NULL 0047 -- bad special inputs 0048 SELECT double('N A N'); 0049 SELECT double('NaN x'); 0050 SELECT double(' INFINITY x'); 0051 0052 SELECT double('Infinity') + 100.0; 0053 SELECT double('Infinity') / double('Infinity'); 0054 SELECT double('NaN') / double('NaN'); 0055 -- [SPARK-28315] Decimal can not accept NaN as input 0056 SELECT double(decimal('nan')); 0057 0058 SELECT '' AS five, * FROM FLOAT8_TBL; 0059 0060 SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <> '1004.3'; 0061 0062 SELECT '' AS one, f.* FROM FLOAT8_TBL f WHERE f.f1 = '1004.3'; 0063 0064 SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE '1004.3' > f.f1; 0065 0066 SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE f.f1 < '1004.3'; 0067 0068 SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE '1004.3' >= f.f1; 0069 0070 SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <= '1004.3'; 0071 0072 SELECT '' AS three, f.f1, f.f1 * '-10' AS x 0073 FROM FLOAT8_TBL f 0074 WHERE f.f1 > '0.0'; 0075 0076 SELECT '' AS three, f.f1, f.f1 + '-10' AS x 0077 FROM FLOAT8_TBL f 0078 WHERE f.f1 > '0.0'; 0079 0080 SELECT '' AS three, f.f1, f.f1 / '-10' AS x 0081 FROM FLOAT8_TBL f 0082 WHERE f.f1 > '0.0'; 0083 0084 SELECT '' AS three, f.f1, f.f1 - '-10' AS x 0085 FROM FLOAT8_TBL f 0086 WHERE f.f1 > '0.0'; 0087 -- [SPARK-28007] Caret operator (^) means bitwise XOR in Spark/Hive and exponentiation in Postgres 0088 -- SELECT '' AS one, f.f1 ^ '2.0' AS square_f1 0089 -- FROM FLOAT8_TBL f where f.f1 = '1004.3'; 0090 0091 -- [SPARK-28027] Spark SQL does not support prefix operator @ 0092 -- absolute value 0093 -- SELECT '' AS five, f.f1, @f.f1 AS abs_f1 0094 -- FROM FLOAT8_TBL f; 0095 0096 -- [SPARK-23906] Support Truncate number 0097 -- truncate 0098 -- SELECT '' AS five, f.f1, trunc(f.f1) AS trunc_f1 0099 -- FROM FLOAT8_TBL f; 0100 0101 -- round 0102 SELECT '' AS five, f.f1, round(f.f1) AS round_f1 0103 FROM FLOAT8_TBL f; 0104 0105 -- [SPARK-28135] ceil/ceiling/floor returns incorrect values 0106 -- ceil / ceiling 0107 select ceil(f1) as ceil_f1 from float8_tbl f; 0108 select ceiling(f1) as ceiling_f1 from float8_tbl f; 0109 0110 -- floor 0111 select floor(f1) as floor_f1 from float8_tbl f; 0112 0113 -- sign 0114 select sign(f1) as sign_f1 from float8_tbl f; 0115 0116 -- avoid bit-exact output here because operations may not be bit-exact. 0117 -- SET extra_float_digits = 0; 0118 0119 -- square root 0120 SELECT sqrt(double('64')) AS eight; 0121 0122 -- [SPARK-28027] Spark SQL does not support prefix operator |/ 0123 -- SELECT |/ float8 '64' AS eight; 0124 0125 -- SELECT '' AS three, f.f1, |/f.f1 AS sqrt_f1 0126 -- FROM FLOAT8_TBL f 0127 -- WHERE f.f1 > '0.0'; 0128 0129 -- power 0130 SELECT power(double('144'), double('0.5')); 0131 SELECT power(double('NaN'), double('0.5')); 0132 SELECT power(double('144'), double('NaN')); 0133 SELECT power(double('NaN'), double('NaN')); 0134 SELECT power(double('-1'), double('NaN')); 0135 -- [SPARK-28135] power returns incorrect values 0136 SELECT power(double('1'), double('NaN')); 0137 SELECT power(double('NaN'), double('0')); 0138 0139 -- take exp of ln(f.f1) 0140 SELECT '' AS three, f.f1, exp(ln(f.f1)) AS exp_ln_f1 0141 FROM FLOAT8_TBL f 0142 WHERE f.f1 > '0.0'; 0143 0144 -- [SPARK-28027] Spark SQL does not support prefix operator ||/ 0145 -- cube root 0146 -- SELECT ||/ float8 '27' AS three; 0147 0148 -- SELECT '' AS five, f.f1, ||/f.f1 AS cbrt_f1 FROM FLOAT8_TBL f; 0149 0150 0151 SELECT '' AS five, * FROM FLOAT8_TBL; 0152 0153 -- UPDATE FLOAT8_TBL 0154 -- SET f1 = FLOAT8_TBL.f1 * '-1' 0155 -- WHERE FLOAT8_TBL.f1 > '0.0'; 0156 -- Update the FLOAT8_TBL to UPDATED_FLOAT8_TBL 0157 CREATE TEMPORARY VIEW UPDATED_FLOAT8_TBL as 0158 SELECT 0159 CASE WHEN FLOAT8_TBL.f1 > '0.0' THEN FLOAT8_TBL.f1 * '-1' ELSE FLOAT8_TBL.f1 END AS f1 0160 FROM FLOAT8_TBL; 0161 0162 -- [SPARK-27923] Out of range, Spark SQL returns Infinity 0163 SELECT '' AS bad, f.f1 * '1e200' from UPDATED_FLOAT8_TBL f; 0164 0165 -- [SPARK-28007] Caret operator (^) means bitwise XOR in Spark/Hive and exponentiation in Postgres 0166 -- SELECT '' AS bad, f.f1 ^ '1e200' from UPDATED_FLOAT8_TBL f; 0167 0168 -- SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5; 0169 0170 -- [SPARK-27923] Cannot take logarithm of zero 0171 -- SELECT '' AS bad, ln(f.f1) from UPDATED_FLOAT8_TBL f where f.f1 = '0.0' ; 0172 0173 -- [SPARK-27923] Cannot take logarithm of a negative number 0174 -- SELECT '' AS bad, ln(f.f1) from UPDATED_FLOAT8_TBL f where f.f1 < '0.0' ; 0175 0176 -- [SPARK-28024] Incorrect numeric values when out of range 0177 -- SELECT '' AS bad, exp(f.f1) from UPDATED_FLOAT8_TBL f; 0178 0179 -- [SPARK-27923] Divide by zero, Spark SQL returns NULL 0180 -- SELECT '' AS bad, f.f1 / '0.0' from UPDATED_FLOAT8_TBL f; 0181 0182 SELECT '' AS five, * FROM UPDATED_FLOAT8_TBL; 0183 0184 -- hyperbolic functions 0185 -- we run these with extra_float_digits = 0 too, since different platforms 0186 -- tend to produce results that vary in the last place. 0187 SELECT sinh(double('1')); 0188 SELECT cosh(double('1')); 0189 SELECT tanh(double('1')); 0190 SELECT asinh(double('1')); 0191 SELECT acosh(double('2')); 0192 SELECT atanh(double('0.5')); 0193 0194 -- test Inf/NaN cases for hyperbolic functions 0195 SELECT sinh(double('Infinity')); 0196 SELECT sinh(double('-Infinity')); 0197 SELECT sinh(double('NaN')); 0198 SELECT cosh(double('Infinity')); 0199 SELECT cosh(double('-Infinity')); 0200 SELECT cosh(double('NaN')); 0201 SELECT tanh(double('Infinity')); 0202 SELECT tanh(double('-Infinity')); 0203 SELECT tanh(double('NaN')); 0204 SELECT asinh(double('Infinity')); 0205 SELECT asinh(double('-Infinity')); 0206 SELECT asinh(double('NaN')); 0207 -- acosh(Inf) should be Inf, but some mingw versions produce NaN, so skip test 0208 SELECT acosh(double('Infinity')); 0209 SELECT acosh(double('-Infinity')); 0210 SELECT acosh(double('NaN')); 0211 SELECT atanh(double('Infinity')); 0212 SELECT atanh(double('-Infinity')); 0213 SELECT atanh(double('NaN')); 0214 0215 -- RESET extra_float_digits; 0216 0217 -- [SPARK-28024] Incorrect numeric values when out of range 0218 -- test for over- and underflow 0219 -- INSERT INTO FLOAT8_TBL VALUES ('10e400'); 0220 0221 -- INSERT INTO FLOAT8_TBL VALUES ('-10e400'); 0222 0223 -- INSERT INTO FLOAT8_TBL VALUES ('10e-400'); 0224 0225 -- INSERT INTO FLOAT8_TBL VALUES ('-10e-400'); 0226 0227 -- maintain external table consistency across platforms 0228 -- delete all values and reinsert well-behaved ones 0229 0230 TRUNCATE TABLE FLOAT8_TBL; 0231 0232 -- PostgreSQL implicitly casts string literals to data with floating point types, but 0233 -- Spark does not support that kind of implicit casts. 0234 INSERT INTO FLOAT8_TBL VALUES (double('0.0')); 0235 0236 INSERT INTO FLOAT8_TBL VALUES (double('-34.84')); 0237 0238 INSERT INTO FLOAT8_TBL VALUES (double('-1004.30')); 0239 0240 INSERT INTO FLOAT8_TBL VALUES (double('-1.2345678901234e+200')); 0241 0242 INSERT INTO FLOAT8_TBL VALUES (double('-1.2345678901234e-200')); 0243 0244 SELECT '' AS five, * FROM FLOAT8_TBL; 0245 0246 -- [SPARK-28028] Cast numeric to integral type need round 0247 -- [SPARK-28024] Incorrect numeric values when out of range 0248 -- test edge-case coercions to integer 0249 SELECT smallint(double('32767.4')); 0250 SELECT smallint(double('32767.6')); 0251 SELECT smallint(double('-32768.4')); 0252 SELECT smallint(double('-32768.6')); 0253 SELECT int(double('2147483647.4')); 0254 SELECT int(double('2147483647.6')); 0255 SELECT int(double('-2147483648.4')); 0256 SELECT int(double('-2147483648.6')); 0257 SELECT bigint(double('9223372036854773760')); 0258 SELECT bigint(double('9223372036854775807')); 0259 SELECT bigint(double('-9223372036854775808.5')); 0260 SELECT bigint(double('-9223372036854780000')); 0261 0262 -- [SPARK-28134] Missing Trigonometric Functions 0263 -- test exact cases for trigonometric functions in degrees 0264 0265 -- SELECT x, 0266 -- sind(x), 0267 -- sind(x) IN (-1,-0.5,0,0.5,1) AS sind_exact 0268 -- FROM (VALUES (0), (30), (90), (150), (180), 0269 -- (210), (270), (330), (360)) AS t(x); 0270 0271 -- SELECT x, 0272 -- cosd(x), 0273 -- cosd(x) IN (-1,-0.5,0,0.5,1) AS cosd_exact 0274 -- FROM (VALUES (0), (60), (90), (120), (180), 0275 -- (240), (270), (300), (360)) AS t(x); 0276 0277 -- SELECT x, 0278 -- tand(x), 0279 -- tand(x) IN ('-Infinity'::float8,-1,0, 0280 -- 1,'Infinity'::float8) AS tand_exact, 0281 -- cotd(x), 0282 -- cotd(x) IN ('-Infinity'::float8,-1,0, 0283 -- 1,'Infinity'::float8) AS cotd_exact 0284 -- FROM (VALUES (0), (45), (90), (135), (180), 0285 -- (225), (270), (315), (360)) AS t(x); 0286 0287 -- SELECT x, 0288 -- asind(x), 0289 -- asind(x) IN (-90,-30,0,30,90) AS asind_exact, 0290 -- acosd(x), 0291 -- acosd(x) IN (0,60,90,120,180) AS acosd_exact 0292 -- FROM (VALUES (-1), (-0.5), (0), (0.5), (1)) AS t(x); 0293 0294 -- SELECT x, 0295 -- atand(x), 0296 -- atand(x) IN (-90,-45,0,45,90) AS atand_exact 0297 -- FROM (VALUES ('-Infinity'::float8), (-1), (0), (1), 0298 -- ('Infinity'::float8)) AS t(x); 0299 0300 -- SELECT x, y, 0301 -- atan2d(y, x), 0302 -- atan2d(y, x) IN (-90,0,90,180) AS atan2d_exact 0303 -- FROM (SELECT 10*cosd(a), 10*sind(a) 0304 -- FROM generate_series(0, 360, 90) AS t(a)) AS t(x,y); 0305 0306 -- We do not support creating types, skip the test below 0307 -- 0308 -- test output (and round-trip safety) of various values. 0309 -- To ensure we're testing what we think we're testing, start with 0310 -- float values specified by bit patterns (as a useful side effect, 0311 -- this means we'll fail on non-IEEE platforms). 0312 0313 -- create type xfloat8; 0314 -- create function xfloat8in(cstring) returns xfloat8 immutable strict 0315 -- language internal as 'int8in'; 0316 -- create function xfloat8out(xfloat8) returns cstring immutable strict 0317 -- language internal as 'int8out'; 0318 -- create type xfloat8 (input = xfloat8in, output = xfloat8out, like = float8); 0319 -- create cast (xfloat8 as float8) without function; 0320 -- create cast (float8 as xfloat8) without function; 0321 -- create cast (xfloat8 as bigint) without function; 0322 -- create cast (bigint as xfloat8) without function; 0323 0324 -- float8: seeeeeee eeeeeeee eeeeeeee mmmmmmmm mmmmmmmm(x4) 0325 0326 -- we don't care to assume the platform's strtod() handles subnormals 0327 -- correctly; those are "use at your own risk". However we do test 0328 -- subnormal outputs, since those are under our control. 0329 0330 -- with testdata(bits) as (values 0331 -- -- small subnormals 0332 -- (x'0000000000000001'), 0333 -- (x'0000000000000002'), (x'0000000000000003'), 0334 -- (x'0000000000001000'), (x'0000000100000000'), 0335 -- (x'0000010000000000'), (x'0000010100000000'), 0336 -- (x'0000400000000000'), (x'0000400100000000'), 0337 -- (x'0000800000000000'), (x'0000800000000001'), 0338 -- -- these values taken from upstream testsuite 0339 -- (x'00000000000f4240'), 0340 -- (x'00000000016e3600'), 0341 -- (x'0000008cdcdea440'), 0342 -- -- borderline between subnormal and normal 0343 -- (x'000ffffffffffff0'), (x'000ffffffffffff1'), 0344 -- (x'000ffffffffffffe'), (x'000fffffffffffff')) 0345 -- select float8send(flt) as ibits, 0346 -- flt 0347 -- from (select bits::bigint::xfloat8::float8 as flt 0348 -- from testdata 0349 -- offset 0) s; 0350 0351 -- round-trip tests 0352 0353 -- with testdata(bits) as (values 0354 -- (x'0000000000000000'), 0355 -- -- smallest normal values 0356 -- (x'0010000000000000'), (x'0010000000000001'), 0357 -- (x'0010000000000002'), (x'0018000000000000'), 0358 -- -- 0359 -- (x'3ddb7cdfd9d7bdba'), (x'3ddb7cdfd9d7bdbb'), (x'3ddb7cdfd9d7bdbc'), 0360 -- (x'3e112e0be826d694'), (x'3e112e0be826d695'), (x'3e112e0be826d696'), 0361 -- (x'3e45798ee2308c39'), (x'3e45798ee2308c3a'), (x'3e45798ee2308c3b'), 0362 -- (x'3e7ad7f29abcaf47'), (x'3e7ad7f29abcaf48'), (x'3e7ad7f29abcaf49'), 0363 -- (x'3eb0c6f7a0b5ed8c'), (x'3eb0c6f7a0b5ed8d'), (x'3eb0c6f7a0b5ed8e'), 0364 -- (x'3ee4f8b588e368ef'), (x'3ee4f8b588e368f0'), (x'3ee4f8b588e368f1'), 0365 -- (x'3f1a36e2eb1c432c'), (x'3f1a36e2eb1c432d'), (x'3f1a36e2eb1c432e'), 0366 -- (x'3f50624dd2f1a9fb'), (x'3f50624dd2f1a9fc'), (x'3f50624dd2f1a9fd'), 0367 -- (x'3f847ae147ae147a'), (x'3f847ae147ae147b'), (x'3f847ae147ae147c'), 0368 -- (x'3fb9999999999999'), (x'3fb999999999999a'), (x'3fb999999999999b'), 0369 -- -- values very close to 1 0370 -- (x'3feffffffffffff0'), (x'3feffffffffffff1'), (x'3feffffffffffff2'), 0371 -- (x'3feffffffffffff3'), (x'3feffffffffffff4'), (x'3feffffffffffff5'), 0372 -- (x'3feffffffffffff6'), (x'3feffffffffffff7'), (x'3feffffffffffff8'), 0373 -- (x'3feffffffffffff9'), (x'3feffffffffffffa'), (x'3feffffffffffffb'), 0374 -- (x'3feffffffffffffc'), (x'3feffffffffffffd'), (x'3feffffffffffffe'), 0375 -- (x'3fefffffffffffff'), 0376 -- (x'3ff0000000000000'), 0377 -- (x'3ff0000000000001'), (x'3ff0000000000002'), (x'3ff0000000000003'), 0378 -- (x'3ff0000000000004'), (x'3ff0000000000005'), (x'3ff0000000000006'), 0379 -- (x'3ff0000000000007'), (x'3ff0000000000008'), (x'3ff0000000000009'), 0380 -- -- 0381 -- (x'3ff921fb54442d18'), 0382 -- (x'4005bf0a8b14576a'), 0383 -- (x'400921fb54442d18'), 0384 -- -- 0385 -- (x'4023ffffffffffff'), (x'4024000000000000'), (x'4024000000000001'), 0386 -- (x'4058ffffffffffff'), (x'4059000000000000'), (x'4059000000000001'), 0387 -- (x'408f3fffffffffff'), (x'408f400000000000'), (x'408f400000000001'), 0388 -- (x'40c387ffffffffff'), (x'40c3880000000000'), (x'40c3880000000001'), 0389 -- (x'40f869ffffffffff'), (x'40f86a0000000000'), (x'40f86a0000000001'), 0390 -- (x'412e847fffffffff'), (x'412e848000000000'), (x'412e848000000001'), 0391 -- (x'416312cfffffffff'), (x'416312d000000000'), (x'416312d000000001'), 0392 -- (x'4197d783ffffffff'), (x'4197d78400000000'), (x'4197d78400000001'), 0393 -- (x'41cdcd64ffffffff'), (x'41cdcd6500000000'), (x'41cdcd6500000001'), 0394 -- (x'4202a05f1fffffff'), (x'4202a05f20000000'), (x'4202a05f20000001'), 0395 -- (x'42374876e7ffffff'), (x'42374876e8000000'), (x'42374876e8000001'), 0396 -- (x'426d1a94a1ffffff'), (x'426d1a94a2000000'), (x'426d1a94a2000001'), 0397 -- (x'42a2309ce53fffff'), (x'42a2309ce5400000'), (x'42a2309ce5400001'), 0398 -- (x'42d6bcc41e8fffff'), (x'42d6bcc41e900000'), (x'42d6bcc41e900001'), 0399 -- (x'430c6bf52633ffff'), (x'430c6bf526340000'), (x'430c6bf526340001'), 0400 -- (x'4341c37937e07fff'), (x'4341c37937e08000'), (x'4341c37937e08001'), 0401 -- (x'4376345785d89fff'), (x'4376345785d8a000'), (x'4376345785d8a001'), 0402 -- (x'43abc16d674ec7ff'), (x'43abc16d674ec800'), (x'43abc16d674ec801'), 0403 -- (x'43e158e460913cff'), (x'43e158e460913d00'), (x'43e158e460913d01'), 0404 -- (x'4415af1d78b58c3f'), (x'4415af1d78b58c40'), (x'4415af1d78b58c41'), 0405 -- (x'444b1ae4d6e2ef4f'), (x'444b1ae4d6e2ef50'), (x'444b1ae4d6e2ef51'), 0406 -- (x'4480f0cf064dd591'), (x'4480f0cf064dd592'), (x'4480f0cf064dd593'), 0407 -- (x'44b52d02c7e14af5'), (x'44b52d02c7e14af6'), (x'44b52d02c7e14af7'), 0408 -- (x'44ea784379d99db3'), (x'44ea784379d99db4'), (x'44ea784379d99db5'), 0409 -- (x'45208b2a2c280290'), (x'45208b2a2c280291'), (x'45208b2a2c280292'), 0410 -- -- 0411 -- (x'7feffffffffffffe'), (x'7fefffffffffffff'), 0412 -- -- round to even tests (+ve) 0413 -- (x'4350000000000002'), 0414 -- (x'4350000000002e06'), 0415 -- (x'4352000000000003'), 0416 -- (x'4352000000000004'), 0417 -- (x'4358000000000003'), 0418 -- (x'4358000000000004'), 0419 -- (x'435f000000000020'), 0420 -- -- round to even tests (-ve) 0421 -- (x'c350000000000002'), 0422 -- (x'c350000000002e06'), 0423 -- (x'c352000000000003'), 0424 -- (x'c352000000000004'), 0425 -- (x'c358000000000003'), 0426 -- (x'c358000000000004'), 0427 -- (x'c35f000000000020'), 0428 -- -- exercise fixed-point memmoves 0429 -- (x'42dc12218377de66'), 0430 -- (x'42a674e79c5fe51f'), 0431 -- (x'4271f71fb04cb74c'), 0432 -- (x'423cbe991a145879'), 0433 -- (x'4206fee0e1a9e061'), 0434 -- (x'41d26580b487e6b4'), 0435 -- (x'419d6f34540ca453'), 0436 -- (x'41678c29dcd6e9dc'), 0437 -- (x'4132d687e3df217d'), 0438 -- (x'40fe240c9fcb68c8'), 0439 -- (x'40c81cd6e63c53d3'), 0440 -- (x'40934a4584fd0fdc'), 0441 -- (x'405edd3c07fb4c93'), 0442 -- (x'4028b0fcd32f7076'), 0443 -- (x'3ff3c0ca428c59f8'), 0444 -- -- these cases come from the upstream's testsuite 0445 -- -- LotsOfTrailingZeros) 0446 -- (x'3e60000000000000'), 0447 -- -- Regression 0448 -- (x'c352bd2668e077c4'), 0449 -- (x'434018601510c000'), 0450 -- (x'43d055dc36f24000'), 0451 -- (x'43e052961c6f8000'), 0452 -- (x'3ff3c0ca2a5b1d5d'), 0453 -- -- LooksLikePow5 0454 -- (x'4830f0cf064dd592'), 0455 -- (x'4840f0cf064dd592'), 0456 -- (x'4850f0cf064dd592'), 0457 -- -- OutputLength 0458 -- (x'3ff3333333333333'), 0459 -- (x'3ff3ae147ae147ae'), 0460 -- (x'3ff3be76c8b43958'), 0461 -- (x'3ff3c083126e978d'), 0462 -- (x'3ff3c0c1fc8f3238'), 0463 -- (x'3ff3c0c9539b8887'), 0464 -- (x'3ff3c0ca2a5b1d5d'), 0465 -- (x'3ff3c0ca4283de1b'), 0466 -- (x'3ff3c0ca43db770a'), 0467 -- (x'3ff3c0ca428abd53'), 0468 -- (x'3ff3c0ca428c1d2b'), 0469 -- (x'3ff3c0ca428c51f2'), 0470 -- (x'3ff3c0ca428c58fc'), 0471 -- (x'3ff3c0ca428c59dd'), 0472 -- (x'3ff3c0ca428c59f8'), 0473 -- (x'3ff3c0ca428c59fb'), 0474 -- -- 32-bit chunking 0475 -- (x'40112e0be8047a7d'), 0476 -- (x'40112e0be815a889'), 0477 -- (x'40112e0be826d695'), 0478 -- (x'40112e0be83804a1'), 0479 -- (x'40112e0be84932ad'), 0480 -- -- MinMaxShift 0481 -- (x'0040000000000000'), 0482 -- (x'007fffffffffffff'), 0483 -- (x'0290000000000000'), 0484 -- (x'029fffffffffffff'), 0485 -- (x'4350000000000000'), 0486 -- (x'435fffffffffffff'), 0487 -- (x'1330000000000000'), 0488 -- (x'133fffffffffffff'), 0489 -- (x'3a6fa7161a4d6e0c') 0490 -- ) 0491 -- select float8send(flt) as ibits, 0492 -- flt, 0493 -- flt::text::float8 as r_flt, 0494 -- float8send(flt::text::float8) as obits, 0495 -- float8send(flt::text::float8) = float8send(flt) as correct 0496 -- from (select bits::bigint::xfloat8::float8 as flt 0497 -- from testdata 0498 -- offset 0) s; 0499 0500 -- clean up, lest opr_sanity complain 0501 -- drop type xfloat8 cascade; 0502 DROP TABLE FLOAT8_TBL;
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |