
(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)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\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)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 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)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\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)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(t_1 (cbrt (/ (- (- C A) (hypot (- A C) B)) B))))
(if (or (<= t_0 -2e-42) (not (<= t_0 0.0)))
(* 180.0 (/ (atan (* t_1 (pow t_1 2.0))) PI))
(*
180.0
(/ (atan (* 0.5 (fma B (/ 1.0 A) (/ (* B C) (pow A 2.0))))) PI)))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double t_1 = cbrt((((C - A) - hypot((A - C), B)) / B));
double tmp;
if ((t_0 <= -2e-42) || !(t_0 <= 0.0)) {
tmp = 180.0 * (atan((t_1 * pow(t_1, 2.0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * fma(B, (1.0 / A), ((B * C) / pow(A, 2.0))))) / ((double) M_PI));
}
return tmp;
}
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) t_1 = cbrt(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) tmp = 0.0 if ((t_0 <= -2e-42) || !(t_0 <= 0.0)) tmp = Float64(180.0 * Float64(atan(Float64(t_1 * (t_1 ^ 2.0))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * fma(B, Float64(1.0 / A), Float64(Float64(B * C) / (A ^ 2.0))))) / pi)); end return tmp end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], 1/3], $MachinePrecision]}, If[Or[LessEqual[t$95$0, -2e-42], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(t$95$1 * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B * N[(1.0 / A), $MachinePrecision] + N[(N[(B * C), $MachinePrecision] / N[Power[A, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := \sqrt[3]{\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}}\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{-42} \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_1 \cdot {t_1}^{2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(B, \frac{1}{A}, \frac{B \cdot C}{{A}^{2}}\right)\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -2.00000000000000008e-42 or -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 62.7%
associate-*l/62.8%
*-un-lft-identity62.8%
div-sub62.5%
unpow262.5%
unpow262.5%
hypot-def82.6%
Applied egg-rr82.6%
add-cube-cbrt82.6%
pow282.6%
sub-div82.6%
sub-div90.2%
Applied egg-rr90.2%
if -2.00000000000000008e-42 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0Initial program 12.0%
Taylor expanded in A around -inf 58.5%
distribute-lft-out58.5%
associate-/l*58.4%
Simplified58.4%
div-inv58.4%
fma-def58.4%
associate-/r/58.6%
Applied egg-rr58.6%
associate-*l/58.5%
Simplified58.5%
Final simplification86.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_0 -2e-42)
(*
180.0
(/
(atan
(*
(pow (cbrt (/ (- (- C A) (hypot (- A C) B)) B)) 2.0)
(cbrt (/ (- C (hypot B C)) B))))
PI))
(if (<= t_0 0.0)
(*
180.0
(/ (atan (* 0.5 (fma B (/ 1.0 A) (/ (* B C) (pow A 2.0))))) PI))
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_0 <= -2e-42) {
tmp = 180.0 * (atan((pow(cbrt((((C - A) - hypot((A - C), B)) / B)), 2.0) * cbrt(((C - hypot(B, C)) / B)))) / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan((0.5 * fma(B, (1.0 / A), ((B * C) / pow(A, 2.0))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_0 <= -2e-42) tmp = Float64(180.0 * Float64(atan(Float64((cbrt(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) ^ 2.0) * cbrt(Float64(Float64(C - hypot(B, C)) / B)))) / pi)); elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * fma(B, Float64(1.0 / A), Float64(Float64(B * C) / (A ^ 2.0))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-42], N[(180.0 * N[(N[ArcTan[N[(N[Power[N[Power[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B * N[(1.0 / A), $MachinePrecision] + N[(N[(B * C), $MachinePrecision] / N[Power[A, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{-42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left({\left(\sqrt[3]{\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}}\right)}^{2} \cdot \sqrt[3]{\frac{C - \mathsf{hypot}\left(B, C\right)}{B}}\right)}{\pi}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \mathsf{fma}\left(B, \frac{1}{A}, \frac{B \cdot C}{{A}^{2}}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -2.00000000000000008e-42Initial program 59.4%
associate-*l/59.4%
*-un-lft-identity59.4%
div-sub59.1%
unpow259.1%
unpow259.1%
hypot-def80.2%
Applied egg-rr80.2%
add-cube-cbrt80.1%
pow280.1%
sub-div80.1%
sub-div90.3%
Applied egg-rr90.3%
Taylor expanded in A around 0 2.5%
unpow1/360.6%
unpow260.6%
unpow260.6%
hypot-def86.8%
Simplified86.8%
if -2.00000000000000008e-42 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0Initial program 12.0%
Taylor expanded in A around -inf 58.5%
distribute-lft-out58.5%
associate-/l*58.4%
Simplified58.4%
div-inv58.4%
fma-def58.4%
associate-/r/58.6%
Applied egg-rr58.6%
associate-*l/58.5%
Simplified58.5%
if -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 65.9%
Simplified87.5%
Final simplification83.5%
(FPCore (A B C)
:precision binary64
(if (<= A -4e+146)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.45e+36)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -3.2e-30)
(* 180.0 (/ (atan (* 0.5 (* B (+ (/ 1.0 A) (/ C (pow A 2.0)))))) PI))
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4e+146) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.45e+36) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -3.2e-30) {
tmp = 180.0 * (atan((0.5 * (B * ((1.0 / A) + (C / pow(A, 2.0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4e+146) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.45e+36) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -3.2e-30) {
tmp = 180.0 * (Math.atan((0.5 * (B * ((1.0 / A) + (C / Math.pow(A, 2.0)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4e+146: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.45e+36: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -3.2e-30: tmp = 180.0 * (math.atan((0.5 * (B * ((1.0 / A) + (C / math.pow(A, 2.0)))))) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4e+146) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.45e+36) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -3.2e-30) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B * Float64(Float64(1.0 / A) + Float64(C / (A ^ 2.0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4e+146) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.45e+36) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -3.2e-30) tmp = 180.0 * (atan((0.5 * (B * ((1.0 / A) + (C / (A ^ 2.0)))))) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4e+146], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.45e+36], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.2e-30], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B * N[(N[(1.0 / A), $MachinePrecision] + N[(C / N[Power[A, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{+146}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{+36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.2 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \left(\frac{1}{A} + \frac{C}{{A}^{2}}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.99999999999999973e146Initial program 9.9%
Taylor expanded in A around -inf 81.1%
associate-*r/81.1%
Simplified81.1%
if -3.99999999999999973e146 < A < -1.45e36Initial program 29.1%
Taylor expanded in A around 0 27.7%
unpow227.7%
unpow227.7%
hypot-def67.1%
Simplified67.1%
if -1.45e36 < A < -3.2e-30Initial program 20.5%
Taylor expanded in A around -inf 71.4%
distribute-lft-out71.4%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in B around 0 71.2%
if -3.2e-30 < A Initial program 68.4%
Simplified87.5%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -8.2e+147)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.3e+34)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -2.95e-30)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (/ B (/ (pow A 2.0) C))))) PI))
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e+147) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.3e+34) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -2.95e-30) {
tmp = 180.0 * (atan((0.5 * ((B / A) + (B / (pow(A, 2.0) / C))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e+147) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.3e+34) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -2.95e-30) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + (B / (Math.pow(A, 2.0) / C))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.2e+147: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.3e+34: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -2.95e-30: tmp = 180.0 * (math.atan((0.5 * ((B / A) + (B / (math.pow(A, 2.0) / C))))) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.2e+147) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.3e+34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -2.95e-30) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(B / Float64((A ^ 2.0) / C))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.2e+147) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.3e+34) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -2.95e-30) tmp = 180.0 * (atan((0.5 * ((B / A) + (B / ((A ^ 2.0) / C))))) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.2e+147], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.3e+34], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.95e-30], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(B / N[(N[Power[A, 2.0], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.2 \cdot 10^{+147}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{+34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.95 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{{A}^{2}}{C}}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.19999999999999932e147Initial program 9.9%
Taylor expanded in A around -inf 81.1%
associate-*r/81.1%
Simplified81.1%
if -8.19999999999999932e147 < A < -1.29999999999999999e34Initial program 29.1%
Taylor expanded in A around 0 27.7%
unpow227.7%
unpow227.7%
hypot-def67.1%
Simplified67.1%
if -1.29999999999999999e34 < A < -2.9499999999999999e-30Initial program 20.5%
Taylor expanded in A around -inf 71.4%
distribute-lft-out71.4%
associate-/l*71.4%
Simplified71.4%
if -2.9499999999999999e-30 < A Initial program 68.4%
Simplified87.5%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -1.7e+148)
t_1
(if (<= A -4.8e+36)
t_0
(if (<= A -3.2e-30)
t_1
(if (<= A 3.3e+47)
t_0
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -1.7e+148) {
tmp = t_1;
} else if (A <= -4.8e+36) {
tmp = t_0;
} else if (A <= -3.2e-30) {
tmp = t_1;
} else if (A <= 3.3e+47) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -1.7e+148) {
tmp = t_1;
} else if (A <= -4.8e+36) {
tmp = t_0;
} else if (A <= -3.2e-30) {
tmp = t_1;
} else if (A <= 3.3e+47) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -1.7e+148: tmp = t_1 elif A <= -4.8e+36: tmp = t_0 elif A <= -3.2e-30: tmp = t_1 elif A <= 3.3e+47: tmp = t_0 else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -1.7e+148) tmp = t_1; elseif (A <= -4.8e+36) tmp = t_0; elseif (A <= -3.2e-30) tmp = t_1; elseif (A <= 3.3e+47) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -1.7e+148) tmp = t_1; elseif (A <= -4.8e+36) tmp = t_0; elseif (A <= -3.2e-30) tmp = t_1; elseif (A <= 3.3e+47) tmp = t_0; else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.7e+148], t$95$1, If[LessEqual[A, -4.8e+36], t$95$0, If[LessEqual[A, -3.2e-30], t$95$1, If[LessEqual[A, 3.3e+47], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.7 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -4.8 \cdot 10^{+36}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.2 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 3.3 \cdot 10^{+47}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.7000000000000001e148 or -4.79999999999999985e36 < A < -3.2e-30Initial program 13.4%
Taylor expanded in A around -inf 76.5%
associate-*r/76.5%
Simplified76.5%
if -1.7000000000000001e148 < A < -4.79999999999999985e36 or -3.2e-30 < A < 3.2999999999999999e47Initial program 60.2%
Taylor expanded in A around 0 56.7%
unpow256.7%
unpow256.7%
hypot-def79.9%
Simplified79.9%
if 3.2999999999999999e47 < A Initial program 86.6%
Simplified97.7%
Taylor expanded in B around inf 89.3%
+-commutative89.3%
Simplified89.3%
Final simplification80.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -1.05e+147)
t_0
(if (<= A -1.35e+35)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -1.42e-30)
t_0
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -1.05e+147) {
tmp = t_0;
} else if (A <= -1.35e+35) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -1.42e-30) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -1.05e+147) {
tmp = t_0;
} else if (A <= -1.35e+35) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -1.42e-30) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -1.05e+147: tmp = t_0 elif A <= -1.35e+35: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -1.42e-30: tmp = t_0 else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -1.05e+147) tmp = t_0; elseif (A <= -1.35e+35) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -1.42e-30) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -1.05e+147) tmp = t_0; elseif (A <= -1.35e+35) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -1.42e-30) tmp = t_0; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.05e+147], t$95$0, If[LessEqual[A, -1.35e+35], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.42e-30], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.05 \cdot 10^{+147}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.35 \cdot 10^{+35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.42 \cdot 10^{-30}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.05000000000000003e147 or -1.35000000000000001e35 < A < -1.42e-30Initial program 13.4%
Taylor expanded in A around -inf 76.5%
associate-*r/76.5%
Simplified76.5%
if -1.05000000000000003e147 < A < -1.35000000000000001e35Initial program 29.1%
Taylor expanded in A around 0 27.7%
unpow227.7%
unpow227.7%
hypot-def67.1%
Simplified67.1%
if -1.42e-30 < A Initial program 68.4%
Simplified87.5%
Final simplification84.3%
(FPCore (A B C)
:precision binary64
(if (<= B -3e-32)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2e-261)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 1.6e-267)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 3.1e-211)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 6.8e-86)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3e-32) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2e-261) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 1.6e-267) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 3.1e-211) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 6.8e-86) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3e-32) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2e-261) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 1.6e-267) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 3.1e-211) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 6.8e-86) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3e-32: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2e-261: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 1.6e-267: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 3.1e-211: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 6.8e-86: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3e-32) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2e-261) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 1.6e-267) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 3.1e-211) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 6.8e-86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3e-32) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2e-261) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 1.6e-267) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 3.1e-211) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 6.8e-86) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3e-32], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-261], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-267], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-211], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e-86], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-261}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-267}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-211}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3e-32Initial program 51.6%
Taylor expanded in B around -inf 67.4%
if -3e-32 < B < -1.99999999999999997e-261Initial program 75.6%
Taylor expanded in A around inf 50.7%
if -1.99999999999999997e-261 < B < 1.59999999999999993e-267Initial program 43.9%
Taylor expanded in C around inf 21.2%
Taylor expanded in B around inf 51.4%
if 1.59999999999999993e-267 < B < 3.09999999999999995e-211Initial program 71.5%
associate--l-71.2%
add-cube-cbrt71.2%
+-commutative71.2%
unpow271.2%
unpow271.2%
hypot-udef71.2%
fma-neg70.9%
*-un-lft-identity70.9%
*-commutative70.9%
pow270.9%
*-commutative70.9%
*-un-lft-identity70.9%
hypot-udef70.9%
unpow270.9%
unpow270.9%
+-commutative70.9%
unpow270.9%
unpow270.9%
Applied egg-rr70.9%
Taylor expanded in C around -inf 70.8%
if 3.09999999999999995e-211 < B < 6.8000000000000001e-86Initial program 42.0%
Taylor expanded in A around -inf 47.0%
associate-*r/47.0%
Simplified47.0%
if 6.8000000000000001e-86 < B Initial program 55.6%
Taylor expanded in B around inf 66.7%
Final simplification60.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.55e-250)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(if (<= B 9.2e-269)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 1.95e-209)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 7e-86)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.55e-250) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else if (B <= 9.2e-269) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 1.95e-209) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 7e-86) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.55e-250) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else if (B <= 9.2e-269) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 1.95e-209) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 7e-86) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.55e-250: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) elif B <= 9.2e-269: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 1.95e-209: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 7e-86: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.55e-250) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); elseif (B <= 9.2e-269) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 1.95e-209) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 7e-86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.55e-250) tmp = 180.0 * (atan(((B - A) / B)) / pi); elseif (B <= 9.2e-269) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 1.95e-209) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 7e-86) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.55e-250], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.2e-269], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.95e-209], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-86], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.55 \cdot 10^{-250}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-269}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-209}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.5500000000000001e-250Initial program 61.2%
Simplified81.4%
Taylor expanded in B around -inf 78.6%
neg-mul-178.6%
unsub-neg78.6%
Simplified78.6%
Taylor expanded in C around 0 67.2%
if -1.5500000000000001e-250 < B < 9.1999999999999999e-269Initial program 43.9%
Taylor expanded in C around inf 21.2%
Taylor expanded in B around inf 51.4%
if 9.1999999999999999e-269 < B < 1.95e-209Initial program 71.5%
associate--l-71.2%
add-cube-cbrt71.2%
+-commutative71.2%
unpow271.2%
unpow271.2%
hypot-udef71.2%
fma-neg70.9%
*-un-lft-identity70.9%
*-commutative70.9%
pow270.9%
*-commutative70.9%
*-un-lft-identity70.9%
hypot-udef70.9%
unpow270.9%
unpow270.9%
+-commutative70.9%
unpow270.9%
unpow270.9%
Applied egg-rr70.9%
Taylor expanded in C around -inf 70.8%
if 1.95e-209 < B < 7.00000000000000041e-86Initial program 42.0%
Taylor expanded in A around -inf 47.0%
associate-*r/47.0%
Simplified47.0%
if 7.00000000000000041e-86 < B Initial program 55.6%
Taylor expanded in B around inf 66.7%
Final simplification63.5%
(FPCore (A B C)
:precision binary64
(if (<= B -6.8e-254)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(if (<= B 2.05e-268)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(if (<= B 2.2e-208)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 6.8e-86)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-254) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else if (B <= 2.05e-268) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else if (B <= 2.2e-208) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 6.8e-86) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-254) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else if (B <= 2.05e-268) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else if (B <= 2.2e-208) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 6.8e-86) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.8e-254: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) elif B <= 2.05e-268: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi elif B <= 2.2e-208: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 6.8e-86: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.8e-254) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); elseif (B <= 2.05e-268) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); elseif (B <= 2.2e-208) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 6.8e-86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.8e-254) tmp = 180.0 * (atan(((B - A) / B)) / pi); elseif (B <= 2.05e-268) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; elseif (B <= 2.2e-208) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 6.8e-86) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.8e-254], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.05e-268], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.2e-208], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e-86], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.8 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-268}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.79999999999999986e-254Initial program 61.2%
Simplified81.4%
Taylor expanded in B around -inf 78.6%
neg-mul-178.6%
unsub-neg78.6%
Simplified78.6%
Taylor expanded in C around 0 67.2%
if -6.79999999999999986e-254 < B < 2.0499999999999999e-268Initial program 43.9%
Taylor expanded in C around inf 21.2%
Taylor expanded in B around inf 51.4%
associate-*r/51.7%
Applied egg-rr51.7%
if 2.0499999999999999e-268 < B < 2.2e-208Initial program 71.5%
associate--l-71.2%
add-cube-cbrt71.2%
+-commutative71.2%
unpow271.2%
unpow271.2%
hypot-udef71.2%
fma-neg70.9%
*-un-lft-identity70.9%
*-commutative70.9%
pow270.9%
*-commutative70.9%
*-un-lft-identity70.9%
hypot-udef70.9%
unpow270.9%
unpow270.9%
+-commutative70.9%
unpow270.9%
unpow270.9%
Applied egg-rr70.9%
Taylor expanded in C around -inf 70.8%
if 2.2e-208 < B < 6.8000000000000001e-86Initial program 42.0%
Taylor expanded in A around -inf 47.0%
associate-*r/47.0%
Simplified47.0%
if 6.8000000000000001e-86 < B Initial program 55.6%
Taylor expanded in B around inf 66.7%
Final simplification63.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -3.8e-16)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.8e-243)
t_0
(if (<= B 3.3e-267)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 2e-67) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -3.8e-16) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.8e-243) {
tmp = t_0;
} else if (B <= 3.3e-267) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 2e-67) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -3.8e-16) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.8e-243) {
tmp = t_0;
} else if (B <= 3.3e-267) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 2e-67) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -3.8e-16: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.8e-243: tmp = t_0 elif B <= 3.3e-267: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 2e-67: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -3.8e-16) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.8e-243) tmp = t_0; elseif (B <= 3.3e-267) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 2e-67) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -3.8e-16) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.8e-243) tmp = t_0; elseif (B <= 3.3e-267) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 2e-67) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.8e-16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.8e-243], t$95$0, If[LessEqual[B, 3.3e-267], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e-67], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.8 \cdot 10^{-16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.8 \cdot 10^{-243}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 3.3 \cdot 10^{-267}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-67}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.80000000000000012e-16Initial program 50.9%
Taylor expanded in B around -inf 71.6%
if -3.80000000000000012e-16 < B < -5.79999999999999953e-243 or 3.30000000000000004e-267 < B < 1.99999999999999989e-67Initial program 62.9%
associate--l-62.0%
add-cube-cbrt62.0%
+-commutative62.0%
unpow262.0%
unpow262.0%
hypot-udef64.0%
fma-neg62.8%
*-un-lft-identity62.8%
*-commutative62.8%
pow262.8%
*-commutative62.8%
*-un-lft-identity62.8%
hypot-udef61.8%
unpow261.8%
unpow261.8%
+-commutative61.8%
unpow261.8%
unpow261.8%
Applied egg-rr62.8%
Taylor expanded in C around -inf 43.9%
if -5.79999999999999953e-243 < B < 3.30000000000000004e-267Initial program 46.9%
Taylor expanded in C around inf 20.0%
Taylor expanded in B around 0 46.9%
distribute-rgt1-in46.9%
metadata-eval46.9%
mul0-lft46.9%
div046.9%
metadata-eval46.9%
Simplified46.9%
if 1.99999999999999989e-67 < B Initial program 54.5%
Taylor expanded in B around inf 68.4%
Final simplification58.2%
(FPCore (A B C)
:precision binary64
(if (<= B -3e-32)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.2e-253)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 8.2e-268)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 8e-67)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3e-32) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.2e-253) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 8.2e-268) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 8e-67) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3e-32) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.2e-253) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 8.2e-268) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 8e-67) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3e-32: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.2e-253: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 8.2e-268: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 8e-67: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3e-32) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.2e-253) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 8.2e-268) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 8e-67) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3e-32) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.2e-253) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 8.2e-268) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 8e-67) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3e-32], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.2e-253], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.2e-268], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8e-67], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.2 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.2 \cdot 10^{-268}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3e-32Initial program 51.6%
Taylor expanded in B around -inf 67.4%
if -3e-32 < B < -5.2e-253Initial program 75.6%
Taylor expanded in A around inf 50.7%
if -5.2e-253 < B < 8.1999999999999998e-268Initial program 43.9%
Taylor expanded in C around inf 21.2%
Taylor expanded in B around 0 49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
div049.3%
metadata-eval49.3%
Simplified49.3%
if 8.1999999999999998e-268 < B < 7.99999999999999954e-67Initial program 51.2%
associate--l-49.3%
add-cube-cbrt49.3%
+-commutative49.3%
unpow249.3%
unpow249.3%
hypot-udef53.4%
fma-neg51.0%
*-un-lft-identity51.0%
*-commutative51.0%
pow251.0%
*-commutative51.0%
*-un-lft-identity51.0%
hypot-udef49.0%
unpow249.0%
unpow249.0%
+-commutative49.0%
unpow249.0%
unpow249.0%
Applied egg-rr51.0%
Taylor expanded in C around -inf 42.7%
if 7.99999999999999954e-67 < B Initial program 54.5%
Taylor expanded in B around inf 68.4%
Final simplification58.8%
(FPCore (A B C)
:precision binary64
(if (<= B -4e-33)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.3e-248)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 7.5e-264)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 7.6e-67)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4e-33) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.3e-248) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 7.5e-264) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 7.6e-67) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4e-33) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.3e-248) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 7.5e-264) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 7.6e-67) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4e-33: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.3e-248: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 7.5e-264: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 7.6e-67: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4e-33) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.3e-248) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 7.5e-264) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 7.6e-67) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4e-33) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.3e-248) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 7.5e-264) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 7.6e-67) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4e-33], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-248], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.5e-264], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.6e-67], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4 \cdot 10^{-33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-248}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{-264}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.0000000000000002e-33Initial program 51.6%
Taylor expanded in B around -inf 67.4%
if -4.0000000000000002e-33 < B < -1.30000000000000003e-248Initial program 75.6%
Taylor expanded in A around inf 50.7%
if -1.30000000000000003e-248 < B < 7.5000000000000001e-264Initial program 43.9%
Taylor expanded in C around inf 21.2%
Taylor expanded in B around inf 51.4%
if 7.5000000000000001e-264 < B < 7.59999999999999976e-67Initial program 51.2%
associate--l-49.3%
add-cube-cbrt49.3%
+-commutative49.3%
unpow249.3%
unpow249.3%
hypot-udef53.4%
fma-neg51.0%
*-un-lft-identity51.0%
*-commutative51.0%
pow251.0%
*-commutative51.0%
*-un-lft-identity51.0%
hypot-udef49.0%
unpow249.0%
unpow249.0%
+-commutative49.0%
unpow249.0%
unpow249.0%
Applied egg-rr51.0%
Taylor expanded in C around -inf 42.7%
if 7.59999999999999976e-67 < B Initial program 54.5%
Taylor expanded in B around inf 68.4%
Final simplification59.0%
(FPCore (A B C)
:precision binary64
(if (<= B -9.5e-17)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(if (or (<= B 4.6e-211) (not (<= B 5.7e-192)))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9.5e-17) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else if ((B <= 4.6e-211) || !(B <= 5.7e-192)) {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -9.5e-17) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else if ((B <= 4.6e-211) || !(B <= 5.7e-192)) {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9.5e-17: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) elif (B <= 4.6e-211) or not (B <= 5.7e-192): tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -9.5e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); elseif ((B <= 4.6e-211) || !(B <= 5.7e-192)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -9.5e-17) tmp = 180.0 * (atan(((B - A) / B)) / pi); elseif ((B <= 4.6e-211) || ~((B <= 5.7e-192))) tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); else tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9.5e-17], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 4.6e-211], N[Not[LessEqual[B, 5.7e-192]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -9.5 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-211} \lor \neg \left(B \leq 5.7 \cdot 10^{-192}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\end{array}
\end{array}
if B < -9.50000000000000029e-17Initial program 50.9%
Simplified84.0%
Taylor expanded in B around -inf 82.5%
neg-mul-182.5%
unsub-neg82.5%
Simplified82.5%
Taylor expanded in C around 0 77.6%
if -9.50000000000000029e-17 < B < 4.59999999999999976e-211 or 5.7000000000000002e-192 < B Initial program 59.4%
Simplified75.8%
Taylor expanded in B around inf 68.4%
+-commutative68.4%
Simplified68.4%
if 4.59999999999999976e-211 < B < 5.7000000000000002e-192Initial program 33.1%
Taylor expanded in A around -inf 70.8%
associate-*r/70.8%
Simplified70.8%
Final simplification70.9%
(FPCore (A B C)
:precision binary64
(if (<= B 3.7e-210)
(* 180.0 (/ (atan (/ (- C (- A B)) B)) PI))
(if (<= B 4.9e-192)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.7e-210) {
tmp = 180.0 * (atan(((C - (A - B)) / B)) / ((double) M_PI));
} else if (B <= 4.9e-192) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.7e-210) {
tmp = 180.0 * (Math.atan(((C - (A - B)) / B)) / Math.PI);
} else if (B <= 4.9e-192) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.7e-210: tmp = 180.0 * (math.atan(((C - (A - B)) / B)) / math.pi) elif B <= 4.9e-192: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.7e-210) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A - B)) / B)) / pi)); elseif (B <= 4.9e-192) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.7e-210) tmp = 180.0 * (atan(((C - (A - B)) / B)) / pi); elseif (B <= 4.9e-192) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.7e-210], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.9e-192], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.7 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.9 \cdot 10^{-192}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 3.7000000000000003e-210Initial program 59.7%
Simplified78.0%
Taylor expanded in B around -inf 72.8%
neg-mul-172.8%
unsub-neg72.8%
Simplified72.8%
if 3.7000000000000003e-210 < B < 4.9e-192Initial program 33.1%
Taylor expanded in A around -inf 70.8%
associate-*r/70.8%
Simplified70.8%
if 4.9e-192 < B Initial program 53.4%
Simplified78.0%
Taylor expanded in B around inf 74.3%
+-commutative74.3%
Simplified74.3%
Final simplification73.3%
(FPCore (A B C) :precision binary64 (if (<= B -2.8e-247) (* 180.0 (/ (atan 1.0) PI)) (if (<= B 6e-86) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.8e-247) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6e-86) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.8e-247) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6e-86) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.8e-247: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6e-86: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.8e-247) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6e-86) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.8e-247) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6e-86) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.8e-247], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e-86], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.8 \cdot 10^{-247}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.79999999999999986e-247Initial program 61.2%
Taylor expanded in B around -inf 48.4%
if -2.79999999999999986e-247 < B < 6.0000000000000002e-86Initial program 47.4%
Taylor expanded in C around inf 13.6%
Taylor expanded in B around 0 31.5%
distribute-rgt1-in31.5%
metadata-eval31.5%
mul0-lft31.5%
div031.5%
metadata-eval31.5%
Simplified31.5%
if 6.0000000000000002e-86 < B Initial program 55.6%
Taylor expanded in B around inf 66.7%
Final simplification49.9%
(FPCore (A B C) :precision binary64 (if (<= B 6e-86) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 6e-86) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 6e-86) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 6e-86: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 6e-86) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 6e-86) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 6e-86], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 6 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 6.0000000000000002e-86Initial program 56.5%
Taylor expanded in C around inf 10.7%
Taylor expanded in B around 0 14.1%
distribute-rgt1-in14.1%
metadata-eval14.1%
mul0-lft14.1%
div014.1%
metadata-eval14.1%
Simplified14.1%
if 6.0000000000000002e-86 < B Initial program 55.6%
Taylor expanded in B around inf 66.7%
Final simplification29.9%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 56.2%
Taylor expanded in B around inf 23.6%
Final simplification23.6%
herbie shell --seed 2024020
(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)))