
(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}
Herbie found 14 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
(if (<= B -1.32e+154)
(* 180.0 (/ (atan 1.0) (PI)))
(if (<= B 2.05e+133)
(*
180.0
(/
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(PI)))
(* 180.0 (/ (atan (* (/ 1.0 B) (- C B))) (PI))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{+133}:\\
\;\;\;\;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)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - B\right)\right)}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if B < -1.31999999999999998e154Initial program 27.0%
Taylor expanded in B around -inf
Applied rewrites80.1%
if -1.31999999999999998e154 < B < 2.05000000000000002e133Initial program 65.3%
if 2.05000000000000002e133 < B Initial program 29.8%
Taylor expanded in B around inf
Applied rewrites96.0%
Taylor expanded in A around 0
Applied rewrites96.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(*
180.0
(/
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(PI)))))
(if (<= t_0 -40.0)
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) (PI)))
(if (<= t_0 2e-6)
(* 180.0 (/ (atan (* (/ (* (+ (/ C A) 1.0) B) A) 0.5)) (PI)))
(*
180.0
(/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (fma C C (* B B)))))) (PI)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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)}\\
\mathbf{if}\;t\_0 \leq -40:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-6}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{C}{A} + 1\right) \cdot B}{A} \cdot 0.5\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}\right)\right)}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -40Initial program 63.4%
Taylor expanded in B around inf
Applied rewrites81.3%
if -40 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < 1.99999999999999991e-6Initial program 17.1%
Taylor expanded in A around -inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-lft-outN/A
lower-*.f64N/A
lower-+.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6465.0
Applied rewrites65.0%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-/.f6465.1
Applied rewrites65.1%
if 1.99999999999999991e-6 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) Initial program 60.4%
Taylor expanded in A around 0
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6460.1
Applied rewrites60.1%
(FPCore (A B C)
:precision binary64
(if (<= A -3.1e-12)
(* 180.0 (/ (atan (* (/ (* (+ (/ C A) 1.0) B) A) 0.5)) (PI)))
(if (<= A 1.95e-231)
(* 180.0 (/ (atan (* (/ 1.0 B) (- C (sqrt (fma C C (* B B)))))) (PI)))
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) (PI))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.1 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{C}{A} + 1\right) \cdot B}{A} \cdot 0.5\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;A \leq 1.95 \cdot 10^{-231}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \sqrt{\mathsf{fma}\left(C, C, B \cdot B\right)}\right)\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if A < -3.1000000000000001e-12Initial program 27.8%
Taylor expanded in A around -inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-lft-outN/A
lower-*.f64N/A
lower-+.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6470.4
Applied rewrites70.4%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-/.f6470.5
Applied rewrites70.5%
if -3.1000000000000001e-12 < A < 1.9499999999999999e-231Initial program 58.7%
Taylor expanded in A around 0
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.6
Applied rewrites58.6%
Taylor expanded in A around 0
Applied rewrites58.6%
if 1.9499999999999999e-231 < A Initial program 71.2%
Taylor expanded in B around inf
Applied rewrites77.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.6e-34)
(* 180.0 (/ (atan 1.0) (PI)))
(if (<= B 8e-265)
(* 180.0 (/ (atan (* (/ A B) -2.0)) (PI)))
(if (<= B 7.5e-176)
(* 180.0 (/ (atan (* (/ B A) 0.5)) (PI)))
(* 180.0 (/ (atan -1.0) (PI)))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.6 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-265}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{-176}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if B < -1.60000000000000001e-34Initial program 50.0%
Taylor expanded in B around -inf
Applied rewrites57.0%
if -1.60000000000000001e-34 < B < 7.99999999999999988e-265Initial program 62.8%
Taylor expanded in A around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6443.7
Applied rewrites43.7%
if 7.99999999999999988e-265 < B < 7.5e-176Initial program 49.7%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6458.3
Applied rewrites58.3%
if 7.5e-176 < B Initial program 59.1%
Taylor expanded in B around inf
Applied rewrites59.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.6e-34)
(* 180.0 (/ (atan 1.0) (PI)))
(if (<= B 6.6e-205)
(* 180.0 (/ (atan (* (/ A B) -2.0)) (PI)))
(if (<= B 1.36e-139)
(* 180.0 (/ (atan (* (/ B C) -0.5)) (PI)))
(* 180.0 (/ (atan -1.0) (PI)))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.6 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;B \leq 6.6 \cdot 10^{-205}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;B \leq 1.36 \cdot 10^{-139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if B < -1.60000000000000001e-34Initial program 50.0%
Taylor expanded in B around -inf
Applied rewrites57.0%
if -1.60000000000000001e-34 < B < 6.5999999999999998e-205Initial program 63.0%
Taylor expanded in A around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6443.6
Applied rewrites43.6%
if 6.5999999999999998e-205 < B < 1.36000000000000003e-139Initial program 33.1%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6456.5
Applied rewrites56.5%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6456.5
Applied rewrites56.5%
if 1.36000000000000003e-139 < B Initial program 59.9%
Taylor expanded in B around inf
Applied rewrites60.9%
(FPCore (A B C) :precision binary64 (if (<= C 4500000.0) (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) (PI))) (/ (* 180.0 (atan (fma (/ B C) -0.5 (/ 0.0 B)))) (PI))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4500000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\mathsf{fma}\left(\frac{B}{C}, -0.5, \frac{0}{B}\right)\right)}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if C < 4.5e6Initial program 69.3%
Taylor expanded in B around inf
Applied rewrites67.2%
if 4.5e6 < C Initial program 18.6%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6465.6
Applied rewrites65.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites65.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.45e-106)
(* 180.0 (/ (atan (* (/ 1.0 B) (- C B))) (PI)))
(if (<= C 4500000.0)
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- A) B))) (PI)))
(* 180.0 (/ (atan (* (/ B C) -0.5)) (PI))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.45 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - B\right)\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;C \leq 4500000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(-A\right) - B\right)\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if C < -1.45e-106Initial program 76.7%
Taylor expanded in B around inf
Applied rewrites81.7%
Taylor expanded in A around 0
Applied rewrites81.2%
if -1.45e-106 < C < 4.5e6Initial program 63.8%
Taylor expanded in B around inf
Applied rewrites56.3%
Taylor expanded in A around inf
mul-1-negN/A
lower-neg.f6455.8
Applied rewrites55.8%
if 4.5e6 < C Initial program 18.6%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6465.6
Applied rewrites65.6%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6465.6
Applied rewrites65.6%
(FPCore (A B C)
:precision binary64
(if (<= C -9.2e-83)
(* 180.0 (/ (atan (* (/ C B) 2.0)) (PI)))
(if (<= C 1600000.0)
(* 180.0 (/ (atan -1.0) (PI)))
(* 180.0 (/ (atan (* (/ B C) -0.5)) (PI))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9.2 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;C \leq 1600000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if C < -9.19999999999999959e-83Initial program 79.8%
Taylor expanded in C around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6471.7
Applied rewrites71.7%
if -9.19999999999999959e-83 < C < 1.6e6Initial program 62.8%
Taylor expanded in B around inf
Applied rewrites38.4%
if 1.6e6 < C Initial program 18.6%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6465.6
Applied rewrites65.6%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6465.6
Applied rewrites65.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.35e-73)
(* 180.0 (/ (atan 1.0) (PI)))
(if (<= B 1.36e-139)
(* 180.0 (/ (atan (* (/ B C) -0.5)) (PI)))
(* 180.0 (/ (atan -1.0) (PI))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.35 \cdot 10^{-73}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;B \leq 1.36 \cdot 10^{-139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if B < -1.34999999999999997e-73Initial program 53.9%
Taylor expanded in B around -inf
Applied rewrites52.8%
if -1.34999999999999997e-73 < B < 1.36000000000000003e-139Initial program 56.2%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6435.0
Applied rewrites35.0%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6435.0
Applied rewrites35.0%
if 1.36000000000000003e-139 < B Initial program 59.9%
Taylor expanded in B around inf
Applied rewrites60.9%
(FPCore (A B C) :precision binary64 (if (<= C 4500000.0) (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) (PI))) (* 180.0 (/ (atan (* (/ B C) -0.5)) (PI)))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4500000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if C < 4.5e6Initial program 69.3%
Taylor expanded in B around inf
Applied rewrites67.2%
if 4.5e6 < C Initial program 18.6%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6465.6
Applied rewrites65.6%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6465.6
Applied rewrites65.6%
(FPCore (A B C) :precision binary64 (if (<= C 1600000.0) (* 180.0 (/ (atan (* (/ 1.0 B) (- C B))) (PI))) (* 180.0 (/ (atan (* (/ B C) -0.5)) (PI)))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1600000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - B\right)\right)}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if C < 1.6e6Initial program 69.3%
Taylor expanded in B around inf
Applied rewrites67.2%
Taylor expanded in A around 0
Applied rewrites56.5%
if 1.6e6 < C Initial program 18.6%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6465.6
Applied rewrites65.6%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6465.6
Applied rewrites65.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.7e-140)
(* 180.0 (/ (atan 1.0) (PI)))
(if (<= B 6.1e-176)
(/ (* 180.0 (atan 0.0)) (PI))
(* 180.0 (/ (atan -1.0) (PI))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.7 \cdot 10^{-140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)}\\
\mathbf{elif}\;B \leq 6.1 \cdot 10^{-176}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if B < -1.70000000000000004e-140Initial program 55.2%
Taylor expanded in B around -inf
Applied rewrites47.2%
if -1.70000000000000004e-140 < B < 6.1000000000000003e-176Initial program 55.9%
Taylor expanded in B around inf
Applied rewrites49.9%
Taylor expanded in C around inf
associate-*r/N/A
*-commutativeN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-/.f64N/A
mul0-lft32.1
Applied rewrites32.1%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6432.1
lift-/.f64N/A
div032.1
Applied rewrites32.1%
if 6.1000000000000003e-176 < B Initial program 59.1%
Taylor expanded in B around inf
Applied rewrites59.8%
(FPCore (A B C) :precision binary64 (if (<= B -1.05e-304) (* 180.0 (/ (atan 1.0) (PI))) (* 180.0 (/ (atan -1.0) (PI)))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.05 \cdot 10^{-304}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\mathsf{PI}\left(\right)}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)}\\
\end{array}
\end{array}
if B < -1.05000000000000004e-304Initial program 55.2%
Taylor expanded in B around -inf
Applied rewrites38.6%
if -1.05000000000000004e-304 < B Initial program 58.4%
Taylor expanded in B around inf
Applied rewrites47.5%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) (PI))))
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\mathsf{PI}\left(\right)}
\end{array}
Initial program 56.9%
Taylor expanded in B around inf
Applied rewrites25.6%
herbie shell --seed 2025076
(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))))