Average Error: 0.0 → 0.0
Time: 21.9s
Precision: 64
Internal Precision: 128
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\log \left(e^{\frac{1 - x}{x + 1}}\right)}\right)\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
  2. Initial simplification0.0

    \[\leadsto \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right) \cdot 2\]
  3. Using strategy rm
  4. Applied add-log-exp0.0

    \[\leadsto \tan^{-1} \left(\sqrt{\color{blue}{\log \left(e^{\frac{1 - x}{1 + x}}\right)}}\right) \cdot 2\]
  5. Final simplification0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\log \left(e^{\frac{1 - x}{x + 1}}\right)}\right)\]

Reproduce

herbie shell --seed 2018360 
(FPCore (x)
  :name "arccos"
  (* 2 (atan (sqrt (/ (- 1 x) (+ 1 x))))))

Details

Time bar (total: 17.6s)Debug log

start316.0ms

Algorithm
intervals

setup87.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize19.0ms

Local error

Found 3 expressions with local error:

0.0b
(/ (- 1 x) (+ 1 x))
0.0b
(sqrt (/ (- 1 x) (+ 1 x)))
0.0b
(atan (sqrt (/ (- 1 x) (+ 1 x))))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
3 → 65
Calls

3 calls. Slowest were:

4.0ms
(/ (- 1 x) (+ 1 x))
1.0ms
(sqrt (/ (- 1 x) (+ 1 x)))
0.0ms
(atan (sqrt (/ (- 1 x) (+ 1 x))))

series58.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

35.0ms
(sqrt (/ (- 1 x) (+ 1 x)))
18.0ms
(/ (- 1 x) (+ 1 x))
4.0ms
(atan (sqrt (/ (- 1 x) (+ 1 x))))

simplify1.7s

Counts
57 → 74
Calls

57 calls. Slowest were:

514.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))
276.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
227.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))

prune777.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize28.0ms

Local error

Found 4 expressions with local error:

0.0b
(/ (- 1 x) (+ 1 x))
0.0b
(sqrt (log (exp (/ (- 1 x) (+ 1 x)))))
0.0b
(atan (sqrt (log (exp (/ (- 1 x) (+ 1 x))))))
0.0b
(exp (/ (- 1 x) (+ 1 x)))

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 91
Calls

4 calls. Slowest were:

5.0ms
(/ (- 1 x) (+ 1 x))
4.0ms
(sqrt (log (exp (/ (- 1 x) (+ 1 x)))))
3.0ms
(exp (/ (- 1 x) (+ 1 x)))

series79.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

31.0ms
(exp (/ (- 1 x) (+ 1 x)))
30.0ms
(sqrt (log (exp (/ (- 1 x) (+ 1 x)))))
14.0ms
(/ (- 1 x) (+ 1 x))
4.0ms
(atan (sqrt (log (exp (/ (- 1 x) (+ 1 x))))))

simplify2.7s

Counts
79 → 103
Calls

79 calls. Slowest were:

603.0ms
(- (+ (exp -1) (* 2 (/ (exp -1) x))) (* 2/3 (/ (exp -1) (pow x 3))))
302.0ms
(- (+ (exp -1) (* 2 (/ (exp -1) x))) (* 2/3 (/ (exp -1) (pow x 3))))
288.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))

prune1.4s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize35.0ms

Local error

Found 4 expressions with local error:

0.1b
(* (cbrt (+ 1 x)) (cbrt (+ 1 x)))
0.0b
(/ (- 1 x) (cbrt (+ 1 x)))
0.0b
(cbrt (+ 1 x))
0.0b
(cbrt (+ 1 x))

rewrite18.0ms

Algorithm
rewrite-expression-head
Counts
4 → 106
Calls

4 calls. Slowest were:

9.0ms
(* (cbrt (+ 1 x)) (cbrt (+ 1 x)))
5.0ms
(/ (- 1 x) (cbrt (+ 1 x)))
1.0ms
(cbrt (+ 1 x))

series179.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

53.0ms
(cbrt (+ 1 x))
52.0ms
(/ (- 1 x) (cbrt (+ 1 x)))
43.0ms
(* (cbrt (+ 1 x)) (cbrt (+ 1 x)))
31.0ms
(cbrt (+ 1 x))

simplify1.9s

Counts
105 → 118
Calls

105 calls. Slowest were:

260.0ms
(- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2))))
251.0ms
(- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2))))
179.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (+ 1 x))

prune2.0s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize22.0ms

Local error

Found 4 expressions with local error:

0.0b
(/ (- 1 x) (+ 1 x))
0.0b
(/ (- 1 x) (+ 1 x))
0.0b
(/ (- 1 x) (+ 1 x))
0.0b
(* (* (cbrt (sqrt (/ (- 1 x) (+ 1 x)))) (cbrt (sqrt (/ (- 1 x) (+ 1 x))))) (cbrt (sqrt (/ (- 1 x) (+ 1 x)))))

rewrite34.0ms

Algorithm
rewrite-expression-head
Counts
4 → 148
Calls

4 calls. Slowest were:

21.0ms
(* (* (cbrt (sqrt (/ (- 1 x) (+ 1 x)))) (cbrt (sqrt (/ (- 1 x) (+ 1 x))))) (cbrt (sqrt (/ (- 1 x) (+ 1 x)))))
5.0ms
(/ (- 1 x) (+ 1 x))
3.0ms
(/ (- 1 x) (+ 1 x))

series62.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

27.0ms
(* (* (cbrt (sqrt (/ (- 1 x) (+ 1 x)))) (cbrt (sqrt (/ (- 1 x) (+ 1 x))))) (cbrt (sqrt (/ (- 1 x) (+ 1 x)))))
14.0ms
(/ (- 1 x) (+ 1 x))
10.0ms
(/ (- 1 x) (+ 1 x))
10.0ms
(/ (- 1 x) (+ 1 x))

simplify3.6s

Counts
153 → 160
Calls

153 calls. Slowest were:

328.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))
290.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
271.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))

prune2.5s

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes112.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms