Average Error: 0.2 → 0.0
Time: 15.3s
Precision: 64
Internal Precision: 128
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
\[\left(\left(b \cdot b\right) \cdot 4 + (2 \cdot \left(e^{\log \left(\left(b \cdot a\right) \cdot \left(b \cdot a\right)\right)}\right) + \left({a}^{4} + {b}^{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(b \cdot b\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(b \cdot b\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(b \cdot b\right)\right) - 1\]
  4. Using strategy rm
  5. Applied add-exp-log0.0

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

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

Reproduce

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

Details

Time bar (total: 14.9s)Debug log

sample145.0ms

Algorithm
intervals

simplify480.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune5.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.2b

localize25.0ms

Local error

Found 4 expressions with local error:

0.4b
(pow (+ (* a a) (* b b)) 2)
0.0b
(* 4 (* b b))
0.0b
(+ (pow (+ (* a a) (* b b)) 2) (* 4 (* b b)))
0.0b
(+ (* a a) (* b b))

rewrite51.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

32.0ms
(+ (pow (+ (* a a) (* b b)) 2) (* 4 (* b b)))
9.0ms
(* 4 (* b b))
5.0ms
(pow (+ (* a a) (* b b)) 2)

series119.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

40.0ms
(+ (pow (+ (* a a) (* b b)) 2) (* 4 (* b b)))
34.0ms
(pow (+ (* a a) (* b b)) 2)
27.0ms
(+ (* a a) (* b b))
18.0ms
(* 4 (* b b))

simplify1.4s

Counts
25 → 73
Calls

25 calls. Slowest were:

202.0ms
(+ (* 2 (* (pow a 2) (pow b 2))) (+ (* 4 (pow b 2)) (pow a 4)))
187.0ms
(* (exp (pow (+ (* a a) (* b b)) 2)) (exp (* 4 (* b b))))
176.0ms
(* (cbrt (pow (+ (* a a) (* b b)) 2)) (cbrt (pow (+ (* a a) (* b b)) 2)))

prune770.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize38.0ms

Local error

Found 4 expressions with local error:

0.2b
(* (* a b) (* a b))
0.0b
(* 4 (* b b))
0.0b
(+ (pow a 4) (pow b 4))
0.0b
(+ (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))) (* 4 (* b b)))

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
4 → 63
Calls

4 calls. Slowest were:

4.0ms
(* (* a b) (* a b))
4.0ms
(+ (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))) (* 4 (* b b)))
3.0ms
(+ (pow a 4) (pow b 4))

series108.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

40.0ms
(+ (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))) (* 4 (* b b)))
39.0ms
(+ (pow a 4) (pow b 4))
18.0ms
(* (* a b) (* a b))
11.0ms
(* 4 (* b b))

simplify1.5s

Counts
26 → 75
Calls

26 calls. Slowest were:

616.0ms
(* (* (* (* a b) (* a b)) (* a b)) (* (* (* a b) (* a b)) (* a b)))
201.0ms
(* (exp (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4)))) (exp (* 4 (* b b))))
122.0ms
(+ (* 2 (* (pow a 2) (pow b 2))) (+ (* 4 (pow b 2)) (pow a 4)))

prune970.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize16.0ms

Local error

Found 4 expressions with local error:

38.3b
(log (* (* a b) (* a b)))
2.1b
(exp (log (* (* a b) (* a b))))
0.2b
(* (* a b) (* a b))
0.0b
(* 4 (* b b))

rewrite21.0ms

Algorithm
rewrite-expression-head
Counts
4 → 65
Calls

4 calls. Slowest were:

8.0ms
(exp (log (* (* a b) (* a b))))
6.0ms
(* (* a b) (* a b))
4.0ms
(log (* (* a b) (* a b)))

series132.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

66.0ms
(log (* (* a b) (* a b)))
27.0ms
(* (* a b) (* a b))
22.0ms
(* 4 (* b b))
17.0ms
(exp (log (* (* a b) (* a b))))

simplify1.1s

Counts
33 → 77
Calls

33 calls. Slowest were:

655.0ms
(* (* (* (* a b) (* a b)) (* a b)) (* (* (* a b) (* a b)) (* a b)))
156.0ms
(- (+ (* 2 (log (/ -1 a))) (* 2 (log (/ -1 b)))))
101.0ms
(- (+ (* 2 (log (/ 1 b))) (* 2 (log (/ 1 a)))))

prune1.5s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize23.0ms

Local error

Found 4 expressions with local error:

11.5b
(sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))))
11.5b
(sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))))
0.3b
(fma (sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4)))) (sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4)))) (* 4 (* b b)))
0.2b
(* (* a b) (* a b))

rewrite11.0ms

Algorithm
rewrite-expression-head
Counts
4 → 56
Calls

4 calls. Slowest were:

6.0ms
(* (* a b) (* a b))
2.0ms
(sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))))
2.0ms
(sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))))

series211.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

95.0ms
(fma (sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4)))) (sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4)))) (* 4 (* b b)))
58.0ms
(sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))))
40.0ms
(sqrt (fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4))))
18.0ms
(* (* a b) (* a b))

simplify1.7s

Counts
26 → 68
Calls

26 calls. Slowest were:

685.0ms
(* (* (* (* a b) (* a b)) (* a b)) (* (* (* a b) (* a b)) (* a b)))
159.0ms
(+ (* 2 (* (pow a 2) (pow b 2))) (+ (* 4 (pow b 2)) (pow a 4)))
132.0ms
(+ (pow b 4) (+ (pow a 4) (* 2 (* (pow a 2) (pow b 2)))))

prune1.1s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes78.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample3.4s

Algorithm
intervals