Average Error: 0.0 → 0.0
Time: 1.1m
Precision: 64
Internal Precision: 128
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - {x}^{3}}{\frac{\left(1 - x \cdot x\right) \cdot \left(1 - \left(x + x \cdot x\right) \cdot \left(x + x \cdot x\right)\right)}{\left(\left(1 - x\right) - x \cdot x\right) \cdot \left(1 - x\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. Using strategy rm
  3. Applied flip3--0.0

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

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

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{\color{blue}{1 - {x}^{3}}}{\left(1 + x\right) \cdot \left(1 \cdot 1 + \left(x \cdot x + 1 \cdot x\right)\right)}}\right)\]
  6. Using strategy rm
  7. Applied flip-+0.0

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

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

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

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

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

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

Reproduce

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

Details

Time bar (total: 1.1m)Debug log

sample190.0ms

Algorithm
intervals

simplify16.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune7.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize42.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:

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

series54.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

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

simplify1.6s

Counts
57 → 74
Calls

57 calls. Slowest were:

338.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))
313.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
269.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))

prune713.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize63.0ms

Local error

Found 4 expressions with local error:

0.0b
(/ (- 1 (pow x 3)) (* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x)))))
0.0b
(* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x))))
0.0b
(atan (sqrt (/ (- 1 (pow x 3)) (* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x)))))))
0.0b
(sqrt (/ (- 1 (pow x 3)) (* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x))))))

rewrite50.0ms

Algorithm
rewrite-expression-head
Counts
4 → 92
Calls

4 calls. Slowest were:

20.0ms
(* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x))))
18.0ms
(/ (- 1 (pow x 3)) (* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x)))))
8.0ms
(sqrt (/ (- 1 (pow x 3)) (* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x))))))

series120.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

56.0ms
(sqrt (/ (- 1 (pow x 3)) (* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x))))))
46.0ms
(/ (- 1 (pow x 3)) (* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x)))))
13.0ms
(* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x))))
5.0ms
(atan (sqrt (/ (- 1 (pow x 3)) (* (+ 1 x) (+ (* 1 1) (+ (* x x) (* 1 x)))))))

simplify13.5s

Counts
76 → 104
Calls

76 calls. Slowest were:

713.0ms
(sqrt (/ (- 1 (pow x 3)) (* (+ 1 x) (- (* (* 1 1) (* 1 1)) (* (+ (* x x) (* 1 x)) (+ (* x x) (* 1 x)))))))
691.0ms
(sqrt (/ (- 1 (pow x 3)) (* (+ 1 x) (+ (pow (* 1 1) 3) (pow (+ (* x x) (* 1 x)) 3)))))
629.0ms
(* (- (* 1 1) (* x x)) (+ (pow (* 1 1) 3) (pow (+ (* x x) (* 1 x)) 3)))

prune1.4s

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize53.0ms

Local error

Found 4 expressions with local error:

0.0b
(* (+ (* x x) x) (+ (* x x) x))
0.0b
(/ (- 1 (pow x 3)) (/ (* (- 1 (* x x)) (- 1 (* (+ (* x x) x) (+ (* x x) x)))) (* (- (- 1 x) (* x x)) (- 1 x))))
0.0b
(/ (* (- 1 (* x x)) (- 1 (* (+ (* x x) x) (+ (* x x) x)))) (* (- (- 1 x) (* x x)) (- 1 x)))
0.0b
(* (- (- 1 x) (* x x)) (- 1 x))

rewrite94.0ms

Algorithm
rewrite-expression-head
Counts
4 → 178
Calls

4 calls. Slowest were:

32.0ms
(/ (- 1 (pow x 3)) (/ (* (- 1 (* x x)) (- 1 (* (+ (* x x) x) (+ (* x x) x)))) (* (- (- 1 x) (* x x)) (- 1 x))))
25.0ms
(/ (* (- 1 (* x x)) (- 1 (* (+ (* x x) x) (+ (* x x) x)))) (* (- (- 1 x) (* x x)) (- 1 x)))
18.0ms
(* (- (- 1 x) (* x x)) (- 1 x))

series138.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

50.0ms
(/ (* (- 1 (* x x)) (- 1 (* (+ (* x x) x) (+ (* x x) x)))) (* (- (- 1 x) (* x x)) (- 1 x)))
48.0ms
(/ (- 1 (pow x 3)) (/ (* (- 1 (* x x)) (- 1 (* (+ (* x x) x) (+ (* x x) x)))) (* (- (- 1 x) (* x x)) (- 1 x))))
28.0ms
(* (- (- 1 x) (* x x)) (- 1 x))
12.0ms
(* (+ (* x x) x) (+ (* x x) x))

simplify35.5s

Counts
198 → 190
Calls

198 calls. Slowest were:

1.0s
(/ (sqrt (- 1 (pow x 3))) (* (+ (- 1 x) (* x x)) (+ (* 1 1) (+ (* x x) (* 1 x)))))
883.0ms
(* (- (- 1 x) (* x x)) (- x))
707.0ms
(* (* (* (- (- 1 x) (* x x)) (- (- 1 x) (* x x))) (- (- 1 x) (* x x))) (* (* (- 1 x) (- 1 x)) (- 1 x)))

prune2.8s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize29.0ms

Local error

Found 4 expressions with local error:

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

rewrite51.0ms

Algorithm
rewrite-expression-head
Counts
4 → 152
Calls

4 calls. Slowest were:

29.0ms
(* (* (cbrt (- 1 x)) (cbrt (- 1 x))) (/ (cbrt (- 1 x)) (+ 1 x)))
10.0ms
(* (cbrt (- 1 x)) (cbrt (- 1 x)))
7.0ms
(/ (cbrt (- 1 x)) (+ 1 x))

series148.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

58.0ms
(/ (cbrt (- 1 x)) (+ 1 x))
39.0ms
(* (cbrt (- 1 x)) (cbrt (- 1 x)))
35.0ms
(cbrt (- 1 x))
16.0ms
(* (* (cbrt (- 1 x)) (cbrt (- 1 x))) (/ (cbrt (- 1 x)) (+ 1 x)))

simplify5.3s

Counts
159 → 164
Calls

159 calls. Slowest were:

458.0ms
(/ (- 1 x) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))
397.0ms
(* (* (cbrt (+ 1 x)) (cbrt (+ (* 1 1) (+ (* x x) (* 1 x))))) (+ 1 x))
379.0ms
(* (* (* (* (cbrt (- 1 x)) (cbrt (- 1 x))) (* (cbrt (- 1 x)) (cbrt (- 1 x)))) (* (cbrt (- 1 x)) (cbrt (- 1 x)))) (* (* (/ (cbrt (- 1 x)) (+ 1 x)) (/ (cbrt (- 1 x)) (+ 1 x))) (/ (cbrt (- 1 x)) (+ 1 x))))

prune2.0s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes31.0ms

Accuracy

0% (0.0b remaining)

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

bsearch3.0ms

end0.0ms

sample2.3s

Algorithm
intervals