


Bits error versus re



Bits error versus im
Results
if re < -1.3034612690171742e+154Initial program 59.4
Taylor expanded around -inf 7.6
Simplified7.6
if -1.3034612690171742e+154 < re < -5.536443801166738e-261 or 2.727916884694162e-303 < re < 3.0959742777573048e+147Initial program 18.9
if -5.536443801166738e-261 < re < 2.727916884694162e-303Initial program 31.2
Taylor expanded around 0 31.3
if 3.0959742777573048e+147 < re Initial program 57.9
Taylor expanded around inf 7.7
Final simplification16.6
herbie shell --seed 2019022
(FPCore (re im)
:name "math.abs on complex"
(sqrt (+ (* re re) (* im im))))
Time bar (total: 1.9s)Debug log
| 20.0ms | 256× | body | 80 | valid |
| 4.0ms | (sqrt (+ (* re re) (* im im))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 31.0b
Found 2 expressions with local error:
| 31.0b | (sqrt (+ (* re re) (* im im))) |
| 0.0b | (+ (* re re) (* im im)) |
| 4× | add-log-exp |
| 4× | add-sqr-sqrt |
| 3× | sqrt-prod |
| 3× | add-cube-cbrt |
| 3× | *-un-lft-identity |
| 2× | flip-+ |
| 2× | add-exp-log |
| 2× | sqrt-div |
| 2× | add-cbrt-cube |
| 2× | flip3-+ |
| 2× | pow1 |
| 1× | pow1/2 |
| 1× | sum-log |
| 1× | rem-sqrt-square |
| 1× | +-commutative |
| 2.0ms | (sqrt (+ (* re re) (* im im))) |
| 2.0ms | (+ (* re re) (* im im)) |
| 33.0ms | (sqrt (+ (* re re) (* im im))) |
| 16.0ms | (+ (* re re) (* im im)) |
| 136.0ms | (sqrt (- (* (* re re) (* re re)) (* (* im im) (* im im)))) |
| 38.0ms | (sqrt (+ (pow (* re re) 3) (pow (* im im) 3))) |
| 5.0ms | (* (exp (* re re)) (exp (* im im))) |
| 3.0ms | (+ (pow im 2) (pow re 2)) |
| 3.0ms | (sqrt (* (cbrt (+ (* re re) (* im im))) (cbrt (+ (* re re) (* im im))))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 6.7b
Found 0 expressions with local error:
4 alts after pruning (2 fresh and 2 done)
Merged error: 6.7b
Found 0 expressions with local error:
4 alts after pruning (1 fresh and 3 done)
Merged error: 6.7b
Found 0 expressions with local error:
4 alts after pruning (0 fresh and 4 done)
Merged error: 6.7b
59.5% (9.0b remaining)
Error of 16.6b against oracle of 7.6b and baseline of 29.7b
| 666.0ms | 8000× | body | 80 | valid |