Commit 5483c0e
authored
Fix for disappearing Around (#663)
## Changes
* Due to a weed in Wolfram Language, `MeanAround` sometimes returns a single number instead of `Around`:
```wl
In[] := MeanAround[{1, 1}]
Out[] = 1
```
* This [sometimes breaks](https://app.circleci.com/pipelines/github/maxitg/SetReplace/2018/workflows/77fc408b-d297-4efd-a01c-517ad52ccb54/jobs/4997) `./performanceTest.wls`, which assumes `Around` objects.
* This PR implements a workaround for this case.
## Examples
* This case happens rarely, but manually assigning `magnitude = 1` in `differenceString` does work:
```console
$ ./performanceTest.wls master HEAD 2
Testing 811551c
Testing 19264e2884d6d3cc6831c1fcce2941225f7d217c
Single-input rule 1 ± 0 %
Medium rule 1 ± 0 %
Sequential rule 1 ± 0 %
Large rule 1 ± 0 %
Exponential-match-count rule 1 ± 0 %
CA emulator 1 ± 0 %
Multiset addition 1 ± 0 %
```1 parent 811551c commit 5483c0e
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
0 commit comments