
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) (PI))))
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) (PI))))
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\mathsf{PI}\left(\right)}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (- (- C A) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))) (/ 1.0 B))))
(if (<= t_0 -5e-49)
(* (/ 1.0 (/ (PI) (atan (/ (- (- C A) (hypot (- A C) B)) B)))) 180.0)
(if (<= t_0 0.0)
(* (/ (atan (* -0.5 (/ B (- C A)))) (PI)) 180.0)
(*
(/ 1.0 (/ 1.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) (PI))))
180.0)))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(C - A\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right) \cdot \frac{1}{B}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-49}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}} \cdot 180\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\mathsf{PI}\left(\right)}}} \cdot 180\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -4.9999999999999999e-49Initial program 52.9%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6453.0
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6453.0
Applied rewrites89.8%
if -4.9999999999999999e-49 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.0Initial program 19.1%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6419.1
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6419.1
Applied rewrites19.1%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
clear-numN/A
frac-subN/A
lower-/.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-hypot.f64N/A
+-commutativeN/A
lower-hypot.f64N/A
lower-*.f64N/A
lower-/.f642.6
Applied rewrites2.6%
Taylor expanded in A around -inf
lower-/.f64N/A
Applied rewrites3.3%
Taylor expanded in B around 0
Applied rewrites99.5%
if 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 58.0%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6458.0
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6458.0
Applied rewrites88.6%
/-rgt-identityN/A
clear-numN/A
lift-/.f64N/A
lower-/.f6488.6
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
lower-/.f6488.7
lift-hypot.f64N/A
+-commutativeN/A
lower-hypot.f6488.7
Applied rewrites88.7%
Final simplification90.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (- (- C A) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))) (/ 1.0 B))))
(if (<= t_0 -1e+286)
(* (/ (atan (- (/ C B) 1.0)) (PI)) 180.0)
(if (<= t_0 -5e-49)
(* (/ (atan (- -1.0 (/ A B))) (PI)) 180.0)
(if (<= t_0 0.05)
(* (atan (* (/ B C) -0.5)) (/ 180.0 (PI)))
(* (/ (atan (+ (/ (- C A) B) 1.0)) (PI)) 180.0))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(C - A\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right) \cdot \frac{1}{B}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+286}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;t\_0 \leq -5 \cdot 10^{-49}:\\
\;\;\;\;\frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;t\_0 \leq 0.05:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -1.00000000000000003e286Initial program 38.7%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.4
Applied rewrites67.4%
Taylor expanded in A around 0
Applied rewrites59.7%
if -1.00000000000000003e286 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -4.9999999999999999e-49Initial program 90.9%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6488.4
Applied rewrites88.4%
Taylor expanded in B around inf
Applied rewrites85.9%
if -4.9999999999999999e-49 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.050000000000000003Initial program 21.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6421.7
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6421.7
Applied rewrites21.7%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
lower-/.f6452.4
Applied rewrites52.4%
lift-*.f64N/A
lift-/.f64N/A
un-div-invN/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6452.3
Applied rewrites52.3%
if 0.050000000000000003 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 57.7%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6474.7
Applied rewrites74.7%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 (/ (PI) (atan (/ (- (- C A) (hypot (- A C) B)) B)))) 180.0))
(t_1
(* (- (- C A) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))) (/ 1.0 B))))
(if (<= t_1 -5e-49)
t_0
(if (<= t_1 0.0) (* (/ (atan (* -0.5 (/ B (- C A)))) (PI)) 180.0) t_0))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}} \cdot 180\\
t_1 := \left(\left(C - A\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right) \cdot \frac{1}{B}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -4.9999999999999999e-49 or 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 55.4%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6455.4
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6455.4
Applied rewrites89.3%
if -4.9999999999999999e-49 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.0Initial program 19.1%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6419.1
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6419.1
Applied rewrites19.1%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
clear-numN/A
frac-subN/A
lower-/.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-hypot.f64N/A
+-commutativeN/A
lower-hypot.f64N/A
lower-*.f64N/A
lower-/.f642.6
Applied rewrites2.6%
Taylor expanded in A around -inf
lower-/.f64N/A
Applied rewrites3.3%
Taylor expanded in B around 0
Applied rewrites99.5%
Final simplification90.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (- (- C A) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))) (/ 1.0 B)))
(t_1 (/ (- C A) B)))
(if (<= t_0 -5e-49)
(* (/ (atan (- t_1 1.0)) (PI)) 180.0)
(if (<= t_0 0.05)
(* (/ (atan (* -0.5 (/ B (- C A)))) (PI)) 180.0)
(/ (* (atan (+ t_1 1.0)) 180.0) (PI))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(C - A\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right) \cdot \frac{1}{B}\\
t_1 := \frac{C - A}{B}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-49}:\\
\;\;\;\;\frac{\tan^{-1} \left(t\_1 - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;t\_0 \leq 0.05:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(t\_1 + 1\right) \cdot 180}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -4.9999999999999999e-49Initial program 52.9%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6474.6
Applied rewrites74.6%
if -4.9999999999999999e-49 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.050000000000000003Initial program 21.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6421.7
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6421.7
Applied rewrites21.7%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
clear-numN/A
frac-subN/A
lower-/.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-hypot.f64N/A
+-commutativeN/A
lower-hypot.f64N/A
lower-*.f64N/A
lower-/.f645.7
Applied rewrites5.7%
Taylor expanded in A around -inf
lower-/.f64N/A
Applied rewrites6.4%
Taylor expanded in B around 0
Applied rewrites97.1%
if 0.050000000000000003 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 57.7%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6474.7
Applied rewrites74.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6474.7
Applied rewrites74.7%
Final simplification77.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (- (- C A) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))) (/ 1.0 B)))
(t_1 (/ (- C A) B)))
(if (<= t_0 -5e-49)
(* (/ (atan (- t_1 1.0)) (PI)) 180.0)
(if (<= t_0 0.05)
(* (atan (* (/ B C) -0.5)) (/ 180.0 (PI)))
(/ (* (atan (+ t_1 1.0)) 180.0) (PI))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(C - A\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right) \cdot \frac{1}{B}\\
t_1 := \frac{C - A}{B}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-49}:\\
\;\;\;\;\frac{\tan^{-1} \left(t\_1 - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;t\_0 \leq 0.05:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(t\_1 + 1\right) \cdot 180}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -4.9999999999999999e-49Initial program 52.9%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6474.6
Applied rewrites74.6%
if -4.9999999999999999e-49 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.050000000000000003Initial program 21.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6421.7
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6421.7
Applied rewrites21.7%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
lower-/.f6452.4
Applied rewrites52.4%
lift-*.f64N/A
lift-/.f64N/A
un-div-invN/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6452.3
Applied rewrites52.3%
if 0.050000000000000003 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 57.7%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6474.7
Applied rewrites74.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6474.7
Applied rewrites74.7%
Final simplification72.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (- (- C A) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))) (/ 1.0 B)))
(t_1 (/ (- C A) B)))
(if (<= t_0 -5e-49)
(* (/ (atan (- t_1 1.0)) (PI)) 180.0)
(if (<= t_0 0.05)
(* (atan (* (/ B C) -0.5)) (/ 180.0 (PI)))
(* (/ (atan (+ t_1 1.0)) (PI)) 180.0)))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(C - A\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right) \cdot \frac{1}{B}\\
t_1 := \frac{C - A}{B}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-49}:\\
\;\;\;\;\frac{\tan^{-1} \left(t\_1 - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;t\_0 \leq 0.05:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right) \cdot \frac{180}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(t\_1 + 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -4.9999999999999999e-49Initial program 52.9%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6474.6
Applied rewrites74.6%
if -4.9999999999999999e-49 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.050000000000000003Initial program 21.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6421.7
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6421.7
Applied rewrites21.7%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
lower-/.f6452.4
Applied rewrites52.4%
lift-*.f64N/A
lift-/.f64N/A
un-div-invN/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6452.3
Applied rewrites52.3%
if 0.050000000000000003 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 57.7%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6474.7
Applied rewrites74.7%
Final simplification72.2%
(FPCore (A B C)
:precision binary64
(if (<= A -9.2e+110)
(* (/ (atan (* -0.5 (/ B (- C A)))) (PI)) 180.0)
(if (<= A 5e-29)
(* (/ (atan (/ (- C (hypot C B)) B)) (PI)) 180.0)
(/ 180.0 (/ (PI) (atan (/ (+ (hypot B A) A) (- B))))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.2 \cdot 10^{+110}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-29}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\mathsf{PI}\left(\right)}{\tan^{-1} \left(\frac{\mathsf{hypot}\left(B, A\right) + A}{-B}\right)}}\\
\end{array}
\end{array}
if A < -9.2000000000000001e110Initial program 15.5%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6415.5
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6415.5
Applied rewrites61.1%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
clear-numN/A
frac-subN/A
lower-/.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-hypot.f64N/A
+-commutativeN/A
lower-hypot.f64N/A
lower-*.f64N/A
lower-/.f6410.5
Applied rewrites10.5%
Taylor expanded in A around -inf
lower-/.f64N/A
Applied rewrites5.5%
Taylor expanded in B around 0
Applied rewrites85.6%
if -9.2000000000000001e110 < A < 4.99999999999999986e-29Initial program 52.4%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6482.2
Applied rewrites82.2%
if 4.99999999999999986e-29 < A Initial program 71.8%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6482.2
Applied rewrites82.2%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6482.2
Applied rewrites82.2%
Final simplification82.8%
(FPCore (A B C)
:precision binary64
(if (<= A -9.2e+110)
(* (/ (atan (* -0.5 (/ B (- C A)))) (PI)) 180.0)
(if (<= A 5e-29)
(* (/ (atan (/ (- C (hypot C B)) B)) (PI)) 180.0)
(* (/ (atan (/ (+ (hypot B A) A) (- B))) (PI)) 180.0))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.2 \cdot 10^{+110}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-29}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\mathsf{hypot}\left(B, A\right) + A}{-B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if A < -9.2000000000000001e110Initial program 15.5%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6415.5
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6415.5
Applied rewrites61.1%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
clear-numN/A
frac-subN/A
lower-/.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-hypot.f64N/A
+-commutativeN/A
lower-hypot.f64N/A
lower-*.f64N/A
lower-/.f6410.5
Applied rewrites10.5%
Taylor expanded in A around -inf
lower-/.f64N/A
Applied rewrites5.5%
Taylor expanded in B around 0
Applied rewrites85.6%
if -9.2000000000000001e110 < A < 4.99999999999999986e-29Initial program 52.4%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6482.2
Applied rewrites82.2%
if 4.99999999999999986e-29 < A Initial program 71.8%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6482.2
Applied rewrites82.2%
Final simplification82.8%
(FPCore (A B C)
:precision binary64
(if (<= A -9.2e+110)
(* (/ (atan (* -0.5 (/ B (- C A)))) (PI)) 180.0)
(if (<= A 1.45e+30)
(* (/ (atan (/ (- C (hypot C B)) B)) (PI)) 180.0)
(* (/ (atan (- (/ (- C A) B) 1.0)) (PI)) 180.0))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.2 \cdot 10^{+110}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{+30}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C - A}{B} - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if A < -9.2000000000000001e110Initial program 15.5%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6415.5
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6415.5
Applied rewrites61.1%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
clear-numN/A
frac-subN/A
lower-/.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-hypot.f64N/A
+-commutativeN/A
lower-hypot.f64N/A
lower-*.f64N/A
lower-/.f6410.5
Applied rewrites10.5%
Taylor expanded in A around -inf
lower-/.f64N/A
Applied rewrites5.5%
Taylor expanded in B around 0
Applied rewrites85.6%
if -9.2000000000000001e110 < A < 1.4499999999999999e30Initial program 52.1%
Taylor expanded in A around 0
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f6480.6
Applied rewrites80.6%
if 1.4499999999999999e30 < A Initial program 78.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6481.9
Applied rewrites81.9%
Final simplification81.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.9e+75)
(* (/ (atan 1.0) (PI)) 180.0)
(if (<= B -8e-195)
(* (/ (atan (/ C B)) (PI)) 180.0)
(if (<= B 2.5e-158)
(* (/ (atan 0.0) (PI)) 180.0)
(if (<= B 9.5e-31)
(* (/ (atan (/ (- A) B)) (PI)) 180.0)
(* (/ (atan -1.0) (PI)) 180.0))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.9 \cdot 10^{+75}:\\
\;\;\;\;\frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;B \leq -8 \cdot 10^{-195}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-158}:\\
\;\;\;\;\frac{\tan^{-1} 0}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-31}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if B < -1.9000000000000001e75Initial program 46.8%
Taylor expanded in B around -inf
Applied rewrites67.9%
if -1.9000000000000001e75 < B < -8.0000000000000007e-195Initial program 69.4%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6459.8
Applied rewrites59.8%
Taylor expanded in C around inf
Applied rewrites42.0%
if -8.0000000000000007e-195 < B < 2.49999999999999986e-158Initial program 45.3%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval52.0
Applied rewrites52.0%
if 2.49999999999999986e-158 < B < 9.5000000000000008e-31Initial program 52.8%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6449.9
Applied rewrites49.9%
Taylor expanded in A around inf
Applied rewrites36.5%
if 9.5000000000000008e-31 < B Initial program 46.1%
Taylor expanded in B around inf
Applied rewrites65.8%
Final simplification54.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.2e+18)
(* (/ (atan (* 0.5 (/ B A))) (PI)) 180.0)
(if (<= A 6.5e-84)
(* (/ (atan (- (/ C B) 1.0)) (PI)) 180.0)
(if (<= A 5e+155)
(* (/ (atan (- 1.0 (/ A B))) (PI)) 180.0)
(* (/ (atan (/ (+ A B) (- B))) (PI)) 180.0)))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 5 \cdot 10^{+155}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if A < -3.2e18Initial program 20.0%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6471.6
Applied rewrites71.6%
if -3.2e18 < A < 6.50000000000000022e-84Initial program 54.1%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.2
Applied rewrites58.2%
Taylor expanded in A around 0
Applied rewrites57.6%
if 6.50000000000000022e-84 < A < 4.9999999999999999e155Initial program 66.6%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6476.0
Applied rewrites76.0%
Taylor expanded in B around -inf
Applied rewrites71.1%
if 4.9999999999999999e155 < A Initial program 75.5%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6488.2
Applied rewrites88.2%
Taylor expanded in A around 0
Applied rewrites88.2%
Final simplification67.3%
(FPCore (A B C)
:precision binary64
(if (<= A -3.2e+18)
(* (/ (atan (* 0.5 (/ B A))) (PI)) 180.0)
(if (<= A 6.5e-84)
(* (/ (atan (- (/ C B) 1.0)) (PI)) 180.0)
(if (<= A 5e+155)
(* (/ (atan (- 1.0 (/ A B))) (PI)) 180.0)
(* (/ (atan (- -1.0 (/ A B))) (PI)) 180.0)))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 5 \cdot 10^{+155}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if A < -3.2e18Initial program 20.0%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6471.6
Applied rewrites71.6%
if -3.2e18 < A < 6.50000000000000022e-84Initial program 54.1%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.2
Applied rewrites58.2%
Taylor expanded in A around 0
Applied rewrites57.6%
if 6.50000000000000022e-84 < A < 4.9999999999999999e155Initial program 66.6%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6476.0
Applied rewrites76.0%
Taylor expanded in B around -inf
Applied rewrites71.1%
if 4.9999999999999999e155 < A Initial program 75.5%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6488.2
Applied rewrites88.2%
Taylor expanded in B around inf
Applied rewrites88.2%
Final simplification67.3%
(FPCore (A B C)
:precision binary64
(if (<= A -6.5e+83)
(* (/ (atan 0.0) (PI)) 180.0)
(if (<= A 6.5e-84)
(* (/ (atan (- (/ C B) 1.0)) (PI)) 180.0)
(if (<= A 5e+155)
(* (/ (atan (- 1.0 (/ A B))) (PI)) 180.0)
(* (/ (atan (- -1.0 (/ A B))) (PI)) 180.0)))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{\tan^{-1} 0}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;A \leq 5 \cdot 10^{+155}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if A < -6.5000000000000003e83Initial program 18.8%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval43.1
Applied rewrites43.1%
if -6.5000000000000003e83 < A < 6.50000000000000022e-84Initial program 51.4%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.0
Applied rewrites56.0%
Taylor expanded in A around 0
Applied rewrites55.5%
if 6.50000000000000022e-84 < A < 4.9999999999999999e155Initial program 66.6%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6476.0
Applied rewrites76.0%
Taylor expanded in B around -inf
Applied rewrites71.1%
if 4.9999999999999999e155 < A Initial program 75.5%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6488.2
Applied rewrites88.2%
Taylor expanded in B around inf
Applied rewrites88.2%
Final simplification60.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.9e+75)
(* (/ (atan 1.0) (PI)) 180.0)
(if (<= B -8e-195)
(* (/ (atan (/ C B)) (PI)) 180.0)
(if (<= B 8.8e-207)
(* (/ (atan 0.0) (PI)) 180.0)
(* (/ (atan (- (/ C B) 1.0)) (PI)) 180.0)))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.9 \cdot 10^{+75}:\\
\;\;\;\;\frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;B \leq -8 \cdot 10^{-195}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;B \leq 8.8 \cdot 10^{-207}:\\
\;\;\;\;\frac{\tan^{-1} 0}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if B < -1.9000000000000001e75Initial program 46.8%
Taylor expanded in B around -inf
Applied rewrites67.9%
if -1.9000000000000001e75 < B < -8.0000000000000007e-195Initial program 69.4%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6459.8
Applied rewrites59.8%
Taylor expanded in C around inf
Applied rewrites42.0%
if -8.0000000000000007e-195 < B < 8.7999999999999995e-207Initial program 47.2%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval61.9
Applied rewrites61.9%
if 8.7999999999999995e-207 < B Initial program 47.4%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6468.4
Applied rewrites68.4%
Taylor expanded in A around 0
Applied rewrites58.3%
Final simplification57.6%
(FPCore (A B C)
:precision binary64
(if (<= C -9.2e-101)
(* (/ (atan (- (/ C B) 1.0)) (PI)) 180.0)
(if (<= C 3.6e+208)
(* (/ (atan (- -1.0 (/ A B))) (PI)) 180.0)
(* (/ (atan 0.0) (PI)) 180.0))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9.2 \cdot 10^{-101}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;C \leq 3.6 \cdot 10^{+208}:\\
\;\;\;\;\frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} 0}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if C < -9.1999999999999998e-101Initial program 73.2%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6478.2
Applied rewrites78.2%
Taylor expanded in A around 0
Applied rewrites77.1%
if -9.1999999999999998e-101 < C < 3.60000000000000003e208Initial program 47.3%
Taylor expanded in C around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
lower-hypot.f64N/A
mul-1-negN/A
lower-neg.f6472.9
Applied rewrites72.9%
Taylor expanded in B around inf
Applied rewrites45.9%
if 3.60000000000000003e208 < C Initial program 5.5%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval55.9
Applied rewrites55.9%
Final simplification57.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.9e+75)
(* (/ (atan 1.0) (PI)) 180.0)
(if (<= B -8e-195)
(* (/ (atan (/ C B)) (PI)) 180.0)
(if (<= B 2e-51)
(* (/ (atan 0.0) (PI)) 180.0)
(* (/ (atan -1.0) (PI)) 180.0)))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.9 \cdot 10^{+75}:\\
\;\;\;\;\frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;B \leq -8 \cdot 10^{-195}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B}\right)}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-51}:\\
\;\;\;\;\frac{\tan^{-1} 0}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if B < -1.9000000000000001e75Initial program 46.8%
Taylor expanded in B around -inf
Applied rewrites67.9%
if -1.9000000000000001e75 < B < -8.0000000000000007e-195Initial program 69.4%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6459.8
Applied rewrites59.8%
Taylor expanded in C around inf
Applied rewrites42.0%
if -8.0000000000000007e-195 < B < 2e-51Initial program 47.0%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval40.7
Applied rewrites40.7%
if 2e-51 < B Initial program 47.8%
Taylor expanded in B around inf
Applied rewrites63.0%
Final simplification52.9%
(FPCore (A B C)
:precision binary64
(if (<= B -4.8e-78)
(* (/ (atan 1.0) (PI)) 180.0)
(if (<= B 2e-51)
(* (/ (atan 0.0) (PI)) 180.0)
(* (/ (atan -1.0) (PI)) 180.0))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.8 \cdot 10^{-78}:\\
\;\;\;\;\frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-51}:\\
\;\;\;\;\frac{\tan^{-1} 0}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if B < -4.79999999999999999e-78Initial program 56.8%
Taylor expanded in B around -inf
Applied rewrites54.0%
if -4.79999999999999999e-78 < B < 2e-51Initial program 50.1%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval35.6
Applied rewrites35.6%
if 2e-51 < B Initial program 47.8%
Taylor expanded in B around inf
Applied rewrites63.0%
Final simplification49.2%
(FPCore (A B C) :precision binary64 (if (<= B 2e-51) (* (/ (atan 0.0) (PI)) 180.0) (* (/ (atan -1.0) (PI)) 180.0)))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2 \cdot 10^{-51}:\\
\;\;\;\;\frac{\tan^{-1} 0}{\mathsf{PI}\left(\right)} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)} \cdot 180\\
\end{array}
\end{array}
if B < 2e-51Initial program 53.1%
Taylor expanded in C around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
div0N/A
metadata-eval21.2
Applied rewrites21.2%
if 2e-51 < B Initial program 47.8%
Taylor expanded in B around inf
Applied rewrites63.0%
Final simplification33.0%
(FPCore (A B C) :precision binary64 (* (/ (atan -1.0) (PI)) 180.0))
\begin{array}{l}
\\
\frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)} \cdot 180
\end{array}
Initial program 51.6%
Taylor expanded in B around inf
Applied rewrites22.1%
Final simplification22.1%
herbie shell --seed 2024277
(FPCore (A B C)
:name "ABCF->ab-angle angle"
:precision binary64
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) (PI))))