Average Error: 0.2 → 0.2
Time: 16.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((b \cdot b + \left(a \cdot a\right))_*\right) \cdot \left((b \cdot b + \left(a \cdot a\right))_*\right) + \left((\left(4 \cdot b\right) \cdot b + -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(b \cdot b\right)\right) - 1\]
  2. Initial simplification0.2

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

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

Reproduce

herbie shell --seed 2018360 +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: 11.4s)Debug log

start140.0ms

Algorithm
intervals

setup412.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.2b

localize21.0ms

Local error

Found 3 expressions with local error:

0.2b
(fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))
0.0b
(fma b b (* a a))
0.0b
(fma b b (* a a))

rewrite1.0ms

Algorithm
rewrite-expression-head
Counts
3 → 30
Calls

3 calls. Slowest were:

0.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))
0.0ms
(fma b b (* a a))
0.0ms
(fma b b (* a a))

series117.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

53.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))
34.0ms
(fma b b (* a a))
30.0ms
(fma b b (* a a))

simplify222.0ms

Counts
9 → 39
Calls

9 calls. Slowest were:

97.0ms
(+ (pow b 4) (+ (* 2 (* (pow a 2) (pow b 2))) (pow a 4)))
81.0ms
(+ (pow b 4) (+ (* 2 (* (pow a 2) (pow b 2))) (pow a 4)))
18.0ms
(- (* 4 (pow b 2)) 1)

prune613.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize25.0ms

Local error

Found 4 expressions with local error:

27.1b
(cbrt (* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a))))
0.3b
(* (fma b b (* a a)) (fma b b (* a a)))
0.2b
(fma (cbrt (* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a)))) (fma b b (* a a)) (fma (* 4 b) b -1))
0.1b
(* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a)))

rewrite41.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

19.0ms
(* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a)))
12.0ms
(cbrt (* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a))))
7.0ms
(* (fma b b (* a a)) (fma b b (* a a)))

series193.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

66.0ms
(* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a)))
64.0ms
(fma (cbrt (* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a)))) (fma b b (* a a)) (fma (* 4 b) b -1))
35.0ms
(cbrt (* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a))))
27.0ms
(* (fma b b (* a a)) (fma b b (* a a)))

simplify4.0s

Counts
48 → 87
Calls

48 calls. Slowest were:

878.0ms
(* (* (* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a))) (* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a)))) (* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a))))
547.0ms
(* (* a a) (* (fma b b (* a a)) (fma b b (* a a))))
389.0ms
(* (* (fma b b (* a a)) (fma b b (* a a))) (fma b b (* a a)))

prune1.4s

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

localize11.0ms

Local error

Found 4 expressions with local error:

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

rewrite7.0ms

Algorithm
rewrite-expression-head
Counts
4 → 42
Calls

4 calls. Slowest were:

6.0ms
(cbrt (* (* (fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1)) (fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))) (fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))))
0.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))
0.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))

series290.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

80.0ms
(cbrt (* (* (fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1)) (fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))) (fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))))
76.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))
69.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))
65.0ms
(fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))

simplify940.0ms

Counts
14 → 54
Calls

14 calls. Slowest were:

128.0ms
(cbrt (* (fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1)) (fma (fma b b (* a a)) (fma b b (* a a)) (fma (* 4 b) b -1))))
123.0ms
(+ (pow b 4) (+ (* 2 (* (pow a 2) (pow b 2))) (pow a 4)))
108.0ms
(+ (pow b 4) (+ (* 2 (* (pow a 2) (pow b 2))) (pow a 4)))

prune830.0ms

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

localize38.0ms

Local error

Found 3 expressions with local error:

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
3 → 45
Calls

3 calls. Slowest were:

7.0ms
(+ (pow a 4) (pow b 4))
7.0ms
(* (* a b) (* a b))
0.0ms
(fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4)))

series115.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

46.0ms
(fma 2 (* (* a b) (* a b)) (+ (pow a 4) (pow b 4)))
42.0ms
(+ (pow a 4) (pow b 4))
27.0ms
(* (* a b) (* a b))

simplify1.2s

Counts
19 → 54
Calls

19 calls. Slowest were:

730.0ms
(* (* (* (* a b) (* a b)) (* a b)) (* (* (* a b) (* a b)) (* a b)))
128.0ms
(+ (pow b 4) (+ (* 2 (* (pow a 2) (pow b 2))) (pow a 4)))
116.0ms
(+ (pow b 4) (+ (pow a 4) (* 2 (* (pow a 2) (pow b 2)))))

prune655.0ms

Pruning

4 alts after pruning (0 fresh and 4 done)

Merged error: 0b

regimes139.0ms

Accuracy

0% (0.2b remaining)

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

bsearch2.0ms