Average Error: 0.0 → 0.0
Time: 44.3s
Precision: 64
Internal Precision: 128
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[\tan^{-1} \left(\sqrt{\frac{\frac{1 - x}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}}{\sqrt[3]{x + 1}}}\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. Initial simplification0.0

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

    \[\leadsto \tan^{-1} \left(\sqrt{\frac{1 - x}{\color{blue}{\left(\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}\right) \cdot \sqrt[3]{1 + x}}}}\right) \cdot 2\]
  5. Applied associate-/r*0.0

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

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

Reproduce

herbie shell --seed 2018365 +o rules:numerics
(FPCore (x)
  :name "arccos"
  (* 2 (atan (sqrt (/ (- 1 x) (+ 1 x))))))

Details

Time bar (total: 39.9s)Debug log

start461.0ms

Algorithm
intervals

setup40.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize73.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))))

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
3 → 71
Calls

3 calls. Slowest were:

5.0ms
(/ (- 1 x) (+ 1 x))
2.0ms
(sqrt (/ (- 1 x) (+ 1 x)))
0.0ms
(atan (sqrt (/ (- 1 x) (+ 1 x))))

series195.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

82.0ms
(sqrt (/ (- 1 x) (+ 1 x)))
74.0ms
(/ (- 1 x) (+ 1 x))
38.0ms
(atan (sqrt (/ (- 1 x) (+ 1 x))))

simplify5.0s

Counts
57 → 80
Calls

57 calls. Slowest were:

2.0s
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
1.6s
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
544.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))

prune867.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize36.0ms

Local error

Found 4 expressions with local error:

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

rewrite77.0ms

Algorithm
rewrite-expression-head
Counts
4 → 317
Calls

4 calls. Slowest were:

23.0ms
(/ (/ (- 1 x) (* (cbrt (+ 1 x)) (cbrt (+ 1 x)))) (cbrt (+ 1 x)))
18.0ms
(sqrt (/ (/ (- 1 x) (* (cbrt (+ 1 x)) (cbrt (+ 1 x)))) (cbrt (+ 1 x))))
11.0ms
(* (cbrt (+ 1 x)) (cbrt (+ 1 x)))

series169.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

67.0ms
(/ (- 1 x) (* (cbrt (+ 1 x)) (cbrt (+ 1 x))))
56.0ms
(* (cbrt (+ 1 x)) (cbrt (+ 1 x)))
28.0ms
(sqrt (/ (/ (- 1 x) (* (cbrt (+ 1 x)) (cbrt (+ 1 x)))) (cbrt (+ 1 x))))
18.0ms
(/ (/ (- 1 x) (* (cbrt (+ 1 x)) (cbrt (+ 1 x)))) (cbrt (+ 1 x)))

simplify22.5s

Counts
380 → 329
Calls

380 calls. Slowest were:

1.7s
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
1.5s
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
785.0ms
(/ (* (* (/ (- 1 x) (* (cbrt (+ 1 x)) (cbrt (+ 1 x)))) (/ (- 1 x) (* (cbrt (+ 1 x)) (cbrt (+ 1 x))))) (/ (- 1 x) (* (cbrt (+ 1 x)) (cbrt (+ 1 x))))) (+ 1 x))

prune5.3s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize23.0ms

Local error

Found 4 expressions with local error:

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

rewrite28.0ms

Algorithm
rewrite-expression-head
Counts
4 → 113
Calls

4 calls. Slowest were:

13.0ms
(/ (cbrt (- 1 x)) (+ 1 x))
10.0ms
(* (cbrt (- 1 x)) (cbrt (- 1 x)))
1.0ms
(cbrt (- 1 x))

series178.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

50.0ms
(/ (cbrt (- 1 x)) (+ 1 x))
48.0ms
(cbrt (- 1 x))
41.0ms
(* (cbrt (- 1 x)) (cbrt (- 1 x)))
38.0ms
(cbrt (- 1 x))

simplify3.0s

Counts
104 → 125
Calls

104 calls. Slowest were:

366.0ms
(- (+ (/ (exp (* 1/3 (- (log -1) (log (/ 1 x))))) x) (* 11/9 (/ (exp (* 1/3 (- (log -1) (log (/ 1 x))))) (pow x 3)))) (* 4/3 (/ (exp (* 1/3 (- (log -1) (log (/ 1 x))))) (pow x 2))))
278.0ms
(/ (- 1 x) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))
244.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)))))

prune1.9s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes32.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms