Repository navigation
Commit 5a55cb5
authored
Expand turned RR + 1 into NaN, and with it ZZ + 1, CC + 1, QQ + 1, BB + 1 and
true + 1. A 2.0 regression: 1.4.0 leaves all of them alone. Expand is public,
so this was not only a Simplify artefact.
CollectLikeTerms reduces every factor to a base and an exponent and then puts
the term back together. A factor that appeared once came back as base^1, and
raising to the first power is an identity only where the power is defined at
all -- RR^1, ZZ^1 and true^1 are NaN. A factor that appeared once now goes
back as itself, and a second guard discards any collection that introduced
NaN, which covers the same fault above the first power.
Sets that can be shifted still are: { 1, 2 } + 1 is { 2, 3 }.
Found by running CSharpMath's suite against 2.0.0-preview.1 -- 955 green on
1.4.0, two red on the preview. Rebuilt against this change it is one.
1 parent 0f73690 commit 5a55cb5
2 files changed
Lines changed: 52 additions & 2 deletions
File tree
- Sources
- AngouriMath/Functions/Evaluation
- Tests/UnitTests/Common
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
294 | 304 | | |
295 | 305 | | |
296 | 306 | | |
| |||
306 | 316 | | |
307 | 317 | | |
308 | 318 | | |
309 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
310 | 331 | | |
311 | 332 | | |
312 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
72 | 101 | | |
73 | 102 | | |
0 commit comments