Average Error: 0.0 → 0.0
Time: 29.1s
Precision: 64
Internal Precision: 128
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[\tan^{-1} \left(\sqrt{e^{\sqrt[3]{\log \left(1 - x\right) - \log_* (1 + x)} \cdot \left(\sqrt[3]{\log \left(1 - x\right) - \log_* (1 + x)} \cdot \sqrt[3]{\log \left(1 - x\right) - \log_* (1 + x)}\right)}}\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 add-exp-log0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{\color{blue}{e^{\log \left(1 + x\right)}}}}\right)\]
  4. Applied add-exp-log0.0

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

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

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{e^{\color{blue}{\log \left(1 - x\right) - \log_* (1 + x)}}}\right)\]
  7. Using strategy rm
  8. Applied add-cube-cbrt0.0

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

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

Reproduce

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

Details

Time bar (total: 28.6s)Debug log

sample177.0ms

Algorithm
intervals

simplify25.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune14.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

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

rewrite18.0ms

Algorithm
rewrite-expression-head
Counts
3 → 71
Calls

3 calls. Slowest were:

10.0ms
(/ (- 1 x) (+ 1 x))
3.0ms
(sqrt (/ (- 1 x) (+ 1 x)))
1.0ms
(atan (sqrt (/ (- 1 x) (+ 1 x))))

series80.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

41.0ms
(sqrt (/ (- 1 x) (+ 1 x)))
33.0ms
(/ (- 1 x) (+ 1 x))
6.0ms
(atan (sqrt (/ (- 1 x) (+ 1 x))))

simplify4.4s

Counts
57 → 80
Calls

57 calls. Slowest were:

1.6s
(- (+ (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))))))
406.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))

prune712.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize35.0ms

Local error

Found 4 expressions with local error:

7.5b
(log (- 1 x))
0.0b
(sqrt (exp (- (log (- 1 x)) (log1p x))))
0.0b
(atan (sqrt (exp (- (log (- 1 x)) (log1p x)))))
0.0b
(- (log (- 1 x)) (log1p x))

rewrite28.0ms

Algorithm
rewrite-expression-head
Counts
4 → 98
Calls

4 calls. Slowest were:

16.0ms
(sqrt (exp (- (log (- 1 x)) (log1p x))))
8.0ms
(- (log (- 1 x)) (log1p x))
2.0ms
(log (- 1 x))

series276.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

139.0ms
(- (log (- 1 x)) (log1p x))
109.0ms
(sqrt (exp (- (log (- 1 x)) (log1p x))))
24.0ms
(log (- 1 x))
2.0ms
(atan (sqrt (exp (- (log (- 1 x)) (log1p x)))))

simplify5.1s

Counts
79 → 110
Calls

79 calls. Slowest were:

1.4s
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
464.0ms
(- (+ (sqrt (exp (- (log -1)))) (* 1/2 (* (/ 1 (pow x 2)) (sqrt (exp (- (log -1))))))) (* (/ 1 x) (sqrt (exp (- (log -1))))))
309.0ms
(- (+ (* 2 (/ 1 x)) (+ (* 2/3 (/ 1 (pow x 3))) (log -1))))

prune1.3s

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0b

localize25.0ms

Local error

Found 4 expressions with local error:

7.5b
(log (- 1 x))
7.5b
(log (- 1 x))
7.5b
(log (- 1 x))
0.6b
(cbrt (- (log (- 1 x)) (log1p x)))

rewrite7.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

3.0ms
(cbrt (- (log (- 1 x)) (log1p x)))
1.0ms
(log (- 1 x))
1.0ms
(log (- 1 x))

series343.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

246.0ms
(cbrt (- (log (- 1 x)) (log1p x)))
43.0ms
(log (- 1 x))
30.0ms
(log (- 1 x))
23.0ms
(log (- 1 x))

simplify3.6s

Counts
44 → 84
Calls

44 calls. Slowest were:

361.0ms
(- (log -1) (+ (log (/ 1 x)) (+ (* 1/2 (/ 1 (pow x 2))) (/ 1 x))))
343.0ms
(- (log -1) (+ (log (/ 1 x)) (+ (* 1/2 (/ 1 (pow x 2))) (/ 1 x))))
323.0ms
(- (+ (log (/ -1 x)) (+ (* 1/2 (/ 1 (pow x 2))) (/ 1 x))))

prune1.4s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

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

rewrite28.0ms

Algorithm
rewrite-expression-head
Counts
4 → 160
Calls

4 calls. Slowest were:

15.0ms
(* (* (cbrt (- 1 x)) (cbrt (- 1 x))) (/ (cbrt (- 1 x)) (+ 1 x)))
6.0ms
(* (cbrt (- 1 x)) (cbrt (- 1 x)))
4.0ms
(/ (cbrt (- 1 x)) (+ 1 x))

series197.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

67.0ms
(/ (cbrt (- 1 x)) (+ 1 x))
58.0ms
(* (cbrt (- 1 x)) (cbrt (- 1 x)))
54.0ms
(cbrt (- 1 x))
18.0ms
(* (* (cbrt (- 1 x)) (cbrt (- 1 x))) (/ (cbrt (- 1 x)) (+ 1 x)))

simplify6.4s

Counts
159 → 172
Calls

159 calls. Slowest were:

688.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))))
460.0ms
(* (* (cbrt (+ 1 x)) (cbrt (+ (* 1 1) (+ (* x x) (* 1 x))))) (+ 1 x))
442.0ms
(* (* (cbrt (+ (* 1 1) (+ (* x x) (* 1 x)))) (cbrt (+ 1 x))) (+ 1 x))

prune2.1s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes42.0ms

Accuracy

0% (0.0b remaining)

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

bsearch4.0ms

end0.0ms

sample2.2s

Algorithm
intervals