Average Error: 0.2 → 0.0
Time: 30.6s
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(1 - 3 \cdot a\right)\right)\right) - 1\]
\[\left(\left(\left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right) + \sqrt[3]{1 + a} \cdot \left(\left(\sqrt[3]{1 + a} \cdot \sqrt[3]{1 + a}\right) \cdot \left(a \cdot a\right)\right)\right) \cdot 4 + (2 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot a\right)\right) + \left({b}^{4} + {a}^{4}\right))_*\right) - 1\]

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(1 - 3 \cdot a\right)\right)\right) - 1\]
  2. Taylor expanded around 0 0.0

    \[\leadsto \left(\color{blue}{\left({b}^{4} + \left(2 \cdot \left({a}^{2} \cdot {b}^{2}\right) + {a}^{4}\right)\right)} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
  3. Simplified0.0

    \[\leadsto \left(\color{blue}{(2 \cdot \left(\left(a \cdot b\right) \cdot \left(a \cdot b\right)\right) + \left({a}^{4} + {b}^{4}\right))_*} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 + a\right) + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
  4. Using strategy rm
  5. Applied add-cube-cbrt0.0

    \[\leadsto \left((2 \cdot \left(\left(a \cdot b\right) \cdot \left(a \cdot b\right)\right) + \left({a}^{4} + {b}^{4}\right))_* + 4 \cdot \left(\left(a \cdot a\right) \cdot \color{blue}{\left(\left(\sqrt[3]{1 + a} \cdot \sqrt[3]{1 + a}\right) \cdot \sqrt[3]{1 + a}\right)} + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
  6. Applied associate-*r*0.0

    \[\leadsto \left((2 \cdot \left(\left(a \cdot b\right) \cdot \left(a \cdot b\right)\right) + \left({a}^{4} + {b}^{4}\right))_* + 4 \cdot \left(\color{blue}{\left(\left(a \cdot a\right) \cdot \left(\sqrt[3]{1 + a} \cdot \sqrt[3]{1 + a}\right)\right) \cdot \sqrt[3]{1 + a}} + \left(b \cdot b\right) \cdot \left(1 - 3 \cdot a\right)\right)\right) - 1\]
  7. Final simplification0.0

    \[\leadsto \left(\left(\left(1 - a \cdot 3\right) \cdot \left(b \cdot b\right) + \sqrt[3]{1 + a} \cdot \left(\left(\sqrt[3]{1 + a} \cdot \sqrt[3]{1 + a}\right) \cdot \left(a \cdot a\right)\right)\right) \cdot 4 + (2 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot a\right)\right) + \left({b}^{4} + {a}^{4}\right))_*\right) - 1\]

Reproduce

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

Details

Time bar (total: 30.0s)Debug log

sample253.0ms

Algorithm
intervals

simplify257.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

257.0ms
(- (+ (pow (+ (* a a) (* b b)) 2) (* 4 (+ (* (* a a) (+ 1 a)) (* (* b b) (- 1 (* 3 a)))))) 1)

prune7.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.2b

localize47.0ms

Local error

Found 4 expressions with local error:

0.7b
(* (* b b) (- 1 (* 3 a)))
0.3b
(pow (+ (* a a) (* b b)) 2)
0.1b
(* (* a a) (+ 1 a))
0.0b
(+ (pow (+ (* a a) (* b b)) 2) (* 4 (+ (* (* a a) (+ 1 a)) (* (* b b) (- 1 (* 3 a))))))

rewrite55.0ms

Algorithm
rewrite-expression-head
Counts
4 → 82
Calls

4 calls. Slowest were:

33.0ms
(+ (pow (+ (* a a) (* b b)) 2) (* 4 (+ (* (* a a) (+ 1 a)) (* (* b b) (- 1 (* 3 a))))))
8.0ms
(* (* b b) (- 1 (* 3 a)))
7.0ms
(* (* a a) (+ 1 a))

series151.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

69.0ms
(+ (pow (+ (* a a) (* b b)) 2) (* 4 (+ (* (* a a) (+ 1 a)) (* (* b b) (- 1 (* 3 a))))))
36.0ms
(* (* b b) (- 1 (* 3 a)))
25.0ms
(* (* a a) (+ 1 a))
22.0ms
(pow (+ (* a a) (* b b)) 2)

simplify5.9s

Counts
48 → 94
Calls

48 calls. Slowest were:

903.0ms
(* (* (* (* a a) (* a a)) (* a a)) (* (* (+ 1 a) (+ 1 a)) (+ 1 a)))
763.0ms
(* (* (* (* b b) (* b b)) (* b b)) (* (* (- 1 (* 3 a)) (- 1 (* 3 a))) (- 1 (* 3 a))))
444.0ms
(+ (pow b 4) (+ (pow a 4) (* 2 (* (pow a 2) (pow b 2)))))

prune1.3s

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0b

localize37.0ms

Local error

Found 4 expressions with local error:

0.7b
(* (* b b) (- 1 (* 3 a)))
0.1b
(* (* a b) (* a b))
0.1b
(* (* a a) (+ 1 a))
0.0b
(+ (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))) (* 4 (+ (* (* a a) (+ 1 a)) (* (* b b) (- 1 (* 3 a))))))

rewrite19.0ms

Algorithm
rewrite-expression-head
Counts
4 → 81
Calls

4 calls. Slowest were:

7.0ms
(* (* b b) (- 1 (* 3 a)))
4.0ms
(+ (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))) (* 4 (+ (* (* a a) (+ 1 a)) (* (* b b) (- 1 (* 3 a))))))
3.0ms
(* (* a a) (+ 1 a))

series169.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

101.0ms
(+ (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))) (* 4 (+ (* (* a a) (+ 1 a)) (* (* b b) (- 1 (* 3 a))))))
25.0ms
(* (* b b) (- 1 (* 3 a)))
23.0ms
(* (* a b) (* a b))
21.0ms
(* (* a a) (+ 1 a))

simplify6.0s

Counts
46 → 93
Calls

46 calls. Slowest were:

920.0ms
(* (* (* (* a a) (* a a)) (* a a)) (* (* (+ 1 a) (+ 1 a)) (+ 1 a)))
771.0ms
(* (* (* (* a b) (* a b)) (* a b)) (* (* (* a b) (* a b)) (* a b)))
747.0ms
(* (* (* (* b b) (* b b)) (* b b)) (* (* (- 1 (* 3 a)) (- 1 (* 3 a))) (- 1 (* 3 a))))

prune1.5s

Pruning

4 alts after pruning (4 fresh and 0 done)

Merged error: 0b

localize26.0ms

Local error

Found 4 expressions with local error:

0.7b
(* (* b b) (- 1 (* 3 a)))
0.1b
(* (* a b) (* a b))
0.1b
(cbrt (+ 1 a))
0.1b
(cbrt (+ 1 a))

rewrite9.0ms

Algorithm
rewrite-expression-head
Counts
4 → 71
Calls

4 calls. Slowest were:

4.0ms
(* (* b b) (- 1 (* 3 a)))
3.0ms
(* (* a b) (* a b))
1.0ms
(cbrt (+ 1 a))

series148.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

50.0ms
(cbrt (+ 1 a))
46.0ms
(cbrt (+ 1 a))
33.0ms
(* (* b b) (- 1 (* 3 a)))
19.0ms
(* (* a b) (* a b))

simplify3.4s

Counts
40 → 83
Calls

40 calls. Slowest were:

656.0ms
(* (* (* (* b b) (* b b)) (* b b)) (* (* (- 1 (* 3 a)) (- 1 (* 3 a))) (- 1 (* 3 a))))
580.0ms
(* (* (* (* a b) (* a b)) (* a b)) (* (* (* a b) (* a b)) (* a b)))
301.0ms
(* (* b b) (- 1 (* 3 a)))

prune1.3s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize11.0ms

Local error

Found 4 expressions with local error:

0.7b
(* (* b b) (- 1 (* 3 a)))
0.3b
(pow (+ (* a a) (* b b)) 2)
0.1b
(cbrt (+ 1 a))
0.1b
(cbrt (+ 1 a))

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
4 → 69
Calls

4 calls. Slowest were:

8.0ms
(* (* b b) (- 1 (* 3 a)))
3.0ms
(pow (+ (* a a) (* b b)) 2)
1.0ms
(cbrt (+ 1 a))

series133.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

56.0ms
(cbrt (+ 1 a))
34.0ms
(cbrt (+ 1 a))
24.0ms
(* (* b b) (- 1 (* 3 a)))
19.0ms
(pow (+ (* a a) (* b b)) 2)

simplify2.9s

Counts
39 → 81
Calls

39 calls. Slowest were:

545.0ms
(* (* (* (* b b) (* b b)) (* b b)) (* (* (- 1 (* 3 a)) (- 1 (* 3 a))) (- 1 (* 3 a))))
250.0ms
(* (* b b) (- 1 (* 3 a)))
221.0ms
(- (+ (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 a))))) a)) (exp (* 1/3 (- (log -1) (log (/ -1 a)))))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 a))))) (pow a 2))))

prune1.1s

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

regimes144.0ms

Accuracy

0% (0.0b remaining)

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

bsearch5.0ms

end0.0ms

sample5.1s

Algorithm
intervals