Average Error: 0.6 → 0.6
Time: 46.2s
Precision: 64
Internal Precision: 128
\[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
\[e^{\sqrt{\log \left(\cos^{-1} \left(\frac{1 - \left(v \cdot v\right) \cdot 5}{v \cdot v - 1}\right)\right)} \cdot \sqrt{\log \left(\cos^{-1} \left(\frac{1 - \left(v \cdot v\right) \cdot 5}{v \cdot v - 1}\right)\right)}}\]

Error

Bits error versus v

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.6

    \[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\]
  2. Using strategy rm
  3. Applied add-exp-log0.6

    \[\leadsto \color{blue}{e^{\log \left(\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)}}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.6

    \[\leadsto e^{\color{blue}{\sqrt{\log \left(\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)} \cdot \sqrt{\log \left(\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)\right)}}}\]
  6. Final simplification0.6

    \[\leadsto e^{\sqrt{\log \left(\cos^{-1} \left(\frac{1 - \left(v \cdot v\right) \cdot 5}{v \cdot v - 1}\right)\right)} \cdot \sqrt{\log \left(\cos^{-1} \left(\frac{1 - \left(v \cdot v\right) \cdot 5}{v \cdot v - 1}\right)\right)}}\]

Reproduce

herbie shell --seed 2018362 
(FPCore (v)
  :name "Falkner and Boettcher, Appendix B, 1"
  (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))

Details

Time bar (total: 34.2s)Debug log

start377.0ms

Algorithm
intervals

setup646.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.6b

localize15.0ms

Local error

Found 2 expressions with local error:

0.6b
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.2b
(* 5 (* v v))

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
2 → 17
Calls

2 calls. Slowest were:

1.0ms
(* 5 (* v v))
0.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

series15.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

11.0ms
(* 5 (* v v))
4.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

simplify597.0ms

Counts
6 → 23
Calls

6 calls. Slowest were:

212.0ms
(acos (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))
202.0ms
(acos (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))
171.0ms
(acos (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))

prune313.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0.6b

localize7.0ms

Local error

Found 4 expressions with local error:

0.6b
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.2b
(* 5 (* v v))
0.0b
(exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))
0.0b
(log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

2.0ms
(exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))
1.0ms
(* 5 (* v v))
1.0ms
(log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))

series118.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

100.0ms
(log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))
11.0ms
(* 5 (* v v))
4.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
3.0ms
(exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))

simplify6.0s

Counts
24 → 56
Calls

24 calls. Slowest were:

598.0ms
(log (sqrt (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))
573.0ms
(exp (log (* (cbrt (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))) (cbrt (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))
545.0ms
(exp (* (cbrt (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))) (cbrt (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))

prune727.0ms

Pruning

4 alts after pruning (4 fresh and 0 done)

Merged error: 0.6b

localize9.0ms

Local error

Found 4 expressions with local error:

0.6b
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.6b
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.2b
(* 5 (* v v))
0.2b
(* 5 (* v v))

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
4 → 34
Calls

4 calls. Slowest were:

1.0ms
(* 5 (* v v))
1.0ms
(* 5 (* v v))
1.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

series45.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

20.0ms
(* 5 (* v v))
16.0ms
(* 5 (* v v))
5.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
3.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

simplify1.3s

Counts
12 → 46
Calls

12 calls. Slowest were:

234.0ms
(acos (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))
214.0ms
(acos (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))
208.0ms
(acos (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))

prune953.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.6b

localize14.0ms

Local error

Found 4 expressions with local error:

1.0b
(* (sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))) (sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))
1.0b
(sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))
1.0b
(sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))
0.6b
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

rewrite31.0ms

Algorithm
rewrite-expression-head
Counts
4 → 76
Calls

4 calls. Slowest were:

20.0ms
(* (sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))) (sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))
4.0ms
(sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))
4.0ms
(sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))

series63.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

26.0ms
(sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))
25.0ms
(sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))
7.0ms
(* (sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))) (sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))
5.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

simplify21.5s

Counts
56 → 88
Calls

56 calls. Slowest were:

886.0ms
(sqrt (exp (log (sqrt (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))
632.0ms
(sqrt (sqrt (exp (log (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))
597.0ms
(exp (log (sqrt (acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))

prune1.3s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.6b

regimes187.0ms

Accuracy

0% (0.0b remaining)

Error of 0.6b against oracle of 0.6b and baseline of 0.6b

bsearch3.0ms