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

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

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

Reproduce

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

Details

Time bar (total: 8.2s)Debug log

sample156.0ms

Algorithm
intervals

simplify28.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune12.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize34.0ms

Local error

Found 2 expressions with local error:

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

rewrite34.0ms

Algorithm
rewrite-expression-head
Counts
2 → 58
Calls

2 calls. Slowest were:

26.0ms
(/ (- 1 x) (+ 1 x))
2.0ms
(sqrt (/ (- 1 x) (+ 1 x)))

series67.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

38.0ms
(sqrt (/ (- 1 x) (+ 1 x)))
28.0ms
(/ (- 1 x) (+ 1 x))

simplify1.5s

Counts
54 → 64
Calls

54 calls. Slowest were:

278.0ms
(/ (* (* (- 1 x) (- 1 x)) (- 1 x)) (* (* (+ 1 x) (+ 1 x)) (+ 1 x)))
250.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))
247.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))

prune697.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize20.0ms

Local error

Found 1 expressions with local error:

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

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
1 → 65
Calls

1 calls. Slowest were:

4.0ms
(/ (sqrt (- 1 x)) (sqrt (+ 1 x)))

series28.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

28.0ms
(/ (sqrt (- 1 x)) (sqrt (+ 1 x)))

simplify2.4s

Counts
93 → 68
Calls

93 calls. Slowest were:

1.1s
(/ (* (* (sqrt (- 1 x)) (sqrt (- 1 x))) (sqrt (- 1 x))) (* (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (sqrt (+ 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))))))
263.0ms
(- (+ (sqrt -1) (/ 1 (* x (sqrt -1)))) (+ (/ 1 (* (pow x 2) (sqrt -1))) (* 1/2 (/ 1 (* (pow x 2) (pow (sqrt -1) 3))))))

prune745.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample2.5s

Algorithm
intervals