forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit217d8f3
committed
Avoid wrong results for power() with NaN input on more platforms.
Buildfarm results show that the modern POSIX rule that 1 ^ NaN = 1 is nothonored on *BSD until relatively recently, and really old platforms don'tbelieve that NaN ^ 0 = 1 either. (This is unsurprising, perhaps, sinceSUSv2 doesn't require either behavior.) In hopes of getting to platformindependent behavior, let's deal with all the NaN-input cases explicitlyin dpow().Note that numeric_power() doesn't know either of these special cases.But since that behavior is platform-independent, I think it should beaddressed separately, and probably not back-patched.Discussion:https://postgr.es/m/75DB81BEEA95B445AE6D576A0A5C9E936A73E741@BPXM05GP.gisp.nec.co.jp1 parent783e8f5 commit217d8f3
File tree
6 files changed
+46
-3
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
6 files changed
+46
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1461 | 1461 | | |
1462 | 1462 | | |
1463 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
1464 | 1483 | | |
1465 | 1484 | | |
1466 | 1485 | | |
| |||
1482 | 1501 | | |
1483 | 1502 | | |
1484 | 1503 | | |
1485 | | - | |
1486 | | - | |
| 1504 | + | |
1487 | 1505 | | |
1488 | 1506 | | |
1489 | 1507 | | |
1490 | | - | |
| 1508 | + | |
1491 | 1509 | | |
1492 | 1510 | | |
1493 | 1511 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
361 | 367 | | |
362 | 368 | | |
363 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
365 | 371 | | |
366 | 372 | | |
367 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
365 | 371 | | |
366 | 372 | | |
367 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
361 | 367 | | |
362 | 368 | | |
363 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
0 commit comments
Comments
(0)