Commit a0b7954
authored
Use Swift Numerics for elementary functions instead of Darwin/Glibc/etc (apple#28)
Also lets us use root instead of exp(log(x)/k), which is more accurate in some cases (but mainly is just nicer to read).
The downside is that this introduces a dependency for Algorithms, where previously it had none. I think that Numerics is an OK thing to depend on (especially for these functions, which are available from 0.0.1), but it _is_ a _massive increase_ in the number of dependencies that the package has, and we should give that some thought.1 parent 73c4a21 commit a0b7954
2 files changed
+12
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 14 | + | |
23 | 15 | | |
24 | 16 | | |
25 | 17 | | |
| |||
90 | 82 | | |
91 | 83 | | |
92 | 84 | | |
93 | | - | |
| 85 | + | |
94 | 86 | | |
95 | | - | |
| 87 | + | |
96 | 88 | | |
97 | 89 | | |
98 | 90 | | |
99 | 91 | | |
100 | 92 | | |
101 | | - | |
| 93 | + | |
102 | 94 | | |
103 | 95 | | |
104 | 96 | | |
| |||
129 | 121 | | |
130 | 122 | | |
131 | 123 | | |
132 | | - | |
133 | | - | |
| 124 | + | |
134 | 125 | | |
135 | 126 | | |
136 | | - | |
| 127 | + | |
137 | 128 | | |
138 | 129 | | |
139 | 130 | | |
| |||
198 | 189 | | |
199 | 190 | | |
200 | 191 | | |
201 | | - | |
202 | 192 | | |
203 | 193 | | |
204 | | - | |
| 194 | + | |
205 | 195 | | |
206 | 196 | | |
207 | 197 | | |
| |||
0 commit comments