
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI)))
(t_1
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_1 -0.04)
t_0
(if (<= t_1 0.0) (* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))) t_0))))
double code(double A, double B, double C) {
double t_0 = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
double t_1 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_1 <= -0.04) {
tmp = t_0;
} else if (t_1 <= 0.0) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
double t_1 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if (t_1 <= -0.04) {
tmp = t_0;
} else if (t_1 <= 0.0) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) t_1 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if t_1 <= -0.04: tmp = t_0 elif t_1 <= 0.0: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)) t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_1 <= -0.04) tmp = t_0; elseif (t_1 <= 0.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); t_1 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if (t_1 <= -0.04) tmp = t_0; elseif (t_1 <= 0.0) tmp = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); else tmp = t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -0.04], t$95$0, If[LessEqual[t$95$1, 0.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_1 \leq -0.04:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0400000000000000008 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 57.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified90.1%
if -0.0400000000000000008 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0Initial program 15.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified15.8%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6499.1%
Simplified99.1%
Final simplification91.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.9e+120)
(/ (atan (/ (* B 0.5) A)) (/ PI 180.0))
(if (<= A 4.5e-24)
(* (/ 1.0 PI) (/ (atan (/ (- C (hypot B C)) B)) 0.005555555555555556))
(* (/ 180.0 PI) (atan (/ (+ A (hypot A B)) (- 0.0 B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e+120) {
tmp = atan(((B * 0.5) / A)) / (((double) M_PI) / 180.0);
} else if (A <= 4.5e-24) {
tmp = (1.0 / ((double) M_PI)) * (atan(((C - hypot(B, C)) / B)) / 0.005555555555555556);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A + hypot(A, B)) / (0.0 - B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e+120) {
tmp = Math.atan(((B * 0.5) / A)) / (Math.PI / 180.0);
} else if (A <= 4.5e-24) {
tmp = (1.0 / Math.PI) * (Math.atan(((C - Math.hypot(B, C)) / B)) / 0.005555555555555556);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A + Math.hypot(A, B)) / (0.0 - B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.9e+120: tmp = math.atan(((B * 0.5) / A)) / (math.pi / 180.0) elif A <= 4.5e-24: tmp = (1.0 / math.pi) * (math.atan(((C - math.hypot(B, C)) / B)) / 0.005555555555555556) else: tmp = (180.0 / math.pi) * math.atan(((A + math.hypot(A, B)) / (0.0 - B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.9e+120) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) / Float64(pi / 180.0)); elseif (A <= 4.5e-24) tmp = Float64(Float64(1.0 / pi) * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / 0.005555555555555556)); else tmp = Float64(Float64(180.0 / pi) * 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 <= -1.9e+120) tmp = atan(((B * 0.5) / A)) / (pi / 180.0); elseif (A <= 4.5e-24) tmp = (1.0 / pi) * (atan(((C - hypot(B, C)) / B)) / 0.005555555555555556); else tmp = (180.0 / pi) * atan(((A + hypot(A, B)) / (0.0 - B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.9e+120], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.5e-24], N[(N[(1.0 / Pi), $MachinePrecision] * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / 0.005555555555555556), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.9 \cdot 10^{+120}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{-24}:\\
\;\;\;\;\frac{1}{\pi} \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{0 - B}\right)\\
\end{array}
\end{array}
if A < -1.8999999999999999e120Initial program 14.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified55.8%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6483.5%
Simplified83.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6483.6%
Applied egg-rr83.6%
if -1.8999999999999999e120 < A < 4.4999999999999997e-24Initial program 50.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.0%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6477.5%
Simplified77.5%
*-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
Applied egg-rr77.6%
if 4.4999999999999997e-24 < A Initial program 72.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.3%
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.f6488.7%
Simplified88.7%
Final simplification81.2%
(FPCore (A B C)
:precision binary64
(if (<= A -2.7e+122)
(/ (atan (/ (* B 0.5) A)) (/ PI 180.0))
(if (<= A 2.8e-23)
(* (/ 180.0 PI) (atan (/ 1.0 (/ B (- C (hypot B C))))))
(* (/ 180.0 PI) (atan (/ (+ A (hypot A B)) (- 0.0 B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e+122) {
tmp = atan(((B * 0.5) / A)) / (((double) M_PI) / 180.0);
} else if (A <= 2.8e-23) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 / (B / (C - hypot(B, C)))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A + hypot(A, B)) / (0.0 - B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e+122) {
tmp = Math.atan(((B * 0.5) / A)) / (Math.PI / 180.0);
} else if (A <= 2.8e-23) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 / (B / (C - Math.hypot(B, C)))));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A + Math.hypot(A, B)) / (0.0 - B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.7e+122: tmp = math.atan(((B * 0.5) / A)) / (math.pi / 180.0) elif A <= 2.8e-23: tmp = (180.0 / math.pi) * math.atan((1.0 / (B / (C - math.hypot(B, C))))) else: tmp = (180.0 / math.pi) * math.atan(((A + math.hypot(A, B)) / (0.0 - B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.7e+122) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) / Float64(pi / 180.0)); elseif (A <= 2.8e-23) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 / Float64(B / Float64(C - hypot(B, C)))))); else tmp = Float64(Float64(180.0 / pi) * 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 <= -2.7e+122) tmp = atan(((B * 0.5) / A)) / (pi / 180.0); elseif (A <= 2.8e-23) tmp = (180.0 / pi) * atan((1.0 / (B / (C - hypot(B, C))))); else tmp = (180.0 / pi) * atan(((A + hypot(A, B)) / (0.0 - B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.7e+122], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e-23], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 / N[(B / N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.7 \cdot 10^{+122}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-23}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{B}{C - \mathsf{hypot}\left(B, C\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{0 - B}\right)\\
\end{array}
\end{array}
if A < -2.6999999999999998e122Initial program 14.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified55.8%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6483.5%
Simplified83.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6483.6%
Applied egg-rr83.6%
if -2.6999999999999998e122 < A < 2.7999999999999997e-23Initial program 50.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.0%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6477.5%
Simplified77.5%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f6477.5%
Applied egg-rr77.5%
if 2.7999999999999997e-23 < A Initial program 72.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.3%
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.f6488.7%
Simplified88.7%
Final simplification81.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.02e+118)
(/ (atan (/ (* B 0.5) A)) (/ PI 180.0))
(if (<= A 1.02e+117)
(* (/ 180.0 PI) (atan (/ 1.0 (/ B (- C (hypot B C))))))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e+118) {
tmp = atan(((B * 0.5) / A)) / (((double) M_PI) / 180.0);
} else if (A <= 1.02e+117) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 / (B / (C - hypot(B, C)))));
} 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.02e+118) {
tmp = Math.atan(((B * 0.5) / A)) / (Math.PI / 180.0);
} else if (A <= 1.02e+117) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 / (B / (C - Math.hypot(B, C)))));
} 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.02e+118: tmp = math.atan(((B * 0.5) / A)) / (math.pi / 180.0) elif A <= 1.02e+117: tmp = (180.0 / math.pi) * math.atan((1.0 / (B / (C - math.hypot(B, C))))) 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.02e+118) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) / Float64(pi / 180.0)); elseif (A <= 1.02e+117) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 / Float64(B / Float64(C - hypot(B, C)))))); 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.02e+118) tmp = atan(((B * 0.5) / A)) / (pi / 180.0); elseif (A <= 1.02e+117) tmp = (180.0 / pi) * atan((1.0 / (B / (C - hypot(B, C))))); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.02e+118], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.02e+117], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 / N[(B / N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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.02 \cdot 10^{+118}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 1.02 \cdot 10^{+117}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{B}{C - \mathsf{hypot}\left(B, C\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.0199999999999999e118Initial program 14.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified55.8%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6483.5%
Simplified83.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6483.6%
Applied egg-rr83.6%
if -1.0199999999999999e118 < A < 1.02e117Initial program 53.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.1%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.7%
Simplified76.7%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f6476.7%
Applied egg-rr76.7%
if 1.02e117 < A Initial program 80.0%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.6%
Simplified85.6%
Final simplification78.6%
(FPCore (A B C)
:precision binary64
(if (<= A -3.8e+120)
(/ (atan (/ (* B 0.5) A)) (/ PI 180.0))
(if (<= A 9.5e+116)
(* (/ 180.0 PI) (atan (/ (- C (hypot C B)) B)))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+120) {
tmp = atan(((B * 0.5) / A)) / (((double) M_PI) / 180.0);
} else if (A <= 9.5e+116) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(C, B)) / B));
} 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 <= -3.8e+120) {
tmp = Math.atan(((B * 0.5) / A)) / (Math.PI / 180.0);
} else if (A <= 9.5e+116) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(C, B)) / B));
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e+120: tmp = math.atan(((B * 0.5) / A)) / (math.pi / 180.0) elif A <= 9.5e+116: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(C, B)) / B)) 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 <= -3.8e+120) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) / Float64(pi / 180.0)); elseif (A <= 9.5e+116) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(C, B)) / B))); 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 <= -3.8e+120) tmp = atan(((B * 0.5) / A)) / (pi / 180.0); elseif (A <= 9.5e+116) tmp = (180.0 / pi) * atan(((C - hypot(C, B)) / B)); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e+120], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9.5e+116], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $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 -3.8 \cdot 10^{+120}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\frac{\pi}{180}}\\
\mathbf{elif}\;A \leq 9.5 \cdot 10^{+116}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.7999999999999998e120Initial program 14.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified55.8%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6483.5%
Simplified83.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6483.6%
Applied egg-rr83.6%
if -3.7999999999999998e120 < A < 9.5000000000000004e116Initial program 53.4%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified80.1%
Taylor expanded in A around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.7%
Simplified76.7%
if 9.5000000000000004e116 < A Initial program 80.0%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.6%
Simplified85.6%
Final simplification78.6%
(FPCore (A B C) :precision binary64 (if (<= A -1.15e+122) (/ (atan (/ (* B 0.5) A)) (/ PI 180.0)) (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (hypot C B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+122) {
tmp = atan(((B * 0.5) / A)) / (((double) M_PI) / 180.0);
} else {
tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - hypot(C, B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+122) {
tmp = Math.atan(((B * 0.5) / A)) / (Math.PI / 180.0);
} else {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.hypot(C, B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+122: tmp = math.atan(((B * 0.5) / A)) / (math.pi / 180.0) else: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.hypot(C, B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+122) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) / Float64(pi / 180.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - hypot(C, B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+122) tmp = atan(((B * 0.5) / A)) / (pi / 180.0); else tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - hypot(C, B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+122], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+122}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(C, B\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.15e122Initial program 14.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified55.8%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6483.5%
Simplified83.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
atan-lowering-atan.f64N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6483.6%
Applied egg-rr83.6%
if -1.15e122 < A Initial program 57.1%
Taylor expanded in A around 0
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6481.8%
Simplified81.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))))
(t_1 (/ (- C A) B))
(t_2 (+ t_1 -1.0)))
(if (<= B -2.95e+79)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -2.1e-290)
t_0
(if (<= B 1.25e-211)
(/ (* 180.0 (atan t_2)) PI)
(if (<= B 2e-106)
t_0
(* (/ 180.0 PI) (atan (+ t_2 (* -0.5 (/ t_1 (/ B (- C A)))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
double t_1 = (C - A) / B;
double t_2 = t_1 + -1.0;
double tmp;
if (B <= -2.95e+79) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -2.1e-290) {
tmp = t_0;
} else if (B <= 1.25e-211) {
tmp = (180.0 * atan(t_2)) / ((double) M_PI);
} else if (B <= 2e-106) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_2 + (-0.5 * (t_1 / (B / (C - A))))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
double t_1 = (C - A) / B;
double t_2 = t_1 + -1.0;
double tmp;
if (B <= -2.95e+79) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -2.1e-290) {
tmp = t_0;
} else if (B <= 1.25e-211) {
tmp = (180.0 * Math.atan(t_2)) / Math.PI;
} else if (B <= 2e-106) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_2 + (-0.5 * (t_1 / (B / (C - A))))));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) t_1 = (C - A) / B t_2 = t_1 + -1.0 tmp = 0 if B <= -2.95e+79: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -2.1e-290: tmp = t_0 elif B <= 1.25e-211: tmp = (180.0 * math.atan(t_2)) / math.pi elif B <= 2e-106: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((t_2 + (-0.5 * (t_1 / (B / (C - A)))))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))) t_1 = Float64(Float64(C - A) / B) t_2 = Float64(t_1 + -1.0) tmp = 0.0 if (B <= -2.95e+79) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -2.1e-290) tmp = t_0; elseif (B <= 1.25e-211) tmp = Float64(Float64(180.0 * atan(t_2)) / pi); elseif (B <= 2e-106) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_2 + Float64(-0.5 * Float64(t_1 / Float64(B / Float64(C - A))))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); t_1 = (C - A) / B; t_2 = t_1 + -1.0; tmp = 0.0; if (B <= -2.95e+79) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -2.1e-290) tmp = t_0; elseif (B <= 1.25e-211) tmp = (180.0 * atan(t_2)) / pi; elseif (B <= 2e-106) tmp = t_0; else tmp = (180.0 / pi) * atan((t_2 + (-0.5 * (t_1 / (B / (C - A)))))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + -1.0), $MachinePrecision]}, If[LessEqual[B, -2.95e+79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.1e-290], t$95$0, If[LessEqual[B, 1.25e-211], N[(N[(180.0 * N[ArcTan[t$95$2], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2e-106], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$2 + N[(-0.5 * N[(t$95$1 / N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
t_1 := \frac{C - A}{B}\\
t_2 := t\_1 + -1\\
\mathbf{if}\;B \leq -2.95 \cdot 10^{+79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -2.1 \cdot 10^{-290}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-211}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} t\_2}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-106}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t\_2 + -0.5 \cdot \frac{t\_1}{\frac{B}{C - A}}\right)\\
\end{array}
\end{array}
if B < -2.95e79Initial program 40.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified97.9%
Taylor expanded in B around -inf
Simplified80.3%
if -2.95e79 < B < -2.1000000000000001e-290 or 1.2500000000000001e-211 < B < 1.99999999999999988e-106Initial program 42.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified64.9%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6462.9%
Simplified62.9%
if -2.1000000000000001e-290 < B < 1.2500000000000001e-211Initial program 82.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified88.7%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.1%
Simplified77.1%
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan-lowering-atan.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
PI-lowering-PI.f6477.1%
Applied egg-rr77.1%
if 1.99999999999999988e-106 < B Initial program 60.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.8%
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
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6471.2%
Simplified71.2%
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6481.1%
Applied egg-rr81.1%
Final simplification73.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))))
(t_1 (/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI)))
(if (<= B -6.2e+79)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -2.4e-290)
t_0
(if (<= B 1.2e-210) t_1 (if (<= B 1.9e-112) t_0 t_1))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
double t_1 = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
double tmp;
if (B <= -6.2e+79) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -2.4e-290) {
tmp = t_0;
} else if (B <= 1.2e-210) {
tmp = t_1;
} else if (B <= 1.9e-112) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
double t_1 = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
double tmp;
if (B <= -6.2e+79) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -2.4e-290) {
tmp = t_0;
} else if (B <= 1.2e-210) {
tmp = t_1;
} else if (B <= 1.9e-112) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) t_1 = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi tmp = 0 if B <= -6.2e+79: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -2.4e-290: tmp = t_0 elif B <= 1.2e-210: tmp = t_1 elif B <= 1.9e-112: tmp = t_0 else: tmp = t_1 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi) tmp = 0.0 if (B <= -6.2e+79) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -2.4e-290) tmp = t_0; elseif (B <= 1.2e-210) tmp = t_1; elseif (B <= 1.9e-112) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); t_1 = (180.0 * atan((((C - A) / B) + -1.0))) / pi; tmp = 0.0; if (B <= -6.2e+79) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -2.4e-290) tmp = t_0; elseif (B <= 1.2e-210) tmp = t_1; elseif (B <= 1.9e-112) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -6.2e+79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.4e-290], t$95$0, If[LessEqual[B, 1.2e-210], t$95$1, If[LessEqual[B, 1.9e-112], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\mathbf{if}\;B \leq -6.2 \cdot 10^{+79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -2.4 \cdot 10^{-290}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.9 \cdot 10^{-112}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if B < -6.1999999999999998e79Initial program 40.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified97.9%
Taylor expanded in B around -inf
Simplified80.3%
if -6.1999999999999998e79 < B < -2.4000000000000001e-290 or 1.20000000000000002e-210 < B < 1.89999999999999997e-112Initial program 42.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified64.5%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6463.1%
Simplified63.1%
if -2.4000000000000001e-290 < B < 1.20000000000000002e-210 or 1.89999999999999997e-112 < B Initial program 63.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified84.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.7%
Simplified78.7%
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan-lowering-atan.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
PI-lowering-PI.f6478.7%
Applied egg-rr78.7%
Final simplification73.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))))
(t_1 (atan (+ (/ (- C A) B) -1.0))))
(if (<= B -3e+79)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -1.05e-290)
t_0
(if (<= B 7.8e-212)
(* 180.0 (/ t_1 PI))
(if (<= B 2.1e-108) t_0 (* (/ 180.0 PI) t_1)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
double t_1 = atan((((C - A) / B) + -1.0));
double tmp;
if (B <= -3e+79) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -1.05e-290) {
tmp = t_0;
} else if (B <= 7.8e-212) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (B <= 2.1e-108) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
double t_1 = Math.atan((((C - A) / B) + -1.0));
double tmp;
if (B <= -3e+79) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -1.05e-290) {
tmp = t_0;
} else if (B <= 7.8e-212) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (B <= 2.1e-108) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * t_1;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) t_1 = math.atan((((C - A) / B) + -1.0)) tmp = 0 if B <= -3e+79: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -1.05e-290: tmp = t_0 elif B <= 7.8e-212: tmp = 180.0 * (t_1 / math.pi) elif B <= 2.1e-108: tmp = t_0 else: tmp = (180.0 / math.pi) * t_1 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))) t_1 = atan(Float64(Float64(Float64(C - A) / B) + -1.0)) tmp = 0.0 if (B <= -3e+79) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -1.05e-290) tmp = t_0; elseif (B <= 7.8e-212) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (B <= 2.1e-108) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * t_1); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); t_1 = atan((((C - A) / B) + -1.0)); tmp = 0.0; if (B <= -3e+79) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -1.05e-290) tmp = t_0; elseif (B <= 7.8e-212) tmp = 180.0 * (t_1 / pi); elseif (B <= 2.1e-108) tmp = t_0; else tmp = (180.0 / pi) * t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, -3e+79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.05e-290], t$95$0, If[LessEqual[B, 7.8e-212], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-108], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
t_1 := \tan^{-1} \left(\frac{C - A}{B} + -1\right)\\
\mathbf{if}\;B \leq -3 \cdot 10^{+79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -1.05 \cdot 10^{-290}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{t\_1}{\pi}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-108}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot t\_1\\
\end{array}
\end{array}
if B < -2.99999999999999974e79Initial program 40.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified97.9%
Taylor expanded in B around -inf
Simplified80.3%
if -2.99999999999999974e79 < B < -1.0500000000000001e-290 or 7.8e-212 < B < 2.0999999999999999e-108Initial program 42.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified64.5%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6463.1%
Simplified63.1%
if -1.0500000000000001e-290 < B < 7.8e-212Initial program 82.9%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.1%
Simplified77.1%
if 2.0999999999999999e-108 < B Initial program 60.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.8%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.0%
Simplified79.0%
Final simplification73.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* B (/ -0.5 (- C A))))))
(t_1 (* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI))))
(if (<= B -2.5e+79)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -3.9e-291)
t_0
(if (<= B 7.5e-211) t_1 (if (<= B 6e-118) t_0 t_1))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / (C - A))));
double t_1 = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
double tmp;
if (B <= -2.5e+79) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -3.9e-291) {
tmp = t_0;
} else if (B <= 7.5e-211) {
tmp = t_1;
} else if (B <= 6e-118) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((B * (-0.5 / (C - A))));
double t_1 = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
double tmp;
if (B <= -2.5e+79) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -3.9e-291) {
tmp = t_0;
} else if (B <= 7.5e-211) {
tmp = t_1;
} else if (B <= 6e-118) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((B * (-0.5 / (C - A)))) t_1 = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) tmp = 0 if B <= -2.5e+79: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -3.9e-291: tmp = t_0 elif B <= 7.5e-211: tmp = t_1 elif B <= 6e-118: tmp = t_0 else: tmp = t_1 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / Float64(C - A))))) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)) tmp = 0.0 if (B <= -2.5e+79) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -3.9e-291) tmp = t_0; elseif (B <= 7.5e-211) tmp = t_1; elseif (B <= 6e-118) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((B * (-0.5 / (C - A)))); t_1 = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); tmp = 0.0; if (B <= -2.5e+79) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -3.9e-291) tmp = t_0; elseif (B <= 7.5e-211) tmp = t_1; elseif (B <= 6e-118) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.5e+79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.9e-291], t$95$0, If[LessEqual[B, 7.5e-211], t$95$1, If[LessEqual[B, 6e-118], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\mathbf{if}\;B \leq -2.5 \cdot 10^{+79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -3.9 \cdot 10^{-291}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-118}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if B < -2.5e79Initial program 40.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified97.9%
Taylor expanded in B around -inf
Simplified80.3%
if -2.5e79 < B < -3.90000000000000016e-291 or 7.5000000000000003e-211 < B < 6.00000000000000035e-118Initial program 42.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified64.5%
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-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
--lowering--.f6463.1%
Simplified63.1%
if -3.90000000000000016e-291 < B < 7.5000000000000003e-211 or 6.00000000000000035e-118 < B Initial program 63.7%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6478.7%
Simplified78.7%
Final simplification73.1%
(FPCore (A B C)
:precision binary64
(if (<= B -2.7e-35)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.85e-181)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 5.4e-117)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-35) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.85e-181) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 5.4e-117) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-35) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.85e-181) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 5.4e-117) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.7e-35: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.85e-181: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 5.4e-117: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.7e-35) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.85e-181) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 5.4e-117) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.7e-35) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.85e-181) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 5.4e-117) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.7e-35], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.85e-181], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e-117], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.7 \cdot 10^{-35}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-181}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if B < -2.6999999999999997e-35Initial program 40.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.9%
Taylor expanded in B around -inf
Simplified62.4%
if -2.6999999999999997e-35 < B < 1.84999999999999992e-181Initial program 57.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.7%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.0%
Simplified50.0%
Taylor expanded in C around inf
/-lowering-/.f6443.6%
Simplified43.6%
if 1.84999999999999992e-181 < B < 5.40000000000000005e-117Initial program 26.8%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6452.6%
Simplified52.6%
if 5.40000000000000005e-117 < B Initial program 60.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.8%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6479.0%
Simplified79.0%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6471.5%
Simplified71.5%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.8e-35)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 6.5e-183)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 5.5e+40)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(* (/ 180.0 PI) (atan -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-35) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 6.5e-183) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 5.5e+40) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} 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.8e-35) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 6.5e-183) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 5.5e+40) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.8e-35: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 6.5e-183: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 5.5e+40: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.8e-35) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 6.5e-183) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 5.5e+40) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); 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.8e-35) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 6.5e-183) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 5.5e+40) tmp = (180.0 / pi) * atan((B * (0.5 / A))); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.8e-35], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-183], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e+40], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $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 -1.8 \cdot 10^{-35}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-183}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{+40}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.80000000000000009e-35Initial program 40.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.9%
Taylor expanded in B around -inf
Simplified62.4%
if -1.80000000000000009e-35 < B < 6.50000000000000014e-183Initial program 57.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.7%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.0%
Simplified50.0%
Taylor expanded in C around inf
/-lowering-/.f6443.6%
Simplified43.6%
if 6.50000000000000014e-183 < B < 5.49999999999999974e40Initial program 49.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified65.5%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6438.1%
Simplified38.1%
associate-*r/N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6438.1%
Applied egg-rr38.1%
if 5.49999999999999974e40 < B Initial program 58.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified93.5%
Taylor expanded in B around inf
Simplified78.6%
Final simplification55.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.35e-28)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 7.2e-180)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 1.05e+42)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* (/ 180.0 PI) (atan -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.35e-28) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 7.2e-180) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 1.05e+42) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} 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.35e-28) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 7.2e-180) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 1.05e+42) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.35e-28: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 7.2e-180: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 1.05e+42: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.35e-28) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 7.2e-180) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 1.05e+42) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); 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.35e-28) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 7.2e-180) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 1.05e+42) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.35e-28], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e-180], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.05e+42], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $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.35 \cdot 10^{-28}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-180}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{+42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.3499999999999999e-28Initial program 40.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.9%
Taylor expanded in B around -inf
Simplified62.4%
if -1.3499999999999999e-28 < B < 7.1999999999999998e-180Initial program 57.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.7%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6450.0%
Simplified50.0%
Taylor expanded in C around inf
/-lowering-/.f6443.6%
Simplified43.6%
if 7.1999999999999998e-180 < B < 1.04999999999999998e42Initial program 49.9%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6438.0%
Simplified38.0%
if 1.04999999999999998e42 < B Initial program 58.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified93.5%
Taylor expanded in B around inf
Simplified78.6%
Final simplification55.6%
(FPCore (A B C)
:precision binary64
(if (<= B -3e+53)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -7e-290)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3e+53) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -7e-290) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((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 <= -3e+53) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -7e-290) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / 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 <= -3e+53: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -7e-290: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / 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 <= -3e+53) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -7e-290) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / 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 <= -3e+53) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -7e-290) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3e+53], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7e-290], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / 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 \cdot 10^{+53}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -7 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999998e53Initial program 40.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified92.4%
Taylor expanded in B around -inf
Simplified76.7%
if -2.99999999999999998e53 < B < -6.99999999999999963e-290Initial program 47.5%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/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-*.f6449.3%
Simplified49.3%
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6449.3%
Applied egg-rr49.3%
if -6.99999999999999963e-290 < B Initial program 57.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.2%
Simplified69.2%
Final simplification65.5%
(FPCore (A B C)
:precision binary64
(if (<= C -1.75e-137)
(/ (* 180.0 (atan (+ -1.0 (/ C B)))) PI)
(if (<= C 4.4e+17)
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.75e-137) {
tmp = (180.0 * atan((-1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= 4.4e+17) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.75e-137) {
tmp = (180.0 * Math.atan((-1.0 + (C / B)))) / Math.PI;
} else if (C <= 4.4e+17) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.75e-137: tmp = (180.0 * math.atan((-1.0 + (C / B)))) / math.pi elif C <= 4.4e+17: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.75e-137) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(C / B)))) / pi); elseif (C <= 4.4e+17) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.75e-137) tmp = (180.0 * atan((-1.0 + (C / B)))) / pi; elseif (C <= 4.4e+17) tmp = (180.0 / pi) * atan((-1.0 - (A / B))); else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.75e-137], N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 4.4e+17], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.75 \cdot 10^{-137}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < -1.7500000000000001e-137Initial program 70.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified93.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.6%
Simplified74.6%
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan-lowering-atan.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
PI-lowering-PI.f6474.6%
Applied egg-rr74.6%
Taylor expanded in A around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6473.8%
Simplified73.8%
if -1.7500000000000001e-137 < C < 4.4e17Initial program 50.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6447.0%
Simplified47.0%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6447.2%
Simplified47.2%
if 4.4e17 < C Initial program 21.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/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-*.f6473.4%
Simplified73.4%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6473.4%
Applied egg-rr73.4%
Final simplification62.8%
(FPCore (A B C)
:precision binary64
(if (<= C -1.45e-137)
(* (/ 180.0 PI) (atan (+ -1.0 (/ C B))))
(if (<= C 4.3e+16)
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.45e-137) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 + (C / B)));
} else if (C <= 4.3e+16) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.45e-137) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 + (C / B)));
} else if (C <= 4.3e+16) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.45e-137: tmp = (180.0 / math.pi) * math.atan((-1.0 + (C / B))) elif C <= 4.3e+16: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.45e-137) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 + Float64(C / B)))); elseif (C <= 4.3e+16) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.45e-137) tmp = (180.0 / pi) * atan((-1.0 + (C / B))); elseif (C <= 4.3e+16) tmp = (180.0 / pi) * atan((-1.0 - (A / B))); else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.45e-137], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.3e+16], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.45 \cdot 10^{-137}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)\\
\mathbf{elif}\;C \leq 4.3 \cdot 10^{+16}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < -1.44999999999999993e-137Initial program 70.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified93.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.6%
Simplified74.6%
Taylor expanded in C around inf
/-lowering-/.f6473.8%
Simplified73.8%
if -1.44999999999999993e-137 < C < 4.3e16Initial program 50.5%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified75.6%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6447.0%
Simplified47.0%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6447.2%
Simplified47.2%
if 4.3e16 < C Initial program 21.7%
Taylor expanded in C around inf
+-lowering-+.f64N/A
associate-*r/N/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-*.f6473.4%
Simplified73.4%
*-commutativeN/A
div-invN/A
associate-*l*N/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
div0N/A
+-lft-identityN/A
atan-lowering-atan.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6473.4%
Applied egg-rr73.4%
Final simplification62.8%
(FPCore (A B C)
:precision binary64
(if (<= A -5.2e-9)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= A 2.8e-134)
(* (/ 180.0 PI) (atan (+ -1.0 (/ C B))))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e-9) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (A <= 2.8e-134) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 + (C / B)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e-9) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (A <= 2.8e-134) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 + (C / B)));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.2e-9: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif A <= 2.8e-134: tmp = (180.0 / math.pi) * math.atan((-1.0 + (C / B))) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.2e-9) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (A <= 2.8e-134) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 + Float64(C / B)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.2e-9) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (A <= 2.8e-134) tmp = (180.0 / pi) * atan((-1.0 + (C / B))); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.2e-9], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e-134], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-134}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -5.2000000000000002e-9Initial program 24.9%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified62.3%
Taylor expanded in A around -inf
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6465.6%
Simplified65.6%
associate-*r/N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6465.4%
Applied egg-rr65.4%
if -5.2000000000000002e-9 < A < 2.7999999999999999e-134Initial program 55.3%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.3%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6454.7%
Simplified54.7%
Taylor expanded in C around inf
/-lowering-/.f6454.8%
Simplified54.8%
if 2.7999999999999999e-134 < A Initial program 66.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified92.5%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.5%
Simplified67.5%
Taylor expanded in C around 0
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6466.7%
Simplified66.7%
Final simplification61.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.2e-27)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 6.8e+44)
(* (/ 180.0 PI) (atan (/ C B)))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-27) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 6.8e+44) {
tmp = (180.0 / ((double) M_PI)) * atan((C / 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 <= -1.2e-27) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 6.8e+44) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.2e-27: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 6.8e+44: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.2e-27) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 6.8e+44) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / 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 <= -1.2e-27) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 6.8e+44) tmp = (180.0 / pi) * atan((C / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.2e-27], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e+44], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / 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 -1.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{+44}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.20000000000000001e-27Initial program 40.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.9%
Taylor expanded in B around -inf
Simplified62.4%
if -1.20000000000000001e-27 < B < 6.8e44Initial program 54.7%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified73.1%
Taylor expanded in B around inf
+-commutativeN/A
associate--r+N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6449.4%
Simplified49.4%
Taylor expanded in C around inf
/-lowering-/.f6436.4%
Simplified36.4%
if 6.8e44 < B Initial program 58.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified93.4%
Taylor expanded in B around inf
Simplified79.7%
Final simplification53.3%
(FPCore (A B C) :precision binary64 (if (<= B -1.55e-89) (* (/ 180.0 PI) (atan 1.0)) (if (<= B 7e-91) (/ (* 180.0 (atan 0.0)) PI) (* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.55e-89) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 7e-91) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} 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.55e-89) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 7e-91) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.55e-89: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 7e-91: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.55e-89) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 7e-91) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); 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.55e-89) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 7e-91) tmp = (180.0 * atan(0.0)) / pi; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.55e-89], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-91], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.55 \cdot 10^{-89}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-91}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.54999999999999998e-89Initial program 42.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.8%
Taylor expanded in B around -inf
Simplified59.8%
if -1.54999999999999998e-89 < B < 6.9999999999999997e-91Initial program 51.1%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified76.3%
Taylor expanded in C around inf
associate-*r/N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
/-lowering-/.f6432.0%
Simplified32.0%
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
div0N/A
atan-lowering-atan.f64N/A
PI-lowering-PI.f6432.0%
Applied egg-rr32.0%
if 6.9999999999999997e-91 < B Initial program 59.8%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified83.0%
Taylor expanded in B around inf
Simplified61.3%
Final simplification50.2%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
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 <= -5e-310) {
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 <= -5e-310: 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 <= -5e-310) 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 <= -5e-310) 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, -5e-310], 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 -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 45.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified78.8%
Taylor expanded in B around -inf
Simplified40.8%
if -4.999999999999985e-310 < B Initial program 57.0%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.8%
Taylor expanded in B around inf
Simplified45.4%
Final simplification43.2%
(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 51.6%
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified79.3%
Taylor expanded in B around inf
Simplified24.7%
Final simplification24.7%
herbie shell --seed 2024158
(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)))