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

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. Using strategy rm
  3. Applied sqrt-div0.0

    \[\leadsto 2 \cdot \tan^{-1} \color{blue}{\left(\frac{\sqrt{1 - x}}{\sqrt{1 + x}}\right)}\]
  4. Using strategy rm
  5. Applied add-cbrt-cube0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\frac{\sqrt{1 - x}}{\color{blue}{\sqrt[3]{\left(\sqrt{1 + x} \cdot \sqrt{1 + x}\right) \cdot \sqrt{1 + x}}}}\right)\]
  6. Applied add-cbrt-cube0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\frac{\color{blue}{\sqrt[3]{\left(\sqrt{1 - x} \cdot \sqrt{1 - x}\right) \cdot \sqrt{1 - x}}}}{\sqrt[3]{\left(\sqrt{1 + x} \cdot \sqrt{1 + x}\right) \cdot \sqrt{1 + x}}}\right)\]
  7. Applied cbrt-undiv0.0

    \[\leadsto 2 \cdot \tan^{-1} \color{blue}{\left(\sqrt[3]{\frac{\left(\sqrt{1 - x} \cdot \sqrt{1 - x}\right) \cdot \sqrt{1 - x}}{\left(\sqrt{1 + x} \cdot \sqrt{1 + x}\right) \cdot \sqrt{1 + x}}}\right)}\]
  8. Simplified0.0

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

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

Reproduce

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

Details

Time bar (total: 4.6m)Debug log

sample363.0ms

Algorithm
intervals

simplify64.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

63.0ms
(* 2 (atan (sqrt (/ (- 1 x) (+ 1 x)))))

prune7.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize22.0ms

Local error

Found 3 expressions with local error:

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

rewrite9.0ms

Algorithm
rewrite-expression-head
Counts
3 → 65
Calls

3 calls. Slowest were:

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

series61.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

26.0ms
(sqrt (/ (- 1 x) (+ 1 x)))
21.0ms
(/ (- 1 x) (+ 1 x))
4.0ms
(atan (sqrt (/ (- 1 x) (+ 1 x))))

simplify1.6s

Counts
57 → 74
Calls

57 calls. Slowest were:

317.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
298.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
259.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))

prune806.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize28.0ms

Local error

Found 4 expressions with local error:

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

rewrite19.0ms

Algorithm
rewrite-expression-head
Counts
4 → 100
Calls

4 calls. Slowest were:

9.0ms
(/ (sqrt (- 1 x)) (sqrt (+ 1 x)))
5.0ms
(atan (/ (sqrt (- 1 x)) (sqrt (+ 1 x))))
1.0ms
(sqrt (- 1 x))

series85.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

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

simplify3.0s

Counts
114 → 112
Calls

114 calls. Slowest were:

1.4s
(/ (* (* (sqrt (- 1 x)) (sqrt (- 1 x))) (sqrt (- 1 x))) (* (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (sqrt (+ 1 x))))
292.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
246.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))

prune1.3s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize42.0ms

Local error

Found 4 expressions with local error:

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

rewrite95.0ms

Algorithm
rewrite-expression-head
Counts
4 → 1449
Calls

4 calls. Slowest were:

9.0ms
(/ (/ (- 1 x) (+ x 1)) (/ (sqrt (+ x 1)) (sqrt (- 1 x))))
6.0ms
(cbrt (/ (/ (- 1 x) (+ x 1)) (/ (sqrt (+ x 1)) (sqrt (- 1 x)))))
4.0ms
(/ (sqrt (+ x 1)) (sqrt (- 1 x)))

series103.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

33.0ms
(/ (/ (- 1 x) (+ x 1)) (/ (sqrt (+ x 1)) (sqrt (- 1 x))))
27.0ms
(cbrt (/ (/ (- 1 x) (+ x 1)) (/ (sqrt (+ x 1)) (sqrt (- 1 x)))))
23.0ms
(/ (sqrt (+ x 1)) (sqrt (- 1 x)))
19.0ms
(/ (- 1 x) (+ x 1))

simplify4.2m

Counts
2095 → 1461
Calls

2095 calls. Slowest were:

947.0ms
(cbrt (/ (/ 1 (* (cbrt (+ x 1)) (cbrt (+ x 1)))) (/ 1 (* (cbrt (sqrt (- 1 x))) (cbrt (sqrt (- 1 x)))))))
777.0ms
(/ (/ 1 (+ x 1)) (/ (cbrt (sqrt (+ x 1))) (sqrt (- 1 x))))
753.0ms
(/ (/ (* (cbrt (- 1 x)) (cbrt (- 1 x))) (sqrt (+ x 1))) (/ 1 (* (cbrt (sqrt (- 1 x))) (cbrt (sqrt (- 1 x))))))

prune15.7s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes23.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample1.4s

Algorithm
intervals