Average Error: 0.2 → 0.2
Time: 32.7s
Precision: 64
Internal Precision: 128
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(3 + a\right)\right)\right) - 1\]
\[(\left((\left(\left(a + 3\right) \cdot b\right) \cdot b + \left(\left(a \cdot a\right) \cdot \left(1 - a\right)\right))_*\right) \cdot 4 + \left((\left((b \cdot b + \left(a \cdot a\right))_*\right) \cdot \left((b \cdot b + \left(a \cdot a\right))_*\right) + -1)_*\right))_*\]

Error

Bits error versus a

Bits error versus b

Derivation

  1. Initial program 0.2

    \[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(3 + a\right)\right)\right) - 1\]
  2. Initial simplification0.2

    \[\leadsto (\left((\left(b \cdot \left(a + 3\right)\right) \cdot b + \left(\left(1 - a\right) \cdot \left(a \cdot a\right)\right))_*\right) \cdot 4 + \left((\left((b \cdot b + \left(a \cdot a\right))_*\right) \cdot \left((b \cdot b + \left(a \cdot a\right))_*\right) + -1)_*\right))_*\]
  3. Final simplification0.2

    \[\leadsto (\left((\left(\left(a + 3\right) \cdot b\right) \cdot b + \left(\left(a \cdot a\right) \cdot \left(1 - a\right)\right))_*\right) \cdot 4 + \left((\left((b \cdot b + \left(a \cdot a\right))_*\right) \cdot \left((b \cdot b + \left(a \cdot a\right))_*\right) + -1)_*\right))_*\]

Reproduce

herbie shell --seed 2018360 +o rules:numerics
(FPCore (a b)
  :name "Bouland and Aaronson, Equation (24)"
  (- (+ (pow (+ (* a a) (* b b)) 2) (* 4 (+ (* (* a a) (- 1 a)) (* (* b b) (+ 3 a))))) 1))

Details

Time bar (total: 28.0s)Debug log

start232.0ms

Algorithm
intervals

setup183.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.2b

localize58.0ms

Local error

Found 4 expressions with local error:

0.2b
(fma (fma b b (* a a)) (fma b b (* a a)) -1)
0.1b
(fma (* b (+ a 3)) b (* (- 1 a) (* a a)))
0.1b
(* (- 1 a) (* a a))
0.0b
(fma (fma (* b (+ a 3)) b (* (- 1 a) (* a a))) 4 (fma (fma b b (* a a)) (fma b b (* a a)) -1))

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
4 → 49
Calls

4 calls. Slowest were:

4.0ms
(* (- 1 a) (* a a))
0.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) -1)
0.0ms
(fma (fma (* b (+ a 3)) b (* (- 1 a) (* a a))) 4 (fma (fma b b (* a a)) (fma b b (* a a)) -1))

series226.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

93.0ms
(fma (fma (* b (+ a 3)) b (* (- 1 a) (* a a))) 4 (fma (fma b b (* a a)) (fma b b (* a a)) -1))
49.0ms
(fma (* b (+ a 3)) b (* (- 1 a) (* a a)))
47.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) -1)
37.0ms
(* (- 1 a) (* a a))

simplify1.2s

Counts
19 → 61
Calls

19 calls. Slowest were:

205.0ms
(* (* (* (- 1 a) (- 1 a)) (- 1 a)) (* (* (* a a) (* a a)) (* a a)))
187.0ms
(- (+ (pow a 2) (* a (pow b 2))) (pow a 3))
148.0ms
(- (+ (pow a 2) (* a (pow b 2))) (pow a 3))

prune982.0ms

Pruning

5 alts after pruning (4 fresh and 1 done)

Merged error: 0.0b

localize26.0ms

Local error

Found 4 expressions with local error:

0.2b
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
0.2b
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))
0.2b
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))
0.2b
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 69
Calls

4 calls. Slowest were:

10.0ms
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
1.0ms
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))
1.0ms
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))

series549.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

147.0ms
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
144.0ms
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))
136.0ms
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))
122.0ms
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))

simplify3.9s

Counts
41 → 81
Calls

41 calls. Slowest were:

224.0ms
(cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))
215.0ms
(sqrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
210.0ms
(cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))

prune1.0s

Pruning

5 alts after pruning (4 fresh and 1 done)

Merged error: 0.0b

localize23.0ms

Local error

Found 4 expressions with local error:

0.2b
(cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))
0.2b
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
0.2b
(* (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
0.2b
(cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))

rewrite35.0ms

Algorithm
rewrite-expression-head
Counts
4 → 81
Calls

4 calls. Slowest were:

21.0ms
(* (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
9.0ms
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
3.0ms
(cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))

series500.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

132.0ms
(* (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
131.0ms
(cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))
126.0ms
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
112.0ms
(cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))

simplify5.2s

Counts
53 → 93
Calls

53 calls. Slowest were:

308.0ms
(* (* (* (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (fma (fma b b (* a a)) (fma b b (* a a)) -1))
157.0ms
(+ (+ (log (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (log (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (log (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))
157.0ms
(* (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))

prune1.3s

Pruning

5 alts after pruning (3 fresh and 2 done)

Merged error: 0.0b

localize30.0ms

Local error

Found 4 expressions with local error:

0.2b
(* (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))))
0.2b
(cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))
0.2b
(* (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (* (* (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))))) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
0.2b
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))

rewrite110.0ms

Algorithm
rewrite-expression-head
Counts
4 → 113
Calls

4 calls. Slowest were:

94.0ms
(* (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (* (* (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))))) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
7.0ms
(* (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))))
5.0ms
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))

series503.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

128.0ms
(* (* (cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (* (* (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))))) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
126.0ms
(* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))
125.0ms
(cbrt (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))
124.0ms
(* (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))))

simplify9.8s

Counts
85 → 125
Calls

85 calls. Slowest were:

408.0ms
(cbrt (cbrt (cbrt (sqrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))))
256.0ms
(* (* (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))) (* (* (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (fma (fma b b (* a a)) (fma b b (* a a)) -1))
237.0ms
(* (* (* (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)) (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))) (* (* (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1)))) (cbrt (cbrt (fma (fma b b (* a a)) (fma b b (* a a)) -1))))) (fma (fma b b (* a a)) (fma b b (* a a)) -1))

prune2.0s

Pruning

5 alts after pruning (2 fresh and 3 done)

Merged error: 0.0b

regimes94.0ms

Accuracy

0% (0.2b remaining)

Error of 0.2b against oracle of 0.0b and baseline of 0.2b

bsearch2.0ms