
(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 25 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 (if (<= A -9.5e-52) (* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI)) (* (/ 180.0 PI) (atan (/ (- (- C A) (hypot B (- C A))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e-52) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((((C - A) - hypot(B, (C - A))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e-52) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((((C - A) - Math.hypot(B, (C - A))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.5e-52: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan((((C - A) - math.hypot(B, (C - A))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.5e-52) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.5e-52) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = (180.0 / pi) * atan((((C - A) - hypot(B, (C - A))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.5e-52], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.5 \cdot 10^{-52}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)\\
\end{array}
\end{array}
if A < -9.50000000000000007e-52Initial program 24.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified54.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6480.5%
Simplified80.5%
if -9.50000000000000007e-52 < A Initial program 69.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified84.9%
Final simplification83.5%
(FPCore (A B C)
:precision binary64
(if (<= A -3.4e-51)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(if (<= A 3.6e+30)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(/ 1.0 (/ (/ PI 180.0) (atan (/ (+ A (hypot A B)) (- 0.0 B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.4e-51) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else if (A <= 3.6e+30) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan(((A + hypot(A, B)) / (0.0 - B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.4e-51) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else if (A <= 3.6e+30) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan(((A + Math.hypot(A, B)) / (0.0 - B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.4e-51: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) elif A <= 3.6e+30: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = 1.0 / ((math.pi / 180.0) / math.atan(((A + math.hypot(A, B)) / (0.0 - B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.4e-51) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); elseif (A <= 3.6e+30) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(A + hypot(A, B)) / Float64(0.0 - B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.4e-51) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); elseif (A <= 3.6e+30) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 1.0 / ((pi / 180.0) / atan(((A + hypot(A, B)) / (0.0 - B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.4e-51], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.6e+30], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.4 \cdot 10^{-51}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 3.6 \cdot 10^{+30}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{0 - B}\right)}}\\
\end{array}
\end{array}
if A < -3.40000000000000003e-51Initial program 24.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified54.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6480.5%
Simplified80.5%
if -3.40000000000000003e-51 < A < 3.6000000000000002e30Initial program 63.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.4%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6478.6%
Simplified78.6%
if 3.6000000000000002e30 < A Initial program 84.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.7%
associate-*r/N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
Applied egg-rr94.8%
Taylor expanded in C around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6490.2%
Simplified90.2%
sub0-negN/A
distribute-frac-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f6490.2%
Applied egg-rr90.2%
Final simplification81.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2.25e-50)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(if (<= A 3.6e+30)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(/ (atan (/ (+ A (hypot A B)) (- 0.0 B))) (/ PI 180.0)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.25e-50) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else if (A <= 3.6e+30) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = atan(((A + hypot(A, B)) / (0.0 - B))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.25e-50) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else if (A <= 3.6e+30) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = Math.atan(((A + Math.hypot(A, B)) / (0.0 - B))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.25e-50: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) elif A <= 3.6e+30: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = math.atan(((A + math.hypot(A, B)) / (0.0 - B))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.25e-50) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); elseif (A <= 3.6e+30) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(0.0 - B))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.25e-50) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); elseif (A <= 3.6e+30) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = atan(((A + hypot(A, B)) / (0.0 - B))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.25e-50], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.6e+30], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.25 \cdot 10^{-50}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 3.6 \cdot 10^{+30}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{0 - B}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if A < -2.24999999999999981e-50Initial program 24.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified54.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6480.5%
Simplified80.5%
if -2.24999999999999981e-50 < A < 3.6000000000000002e30Initial program 63.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.4%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6478.6%
Simplified78.6%
if 3.6000000000000002e30 < A Initial program 84.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.7%
associate-*r/N/A
clear-numN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
Applied egg-rr94.8%
Taylor expanded in C around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6490.2%
Simplified90.2%
clear-numN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
frac-2negN/A
sub0-negN/A
remove-double-negN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6490.2%
Applied egg-rr90.2%
Final simplification81.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2.1e-52)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(if (<= A 7.2e+30)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (/ (- (- 0.0 (hypot B A)) A) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e-52) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else if (A <= 7.2e+30) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((((0.0 - hypot(B, A)) - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e-52) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else if (A <= 7.2e+30) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((((0.0 - Math.hypot(B, A)) - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.1e-52: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) elif A <= 7.2e+30: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan((((0.0 - math.hypot(B, A)) - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.1e-52) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); elseif (A <= 7.2e+30) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(0.0 - hypot(B, A)) - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.1e-52) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); elseif (A <= 7.2e+30) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan((((0.0 - hypot(B, A)) - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.1e-52], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.2e+30], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(0.0 - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.1 \cdot 10^{-52}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{+30}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(0 - \mathsf{hypot}\left(B, A\right)\right) - A}{B}\right)\\
\end{array}
\end{array}
if A < -2.0999999999999999e-52Initial program 24.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified54.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6480.5%
Simplified80.5%
if -2.0999999999999999e-52 < A < 7.2000000000000004e30Initial program 63.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.4%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6478.6%
Simplified78.6%
if 7.2000000000000004e30 < A Initial program 84.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.7%
Taylor expanded in C around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6490.2%
Simplified90.2%
Final simplification81.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2.4e-50)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(if (<= A 6.8e+33)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e-50) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else if (A <= 6.8e+33) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e-50) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else if (A <= 6.8e+33) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.4e-50: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) elif A <= 6.8e+33: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.4e-50) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); elseif (A <= 6.8e+33) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e-50) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); elseif (A <= 6.8e+33) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; else tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e-50], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.8e+33], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{-50}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{+33}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\end{array}
\end{array}
if A < -2.40000000000000002e-50Initial program 24.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified54.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6480.5%
Simplified80.5%
if -2.40000000000000002e-50 < A < 6.7999999999999999e33Initial program 62.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.8%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr79.8%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6478.0%
Simplified78.0%
if 6.7999999999999999e33 < A Initial program 85.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified96.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6487.8%
Simplified87.8%
Final simplification80.9%
(FPCore (A B C)
:precision binary64
(if (<= A -6.2e-53)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(if (<= A 9e+43)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e-53) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else if (A <= 9e+43) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e-53) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else if (A <= 9e+43) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.2e-53: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) elif A <= 9e+43: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.2e-53) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); elseif (A <= 9e+43) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.2e-53) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); elseif (A <= 9e+43) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.2e-53], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e+43], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.2 \cdot 10^{-53}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+43}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\end{array}
\end{array}
if A < -6.20000000000000031e-53Initial program 24.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified54.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6480.5%
Simplified80.5%
if -6.20000000000000031e-53 < A < 9e43Initial program 62.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.8%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6478.0%
Simplified78.0%
if 9e43 < A Initial program 85.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified96.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6487.8%
Simplified87.8%
Final simplification80.9%
(FPCore (A B C)
:precision binary64
(if (<= B -4.4e-138)
(/
1.0
(/
(/ PI 180.0)
(atan (+ 1.0 (/ (* (- A C) (+ (/ 0.5 (/ B (- A C))) -1.0)) B)))))
(if (<= B 3.8e-122)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(/
(/ (atan (/ (+ (- C (+ A B)) (* (- A C) (/ 0.5 (/ B (- C A))))) B)) PI)
0.005555555555555556))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.4e-138) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B))));
} else if (B <= 3.8e-122) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = (atan((((C - (A + B)) + ((A - C) * (0.5 / (B / (C - A))))) / B)) / ((double) M_PI)) / 0.005555555555555556;
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.4e-138) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B))));
} else if (B <= 3.8e-122) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = (Math.atan((((C - (A + B)) + ((A - C) * (0.5 / (B / (C - A))))) / B)) / Math.PI) / 0.005555555555555556;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.4e-138: tmp = 1.0 / ((math.pi / 180.0) / math.atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) elif B <= 3.8e-122: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = (math.atan((((C - (A + B)) + ((A - C) * (0.5 / (B / (C - A))))) / B)) / math.pi) / 0.005555555555555556 return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.4e-138) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(1.0 + Float64(Float64(Float64(A - C) * Float64(Float64(0.5 / Float64(B / Float64(A - C))) + -1.0)) / B))))); elseif (B <= 3.8e-122) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(Float64(atan(Float64(Float64(Float64(C - Float64(A + B)) + Float64(Float64(A - C) * Float64(0.5 / Float64(B / Float64(C - A))))) / B)) / pi) / 0.005555555555555556); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.4e-138) tmp = 1.0 / ((pi / 180.0) / atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))); elseif (B <= 3.8e-122) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = (atan((((C - (A + B)) + ((A - C) * (0.5 / (B / (C - A))))) / B)) / pi) / 0.005555555555555556; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.4e-138], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(1.0 + N[(N[(N[(A - C), $MachinePrecision] * N[(N[(0.5 / N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-122], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] + N[(N[(A - C), $MachinePrecision] * N[(0.5 / N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.4 \cdot 10^{-138}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(1 + \frac{\left(A - C\right) \cdot \left(\frac{0.5}{\frac{B}{A - C}} + -1\right)}{B}\right)}}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-122}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{\left(C - \left(A + B\right)\right) + \left(A - C\right) \cdot \frac{0.5}{\frac{B}{C - A}}}{B}\right)}{\pi}}{0.005555555555555556}\\
\end{array}
\end{array}
if B < -4.3999999999999998e-138Initial program 56.2%
Taylor expanded in B around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified69.8%
associate-*r/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Applied egg-rr69.8%
if -4.3999999999999998e-138 < B < 3.8000000000000001e-122Initial program 51.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.3%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6465.0%
Simplified65.0%
if 3.8000000000000001e-122 < B Initial program 57.2%
Taylor expanded in B around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6463.7%
Simplified63.7%
Applied egg-rr74.6%
Final simplification70.2%
(FPCore (A B C)
:precision binary64
(if (<= B -3.2e-138)
(/
1.0
(/
(/ PI 180.0)
(atan (+ 1.0 (/ (* (- A C) (+ (/ 0.5 (/ B (- A C))) -1.0)) B)))))
(if (<= B 4.2e-122)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(*
180.0
(/
(atan (+ (+ (/ C B) -1.0) (* (/ -0.5 B) (* (- A C) (/ (- A C) B)))))
PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e-138) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B))));
} else if (B <= 4.2e-122) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C / B) + -1.0) + ((-0.5 / B) * ((A - C) * ((A - C) / B))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e-138) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B))));
} else if (B <= 4.2e-122) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C / B) + -1.0) + ((-0.5 / B) * ((A - C) * ((A - C) / B))))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.2e-138: tmp = 1.0 / ((math.pi / 180.0) / math.atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) elif B <= 4.2e-122: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((((C / B) + -1.0) + ((-0.5 / B) * ((A - C) * ((A - C) / B))))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.2e-138) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(1.0 + Float64(Float64(Float64(A - C) * Float64(Float64(0.5 / Float64(B / Float64(A - C))) + -1.0)) / B))))); elseif (B <= 4.2e-122) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C / B) + -1.0) + Float64(Float64(-0.5 / B) * Float64(Float64(A - C) * Float64(Float64(A - C) / B))))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.2e-138) tmp = 1.0 / ((pi / 180.0) / atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))); elseif (B <= 4.2e-122) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = 180.0 * (atan((((C / B) + -1.0) + ((-0.5 / B) * ((A - C) * ((A - C) / B))))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.2e-138], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(1.0 + N[(N[(N[(A - C), $MachinePrecision] * N[(N[(0.5 / N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-122], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision] + N[(N[(-0.5 / B), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.2 \cdot 10^{-138}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(1 + \frac{\left(A - C\right) \cdot \left(\frac{0.5}{\frac{B}{A - C}} + -1\right)}{B}\right)}}\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-122}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\frac{C}{B} + -1\right) + \frac{-0.5}{B} \cdot \left(\left(A - C\right) \cdot \frac{A - C}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.2000000000000001e-138Initial program 56.2%
Taylor expanded in B around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified69.8%
associate-*r/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
atan-lowering-atan.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Applied egg-rr69.8%
if -3.2000000000000001e-138 < B < 4.19999999999999985e-122Initial program 51.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.3%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6465.0%
Simplified65.0%
if 4.19999999999999985e-122 < B Initial program 57.2%
Taylor expanded in B around inf
associate--l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-*r/N/A
unpow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
associate-/l*N/A
Simplified74.6%
Taylor expanded in C around inf
/-lowering-/.f6473.9%
Simplified73.9%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(if (<= B -6.8e-138)
(/
(* 180.0 (atan (+ 1.0 (/ (* (- A C) (+ (/ 0.5 (/ B (- A C))) -1.0)) B))))
PI)
(if (<= B 4.2e-122)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(*
180.0
(/
(atan (+ (+ (/ C B) -1.0) (* (/ -0.5 B) (* (- A C) (/ (- A C) B)))))
PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-138) {
tmp = (180.0 * atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) / ((double) M_PI);
} else if (B <= 4.2e-122) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C / B) + -1.0) + ((-0.5 / B) * ((A - C) * ((A - C) / B))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-138) {
tmp = (180.0 * Math.atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) / Math.PI;
} else if (B <= 4.2e-122) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C / B) + -1.0) + ((-0.5 / B) * ((A - C) * ((A - C) / B))))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.8e-138: tmp = (180.0 * math.atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) / math.pi elif B <= 4.2e-122: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((((C / B) + -1.0) + ((-0.5 / B) * ((A - C) * ((A - C) / B))))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.8e-138) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(Float64(Float64(A - C) * Float64(Float64(0.5 / Float64(B / Float64(A - C))) + -1.0)) / B)))) / pi); elseif (B <= 4.2e-122) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C / B) + -1.0) + Float64(Float64(-0.5 / B) * Float64(Float64(A - C) * Float64(Float64(A - C) / B))))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.8e-138) tmp = (180.0 * atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) / pi; elseif (B <= 4.2e-122) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = 180.0 * (atan((((C / B) + -1.0) + ((-0.5 / B) * ((A - C) * ((A - C) / B))))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.8e-138], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(N[(A - C), $MachinePrecision] * N[(N[(0.5 / N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 4.2e-122], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision] + N[(N[(-0.5 / B), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.8 \cdot 10^{-138}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{\left(A - C\right) \cdot \left(\frac{0.5}{\frac{B}{A - C}} + -1\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-122}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\frac{C}{B} + -1\right) + \frac{-0.5}{B} \cdot \left(\left(A - C\right) \cdot \frac{A - C}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.8000000000000003e-138Initial program 56.2%
Taylor expanded in B around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified69.8%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.8%
if -6.8000000000000003e-138 < B < 4.19999999999999985e-122Initial program 51.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.3%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6465.0%
Simplified65.0%
if 4.19999999999999985e-122 < B Initial program 57.2%
Taylor expanded in B around inf
associate--l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-*r/N/A
unpow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
associate-/l*N/A
Simplified74.6%
Taylor expanded in C around inf
/-lowering-/.f6473.9%
Simplified73.9%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e-252)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 2.8e-292)
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))
(if (<= A 3.8e-213)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= A 1.25e+23)
(* (/ 180.0 PI) (atan -1.0))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e-252) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 2.8e-292) {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
} else if (A <= 3.8e-213) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (A <= 1.25e+23) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e-252) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 2.8e-292) {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
} else if (A <= 3.8e-213) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (A <= 1.25e+23) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.8e-252: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 2.8e-292: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) elif A <= 3.8e-213: tmp = (180.0 / math.pi) * math.atan((C / B)) elif A <= 1.25e+23: tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.8e-252) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 2.8e-292) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); elseif (A <= 3.8e-213) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (A <= 1.25e+23) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e-252) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 2.8e-292) tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); elseif (A <= 3.8e-213) tmp = (180.0 / pi) * atan((C / B)); elseif (A <= 1.25e+23) tmp = (180.0 / pi) * atan(-1.0); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e-252], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e-292], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-213], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.25e+23], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.8 \cdot 10^{-252}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-292}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-213}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{+23}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.80000000000000011e-252Initial program 35.9%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6453.1%
Simplified53.1%
if -1.80000000000000011e-252 < A < 2.8000000000000001e-292Initial program 27.0%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6466.5%
Simplified66.5%
div0N/A
+-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6466.4%
Applied egg-rr66.4%
if 2.8000000000000001e-292 < A < 3.8e-213Initial program 74.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified95.2%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.6%
Simplified70.6%
Taylor expanded in C around inf
/-lowering-/.f6451.7%
Simplified51.7%
if 3.8e-213 < A < 1.25e23Initial program 67.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.3%
Taylor expanded in B around inf
Simplified36.9%
if 1.25e23 < A Initial program 84.4%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6475.8%
Simplified75.8%
Final simplification55.5%
(FPCore (A B C)
:precision binary64
(if (<= B -5.2e-138)
(/
(* 180.0 (atan (+ 1.0 (/ (* (- A C) (+ (/ 0.5 (/ B (- A C))) -1.0)) B))))
PI)
(if (<= B 4.3e-122)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-138) {
tmp = (180.0 * atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) / ((double) M_PI);
} else if (B <= 4.3e-122) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-138) {
tmp = (180.0 * Math.atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) / Math.PI;
} else if (B <= 4.3e-122) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.2e-138: tmp = (180.0 * math.atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) / math.pi elif B <= 4.3e-122: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.2e-138) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(Float64(Float64(A - C) * Float64(Float64(0.5 / Float64(B / Float64(A - C))) + -1.0)) / B)))) / pi); elseif (B <= 4.3e-122) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.2e-138) tmp = (180.0 * atan((1.0 + (((A - C) * ((0.5 / (B / (A - C))) + -1.0)) / B)))) / pi; elseif (B <= 4.3e-122) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.2e-138], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(N[(A - C), $MachinePrecision] * N[(N[(0.5 / N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 4.3e-122], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.2 \cdot 10^{-138}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{\left(A - C\right) \cdot \left(\frac{0.5}{\frac{B}{A - C}} + -1\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-122}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.2e-138Initial program 56.2%
Taylor expanded in B around -inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified69.8%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr69.8%
if -5.2e-138 < B < 4.30000000000000019e-122Initial program 51.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.3%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6465.0%
Simplified65.0%
if 4.30000000000000019e-122 < B Initial program 57.2%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.7%
Simplified72.7%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(if (<= A -4.6e+25)
(/ (/ (atan (/ (* B 0.5) A)) PI) 0.005555555555555556)
(if (<= A -7e-39)
(/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
(if (<= A 2.8e+30)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+25) {
tmp = (atan(((B * 0.5) / A)) / ((double) M_PI)) / 0.005555555555555556;
} else if (A <= -7e-39) {
tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
} else if (A <= 2.8e+30) {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+25) {
tmp = (Math.atan(((B * 0.5) / A)) / Math.PI) / 0.005555555555555556;
} else if (A <= -7e-39) {
tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
} else if (A <= 2.8e+30) {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.6e+25: tmp = (math.atan(((B * 0.5) / A)) / math.pi) / 0.005555555555555556 elif A <= -7e-39: tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0) elif A <= 2.8e+30: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.6e+25) tmp = Float64(Float64(atan(Float64(Float64(B * 0.5) / A)) / pi) / 0.005555555555555556); elseif (A <= -7e-39) tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0)); elseif (A <= 2.8e+30) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.6e+25) tmp = (atan(((B * 0.5) / A)) / pi) / 0.005555555555555556; elseif (A <= -7e-39) tmp = atan((B / (C / -0.5))) / (pi / 180.0); elseif (A <= 2.8e+30) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.6e+25], N[(N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision], If[LessEqual[A, -7e-39], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e+30], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.6 \cdot 10^{+25}:\\
\;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}}{0.005555555555555556}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-39}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.5999999999999996e25Initial program 23.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified52.2%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2%
Simplified70.2%
clear-numN/A
un-div-invN/A
div-invN/A
associate-/r*N/A
*-lft-identityN/A
associate-*l/N/A
/-lowering-/.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
metadata-eval70.3%
Applied egg-rr70.3%
if -4.5999999999999996e25 < A < -6.99999999999999999e-39Initial program 24.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6464.2%
Applied egg-rr64.2%
if -6.99999999999999999e-39 < A < 2.79999999999999983e30Initial program 62.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.3%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr79.3%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6451.5%
Simplified51.5%
Taylor expanded in A around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6449.8%
Simplified49.8%
if 2.79999999999999983e30 < A Initial program 84.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.7%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr94.7%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6480.8%
Simplified80.8%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6479.5%
Simplified79.5%
Final simplification62.1%
(FPCore (A B C)
:precision binary64
(if (<= A -4.6e+25)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -4.4e-44)
(/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
(if (<= A 1.05e+31)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+25) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -4.4e-44) {
tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
} else if (A <= 1.05e+31) {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+25) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -4.4e-44) {
tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
} else if (A <= 1.05e+31) {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.6e+25: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -4.4e-44: tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0) elif A <= 1.05e+31: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.6e+25) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -4.4e-44) tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0)); elseif (A <= 1.05e+31) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.6e+25) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -4.4e-44) tmp = atan((B / (C / -0.5))) / (pi / 180.0); elseif (A <= 1.05e+31) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.6e+25], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.4e-44], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.05e+31], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.6 \cdot 10^{+25}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.4 \cdot 10^{-44}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{+31}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.5999999999999996e25Initial program 23.5%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2%
Simplified70.2%
if -4.5999999999999996e25 < A < -4.40000000000000024e-44Initial program 24.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6464.2%
Applied egg-rr64.2%
if -4.40000000000000024e-44 < A < 1.04999999999999989e31Initial program 62.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.3%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr79.3%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6451.5%
Simplified51.5%
Taylor expanded in A around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6449.8%
Simplified49.8%
if 1.04999999999999989e31 < A Initial program 84.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.7%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr94.7%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6480.8%
Simplified80.8%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6479.5%
Simplified79.5%
Final simplification62.1%
(FPCore (A B C)
:precision binary64
(if (<= A -4.8e+25)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -7e-44)
(/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
(if (<= A 3.8e+31)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e+25) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -7e-44) {
tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
} else if (A <= 3.8e+31) {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e+25) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -7e-44) {
tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
} else if (A <= 3.8e+31) {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.8e+25: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -7e-44: tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0) elif A <= 3.8e+31: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.8e+25) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -7e-44) tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0)); elseif (A <= 3.8e+31) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.8e+25) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -7e-44) tmp = atan((B / (C / -0.5))) / (pi / 180.0); elseif (A <= 3.8e+31) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.8e+25], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-44], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e+31], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.8 \cdot 10^{+25}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-44}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{+31}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.79999999999999992e25Initial program 23.5%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2%
Simplified70.2%
if -4.79999999999999992e25 < A < -6.9999999999999995e-44Initial program 24.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6464.2%
Applied egg-rr64.2%
if -6.9999999999999995e-44 < A < 3.8000000000000001e31Initial program 62.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.3%
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr79.3%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6451.5%
Simplified51.5%
Taylor expanded in A around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6449.8%
Simplified49.8%
if 3.8000000000000001e31 < A Initial program 84.1%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.5%
Simplified76.5%
Final simplification61.5%
(FPCore (A B C)
:precision binary64
(if (<= A -5.4e+25)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -7e-39)
(/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
(if (<= A 4.5e+63)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(/ (* 180.0 (atan (/ -2.0 (/ B A)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e+25) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -7e-39) {
tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
} else if (A <= 4.5e+63) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else {
tmp = (180.0 * atan((-2.0 / (B / A)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e+25) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -7e-39) {
tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
} else if (A <= 4.5e+63) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else {
tmp = (180.0 * Math.atan((-2.0 / (B / A)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.4e+25: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -7e-39: tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0) elif A <= 4.5e+63: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) else: tmp = (180.0 * math.atan((-2.0 / (B / A)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.4e+25) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -7e-39) tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0)); elseif (A <= 4.5e+63) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); else tmp = Float64(Float64(180.0 * atan(Float64(-2.0 / Float64(B / A)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.4e+25) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -7e-39) tmp = atan((B / (C / -0.5))) / (pi / 180.0); elseif (A <= 4.5e+63) tmp = (180.0 / pi) * atan((1.0 + (C / B))); else tmp = (180.0 * atan((-2.0 / (B / A)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.4e+25], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-39], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.5e+63], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-2.0 / N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.4 \cdot 10^{+25}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-39}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{+63}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-2}{\frac{B}{A}}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.4e25Initial program 23.5%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2%
Simplified70.2%
if -5.4e25 < A < -6.99999999999999999e-39Initial program 24.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6464.2%
Applied egg-rr64.2%
if -6.99999999999999999e-39 < A < 4.50000000000000017e63Initial program 62.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.7%
Simplified49.7%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6447.6%
Simplified47.6%
if 4.50000000000000017e63 < A Initial program 87.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified97.9%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6482.8%
Simplified82.8%
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan-lowering-atan.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6482.8%
Applied egg-rr82.8%
Final simplification60.8%
(FPCore (A B C)
:precision binary64
(if (<= A -5.2e+25)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -9.5e-46)
(/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
(if (<= A 7.5e+62)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+25) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -9.5e-46) {
tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
} else if (A <= 7.5e+62) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+25) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -9.5e-46) {
tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
} else if (A <= 7.5e+62) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.2e+25: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -9.5e-46: tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0) elif A <= 7.5e+62: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.2e+25) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -9.5e-46) tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0)); elseif (A <= 7.5e+62) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.2e+25) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -9.5e-46) tmp = atan((B / (C / -0.5))) / (pi / 180.0); elseif (A <= 7.5e+62) tmp = (180.0 / pi) * atan((1.0 + (C / B))); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.2e+25], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.5e-46], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.5e+62], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.2 \cdot 10^{+25}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -9.5 \cdot 10^{-46}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 7.5 \cdot 10^{+62}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.1999999999999997e25Initial program 23.5%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2%
Simplified70.2%
if -5.1999999999999997e25 < A < -9.49999999999999993e-46Initial program 24.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6464.2%
Applied egg-rr64.2%
if -9.49999999999999993e-46 < A < 7.49999999999999998e62Initial program 62.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.7%
Simplified49.7%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6447.6%
Simplified47.6%
if 7.49999999999999998e62 < A Initial program 87.5%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6482.8%
Simplified82.8%
Final simplification60.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.1e+26)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -6.5e-39)
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))
(if (<= A 4.3e+68)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.1e+26) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -6.5e-39) {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
} else if (A <= 4.3e+68) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.1e+26) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -6.5e-39) {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
} else if (A <= 4.3e+68) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.1e+26: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -6.5e-39: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) elif A <= 4.3e+68: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.1e+26) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -6.5e-39) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); elseif (A <= 4.3e+68) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.1e+26) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -6.5e-39) tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); elseif (A <= 4.3e+68) tmp = (180.0 / pi) * atan((1.0 + (C / B))); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.1e+26], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6.5e-39], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.3e+68], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.1 \cdot 10^{+26}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -6.5 \cdot 10^{-39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.3 \cdot 10^{+68}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.10000000000000004e26Initial program 23.5%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2%
Simplified70.2%
if -1.10000000000000004e26 < A < -6.50000000000000027e-39Initial program 24.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
div0N/A
+-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6464.1%
Applied egg-rr64.1%
if -6.50000000000000027e-39 < A < 4.3000000000000001e68Initial program 62.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.0%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.7%
Simplified49.7%
Taylor expanded in A around 0
+-lowering-+.f64N/A
/-lowering-/.f6447.6%
Simplified47.6%
if 4.3000000000000001e68 < A Initial program 87.5%
Taylor expanded in A around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6482.8%
Simplified82.8%
Final simplification60.8%
(FPCore (A B C)
:precision binary64
(if (<= C -1.7e-16)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= C -1.75e-239)
(* (/ 180.0 PI) (atan 1.0))
(if (<= C 2.8e-83)
(* (/ 180.0 PI) (atan -1.0))
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.7e-16) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (C <= -1.75e-239) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (C <= 2.8e-83) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.7e-16) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (C <= -1.75e-239) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (C <= 2.8e-83) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.7e-16: tmp = (180.0 / math.pi) * math.atan((C / B)) elif C <= -1.75e-239: tmp = (180.0 / math.pi) * math.atan(1.0) elif C <= 2.8e-83: tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.7e-16) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (C <= -1.75e-239) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (C <= 2.8e-83) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.7e-16) tmp = (180.0 / pi) * atan((C / B)); elseif (C <= -1.75e-239) tmp = (180.0 / pi) * atan(1.0); elseif (C <= 2.8e-83) tmp = (180.0 / pi) * atan(-1.0); else tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.7e-16], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.75e-239], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.8e-83], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.7 \cdot 10^{-16}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;C \leq -1.75 \cdot 10^{-239}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;C \leq 2.8 \cdot 10^{-83}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.7e-16Initial program 75.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified86.8%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.9%
Simplified69.9%
Taylor expanded in C around inf
/-lowering-/.f6462.8%
Simplified62.8%
if -1.7e-16 < C < -1.75000000000000003e-239Initial program 69.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.2%
Taylor expanded in B around -inf
Simplified34.9%
if -1.75000000000000003e-239 < C < 2.8000000000000001e-83Initial program 57.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.1%
Taylor expanded in B around inf
Simplified36.5%
if 2.8000000000000001e-83 < C Initial program 32.0%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6462.8%
Simplified62.8%
div0N/A
+-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6462.8%
Applied egg-rr62.8%
Final simplification51.4%
(FPCore (A B C)
:precision binary64
(if (<= B -3.7e-138)
(* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))
(if (<= B 6.2e-122)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.7e-138) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
} else if (B <= 6.2e-122) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.7e-138) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
} else if (B <= 6.2e-122) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.7e-138: tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) elif B <= 6.2e-122: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.7e-138) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))); elseif (B <= 6.2e-122) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.7e-138) tmp = (180.0 / pi) * atan(((C - (A - B)) / B)); elseif (B <= 6.2e-122) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.7e-138], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.2e-122], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.7 \cdot 10^{-138}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
\mathbf{elif}\;B \leq 6.2 \cdot 10^{-122}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.69999999999999991e-138Initial program 56.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.8%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.7%
Simplified68.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f6468.7%
Simplified68.7%
if -3.69999999999999991e-138 < B < 6.1999999999999997e-122Initial program 51.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.3%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6465.0%
Simplified65.0%
if 6.1999999999999997e-122 < B Initial program 57.2%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.7%
Simplified72.7%
Final simplification69.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -4.8e-138)
(* (/ 180.0 PI) (atan (+ 1.0 t_0)))
(if (<= B 3.1e-122)
(* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -4.8e-138) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + t_0));
} else if (B <= 3.1e-122) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -4.8e-138) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + t_0));
} else if (B <= 3.1e-122) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -4.8e-138: tmp = (180.0 / math.pi) * math.atan((1.0 + t_0)) elif B <= 3.1e-122: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -4.8e-138) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + t_0))); elseif (B <= 3.1e-122) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -4.8e-138) tmp = (180.0 / pi) * atan((1.0 + t_0)); elseif (B <= 3.1e-122) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -4.8e-138], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-122], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -4.8 \cdot 10^{-138}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + t\_0\right)\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-122}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.7999999999999998e-138Initial program 56.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.8%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.7%
Simplified68.7%
if -4.7999999999999998e-138 < B < 3.0999999999999998e-122Initial program 51.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.3%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6465.0%
Simplified65.0%
if 3.0999999999999998e-122 < B Initial program 57.2%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.7%
Simplified72.7%
Final simplification69.1%
(FPCore (A B C)
:precision binary64
(if (<= A -1.06e+26)
(/ (/ (atan (/ (* B 0.5) A)) PI) 0.005555555555555556)
(if (<= A -3.3e-39)
(/ (atan (/ B (/ C -0.5))) (/ PI 180.0))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.06e+26) {
tmp = (atan(((B * 0.5) / A)) / ((double) M_PI)) / 0.005555555555555556;
} else if (A <= -3.3e-39) {
tmp = atan((B / (C / -0.5))) / (((double) M_PI) / 180.0);
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.06e+26) {
tmp = (Math.atan(((B * 0.5) / A)) / Math.PI) / 0.005555555555555556;
} else if (A <= -3.3e-39) {
tmp = Math.atan((B / (C / -0.5))) / (Math.PI / 180.0);
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.06e+26: tmp = (math.atan(((B * 0.5) / A)) / math.pi) / 0.005555555555555556 elif A <= -3.3e-39: tmp = math.atan((B / (C / -0.5))) / (math.pi / 180.0) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.06e+26) tmp = Float64(Float64(atan(Float64(Float64(B * 0.5) / A)) / pi) / 0.005555555555555556); elseif (A <= -3.3e-39) tmp = Float64(atan(Float64(B / Float64(C / -0.5))) / Float64(pi / 180.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.06e+26) tmp = (atan(((B * 0.5) / A)) / pi) / 0.005555555555555556; elseif (A <= -3.3e-39) tmp = atan((B / (C / -0.5))) / (pi / 180.0); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.06e+26], N[(N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] / 0.005555555555555556), $MachinePrecision], If[LessEqual[A, -3.3e-39], N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.06 \cdot 10^{+26}:\\
\;\;\;\;\frac{\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}}{0.005555555555555556}\\
\mathbf{elif}\;A \leq -3.3 \cdot 10^{-39}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.05999999999999997e26Initial program 23.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified52.2%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2%
Simplified70.2%
clear-numN/A
un-div-invN/A
div-invN/A
associate-/r*N/A
*-lft-identityN/A
associate-*l/N/A
/-lowering-/.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
metadata-eval70.3%
Applied egg-rr70.3%
if -1.05999999999999997e26 < A < -3.29999999999999985e-39Initial program 24.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6464.1%
Simplified64.1%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
un-div-invN/A
/-lowering-/.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6464.2%
Applied egg-rr64.2%
if -3.29999999999999985e-39 < A Initial program 69.1%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6460.5%
Simplified60.5%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= B -6.5e-138)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 5e-122)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.5e-138) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 5e-122) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.5e-138) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 5e-122) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.5e-138: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 5e-122: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.5e-138) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 5e-122) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.5e-138) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 5e-122) tmp = (180.0 / pi) * atan((0.0 / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.5e-138], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-122], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.5 \cdot 10^{-138}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -6.4999999999999999e-138Initial program 56.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.8%
Taylor expanded in B around -inf
Simplified45.0%
if -6.4999999999999999e-138 < B < 4.9999999999999999e-122Initial program 51.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.3%
Taylor expanded in C around inf
associate-*r/N/A
mul-1-negN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f6440.5%
Simplified40.5%
if 4.9999999999999999e-122 < B Initial program 57.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified76.5%
Taylor expanded in B around inf
Simplified53.5%
Final simplification46.7%
(FPCore (A B C) :precision binary64 (if (<= A -5.7e-58) (* (atan (* B (/ 0.5 (- A C)))) (/ 180.0 PI)) (* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.7e-58) {
tmp = atan((B * (0.5 / (A - C)))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.7e-58) {
tmp = Math.atan((B * (0.5 / (A - C)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.7e-58: tmp = math.atan((B * (0.5 / (A - C)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.7e-58) tmp = Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.7e-58) tmp = atan((B * (0.5 / (A - C)))) * (180.0 / pi); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.7e-58], N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.7 \cdot 10^{-58}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.70000000000000032e-58Initial program 24.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified54.0%
Taylor expanded in B around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-frac2N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
sub-negN/A
/-lowering-/.f64N/A
--lowering--.f6480.5%
Simplified80.5%
if -5.70000000000000032e-58 < A Initial program 69.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6461.0%
Simplified61.0%
Final simplification67.2%
(FPCore (A B C) :precision binary64 (if (<= B -1.2e-307) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-307) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-307) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.2e-307: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.2e-307) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.2e-307) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.2e-307], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.2 \cdot 10^{-307}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.20000000000000009e-307Initial program 54.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.5%
Taylor expanded in B around -inf
Simplified36.6%
if -1.20000000000000009e-307 < B Initial program 56.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified77.0%
Taylor expanded in B around inf
Simplified42.9%
Final simplification39.4%
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C): return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C) return Float64(Float64(180.0 / pi) * atan(-1.0)) end
function tmp = code(A, B, C) tmp = (180.0 / pi) * atan(-1.0); end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Initial program 55.2%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.1%
Taylor expanded in B around inf
Simplified20.3%
Final simplification20.3%
herbie shell --seed 2024164
(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)))