forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6b1a213
committed
New method for preventing compile-time calculation of degree constants.
Commit65abaab tried to prevent the scaling constants used inthe degree-based trig functions from being precomputed at compile time,because some compilers do that with functions that don't yield resultsidentical-to-the-last-bit to what you get at runtime. A report fromPeter Eisentraut suggests that some recent compilers are smart enoughto see through that trick, though. Instead, let's put the inputs tothese calculations into non-const global variables, which should be amore reliable way of convincing the compiler that it can't assume thatthey are compile-time constants. (If we really get desperate, we couldmark these variables "volatile", but I do not believe we should have to.)1 parent40e89e2 commit6b1a213
1 file changed
+27
-22
lines changedLines changed: 27 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
80 | 92 |
| |
81 | 93 |
| |
82 | 94 |
| |
83 | 95 |
| |
84 | 96 |
| |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
| 97 | + | |
89 | 98 |
| |
90 | 99 |
| |
91 | 100 |
| |
| |||
1814 | 1823 |
| |
1815 | 1824 |
| |
1816 | 1825 |
| |
1817 |
| - | |
1818 |
| - | |
1819 |
| - | |
1820 |
| - | |
1821 |
| - | |
1822 |
| - | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
1823 | 1829 |
| |
1824 | 1830 |
| |
1825 | 1831 |
| |
1826 | 1832 |
| |
1827 | 1833 |
| |
1828 |
| - | |
1829 |
| - | |
1830 |
| - | |
1831 |
| - | |
1832 |
| - | |
1833 |
| - | |
1834 |
| - | |
1835 |
| - | |
1836 |
| - | |
1837 |
| - | |
1838 |
| - | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
1839 | 1844 |
| |
1840 | 1845 |
| |
1841 | 1846 |
| |
1842 | 1847 |
| |
1843 | 1848 |
| |
1844 | 1849 |
| |
1845 |
| - | |
| 1850 | + | |
1846 | 1851 |
| |
1847 | 1852 |
| |
1848 | 1853 |
| |
|
0 commit comments
Comments
(0)