float4.out 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  1. --
  2. -- FLOAT4
  3. --
  4. CREATE TABLE FLOAT4_TBL (f1 float4);
  5. INSERT INTO FLOAT4_TBL(f1) VALUES (' 0.0');
  6. INSERT INTO FLOAT4_TBL(f1) VALUES ('1004.30 ');
  7. INSERT INTO FLOAT4_TBL(f1) VALUES (' -34.84 ');
  8. INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e+20');
  9. INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20');
  10. -- test for over and under flow
  11. INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70');
  12. ERROR: "10e70" is out of range for type real
  13. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70');
  14. ^
  15. INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70');
  16. ERROR: "-10e70" is out of range for type real
  17. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70');
  18. ^
  19. INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70');
  20. ERROR: "10e-70" is out of range for type real
  21. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70');
  22. ^
  23. INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
  24. ERROR: "-10e-70" is out of range for type real
  25. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
  26. ^
  27. INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'::float8);
  28. ERROR: value out of range: overflow
  29. INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'::float8);
  30. ERROR: value out of range: overflow
  31. INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'::float8);
  32. ERROR: value out of range: underflow
  33. INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'::float8);
  34. ERROR: value out of range: underflow
  35. INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400');
  36. ERROR: "10e400" is out of range for type real
  37. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400');
  38. ^
  39. INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e400');
  40. ERROR: "-10e400" is out of range for type real
  41. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e400');
  42. ^
  43. INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-400');
  44. ERROR: "10e-400" is out of range for type real
  45. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-400');
  46. ^
  47. INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-400');
  48. ERROR: "-10e-400" is out of range for type real
  49. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-400');
  50. ^
  51. -- bad input
  52. INSERT INTO FLOAT4_TBL(f1) VALUES ('');
  53. ERROR: invalid input syntax for type real: ""
  54. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('');
  55. ^
  56. INSERT INTO FLOAT4_TBL(f1) VALUES (' ');
  57. ERROR: invalid input syntax for type real: " "
  58. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES (' ');
  59. ^
  60. INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz');
  61. ERROR: invalid input syntax for type real: "xyz"
  62. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz');
  63. ^
  64. INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0');
  65. ERROR: invalid input syntax for type real: "5.0.0"
  66. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0');
  67. ^
  68. INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0');
  69. ERROR: invalid input syntax for type real: "5 . 0"
  70. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0');
  71. ^
  72. INSERT INTO FLOAT4_TBL(f1) VALUES ('5. 0');
  73. ERROR: invalid input syntax for type real: "5. 0"
  74. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5. 0');
  75. ^
  76. INSERT INTO FLOAT4_TBL(f1) VALUES (' - 3.0');
  77. ERROR: invalid input syntax for type real: " - 3.0"
  78. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES (' - 3.0');
  79. ^
  80. INSERT INTO FLOAT4_TBL(f1) VALUES ('123 5');
  81. ERROR: invalid input syntax for type real: "123 5"
  82. LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('123 5');
  83. ^
  84. -- special inputs
  85. SELECT 'NaN'::float4;
  86. float4
  87. --------
  88. NaN
  89. (1 row)
  90. SELECT 'nan'::float4;
  91. float4
  92. --------
  93. NaN
  94. (1 row)
  95. SELECT ' NAN '::float4;
  96. float4
  97. --------
  98. NaN
  99. (1 row)
  100. SELECT 'infinity'::float4;
  101. float4
  102. ----------
  103. Infinity
  104. (1 row)
  105. SELECT ' -INFINiTY '::float4;
  106. float4
  107. -----------
  108. -Infinity
  109. (1 row)
  110. -- bad special inputs
  111. SELECT 'N A N'::float4;
  112. ERROR: invalid input syntax for type real: "N A N"
  113. LINE 1: SELECT 'N A N'::float4;
  114. ^
  115. SELECT 'NaN x'::float4;
  116. ERROR: invalid input syntax for type real: "NaN x"
  117. LINE 1: SELECT 'NaN x'::float4;
  118. ^
  119. SELECT ' INFINITY x'::float4;
  120. ERROR: invalid input syntax for type real: " INFINITY x"
  121. LINE 1: SELECT ' INFINITY x'::float4;
  122. ^
  123. SELECT 'Infinity'::float4 + 100.0;
  124. ?column?
  125. ----------
  126. Infinity
  127. (1 row)
  128. SELECT 'Infinity'::float4 / 'Infinity'::float4;
  129. ?column?
  130. ----------
  131. NaN
  132. (1 row)
  133. SELECT '42'::float4 / 'Infinity'::float4;
  134. ?column?
  135. ----------
  136. 0
  137. (1 row)
  138. SELECT 'nan'::float4 / 'nan'::float4;
  139. ?column?
  140. ----------
  141. NaN
  142. (1 row)
  143. SELECT 'nan'::float4 / '0'::float4;
  144. ?column?
  145. ----------
  146. NaN
  147. (1 row)
  148. SELECT 'nan'::numeric::float4;
  149. float4
  150. --------
  151. NaN
  152. (1 row)
  153. SELECT * FROM FLOAT4_TBL;
  154. f1
  155. ---------------
  156. 0
  157. 1004.3
  158. -34.84
  159. 1.2345679e+20
  160. 1.2345679e-20
  161. (5 rows)
  162. SELECT f.* FROM FLOAT4_TBL f WHERE f.f1 <> '1004.3';
  163. f1
  164. ---------------
  165. 0
  166. -34.84
  167. 1.2345679e+20
  168. 1.2345679e-20
  169. (4 rows)
  170. SELECT f.* FROM FLOAT4_TBL f WHERE f.f1 = '1004.3';
  171. f1
  172. --------
  173. 1004.3
  174. (1 row)
  175. SELECT f.* FROM FLOAT4_TBL f WHERE '1004.3' > f.f1;
  176. f1
  177. ---------------
  178. 0
  179. -34.84
  180. 1.2345679e-20
  181. (3 rows)
  182. SELECT f.* FROM FLOAT4_TBL f WHERE f.f1 < '1004.3';
  183. f1
  184. ---------------
  185. 0
  186. -34.84
  187. 1.2345679e-20
  188. (3 rows)
  189. SELECT f.* FROM FLOAT4_TBL f WHERE '1004.3' >= f.f1;
  190. f1
  191. ---------------
  192. 0
  193. 1004.3
  194. -34.84
  195. 1.2345679e-20
  196. (4 rows)
  197. SELECT f.* FROM FLOAT4_TBL f WHERE f.f1 <= '1004.3';
  198. f1
  199. ---------------
  200. 0
  201. 1004.3
  202. -34.84
  203. 1.2345679e-20
  204. (4 rows)
  205. SELECT f.f1, f.f1 * '-10' AS x FROM FLOAT4_TBL f
  206. WHERE f.f1 > '0.0';
  207. f1 | x
  208. ---------------+----------------
  209. 1004.3 | -10043
  210. 1.2345679e+20 | -1.2345678e+21
  211. 1.2345679e-20 | -1.2345678e-19
  212. (3 rows)
  213. SELECT f.f1, f.f1 + '-10' AS x FROM FLOAT4_TBL f
  214. WHERE f.f1 > '0.0';
  215. f1 | x
  216. ---------------+---------------
  217. 1004.3 | 994.3
  218. 1.2345679e+20 | 1.2345679e+20
  219. 1.2345679e-20 | -10
  220. (3 rows)
  221. SELECT f.f1, f.f1 / '-10' AS x FROM FLOAT4_TBL f
  222. WHERE f.f1 > '0.0';
  223. f1 | x
  224. ---------------+----------------
  225. 1004.3 | -100.43
  226. 1.2345679e+20 | -1.2345679e+19
  227. 1.2345679e-20 | -1.2345679e-21
  228. (3 rows)
  229. SELECT f.f1, f.f1 - '-10' AS x FROM FLOAT4_TBL f
  230. WHERE f.f1 > '0.0';
  231. f1 | x
  232. ---------------+---------------
  233. 1004.3 | 1014.3
  234. 1.2345679e+20 | 1.2345679e+20
  235. 1.2345679e-20 | 10
  236. (3 rows)
  237. -- test divide by zero
  238. SELECT f.f1 / '0.0' from FLOAT4_TBL f;
  239. ERROR: division by zero
  240. SELECT * FROM FLOAT4_TBL;
  241. f1
  242. ---------------
  243. 0
  244. 1004.3
  245. -34.84
  246. 1.2345679e+20
  247. 1.2345679e-20
  248. (5 rows)
  249. -- test the unary float4abs operator
  250. SELECT f.f1, @f.f1 AS abs_f1 FROM FLOAT4_TBL f;
  251. f1 | abs_f1
  252. ---------------+---------------
  253. 0 | 0
  254. 1004.3 | 1004.3
  255. -34.84 | 34.84
  256. 1.2345679e+20 | 1.2345679e+20
  257. 1.2345679e-20 | 1.2345679e-20
  258. (5 rows)
  259. UPDATE FLOAT4_TBL
  260. SET f1 = FLOAT4_TBL.f1 * '-1'
  261. WHERE FLOAT4_TBL.f1 > '0.0';
  262. SELECT * FROM FLOAT4_TBL;
  263. f1
  264. ----------------
  265. 0
  266. -34.84
  267. -1004.3
  268. -1.2345679e+20
  269. -1.2345679e-20
  270. (5 rows)
  271. -- test edge-case coercions to integer
  272. SELECT '32767.4'::float4::int2;
  273. int2
  274. -------
  275. 32767
  276. (1 row)
  277. SELECT '32767.6'::float4::int2;
  278. ERROR: smallint out of range
  279. SELECT '-32768.4'::float4::int2;
  280. int2
  281. --------
  282. -32768
  283. (1 row)
  284. SELECT '-32768.6'::float4::int2;
  285. ERROR: smallint out of range
  286. SELECT '2147483520'::float4::int4;
  287. int4
  288. ------------
  289. 2147483520
  290. (1 row)
  291. SELECT '2147483647'::float4::int4;
  292. ERROR: integer out of range
  293. SELECT '-2147483648.5'::float4::int4;
  294. int4
  295. -------------
  296. -2147483648
  297. (1 row)
  298. SELECT '-2147483900'::float4::int4;
  299. ERROR: integer out of range
  300. SELECT '9223369837831520256'::float4::int8;
  301. int8
  302. ---------------------
  303. 9223369837831520256
  304. (1 row)
  305. SELECT '9223372036854775807'::float4::int8;
  306. ERROR: bigint out of range
  307. SELECT '-9223372036854775808.5'::float4::int8;
  308. int8
  309. ----------------------
  310. -9223372036854775808
  311. (1 row)
  312. SELECT '-9223380000000000000'::float4::int8;
  313. ERROR: bigint out of range
  314. -- Test for correct input rounding in edge cases.
  315. -- These lists are from Paxson 1991, excluding subnormals and
  316. -- inputs of over 9 sig. digits.
  317. SELECT float4send('5e-20'::float4);
  318. float4send
  319. ------------
  320. \x1f6c1e4a
  321. (1 row)
  322. SELECT float4send('67e14'::float4);
  323. float4send
  324. ------------
  325. \x59be6cea
  326. (1 row)
  327. SELECT float4send('985e15'::float4);
  328. float4send
  329. ------------
  330. \x5d5ab6c4
  331. (1 row)
  332. SELECT float4send('55895e-16'::float4);
  333. float4send
  334. ------------
  335. \x2cc4a9bd
  336. (1 row)
  337. SELECT float4send('7038531e-32'::float4);
  338. float4send
  339. ------------
  340. \x15ae43fd
  341. (1 row)
  342. SELECT float4send('702990899e-20'::float4);
  343. float4send
  344. ------------
  345. \x2cf757ca
  346. (1 row)
  347. SELECT float4send('3e-23'::float4);
  348. float4send
  349. ------------
  350. \x1a111234
  351. (1 row)
  352. SELECT float4send('57e18'::float4);
  353. float4send
  354. ------------
  355. \x6045c22c
  356. (1 row)
  357. SELECT float4send('789e-35'::float4);
  358. float4send
  359. ------------
  360. \x0a23de70
  361. (1 row)
  362. SELECT float4send('2539e-18'::float4);
  363. float4send
  364. ------------
  365. \x2736f449
  366. (1 row)
  367. SELECT float4send('76173e28'::float4);
  368. float4send
  369. ------------
  370. \x7616398a
  371. (1 row)
  372. SELECT float4send('887745e-11'::float4);
  373. float4send
  374. ------------
  375. \x3714f05c
  376. (1 row)
  377. SELECT float4send('5382571e-37'::float4);
  378. float4send
  379. ------------
  380. \x0d2eaca7
  381. (1 row)
  382. SELECT float4send('82381273e-35'::float4);
  383. float4send
  384. ------------
  385. \x128289d1
  386. (1 row)
  387. SELECT float4send('750486563e-38'::float4);
  388. float4send
  389. ------------
  390. \x0f18377e
  391. (1 row)
  392. -- Test that the smallest possible normalized input value inputs
  393. -- correctly, either in 9-significant-digit or shortest-decimal
  394. -- format.
  395. --
  396. -- exact val is 1.1754943508...
  397. -- shortest val is 1.1754944000
  398. -- midpoint to next val is 1.1754944208...
  399. SELECT float4send('1.17549435e-38'::float4);
  400. float4send
  401. ------------
  402. \x00800000
  403. (1 row)
  404. SELECT float4send('1.1754944e-38'::float4);
  405. float4send
  406. ------------
  407. \x00800000
  408. (1 row)
  409. -- test output (and round-trip safety) of various values.
  410. -- To ensure we're testing what we think we're testing, start with
  411. -- float values specified by bit patterns (as a useful side effect,
  412. -- this means we'll fail on non-IEEE platforms).
  413. create type xfloat4;
  414. create function xfloat4in(cstring) returns xfloat4 immutable strict
  415. language internal as 'int4in';
  416. NOTICE: return type xfloat4 is only a shell
  417. create function xfloat4out(xfloat4) returns cstring immutable strict
  418. language internal as 'int4out';
  419. NOTICE: argument type xfloat4 is only a shell
  420. create type xfloat4 (input = xfloat4in, output = xfloat4out, like = float4);
  421. create cast (xfloat4 as float4) without function;
  422. create cast (float4 as xfloat4) without function;
  423. create cast (xfloat4 as integer) without function;
  424. create cast (integer as xfloat4) without function;
  425. -- float4: seeeeeee emmmmmmm mmmmmmmm mmmmmmmm
  426. -- we don't care to assume the platform's strtod() handles subnormals
  427. -- correctly; those are "use at your own risk". However we do test
  428. -- subnormal outputs, since those are under our control.
  429. with testdata(bits) as (values
  430. -- small subnormals
  431. (x'00000001'),
  432. (x'00000002'), (x'00000003'),
  433. (x'00000010'), (x'00000011'), (x'00000100'), (x'00000101'),
  434. (x'00004000'), (x'00004001'), (x'00080000'), (x'00080001'),
  435. -- stress values
  436. (x'0053c4f4'), -- 7693e-42
  437. (x'006c85c4'), -- 996622e-44
  438. (x'0041ca76'), -- 60419369e-46
  439. (x'004b7678'), -- 6930161142e-48
  440. -- taken from upstream testsuite
  441. (x'00000007'),
  442. (x'00424fe2'),
  443. -- borderline between subnormal and normal
  444. (x'007ffff0'), (x'007ffff1'), (x'007ffffe'), (x'007fffff'))
  445. select float4send(flt) as ibits,
  446. flt
  447. from (select bits::integer::xfloat4::float4 as flt
  448. from testdata
  449. offset 0) s;
  450. ibits | flt
  451. ------------+---------------
  452. \x00000001 | 1e-45
  453. \x00000002 | 3e-45
  454. \x00000003 | 4e-45
  455. \x00000010 | 2.2e-44
  456. \x00000011 | 2.4e-44
  457. \x00000100 | 3.59e-43
  458. \x00000101 | 3.6e-43
  459. \x00004000 | 2.2959e-41
  460. \x00004001 | 2.296e-41
  461. \x00080000 | 7.34684e-40
  462. \x00080001 | 7.34685e-40
  463. \x0053c4f4 | 7.693e-39
  464. \x006c85c4 | 9.96622e-39
  465. \x0041ca76 | 6.041937e-39
  466. \x004b7678 | 6.930161e-39
  467. \x00000007 | 1e-44
  468. \x00424fe2 | 6.0898e-39
  469. \x007ffff0 | 1.1754921e-38
  470. \x007ffff1 | 1.1754922e-38
  471. \x007ffffe | 1.1754941e-38
  472. \x007fffff | 1.1754942e-38
  473. (21 rows)
  474. with testdata(bits) as (values
  475. (x'00000000'),
  476. -- smallest normal values
  477. (x'00800000'), (x'00800001'), (x'00800004'), (x'00800005'),
  478. (x'00800006'),
  479. -- small normal values chosen for short vs. long output
  480. (x'008002f1'), (x'008002f2'), (x'008002f3'),
  481. (x'00800e17'), (x'00800e18'), (x'00800e19'),
  482. -- assorted values (random mantissae)
  483. (x'01000001'), (x'01102843'), (x'01a52c98'),
  484. (x'0219c229'), (x'02e4464d'), (x'037343c1'), (x'03a91b36'),
  485. (x'047ada65'), (x'0496fe87'), (x'0550844f'), (x'05999da3'),
  486. (x'060ea5e2'), (x'06e63c45'), (x'07f1e548'), (x'0fc5282b'),
  487. (x'1f850283'), (x'2874a9d6'),
  488. -- values around 5e-08
  489. (x'3356bf94'), (x'3356bf95'), (x'3356bf96'),
  490. -- around 1e-07
  491. (x'33d6bf94'), (x'33d6bf95'), (x'33d6bf96'),
  492. -- around 3e-07 .. 1e-04
  493. (x'34a10faf'), (x'34a10fb0'), (x'34a10fb1'),
  494. (x'350637bc'), (x'350637bd'), (x'350637be'),
  495. (x'35719786'), (x'35719787'), (x'35719788'),
  496. (x'358637bc'), (x'358637bd'), (x'358637be'),
  497. (x'36a7c5ab'), (x'36a7c5ac'), (x'36a7c5ad'),
  498. (x'3727c5ab'), (x'3727c5ac'), (x'3727c5ad'),
  499. -- format crossover at 1e-04
  500. (x'38d1b714'), (x'38d1b715'), (x'38d1b716'),
  501. (x'38d1b717'), (x'38d1b718'), (x'38d1b719'),
  502. (x'38d1b71a'), (x'38d1b71b'), (x'38d1b71c'),
  503. (x'38d1b71d'),
  504. --
  505. (x'38dffffe'), (x'38dfffff'), (x'38e00000'),
  506. (x'38efffff'), (x'38f00000'), (x'38f00001'),
  507. (x'3a83126e'), (x'3a83126f'), (x'3a831270'),
  508. (x'3c23d709'), (x'3c23d70a'), (x'3c23d70b'),
  509. (x'3dcccccc'), (x'3dcccccd'), (x'3dccccce'),
  510. -- chosen to need 9 digits for 3dcccd70
  511. (x'3dcccd6f'), (x'3dcccd70'), (x'3dcccd71'),
  512. --
  513. (x'3effffff'), (x'3f000000'), (x'3f000001'),
  514. (x'3f333332'), (x'3f333333'), (x'3f333334'),
  515. -- approach 1.0 with increasing numbers of 9s
  516. (x'3f666665'), (x'3f666666'), (x'3f666667'),
  517. (x'3f7d70a3'), (x'3f7d70a4'), (x'3f7d70a5'),
  518. (x'3f7fbe76'), (x'3f7fbe77'), (x'3f7fbe78'),
  519. (x'3f7ff971'), (x'3f7ff972'), (x'3f7ff973'),
  520. (x'3f7fff57'), (x'3f7fff58'), (x'3f7fff59'),
  521. (x'3f7fffee'), (x'3f7fffef'),
  522. -- values very close to 1
  523. (x'3f7ffff0'), (x'3f7ffff1'), (x'3f7ffff2'),
  524. (x'3f7ffff3'), (x'3f7ffff4'), (x'3f7ffff5'),
  525. (x'3f7ffff6'), (x'3f7ffff7'), (x'3f7ffff8'),
  526. (x'3f7ffff9'), (x'3f7ffffa'), (x'3f7ffffb'),
  527. (x'3f7ffffc'), (x'3f7ffffd'), (x'3f7ffffe'),
  528. (x'3f7fffff'),
  529. (x'3f800000'),
  530. (x'3f800001'), (x'3f800002'), (x'3f800003'),
  531. (x'3f800004'), (x'3f800005'), (x'3f800006'),
  532. (x'3f800007'), (x'3f800008'), (x'3f800009'),
  533. -- values 1 to 1.1
  534. (x'3f80000f'), (x'3f800010'), (x'3f800011'),
  535. (x'3f800012'), (x'3f800013'), (x'3f800014'),
  536. (x'3f800017'), (x'3f800018'), (x'3f800019'),
  537. (x'3f80001a'), (x'3f80001b'), (x'3f80001c'),
  538. (x'3f800029'), (x'3f80002a'), (x'3f80002b'),
  539. (x'3f800053'), (x'3f800054'), (x'3f800055'),
  540. (x'3f800346'), (x'3f800347'), (x'3f800348'),
  541. (x'3f8020c4'), (x'3f8020c5'), (x'3f8020c6'),
  542. (x'3f8147ad'), (x'3f8147ae'), (x'3f8147af'),
  543. (x'3f8ccccc'), (x'3f8ccccd'), (x'3f8cccce'),
  544. --
  545. (x'3fc90fdb'), -- pi/2
  546. (x'402df854'), -- e
  547. (x'40490fdb'), -- pi
  548. --
  549. (x'409fffff'), (x'40a00000'), (x'40a00001'),
  550. (x'40afffff'), (x'40b00000'), (x'40b00001'),
  551. (x'411fffff'), (x'41200000'), (x'41200001'),
  552. (x'42c7ffff'), (x'42c80000'), (x'42c80001'),
  553. (x'4479ffff'), (x'447a0000'), (x'447a0001'),
  554. (x'461c3fff'), (x'461c4000'), (x'461c4001'),
  555. (x'47c34fff'), (x'47c35000'), (x'47c35001'),
  556. (x'497423ff'), (x'49742400'), (x'49742401'),
  557. (x'4b18967f'), (x'4b189680'), (x'4b189681'),
  558. (x'4cbebc1f'), (x'4cbebc20'), (x'4cbebc21'),
  559. (x'4e6e6b27'), (x'4e6e6b28'), (x'4e6e6b29'),
  560. (x'501502f8'), (x'501502f9'), (x'501502fa'),
  561. (x'51ba43b6'), (x'51ba43b7'), (x'51ba43b8'),
  562. -- stress values
  563. (x'1f6c1e4a'), -- 5e-20
  564. (x'59be6cea'), -- 67e14
  565. (x'5d5ab6c4'), -- 985e15
  566. (x'2cc4a9bd'), -- 55895e-16
  567. (x'15ae43fd'), -- 7038531e-32
  568. (x'2cf757ca'), -- 702990899e-20
  569. (x'665ba998'), -- 25933168707e13
  570. (x'743c3324'), -- 596428896559e20
  571. -- exercise fixed-point memmoves
  572. (x'47f1205a'),
  573. (x'4640e6ae'),
  574. (x'449a5225'),
  575. (x'42f6e9d5'),
  576. (x'414587dd'),
  577. (x'3f9e064b'),
  578. -- these cases come from the upstream's testsuite
  579. -- BoundaryRoundEven
  580. (x'4c000004'),
  581. (x'50061c46'),
  582. (x'510006a8'),
  583. -- ExactValueRoundEven
  584. (x'48951f84'),
  585. (x'45fd1840'),
  586. -- LotsOfTrailingZeros
  587. (x'39800000'),
  588. (x'3b200000'),
  589. (x'3b900000'),
  590. (x'3bd00000'),
  591. -- Regression
  592. (x'63800000'),
  593. (x'4b000000'),
  594. (x'4b800000'),
  595. (x'4c000001'),
  596. (x'4c800b0d'),
  597. (x'00d24584'),
  598. (x'00d90b88'),
  599. (x'45803f34'),
  600. (x'4f9f24f7'),
  601. (x'3a8722c3'),
  602. (x'5c800041'),
  603. (x'15ae43fd'),
  604. (x'5d4cccfb'),
  605. (x'4c800001'),
  606. (x'57800ed8'),
  607. (x'5f000000'),
  608. (x'700000f0'),
  609. (x'5f23e9ac'),
  610. (x'5e9502f9'),
  611. (x'5e8012b1'),
  612. (x'3c000028'),
  613. (x'60cde861'),
  614. (x'03aa2a50'),
  615. (x'43480000'),
  616. (x'4c000000'),
  617. -- LooksLikePow5
  618. (x'5D1502F9'),
  619. (x'5D9502F9'),
  620. (x'5E1502F9'),
  621. -- OutputLength
  622. (x'3f99999a'),
  623. (x'3f9d70a4'),
  624. (x'3f9df3b6'),
  625. (x'3f9e0419'),
  626. (x'3f9e0610'),
  627. (x'3f9e064b'),
  628. (x'3f9e0651'),
  629. (x'03d20cfe')
  630. )
  631. select float4send(flt) as ibits,
  632. flt,
  633. flt::text::float4 as r_flt,
  634. float4send(flt::text::float4) as obits,
  635. float4send(flt::text::float4) = float4send(flt) as correct
  636. from (select bits::integer::xfloat4::float4 as flt
  637. from testdata
  638. offset 0) s;
  639. ibits | flt | r_flt | obits | correct
  640. ------------+----------------+----------------+------------+---------
  641. \x00000000 | 0 | 0 | \x00000000 | t
  642. \x00800000 | 1.1754944e-38 | 1.1754944e-38 | \x00800000 | t
  643. \x00800001 | 1.1754945e-38 | 1.1754945e-38 | \x00800001 | t
  644. \x00800004 | 1.1754949e-38 | 1.1754949e-38 | \x00800004 | t
  645. \x00800005 | 1.175495e-38 | 1.175495e-38 | \x00800005 | t
  646. \x00800006 | 1.1754952e-38 | 1.1754952e-38 | \x00800006 | t
  647. \x008002f1 | 1.1755999e-38 | 1.1755999e-38 | \x008002f1 | t
  648. \x008002f2 | 1.1756e-38 | 1.1756e-38 | \x008002f2 | t
  649. \x008002f3 | 1.1756001e-38 | 1.1756001e-38 | \x008002f3 | t
  650. \x00800e17 | 1.1759998e-38 | 1.1759998e-38 | \x00800e17 | t
  651. \x00800e18 | 1.176e-38 | 1.176e-38 | \x00800e18 | t
  652. \x00800e19 | 1.1760001e-38 | 1.1760001e-38 | \x00800e19 | t
  653. \x01000001 | 2.350989e-38 | 2.350989e-38 | \x01000001 | t
  654. \x01102843 | 2.647751e-38 | 2.647751e-38 | \x01102843 | t
  655. \x01a52c98 | 6.0675416e-38 | 6.0675416e-38 | \x01a52c98 | t
  656. \x0219c229 | 1.1296386e-37 | 1.1296386e-37 | \x0219c229 | t
  657. \x02e4464d | 3.354194e-37 | 3.354194e-37 | \x02e4464d | t
  658. \x037343c1 | 7.148906e-37 | 7.148906e-37 | \x037343c1 | t
  659. \x03a91b36 | 9.939175e-37 | 9.939175e-37 | \x03a91b36 | t
  660. \x047ada65 | 2.948764e-36 | 2.948764e-36 | \x047ada65 | t
  661. \x0496fe87 | 3.5498577e-36 | 3.5498577e-36 | \x0496fe87 | t
  662. \x0550844f | 9.804414e-36 | 9.804414e-36 | \x0550844f | t
  663. \x05999da3 | 1.4445957e-35 | 1.4445957e-35 | \x05999da3 | t
  664. \x060ea5e2 | 2.6829103e-35 | 2.6829103e-35 | \x060ea5e2 | t
  665. \x06e63c45 | 8.660494e-35 | 8.660494e-35 | \x06e63c45 | t
  666. \x07f1e548 | 3.639641e-34 | 3.639641e-34 | \x07f1e548 | t
  667. \x0fc5282b | 1.9441172e-29 | 1.9441172e-29 | \x0fc5282b | t
  668. \x1f850283 | 5.6331846e-20 | 5.6331846e-20 | \x1f850283 | t
  669. \x2874a9d6 | 1.3581548e-14 | 1.3581548e-14 | \x2874a9d6 | t
  670. \x3356bf94 | 4.9999997e-08 | 4.9999997e-08 | \x3356bf94 | t
  671. \x3356bf95 | 5e-08 | 5e-08 | \x3356bf95 | t
  672. \x3356bf96 | 5.0000004e-08 | 5.0000004e-08 | \x3356bf96 | t
  673. \x33d6bf94 | 9.9999994e-08 | 9.9999994e-08 | \x33d6bf94 | t
  674. \x33d6bf95 | 1e-07 | 1e-07 | \x33d6bf95 | t
  675. \x33d6bf96 | 1.0000001e-07 | 1.0000001e-07 | \x33d6bf96 | t
  676. \x34a10faf | 2.9999998e-07 | 2.9999998e-07 | \x34a10faf | t
  677. \x34a10fb0 | 3e-07 | 3e-07 | \x34a10fb0 | t
  678. \x34a10fb1 | 3.0000004e-07 | 3.0000004e-07 | \x34a10fb1 | t
  679. \x350637bc | 4.9999994e-07 | 4.9999994e-07 | \x350637bc | t
  680. \x350637bd | 5e-07 | 5e-07 | \x350637bd | t
  681. \x350637be | 5.0000006e-07 | 5.0000006e-07 | \x350637be | t
  682. \x35719786 | 8.999999e-07 | 8.999999e-07 | \x35719786 | t
  683. \x35719787 | 9e-07 | 9e-07 | \x35719787 | t
  684. \x35719788 | 9.0000003e-07 | 9.0000003e-07 | \x35719788 | t
  685. \x358637bc | 9.999999e-07 | 9.999999e-07 | \x358637bc | t
  686. \x358637bd | 1e-06 | 1e-06 | \x358637bd | t
  687. \x358637be | 1.0000001e-06 | 1.0000001e-06 | \x358637be | t
  688. \x36a7c5ab | 4.9999994e-06 | 4.9999994e-06 | \x36a7c5ab | t
  689. \x36a7c5ac | 5e-06 | 5e-06 | \x36a7c5ac | t
  690. \x36a7c5ad | 5.0000003e-06 | 5.0000003e-06 | \x36a7c5ad | t
  691. \x3727c5ab | 9.999999e-06 | 9.999999e-06 | \x3727c5ab | t
  692. \x3727c5ac | 1e-05 | 1e-05 | \x3727c5ac | t
  693. \x3727c5ad | 1.0000001e-05 | 1.0000001e-05 | \x3727c5ad | t
  694. \x38d1b714 | 9.9999976e-05 | 9.9999976e-05 | \x38d1b714 | t
  695. \x38d1b715 | 9.999998e-05 | 9.999998e-05 | \x38d1b715 | t
  696. \x38d1b716 | 9.999999e-05 | 9.999999e-05 | \x38d1b716 | t
  697. \x38d1b717 | 0.0001 | 0.0001 | \x38d1b717 | t
  698. \x38d1b718 | 0.000100000005 | 0.000100000005 | \x38d1b718 | t
  699. \x38d1b719 | 0.00010000001 | 0.00010000001 | \x38d1b719 | t
  700. \x38d1b71a | 0.00010000002 | 0.00010000002 | \x38d1b71a | t
  701. \x38d1b71b | 0.00010000003 | 0.00010000003 | \x38d1b71b | t
  702. \x38d1b71c | 0.000100000034 | 0.000100000034 | \x38d1b71c | t
  703. \x38d1b71d | 0.00010000004 | 0.00010000004 | \x38d1b71d | t
  704. \x38dffffe | 0.00010681151 | 0.00010681151 | \x38dffffe | t
  705. \x38dfffff | 0.000106811516 | 0.000106811516 | \x38dfffff | t
  706. \x38e00000 | 0.00010681152 | 0.00010681152 | \x38e00000 | t
  707. \x38efffff | 0.00011444091 | 0.00011444091 | \x38efffff | t
  708. \x38f00000 | 0.00011444092 | 0.00011444092 | \x38f00000 | t
  709. \x38f00001 | 0.000114440925 | 0.000114440925 | \x38f00001 | t
  710. \x3a83126e | 0.0009999999 | 0.0009999999 | \x3a83126e | t
  711. \x3a83126f | 0.001 | 0.001 | \x3a83126f | t
  712. \x3a831270 | 0.0010000002 | 0.0010000002 | \x3a831270 | t
  713. \x3c23d709 | 0.009999999 | 0.009999999 | \x3c23d709 | t
  714. \x3c23d70a | 0.01 | 0.01 | \x3c23d70a | t
  715. \x3c23d70b | 0.010000001 | 0.010000001 | \x3c23d70b | t
  716. \x3dcccccc | 0.099999994 | 0.099999994 | \x3dcccccc | t
  717. \x3dcccccd | 0.1 | 0.1 | \x3dcccccd | t
  718. \x3dccccce | 0.10000001 | 0.10000001 | \x3dccccce | t
  719. \x3dcccd6f | 0.10000121 | 0.10000121 | \x3dcccd6f | t
  720. \x3dcccd70 | 0.100001216 | 0.100001216 | \x3dcccd70 | t
  721. \x3dcccd71 | 0.10000122 | 0.10000122 | \x3dcccd71 | t
  722. \x3effffff | 0.49999997 | 0.49999997 | \x3effffff | t
  723. \x3f000000 | 0.5 | 0.5 | \x3f000000 | t
  724. \x3f000001 | 0.50000006 | 0.50000006 | \x3f000001 | t
  725. \x3f333332 | 0.6999999 | 0.6999999 | \x3f333332 | t
  726. \x3f333333 | 0.7 | 0.7 | \x3f333333 | t
  727. \x3f333334 | 0.70000005 | 0.70000005 | \x3f333334 | t
  728. \x3f666665 | 0.8999999 | 0.8999999 | \x3f666665 | t
  729. \x3f666666 | 0.9 | 0.9 | \x3f666666 | t
  730. \x3f666667 | 0.90000004 | 0.90000004 | \x3f666667 | t
  731. \x3f7d70a3 | 0.98999995 | 0.98999995 | \x3f7d70a3 | t
  732. \x3f7d70a4 | 0.99 | 0.99 | \x3f7d70a4 | t
  733. \x3f7d70a5 | 0.99000007 | 0.99000007 | \x3f7d70a5 | t
  734. \x3f7fbe76 | 0.99899995 | 0.99899995 | \x3f7fbe76 | t
  735. \x3f7fbe77 | 0.999 | 0.999 | \x3f7fbe77 | t
  736. \x3f7fbe78 | 0.9990001 | 0.9990001 | \x3f7fbe78 | t
  737. \x3f7ff971 | 0.9998999 | 0.9998999 | \x3f7ff971 | t
  738. \x3f7ff972 | 0.9999 | 0.9999 | \x3f7ff972 | t
  739. \x3f7ff973 | 0.99990004 | 0.99990004 | \x3f7ff973 | t
  740. \x3f7fff57 | 0.9999899 | 0.9999899 | \x3f7fff57 | t
  741. \x3f7fff58 | 0.99999 | 0.99999 | \x3f7fff58 | t
  742. \x3f7fff59 | 0.99999005 | 0.99999005 | \x3f7fff59 | t
  743. \x3f7fffee | 0.9999989 | 0.9999989 | \x3f7fffee | t
  744. \x3f7fffef | 0.999999 | 0.999999 | \x3f7fffef | t
  745. \x3f7ffff0 | 0.99999905 | 0.99999905 | \x3f7ffff0 | t
  746. \x3f7ffff1 | 0.9999991 | 0.9999991 | \x3f7ffff1 | t
  747. \x3f7ffff2 | 0.99999917 | 0.99999917 | \x3f7ffff2 | t
  748. \x3f7ffff3 | 0.9999992 | 0.9999992 | \x3f7ffff3 | t
  749. \x3f7ffff4 | 0.9999993 | 0.9999993 | \x3f7ffff4 | t
  750. \x3f7ffff5 | 0.99999934 | 0.99999934 | \x3f7ffff5 | t
  751. \x3f7ffff6 | 0.9999994 | 0.9999994 | \x3f7ffff6 | t
  752. \x3f7ffff7 | 0.99999946 | 0.99999946 | \x3f7ffff7 | t
  753. \x3f7ffff8 | 0.9999995 | 0.9999995 | \x3f7ffff8 | t
  754. \x3f7ffff9 | 0.9999996 | 0.9999996 | \x3f7ffff9 | t
  755. \x3f7ffffa | 0.99999964 | 0.99999964 | \x3f7ffffa | t
  756. \x3f7ffffb | 0.9999997 | 0.9999997 | \x3f7ffffb | t
  757. \x3f7ffffc | 0.99999976 | 0.99999976 | \x3f7ffffc | t
  758. \x3f7ffffd | 0.9999998 | 0.9999998 | \x3f7ffffd | t
  759. \x3f7ffffe | 0.9999999 | 0.9999999 | \x3f7ffffe | t
  760. \x3f7fffff | 0.99999994 | 0.99999994 | \x3f7fffff | t
  761. \x3f800000 | 1 | 1 | \x3f800000 | t
  762. \x3f800001 | 1.0000001 | 1.0000001 | \x3f800001 | t
  763. \x3f800002 | 1.0000002 | 1.0000002 | \x3f800002 | t
  764. \x3f800003 | 1.0000004 | 1.0000004 | \x3f800003 | t
  765. \x3f800004 | 1.0000005 | 1.0000005 | \x3f800004 | t
  766. \x3f800005 | 1.0000006 | 1.0000006 | \x3f800005 | t
  767. \x3f800006 | 1.0000007 | 1.0000007 | \x3f800006 | t
  768. \x3f800007 | 1.0000008 | 1.0000008 | \x3f800007 | t
  769. \x3f800008 | 1.000001 | 1.000001 | \x3f800008 | t
  770. \x3f800009 | 1.0000011 | 1.0000011 | \x3f800009 | t
  771. \x3f80000f | 1.0000018 | 1.0000018 | \x3f80000f | t
  772. \x3f800010 | 1.0000019 | 1.0000019 | \x3f800010 | t
  773. \x3f800011 | 1.000002 | 1.000002 | \x3f800011 | t
  774. \x3f800012 | 1.0000021 | 1.0000021 | \x3f800012 | t
  775. \x3f800013 | 1.0000023 | 1.0000023 | \x3f800013 | t
  776. \x3f800014 | 1.0000024 | 1.0000024 | \x3f800014 | t
  777. \x3f800017 | 1.0000027 | 1.0000027 | \x3f800017 | t
  778. \x3f800018 | 1.0000029 | 1.0000029 | \x3f800018 | t
  779. \x3f800019 | 1.000003 | 1.000003 | \x3f800019 | t
  780. \x3f80001a | 1.0000031 | 1.0000031 | \x3f80001a | t
  781. \x3f80001b | 1.0000032 | 1.0000032 | \x3f80001b | t
  782. \x3f80001c | 1.0000033 | 1.0000033 | \x3f80001c | t
  783. \x3f800029 | 1.0000049 | 1.0000049 | \x3f800029 | t
  784. \x3f80002a | 1.000005 | 1.000005 | \x3f80002a | t
  785. \x3f80002b | 1.0000051 | 1.0000051 | \x3f80002b | t
  786. \x3f800053 | 1.0000099 | 1.0000099 | \x3f800053 | t
  787. \x3f800054 | 1.00001 | 1.00001 | \x3f800054 | t
  788. \x3f800055 | 1.0000101 | 1.0000101 | \x3f800055 | t
  789. \x3f800346 | 1.0000999 | 1.0000999 | \x3f800346 | t
  790. \x3f800347 | 1.0001 | 1.0001 | \x3f800347 | t
  791. \x3f800348 | 1.0001001 | 1.0001001 | \x3f800348 | t
  792. \x3f8020c4 | 1.0009999 | 1.0009999 | \x3f8020c4 | t
  793. \x3f8020c5 | 1.001 | 1.001 | \x3f8020c5 | t
  794. \x3f8020c6 | 1.0010002 | 1.0010002 | \x3f8020c6 | t
  795. \x3f8147ad | 1.0099999 | 1.0099999 | \x3f8147ad | t
  796. \x3f8147ae | 1.01 | 1.01 | \x3f8147ae | t
  797. \x3f8147af | 1.0100001 | 1.0100001 | \x3f8147af | t
  798. \x3f8ccccc | 1.0999999 | 1.0999999 | \x3f8ccccc | t
  799. \x3f8ccccd | 1.1 | 1.1 | \x3f8ccccd | t
  800. \x3f8cccce | 1.1000001 | 1.1000001 | \x3f8cccce | t
  801. \x3fc90fdb | 1.5707964 | 1.5707964 | \x3fc90fdb | t
  802. \x402df854 | 2.7182817 | 2.7182817 | \x402df854 | t
  803. \x40490fdb | 3.1415927 | 3.1415927 | \x40490fdb | t
  804. \x409fffff | 4.9999995 | 4.9999995 | \x409fffff | t
  805. \x40a00000 | 5 | 5 | \x40a00000 | t
  806. \x40a00001 | 5.0000005 | 5.0000005 | \x40a00001 | t
  807. \x40afffff | 5.4999995 | 5.4999995 | \x40afffff | t
  808. \x40b00000 | 5.5 | 5.5 | \x40b00000 | t
  809. \x40b00001 | 5.5000005 | 5.5000005 | \x40b00001 | t
  810. \x411fffff | 9.999999 | 9.999999 | \x411fffff | t
  811. \x41200000 | 10 | 10 | \x41200000 | t
  812. \x41200001 | 10.000001 | 10.000001 | \x41200001 | t
  813. \x42c7ffff | 99.99999 | 99.99999 | \x42c7ffff | t
  814. \x42c80000 | 100 | 100 | \x42c80000 | t
  815. \x42c80001 | 100.00001 | 100.00001 | \x42c80001 | t
  816. \x4479ffff | 999.99994 | 999.99994 | \x4479ffff | t
  817. \x447a0000 | 1000 | 1000 | \x447a0000 | t
  818. \x447a0001 | 1000.00006 | 1000.00006 | \x447a0001 | t
  819. \x461c3fff | 9999.999 | 9999.999 | \x461c3fff | t
  820. \x461c4000 | 10000 | 10000 | \x461c4000 | t
  821. \x461c4001 | 10000.001 | 10000.001 | \x461c4001 | t
  822. \x47c34fff | 99999.99 | 99999.99 | \x47c34fff | t
  823. \x47c35000 | 100000 | 100000 | \x47c35000 | t
  824. \x47c35001 | 100000.01 | 100000.01 | \x47c35001 | t
  825. \x497423ff | 999999.94 | 999999.94 | \x497423ff | t
  826. \x49742400 | 1e+06 | 1e+06 | \x49742400 | t
  827. \x49742401 | 1.00000006e+06 | 1.00000006e+06 | \x49742401 | t
  828. \x4b18967f | 9.999999e+06 | 9.999999e+06 | \x4b18967f | t
  829. \x4b189680 | 1e+07 | 1e+07 | \x4b189680 | t
  830. \x4b189681 | 1.0000001e+07 | 1.0000001e+07 | \x4b189681 | t
  831. \x4cbebc1f | 9.999999e+07 | 9.999999e+07 | \x4cbebc1f | t
  832. \x4cbebc20 | 1e+08 | 1e+08 | \x4cbebc20 | t
  833. \x4cbebc21 | 1.0000001e+08 | 1.0000001e+08 | \x4cbebc21 | t
  834. \x4e6e6b27 | 9.9999994e+08 | 9.9999994e+08 | \x4e6e6b27 | t
  835. \x4e6e6b28 | 1e+09 | 1e+09 | \x4e6e6b28 | t
  836. \x4e6e6b29 | 1.00000006e+09 | 1.00000006e+09 | \x4e6e6b29 | t
  837. \x501502f8 | 9.999999e+09 | 9.999999e+09 | \x501502f8 | t
  838. \x501502f9 | 1e+10 | 1e+10 | \x501502f9 | t
  839. \x501502fa | 1.0000001e+10 | 1.0000001e+10 | \x501502fa | t
  840. \x51ba43b6 | 9.999999e+10 | 9.999999e+10 | \x51ba43b6 | t
  841. \x51ba43b7 | 1e+11 | 1e+11 | \x51ba43b7 | t
  842. \x51ba43b8 | 1.0000001e+11 | 1.0000001e+11 | \x51ba43b8 | t
  843. \x1f6c1e4a | 5e-20 | 5e-20 | \x1f6c1e4a | t
  844. \x59be6cea | 6.7e+15 | 6.7e+15 | \x59be6cea | t
  845. \x5d5ab6c4 | 9.85e+17 | 9.85e+17 | \x5d5ab6c4 | t
  846. \x2cc4a9bd | 5.5895e-12 | 5.5895e-12 | \x2cc4a9bd | t
  847. \x15ae43fd | 7.038531e-26 | 7.038531e-26 | \x15ae43fd | t
  848. \x2cf757ca | 7.0299088e-12 | 7.0299088e-12 | \x2cf757ca | t
  849. \x665ba998 | 2.5933168e+23 | 2.5933168e+23 | \x665ba998 | t
  850. \x743c3324 | 5.9642887e+31 | 5.9642887e+31 | \x743c3324 | t
  851. \x47f1205a | 123456.7 | 123456.7 | \x47f1205a | t
  852. \x4640e6ae | 12345.67 | 12345.67 | \x4640e6ae | t
  853. \x449a5225 | 1234.567 | 1234.567 | \x449a5225 | t
  854. \x42f6e9d5 | 123.4567 | 123.4567 | \x42f6e9d5 | t
  855. \x414587dd | 12.34567 | 12.34567 | \x414587dd | t
  856. \x3f9e064b | 1.234567 | 1.234567 | \x3f9e064b | t
  857. \x4c000004 | 3.3554448e+07 | 3.3554448e+07 | \x4c000004 | t
  858. \x50061c46 | 8.999999e+09 | 8.999999e+09 | \x50061c46 | t
  859. \x510006a8 | 3.4366718e+10 | 3.4366718e+10 | \x510006a8 | t
  860. \x48951f84 | 305404.12 | 305404.12 | \x48951f84 | t
  861. \x45fd1840 | 8099.0312 | 8099.0312 | \x45fd1840 | t
  862. \x39800000 | 0.00024414062 | 0.00024414062 | \x39800000 | t
  863. \x3b200000 | 0.0024414062 | 0.0024414062 | \x3b200000 | t
  864. \x3b900000 | 0.0043945312 | 0.0043945312 | \x3b900000 | t
  865. \x3bd00000 | 0.0063476562 | 0.0063476562 | \x3bd00000 | t
  866. \x63800000 | 4.7223665e+21 | 4.7223665e+21 | \x63800000 | t
  867. \x4b000000 | 8.388608e+06 | 8.388608e+06 | \x4b000000 | t
  868. \x4b800000 | 1.6777216e+07 | 1.6777216e+07 | \x4b800000 | t
  869. \x4c000001 | 3.3554436e+07 | 3.3554436e+07 | \x4c000001 | t
  870. \x4c800b0d | 6.7131496e+07 | 6.7131496e+07 | \x4c800b0d | t
  871. \x00d24584 | 1.9310392e-38 | 1.9310392e-38 | \x00d24584 | t
  872. \x00d90b88 | 1.993244e-38 | 1.993244e-38 | \x00d90b88 | t
  873. \x45803f34 | 4103.9004 | 4103.9004 | \x45803f34 | t
  874. \x4f9f24f7 | 5.3399997e+09 | 5.3399997e+09 | \x4f9f24f7 | t
  875. \x3a8722c3 | 0.0010310042 | 0.0010310042 | \x3a8722c3 | t
  876. \x5c800041 | 2.882326e+17 | 2.882326e+17 | \x5c800041 | t
  877. \x15ae43fd | 7.038531e-26 | 7.038531e-26 | \x15ae43fd | t
  878. \x5d4cccfb | 9.223404e+17 | 9.223404e+17 | \x5d4cccfb | t
  879. \x4c800001 | 6.710887e+07 | 6.710887e+07 | \x4c800001 | t
  880. \x57800ed8 | 2.816025e+14 | 2.816025e+14 | \x57800ed8 | t
  881. \x5f000000 | 9.223372e+18 | 9.223372e+18 | \x5f000000 | t
  882. \x700000f0 | 1.5846086e+29 | 1.5846086e+29 | \x700000f0 | t
  883. \x5f23e9ac | 1.1811161e+19 | 1.1811161e+19 | \x5f23e9ac | t
  884. \x5e9502f9 | 5.368709e+18 | 5.368709e+18 | \x5e9502f9 | t
  885. \x5e8012b1 | 4.6143166e+18 | 4.6143166e+18 | \x5e8012b1 | t
  886. \x3c000028 | 0.007812537 | 0.007812537 | \x3c000028 | t
  887. \x60cde861 | 1.18697725e+20 | 1.18697725e+20 | \x60cde861 | t
  888. \x03aa2a50 | 1.00014165e-36 | 1.00014165e-36 | \x03aa2a50 | t
  889. \x43480000 | 200 | 200 | \x43480000 | t
  890. \x4c000000 | 3.3554432e+07 | 3.3554432e+07 | \x4c000000 | t
  891. \x5d1502f9 | 6.7108864e+17 | 6.7108864e+17 | \x5d1502f9 | t
  892. \x5d9502f9 | 1.3421773e+18 | 1.3421773e+18 | \x5d9502f9 | t
  893. \x5e1502f9 | 2.6843546e+18 | 2.6843546e+18 | \x5e1502f9 | t
  894. \x3f99999a | 1.2 | 1.2 | \x3f99999a | t
  895. \x3f9d70a4 | 1.23 | 1.23 | \x3f9d70a4 | t
  896. \x3f9df3b6 | 1.234 | 1.234 | \x3f9df3b6 | t
  897. \x3f9e0419 | 1.2345 | 1.2345 | \x3f9e0419 | t
  898. \x3f9e0610 | 1.23456 | 1.23456 | \x3f9e0610 | t
  899. \x3f9e064b | 1.234567 | 1.234567 | \x3f9e064b | t
  900. \x3f9e0651 | 1.2345678 | 1.2345678 | \x3f9e0651 | t
  901. \x03d20cfe | 1.23456735e-36 | 1.23456735e-36 | \x03d20cfe | t
  902. (261 rows)
  903. -- clean up, lest opr_sanity complain
  904. drop type xfloat4 cascade;
  905. NOTICE: drop cascades to 6 other objects
  906. DETAIL: drop cascades to function xfloat4in(cstring)
  907. drop cascades to function xfloat4out(xfloat4)
  908. drop cascades to cast from xfloat4 to real
  909. drop cascades to cast from real to xfloat4
  910. drop cascades to cast from xfloat4 to integer
  911. drop cascades to cast from integer to xfloat4