Average Error: 0.6 → 0.6
Time: 33.9s
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(\frac{\pi}{2} - \sin^{-1} \left(\frac{1 - \left(v \cdot v\right) \cdot 5}{v \cdot v - 1}\right)\right)} \cdot \sqrt{\log \left(\frac{\pi}{2} - \sin^{-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 acos-asin0.6

    \[\leadsto \color{blue}{\frac{\pi}{2} - \sin^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)}\]
  4. Using strategy rm
  5. Applied add-exp-log0.6

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

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

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

Reproduce

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

Details

Time bar (total: 32.9s)Debug log

sample243.0ms

Algorithm
intervals
Results
524×(pre true 80)
268×(body nan 80)
94×(body real 2560)
77×(body real 1280)
44×(body real 640)
22×(body real 320)
11×(body real 80)
(body real 160)

simplify532.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
532.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

prune5.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.4b

localize17.0ms

Local error

Found 4 expressions with local error:

0.4b
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.1b
(* 5 (* v v))
0.0b
(/ (- 1 (* 5 (* v v))) (- (* v v) 1))
0.0b
(- 1 (* 5 (* v v)))

rewrite13.0ms

Algorithm
rewrite-expression-head
Rules
13×add-cube-cbrt
13×*-un-lft-identity
13×add-sqr-sqrt
12×times-frac
add-exp-log
add-cbrt-cube
add-log-exp
difference-of-sqr-1
associate-/r*
pow1
associate-/l*
flip--
flip3--
associate-/l/
associate-/r/
div-inv
*-commutative
associate-*r*
div-exp
div-sub
frac-2neg
sub-neg
clear-num
cbrt-undiv
acos-asin
Counts
4 → 64
Calls
4 calls:
Slowest
9.0ms
(/ (- 1 (* 5 (* v v))) (- (* v v) 1))
1.0ms
(- 1 (* 5 (* v v)))
1.0ms
(* 5 (* v v))
1.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

series109.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
44.0ms
(- 1 (* 5 (* v v)))
40.0ms
(/ (- 1 (* 5 (* v v))) (- (* v v) 1))
18.0ms
(* 5 (* v v))
6.0ms
(acos (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

simplify4.9s

Counts
49 → 76
Calls
49 calls:
Slowest
775.0ms
(/ (* (* (- 1 (* 5 (* v v))) (- 1 (* 5 (* v v)))) (- 1 (* 5 (* v v)))) (* (* (- (* v v) 1) (- (* v v) 1)) (- (* v v) 1)))
466.0ms
(/ (sqrt (- 1 (* 5 (* v v)))) (sqrt (- (* v v) 1)))
419.0ms
(/ (- 1 (* 5 (* v v))) (- (* v v) 1))
205.0ms
(- (pow 1 3) (pow (* 5 (* v v)) 3))
183.0ms
(/ (- 1 (* 5 (* v v))) (sqrt (- (* v v) 1)))

prune621.0ms

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.4b

localize9.0ms

Local error

Found 4 expressions with local error:

0.5b
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.1b
(* 5 (* v v))
0.0b
(- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))
0.0b
(/ (- 1 (* 5 (* v v))) (- (* v v) 1))

rewrite20.0ms

Algorithm
rewrite-expression-head
Rules
15×*-un-lft-identity
15×add-sqr-sqrt
13×add-cube-cbrt
12×times-frac
add-log-exp
add-exp-log
add-cbrt-cube
difference-of-sqr-1
associate-/r*
pow1
associate-/l*
flip--
flip3--
associate-/l/
associate-/r/
asin-acos
difference-of-squares
associate--r-
distribute-lft-out--
div-inv
*-commutative
associate-*r*
div-exp
div-sub
diff-log
frac-2neg
sub-neg
clear-num
cbrt-undiv
Counts
4 → 68
Calls
4 calls:
Slowest
9.0ms
(/ (- 1 (* 5 (* v v))) (- (* v v) 1))
7.0ms
(- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))
2.0ms
(* 5 (* v v))
1.0ms
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

series102.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
45.0ms
(/ (- 1 (* 5 (* v v))) (- (* v v) 1))
38.0ms
(- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))
13.0ms
(* 5 (* v v))
6.0ms
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

simplify7.9s

Counts
54 → 80
Calls
54 calls:
Slowest
777.0ms
(/ (* (* (- 1 (* 5 (* v v))) (- 1 (* 5 (* v v)))) (- 1 (* 5 (* v v)))) (* (* (- (* v v) 1) (- (* v v) 1)) (- (* v v) 1)))
550.0ms
(/ (- 1 (* 5 (* v v))) (- (* v v) 1))
541.0ms
(+ (sqrt (/ PI 2)) (sqrt (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))
491.0ms
(- (sqrt (/ PI 2)) (sqrt (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))
485.0ms
(/ (exp (/ PI 2)) (exp (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))

prune749.0ms

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.4b

localize16.0ms

Local error

Found 4 expressions with local error:

0.5b
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.1b
(* 5 (* v v))
0.0b
(exp (log (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))
0.0b
(log (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))

rewrite18.0ms

Algorithm
rewrite-expression-head
Rules
11×*-un-lft-identity
11×add-sqr-sqrt
10×log-prod
add-cube-cbrt
pow1
add-exp-log
exp-sum
add-log-exp
add-cbrt-cube
exp-prod
log-div
difference-of-squares
distribute-lft-out--
flip--
log-pow
exp-diff
flip3--
rem-exp-log
*-commutative
associate-*r*
rem-log-exp
asin-acos
Counts
4 → 52
Calls
4 calls:
Slowest
8.0ms
(exp (log (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))
5.0ms
(log (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))
2.0ms
(* 5 (* v v))
1.0ms
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

series234.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
172.0ms
(log (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))
47.0ms
(exp (log (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))
11.0ms
(* 5 (* v v))
3.0ms
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

simplify6.5s

Counts
32 → 64
Calls
32 calls:
Slowest
532.0ms
(exp (log (sqrt (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))
515.0ms
(exp (log (* (cbrt (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))) (cbrt (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))))
490.0ms
(log (* (cbrt (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))) (cbrt (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))))
487.0ms
(exp (* (cbrt (log (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))))) (cbrt (log (- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))))))
459.0ms
(- (/ PI 2) (asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1))))

prune788.0ms

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0.4b

localize22.0ms

Local error

Found 4 expressions with local error:

0.5b
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.5b
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
0.1b
(* 5 (* v v))
0.1b
(* 5 (* v v))

rewrite6.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
*-commutative
associate-*r*
asin-acos
Counts
4 → 34
Calls
4 calls:
Slowest
2.0ms
(* 5 (* v v))
2.0ms
(* 5 (* v v))
1.0ms
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
1.0ms
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

series37.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
16.0ms
(* 5 (* v v))
11.0ms
(* 5 (* v v))
5.0ms
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))
5.0ms
(asin (/ (- 1 (* 5 (* v v))) (- (* v v) 1)))

simplify1.1s

Counts
12 → 46
Calls
12 calls:
Slowest
199.0ms
(asin (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))
193.0ms
(asin (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))
184.0ms
(asin (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))
170.0ms
(asin (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))
158.0ms
(asin (/ (- 1 (* 5 (pow v 2))) (- (pow v 2) 1)))

prune683.0ms

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.4b

regimes275.0ms

Accuracy

0% (0.0b remaining)

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

bsearch4.0ms

end0.0ms

sample8.0s

Algorithm
intervals
Results
16013×(pre true 80)
8012×(body nan 80)
2960×(body real 2560)
2506×(body real 1280)
1236×(body real 640)
639×(body real 320)
434×(body real 160)
226×(body real 80)