
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -0.5) (not (<= t_0 5e-6)))
(* (/ 180.0 PI) (atan (/ (- (- C A) (hypot B (- C A))) B)))
(/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556)))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 5e-6)) {
tmp = (180.0 / ((double) M_PI)) * atan((((C - A) - hypot(B, (C - A))) / B));
} else {
tmp = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 5e-6)) {
tmp = (180.0 / Math.PI) * Math.atan((((C - A) - Math.hypot(B, (C - A))) / B));
} else {
tmp = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -0.5) or not (t_0 <= 5e-6): tmp = (180.0 / math.pi) * math.atan((((C - A) - math.hypot(B, (C - A))) / B)) else: tmp = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -0.5) || !(t_0 <= 5e-6)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B))); else tmp = Float64(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -0.5) || ~((t_0 <= 5e-6))) tmp = (180.0 / pi) * atan((((C - A) - hypot(B, (C - A))) / B)); else tmp = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 5e-6]], $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], N[(N[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 5 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 or 5.00000000000000041e-6 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 55.4%
Simplified85.9%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 5.00000000000000041e-6Initial program 17.8%
Simplified17.8%
Taylor expanded in B around 0 98.6%
associate-*r/98.6%
Simplified98.6%
*-commutative98.6%
clear-num98.6%
un-div-inv98.7%
div-inv98.7%
associate-/r*98.6%
Applied egg-rr98.6%
Taylor expanded in A around -inf 98.5%
associate-*r/98.5%
*-commutative98.5%
mul-1-neg98.5%
sub-neg98.5%
associate-*r/98.5%
/-rgt-identity98.5%
associate-*r/98.4%
*-commutative98.4%
associate-*r/98.5%
associate-/l*98.6%
associate-*r/98.7%
associate-/l*98.7%
associate-/r/98.7%
metadata-eval98.7%
*-commutative98.7%
Simplified98.7%
Final simplification87.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e+96)
(/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556))
(if (<= A 1.4)
(/ 180.0 (* (/ -1.0 (atan (/ (- C (hypot C B)) B))) (- PI)))
(/ (atan (/ (+ A (hypot A B)) B)) (* PI -0.005555555555555556)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+96) {
tmp = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= 1.4) {
tmp = 180.0 / ((-1.0 / atan(((C - hypot(C, B)) / B))) * -((double) M_PI));
} else {
tmp = atan(((A + hypot(A, B)) / B)) / (((double) M_PI) * -0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+96) {
tmp = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
} else if (A <= 1.4) {
tmp = 180.0 / ((-1.0 / Math.atan(((C - Math.hypot(C, B)) / B))) * -Math.PI);
} else {
tmp = Math.atan(((A + Math.hypot(A, B)) / B)) / (Math.PI * -0.005555555555555556);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.8e+96: tmp = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) elif A <= 1.4: tmp = 180.0 / ((-1.0 / math.atan(((C - math.hypot(C, B)) / B))) * -math.pi) else: tmp = math.atan(((A + math.hypot(A, B)) / B)) / (math.pi * -0.005555555555555556) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.8e+96) tmp = Float64(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); elseif (A <= 1.4) tmp = Float64(180.0 / Float64(Float64(-1.0 / atan(Float64(Float64(C - hypot(C, B)) / B))) * Float64(-pi))); else tmp = Float64(atan(Float64(Float64(A + hypot(A, B)) / B)) / Float64(pi * -0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e+96) tmp = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); elseif (A <= 1.4) tmp = 180.0 / ((-1.0 / atan(((C - hypot(C, B)) / B))) * -pi); else tmp = atan(((A + hypot(A, B)) / B)) / (pi * -0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e+96], N[(N[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.4], N[(180.0 / N[(N[(-1.0 / N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * (-Pi)), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.8 \cdot 10^{+96}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq 1.4:\\
\;\;\;\;\frac{180}{\frac{-1}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)} \cdot \left(-\pi\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi \cdot -0.005555555555555556}\\
\end{array}
\end{array}
if A < -1.80000000000000007e96Initial program 17.8%
Simplified59.9%
Taylor expanded in B around 0 85.9%
associate-*r/85.9%
Simplified85.9%
*-commutative85.9%
clear-num85.9%
un-div-inv85.9%
div-inv85.9%
associate-/r*85.9%
Applied egg-rr85.9%
Taylor expanded in A around -inf 85.8%
associate-*r/85.8%
*-commutative85.8%
mul-1-neg85.8%
sub-neg85.8%
associate-*r/85.8%
/-rgt-identity85.8%
associate-*r/85.7%
*-commutative85.7%
associate-*r/85.8%
associate-/l*85.8%
associate-*r/85.9%
associate-/l*85.9%
associate-/r/85.9%
metadata-eval85.9%
*-commutative85.9%
Simplified85.9%
if -1.80000000000000007e96 < A < 1.3999999999999999Initial program 52.6%
Simplified52.4%
Taylor expanded in A around 0 51.3%
unpow251.3%
unpow251.3%
hypot-def75.3%
Simplified75.3%
clear-num75.2%
inv-pow75.2%
div-inv75.3%
unpow-prod-down75.3%
inv-pow75.3%
Applied egg-rr75.3%
associate-*r*75.2%
unpow-175.2%
associate-*r/75.2%
*-commutative75.2%
associate-*l/75.2%
frac-2neg75.2%
metadata-eval75.2%
div-inv75.2%
associate-/r*75.2%
metadata-eval75.2%
frac-2neg75.2%
metadata-eval75.2%
associate-*r/75.2%
Applied egg-rr75.3%
if 1.3999999999999999 < A Initial program 71.5%
Simplified71.5%
Taylor expanded in C around 0 71.6%
associate-*r/71.6%
mul-1-neg71.6%
+-commutative71.6%
unpow271.6%
unpow271.6%
hypot-def83.8%
Simplified83.8%
*-commutative83.8%
frac-2neg83.8%
associate-*l/83.8%
associate-/l*83.8%
distribute-frac-neg83.8%
atan-neg83.8%
remove-double-neg83.8%
hypot-udef71.6%
+-commutative71.6%
hypot-def83.8%
distribute-neg-frac83.8%
div-inv83.8%
distribute-rgt-neg-in83.8%
metadata-eval83.8%
metadata-eval83.8%
Applied egg-rr83.8%
Final simplification79.7%
(FPCore (A B C) :precision binary64 (if (<= A -1.55e+96) (/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e+96) {
tmp = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e+96) {
tmp = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.55e+96: tmp = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.55e+96) tmp = Float64(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.55e+96) tmp = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.55e+96], N[(N[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.55 \cdot 10^{+96}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.5499999999999999e96Initial program 17.8%
Simplified59.9%
Taylor expanded in B around 0 85.9%
associate-*r/85.9%
Simplified85.9%
*-commutative85.9%
clear-num85.9%
un-div-inv85.9%
div-inv85.9%
associate-/r*85.9%
Applied egg-rr85.9%
Taylor expanded in A around -inf 85.8%
associate-*r/85.8%
*-commutative85.8%
mul-1-neg85.8%
sub-neg85.8%
associate-*r/85.8%
/-rgt-identity85.8%
associate-*r/85.7%
*-commutative85.7%
associate-*r/85.8%
associate-/l*85.8%
associate-*r/85.9%
associate-/l*85.9%
associate-/r/85.9%
metadata-eval85.9%
*-commutative85.9%
Simplified85.9%
if -1.5499999999999999e96 < A Initial program 58.9%
Simplified81.5%
Final simplification82.4%
(FPCore (A B C)
:precision binary64
(if (<= A -3.6e+97)
(/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556))
(if (<= A 6.8e+88)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* -180.0 (atan (/ (+ B A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.6e+97) {
tmp = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= 6.8e+88) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (-180.0 * atan(((B + A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.6e+97) {
tmp = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
} else if (A <= 6.8e+88) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((B + A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.6e+97: tmp = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) elif A <= 6.8e+88: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (-180.0 * math.atan(((B + A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.6e+97) tmp = Float64(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); elseif (A <= 6.8e+88) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(B + A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.6e+97) tmp = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); elseif (A <= 6.8e+88) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (-180.0 * atan(((B + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.6e+97], N[(N[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.8e+88], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.6 \cdot 10^{+97}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{+88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{B + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.59999999999999966e97Initial program 17.8%
Simplified59.9%
Taylor expanded in B around 0 85.9%
associate-*r/85.9%
Simplified85.9%
*-commutative85.9%
clear-num85.9%
un-div-inv85.9%
div-inv85.9%
associate-/r*85.9%
Applied egg-rr85.9%
Taylor expanded in A around -inf 85.8%
associate-*r/85.8%
*-commutative85.8%
mul-1-neg85.8%
sub-neg85.8%
associate-*r/85.8%
/-rgt-identity85.8%
associate-*r/85.7%
*-commutative85.7%
associate-*r/85.8%
associate-/l*85.8%
associate-*r/85.9%
associate-/l*85.9%
associate-/r/85.9%
metadata-eval85.9%
*-commutative85.9%
Simplified85.9%
if -3.59999999999999966e97 < A < 6.80000000000000008e88Initial program 55.4%
Simplified55.3%
Taylor expanded in A around 0 52.0%
unpow252.0%
unpow252.0%
hypot-def75.0%
Simplified75.0%
if 6.80000000000000008e88 < A Initial program 70.3%
Simplified70.3%
Taylor expanded in C around 0 70.4%
associate-*r/70.4%
mul-1-neg70.4%
+-commutative70.4%
unpow270.4%
unpow270.4%
hypot-def84.7%
Simplified84.7%
Taylor expanded in A around 0 77.9%
+-commutative77.9%
Simplified77.9%
*-commutative77.9%
frac-2neg77.9%
associate-*l/77.9%
clear-num77.9%
*-commutative77.9%
distribute-frac-neg77.9%
atan-neg77.9%
remove-double-neg77.9%
+-commutative77.9%
Applied egg-rr77.9%
associate-/r*77.9%
associate-/l*77.9%
*-lft-identity77.9%
associate-/l*77.9%
*-commutative77.9%
neg-mul-177.9%
associate-/r*77.9%
associate-/l*77.9%
associate-/r/77.9%
metadata-eval77.9%
+-commutative77.9%
Simplified77.9%
Final simplification77.8%
(FPCore (A B C)
:precision binary64
(if (<= A -3.2e+98)
(/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556))
(if (<= A 0.9)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (atan (/ (+ A (hypot A B)) B)) (* PI -0.005555555555555556)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.2e+98) {
tmp = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= 0.9) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = atan(((A + hypot(A, B)) / B)) / (((double) M_PI) * -0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.2e+98) {
tmp = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
} else if (A <= 0.9) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = Math.atan(((A + Math.hypot(A, B)) / B)) / (Math.PI * -0.005555555555555556);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.2e+98: tmp = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) elif A <= 0.9: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = math.atan(((A + math.hypot(A, B)) / B)) / (math.pi * -0.005555555555555556) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.2e+98) tmp = Float64(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); elseif (A <= 0.9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(atan(Float64(Float64(A + hypot(A, B)) / B)) / Float64(pi * -0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.2e+98) tmp = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); elseif (A <= 0.9) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = atan(((A + hypot(A, B)) / B)) / (pi * -0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.2e+98], N[(N[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 0.9], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq 0.9:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi \cdot -0.005555555555555556}\\
\end{array}
\end{array}
if A < -3.2000000000000002e98Initial program 17.8%
Simplified59.9%
Taylor expanded in B around 0 85.9%
associate-*r/85.9%
Simplified85.9%
*-commutative85.9%
clear-num85.9%
un-div-inv85.9%
div-inv85.9%
associate-/r*85.9%
Applied egg-rr85.9%
Taylor expanded in A around -inf 85.8%
associate-*r/85.8%
*-commutative85.8%
mul-1-neg85.8%
sub-neg85.8%
associate-*r/85.8%
/-rgt-identity85.8%
associate-*r/85.7%
*-commutative85.7%
associate-*r/85.8%
associate-/l*85.8%
associate-*r/85.9%
associate-/l*85.9%
associate-/r/85.9%
metadata-eval85.9%
*-commutative85.9%
Simplified85.9%
if -3.2000000000000002e98 < A < 0.900000000000000022Initial program 52.6%
Simplified52.4%
Taylor expanded in A around 0 51.3%
unpow251.3%
unpow251.3%
hypot-def75.3%
Simplified75.3%
if 0.900000000000000022 < A Initial program 71.5%
Simplified71.5%
Taylor expanded in C around 0 71.6%
associate-*r/71.6%
mul-1-neg71.6%
+-commutative71.6%
unpow271.6%
unpow271.6%
hypot-def83.8%
Simplified83.8%
*-commutative83.8%
frac-2neg83.8%
associate-*l/83.8%
associate-/l*83.8%
distribute-frac-neg83.8%
atan-neg83.8%
remove-double-neg83.8%
hypot-udef71.6%
+-commutative71.6%
hypot-def83.8%
distribute-neg-frac83.8%
div-inv83.8%
distribute-rgt-neg-in83.8%
metadata-eval83.8%
metadata-eval83.8%
Applied egg-rr83.8%
Final simplification79.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -1.2e-59)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -8.8e-157)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B -4.4e-209)
t_0
(if (<= B -1.2e-290)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 1.85e-55) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -1.2e-59) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -8.8e-157) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= -4.4e-209) {
tmp = t_0;
} else if (B <= -1.2e-290) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 1.85e-55) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -1.2e-59) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -8.8e-157) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= -4.4e-209) {
tmp = t_0;
} else if (B <= -1.2e-290) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 1.85e-55) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -1.2e-59: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -8.8e-157: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= -4.4e-209: tmp = t_0 elif B <= -1.2e-290: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 1.85e-55: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -1.2e-59) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -8.8e-157) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= -4.4e-209) tmp = t_0; elseif (B <= -1.2e-290) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 1.85e-55) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -1.2e-59) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -8.8e-157) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= -4.4e-209) tmp = t_0; elseif (B <= -1.2e-290) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 1.85e-55) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.2e-59], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.8e-157], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-209], t$95$0, If[LessEqual[B, -1.2e-290], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.85e-55], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.2 \cdot 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -8.8 \cdot 10^{-157}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -4.4 \cdot 10^{-209}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.2 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-55}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.20000000000000008e-59Initial program 53.5%
Simplified53.5%
Taylor expanded in B around -inf 54.0%
if -1.20000000000000008e-59 < B < -8.80000000000000041e-157Initial program 60.5%
Simplified60.4%
Taylor expanded in C around 0 55.1%
associate-*r/55.1%
mul-1-neg55.1%
+-commutative55.1%
unpow255.1%
unpow255.1%
hypot-def55.5%
Simplified55.5%
Taylor expanded in A around 0 47.4%
+-commutative47.4%
Simplified47.4%
Taylor expanded in B around 0 48.6%
associate-*r/48.6%
mul-1-neg48.6%
Simplified48.6%
if -8.80000000000000041e-157 < B < -4.40000000000000019e-209 or -1.2e-290 < B < 1.84999999999999993e-55Initial program 42.4%
Simplified38.4%
Taylor expanded in C around inf 47.2%
associate-*r/47.2%
distribute-rgt1-in47.2%
metadata-eval47.2%
mul0-lft47.2%
metadata-eval47.2%
Simplified47.2%
if -4.40000000000000019e-209 < B < -1.2e-290Initial program 64.1%
Simplified64.0%
Taylor expanded in A around 0 58.5%
unpow258.5%
unpow258.5%
hypot-def64.3%
Simplified64.3%
Taylor expanded in B around -inf 57.6%
Taylor expanded in B around 0 58.0%
if 1.84999999999999993e-55 < B Initial program 50.3%
Simplified50.2%
Taylor expanded in B around inf 53.1%
Final simplification51.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -1.16e-156)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B -9.2e-212)
t_0
(if (<= B -3.5e-291)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 2.2e-55) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -1.16e-156) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= -9.2e-212) {
tmp = t_0;
} else if (B <= -3.5e-291) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 2.2e-55) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -1.16e-156) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= -9.2e-212) {
tmp = t_0;
} else if (B <= -3.5e-291) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 2.2e-55) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -1.16e-156: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= -9.2e-212: tmp = t_0 elif B <= -3.5e-291: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 2.2e-55: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -1.16e-156) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= -9.2e-212) tmp = t_0; elseif (B <= -3.5e-291) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 2.2e-55) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -1.16e-156) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= -9.2e-212) tmp = t_0; elseif (B <= -3.5e-291) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 2.2e-55) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.16e-156], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.2e-212], t$95$0, If[LessEqual[B, -3.5e-291], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.2e-55], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.16 \cdot 10^{-156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -9.2 \cdot 10^{-212}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.5 \cdot 10^{-291}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-55}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.15999999999999995e-156Initial program 54.8%
Simplified54.8%
Taylor expanded in C around 0 50.0%
associate-*r/50.0%
mul-1-neg50.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-def62.9%
Simplified62.9%
Taylor expanded in B around -inf 61.0%
mul-1-neg61.0%
unsub-neg61.0%
Simplified61.0%
if -1.15999999999999995e-156 < B < -9.2000000000000004e-212 or -3.49999999999999996e-291 < B < 2.2e-55Initial program 42.4%
Simplified38.4%
Taylor expanded in C around inf 47.2%
associate-*r/47.2%
distribute-rgt1-in47.2%
metadata-eval47.2%
mul0-lft47.2%
metadata-eval47.2%
Simplified47.2%
if -9.2000000000000004e-212 < B < -3.49999999999999996e-291Initial program 64.1%
Simplified64.0%
Taylor expanded in A around 0 58.5%
unpow258.5%
unpow258.5%
hypot-def64.3%
Simplified64.3%
Taylor expanded in B around -inf 57.6%
Taylor expanded in B around 0 58.0%
if 2.2e-55 < B Initial program 50.3%
Simplified50.2%
Taylor expanded in B around inf 53.1%
Final simplification54.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.9e+85)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.06e-274)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 26.0)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.9e+85) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.06e-274) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 26.0) {
tmp = 180.0 * (atan(((B + C) / B)) / ((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 <= -2.9e+85) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.06e-274) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 26.0) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / 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 <= -2.9e+85: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.06e-274: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 26.0: tmp = 180.0 * (math.atan(((B + C) / B)) / 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 <= -2.9e+85) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.06e-274) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 26.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.9e+85) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.06e-274) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 26.0) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.9e+85], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.06e-274], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 26.0], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.9 \cdot 10^{+85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.06 \cdot 10^{-274}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 26:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.89999999999999997e85Initial program 17.6%
Simplified12.2%
Taylor expanded in A around -inf 81.8%
associate-*r/81.8%
Simplified81.8%
if -2.89999999999999997e85 < A < -1.05999999999999997e-274Initial program 46.4%
Simplified46.1%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def68.3%
Simplified68.3%
Taylor expanded in C around 0 49.3%
mul-1-neg49.3%
unsub-neg49.3%
Simplified49.3%
if -1.05999999999999997e-274 < A < 26Initial program 59.8%
Simplified59.8%
Taylor expanded in A around 0 57.1%
unpow257.1%
unpow257.1%
hypot-def82.7%
Simplified82.7%
Taylor expanded in B around -inf 59.7%
if 26 < A Initial program 71.5%
Simplified71.5%
Taylor expanded in C around 0 71.6%
associate-*r/71.6%
mul-1-neg71.6%
+-commutative71.6%
unpow271.6%
unpow271.6%
hypot-def83.8%
Simplified83.8%
Taylor expanded in B around -inf 70.2%
mul-1-neg70.2%
unsub-neg70.2%
Simplified70.2%
Final simplification64.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.4e+77)
(/ (atan (/ B (/ A -0.5))) (* PI -0.005555555555555556))
(if (<= A -1.5e-274)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 0.16)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+77) {
tmp = atan((B / (A / -0.5))) / (((double) M_PI) * -0.005555555555555556);
} else if (A <= -1.5e-274) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 0.16) {
tmp = 180.0 * (atan(((B + C) / B)) / ((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 <= -2.4e+77) {
tmp = Math.atan((B / (A / -0.5))) / (Math.PI * -0.005555555555555556);
} else if (A <= -1.5e-274) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 0.16) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / 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 <= -2.4e+77: tmp = math.atan((B / (A / -0.5))) / (math.pi * -0.005555555555555556) elif A <= -1.5e-274: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 0.16: tmp = 180.0 * (math.atan(((B + C) / B)) / 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 <= -2.4e+77) tmp = Float64(atan(Float64(B / Float64(A / -0.5))) / Float64(pi * -0.005555555555555556)); elseif (A <= -1.5e-274) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 0.16) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e+77) tmp = atan((B / (A / -0.5))) / (pi * -0.005555555555555556); elseif (A <= -1.5e-274) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 0.16) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e+77], N[(N[ArcTan[N[(B / N[(A / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.5e-274], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 0.16], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{+77}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{A}{-0.5}}\right)}{\pi \cdot -0.005555555555555556}\\
\mathbf{elif}\;A \leq -1.5 \cdot 10^{-274}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.16:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.3999999999999999e77Initial program 17.6%
Simplified12.2%
Taylor expanded in C around 0 17.6%
associate-*r/17.6%
mul-1-neg17.6%
+-commutative17.6%
unpow217.6%
unpow217.6%
hypot-def52.6%
Simplified52.6%
*-commutative52.6%
frac-2neg52.6%
associate-*l/52.6%
associate-/l*52.6%
distribute-frac-neg52.6%
atan-neg52.6%
remove-double-neg52.6%
hypot-udef17.6%
+-commutative17.6%
hypot-def52.6%
distribute-neg-frac52.6%
div-inv52.6%
distribute-rgt-neg-in52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
Taylor expanded in A around -inf 81.9%
*-commutative81.9%
associate-/r/81.9%
Simplified81.9%
if -2.3999999999999999e77 < A < -1.49999999999999989e-274Initial program 46.4%
Simplified46.1%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def68.3%
Simplified68.3%
Taylor expanded in C around 0 49.3%
mul-1-neg49.3%
unsub-neg49.3%
Simplified49.3%
if -1.49999999999999989e-274 < A < 0.160000000000000003Initial program 59.8%
Simplified59.8%
Taylor expanded in A around 0 57.1%
unpow257.1%
unpow257.1%
hypot-def82.7%
Simplified82.7%
Taylor expanded in B around -inf 59.7%
if 0.160000000000000003 < A Initial program 71.5%
Simplified71.5%
Taylor expanded in C around 0 71.6%
associate-*r/71.6%
mul-1-neg71.6%
+-commutative71.6%
unpow271.6%
unpow271.6%
hypot-def83.8%
Simplified83.8%
Taylor expanded in B around -inf 70.2%
mul-1-neg70.2%
unsub-neg70.2%
Simplified70.2%
Final simplification64.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.9e+79)
(/ (atan (/ B (/ A -0.5))) (* PI -0.005555555555555556))
(if (<= A -1.3e-275)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 1.15e-11)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(/ (* -180.0 (atan (/ (+ B A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.9e+79) {
tmp = atan((B / (A / -0.5))) / (((double) M_PI) * -0.005555555555555556);
} else if (A <= -1.3e-275) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 1.15e-11) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else {
tmp = (-180.0 * atan(((B + A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.9e+79) {
tmp = Math.atan((B / (A / -0.5))) / (Math.PI * -0.005555555555555556);
} else if (A <= -1.3e-275) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 1.15e-11) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((B + A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.9e+79: tmp = math.atan((B / (A / -0.5))) / (math.pi * -0.005555555555555556) elif A <= -1.3e-275: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 1.15e-11: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = (-180.0 * math.atan(((B + A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.9e+79) tmp = Float64(atan(Float64(B / Float64(A / -0.5))) / Float64(pi * -0.005555555555555556)); elseif (A <= -1.3e-275) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 1.15e-11) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(B + A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.9e+79) tmp = atan((B / (A / -0.5))) / (pi * -0.005555555555555556); elseif (A <= -1.3e-275) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 1.15e-11) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = (-180.0 * atan(((B + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.9e+79], N[(N[ArcTan[N[(B / N[(A / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.3e-275], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.15e-11], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.9 \cdot 10^{+79}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{A}{-0.5}}\right)}{\pi \cdot -0.005555555555555556}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-275}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.15 \cdot 10^{-11}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{B + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.89999999999999992e79Initial program 17.6%
Simplified12.2%
Taylor expanded in C around 0 17.6%
associate-*r/17.6%
mul-1-neg17.6%
+-commutative17.6%
unpow217.6%
unpow217.6%
hypot-def52.6%
Simplified52.6%
*-commutative52.6%
frac-2neg52.6%
associate-*l/52.6%
associate-/l*52.6%
distribute-frac-neg52.6%
atan-neg52.6%
remove-double-neg52.6%
hypot-udef17.6%
+-commutative17.6%
hypot-def52.6%
distribute-neg-frac52.6%
div-inv52.6%
distribute-rgt-neg-in52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
Taylor expanded in A around -inf 81.9%
*-commutative81.9%
associate-/r/81.9%
Simplified81.9%
if -2.89999999999999992e79 < A < -1.29999999999999996e-275Initial program 46.4%
Simplified46.1%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def68.3%
Simplified68.3%
Taylor expanded in C around 0 49.3%
mul-1-neg49.3%
unsub-neg49.3%
Simplified49.3%
if -1.29999999999999996e-275 < A < 1.15000000000000007e-11Initial program 59.4%
Simplified59.4%
Taylor expanded in A around 0 57.9%
unpow257.9%
unpow257.9%
hypot-def83.3%
Simplified83.3%
Taylor expanded in B around -inf 60.8%
if 1.15000000000000007e-11 < A Initial program 71.3%
Simplified71.3%
Taylor expanded in C around 0 70.3%
associate-*r/70.3%
mul-1-neg70.3%
+-commutative70.3%
unpow270.3%
unpow270.3%
hypot-def82.0%
Simplified82.0%
Taylor expanded in A around 0 70.5%
+-commutative70.5%
Simplified70.5%
*-commutative70.5%
frac-2neg70.5%
associate-*l/70.5%
clear-num70.5%
*-commutative70.5%
distribute-frac-neg70.5%
atan-neg70.5%
remove-double-neg70.5%
+-commutative70.5%
Applied egg-rr70.5%
associate-/r*70.5%
associate-/l*70.5%
*-lft-identity70.5%
associate-/l*70.5%
*-commutative70.5%
neg-mul-170.5%
associate-/r*70.5%
associate-/l*70.5%
associate-/r/70.5%
metadata-eval70.5%
+-commutative70.5%
Simplified70.5%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.1e+82)
(/ (atan (/ B (/ A -0.5))) (* PI -0.005555555555555556))
(if (<= A -2.7e-275)
(/ (* 180.0 (atan (+ -1.0 (/ C B)))) PI)
(if (<= A 5.2e-12)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(/ (* -180.0 (atan (/ (+ B A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.1e+82) {
tmp = atan((B / (A / -0.5))) / (((double) M_PI) * -0.005555555555555556);
} else if (A <= -2.7e-275) {
tmp = (180.0 * atan((-1.0 + (C / B)))) / ((double) M_PI);
} else if (A <= 5.2e-12) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else {
tmp = (-180.0 * atan(((B + A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.1e+82) {
tmp = Math.atan((B / (A / -0.5))) / (Math.PI * -0.005555555555555556);
} else if (A <= -2.7e-275) {
tmp = (180.0 * Math.atan((-1.0 + (C / B)))) / Math.PI;
} else if (A <= 5.2e-12) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((B + A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.1e+82: tmp = math.atan((B / (A / -0.5))) / (math.pi * -0.005555555555555556) elif A <= -2.7e-275: tmp = (180.0 * math.atan((-1.0 + (C / B)))) / math.pi elif A <= 5.2e-12: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = (-180.0 * math.atan(((B + A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.1e+82) tmp = Float64(atan(Float64(B / Float64(A / -0.5))) / Float64(pi * -0.005555555555555556)); elseif (A <= -2.7e-275) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(C / B)))) / pi); elseif (A <= 5.2e-12) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(B + A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.1e+82) tmp = atan((B / (A / -0.5))) / (pi * -0.005555555555555556); elseif (A <= -2.7e-275) tmp = (180.0 * atan((-1.0 + (C / B)))) / pi; elseif (A <= 5.2e-12) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = (-180.0 * atan(((B + A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.1e+82], N[(N[ArcTan[N[(B / N[(A / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.7e-275], N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5.2e-12], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(B + A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.1 \cdot 10^{+82}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{A}{-0.5}}\right)}{\pi \cdot -0.005555555555555556}\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{-275}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.2 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{B + A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.1000000000000001e82Initial program 17.6%
Simplified12.2%
Taylor expanded in C around 0 17.6%
associate-*r/17.6%
mul-1-neg17.6%
+-commutative17.6%
unpow217.6%
unpow217.6%
hypot-def52.6%
Simplified52.6%
*-commutative52.6%
frac-2neg52.6%
associate-*l/52.6%
associate-/l*52.6%
distribute-frac-neg52.6%
atan-neg52.6%
remove-double-neg52.6%
hypot-udef17.6%
+-commutative17.6%
hypot-def52.6%
distribute-neg-frac52.6%
div-inv52.6%
distribute-rgt-neg-in52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
Taylor expanded in A around -inf 81.9%
*-commutative81.9%
associate-/r/81.9%
Simplified81.9%
if -1.1000000000000001e82 < A < -2.69999999999999993e-275Initial program 46.4%
Simplified46.1%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def68.3%
Simplified68.3%
Taylor expanded in C around 0 49.3%
mul-1-neg49.3%
unsub-neg49.3%
Simplified49.3%
associate-*r/49.3%
div-sub49.3%
*-inverses49.3%
sub-neg49.3%
metadata-eval49.3%
+-commutative49.3%
Applied egg-rr49.3%
if -2.69999999999999993e-275 < A < 5.19999999999999965e-12Initial program 59.4%
Simplified59.4%
Taylor expanded in A around 0 57.9%
unpow257.9%
unpow257.9%
hypot-def83.3%
Simplified83.3%
Taylor expanded in B around -inf 60.8%
if 5.19999999999999965e-12 < A Initial program 71.3%
Simplified71.3%
Taylor expanded in C around 0 70.3%
associate-*r/70.3%
mul-1-neg70.3%
+-commutative70.3%
unpow270.3%
unpow270.3%
hypot-def82.0%
Simplified82.0%
Taylor expanded in A around 0 70.5%
+-commutative70.5%
Simplified70.5%
*-commutative70.5%
frac-2neg70.5%
associate-*l/70.5%
clear-num70.5%
*-commutative70.5%
distribute-frac-neg70.5%
atan-neg70.5%
remove-double-neg70.5%
+-commutative70.5%
Applied egg-rr70.5%
associate-/r*70.5%
associate-/l*70.5%
*-lft-identity70.5%
associate-/l*70.5%
*-commutative70.5%
neg-mul-170.5%
associate-/r*70.5%
associate-/l*70.5%
associate-/r/70.5%
metadata-eval70.5%
+-commutative70.5%
Simplified70.5%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.9e+81)
(/ (atan (/ B (/ A -0.5))) (* PI -0.005555555555555556))
(if (<= A -1.55e-274)
(/ (* 180.0 (atan (+ -1.0 (/ C B)))) PI)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e+81) {
tmp = atan((B / (A / -0.5))) / (((double) M_PI) * -0.005555555555555556);
} else if (A <= -1.55e-274) {
tmp = (180.0 * atan((-1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e+81) {
tmp = Math.atan((B / (A / -0.5))) / (Math.PI * -0.005555555555555556);
} else if (A <= -1.55e-274) {
tmp = (180.0 * Math.atan((-1.0 + (C / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.9e+81: tmp = math.atan((B / (A / -0.5))) / (math.pi * -0.005555555555555556) elif A <= -1.55e-274: tmp = (180.0 * math.atan((-1.0 + (C / B)))) / math.pi else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.9e+81) tmp = Float64(atan(Float64(B / Float64(A / -0.5))) / Float64(pi * -0.005555555555555556)); elseif (A <= -1.55e-274) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(C / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.9e+81) tmp = atan((B / (A / -0.5))) / (pi * -0.005555555555555556); elseif (A <= -1.55e-274) tmp = (180.0 * atan((-1.0 + (C / B)))) / pi; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.9e+81], N[(N[ArcTan[N[(B / N[(A / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.55e-274], N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.9 \cdot 10^{+81}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{A}{-0.5}}\right)}{\pi \cdot -0.005555555555555556}\\
\mathbf{elif}\;A \leq -1.55 \cdot 10^{-274}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.9e81Initial program 17.6%
Simplified12.2%
Taylor expanded in C around 0 17.6%
associate-*r/17.6%
mul-1-neg17.6%
+-commutative17.6%
unpow217.6%
unpow217.6%
hypot-def52.6%
Simplified52.6%
*-commutative52.6%
frac-2neg52.6%
associate-*l/52.6%
associate-/l*52.6%
distribute-frac-neg52.6%
atan-neg52.6%
remove-double-neg52.6%
hypot-udef17.6%
+-commutative17.6%
hypot-def52.6%
distribute-neg-frac52.6%
div-inv52.6%
distribute-rgt-neg-in52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
Taylor expanded in A around -inf 81.9%
*-commutative81.9%
associate-/r/81.9%
Simplified81.9%
if -1.9e81 < A < -1.54999999999999989e-274Initial program 46.4%
Simplified46.1%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def68.3%
Simplified68.3%
Taylor expanded in C around 0 49.3%
mul-1-neg49.3%
unsub-neg49.3%
Simplified49.3%
associate-*r/49.3%
div-sub49.3%
*-inverses49.3%
sub-neg49.3%
metadata-eval49.3%
+-commutative49.3%
Applied egg-rr49.3%
if -1.54999999999999989e-274 < A Initial program 65.6%
Simplified65.6%
Taylor expanded in B around -inf 64.9%
associate--l+64.9%
div-sub66.4%
Simplified66.4%
Final simplification65.3%
(FPCore (A B C)
:precision binary64
(if (<= A -4.4e-42)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A -2.8e-274)
(/ (* 180.0 (atan (+ -1.0 (/ C B)))) PI)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.4e-42) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= -2.8e-274) {
tmp = (180.0 * atan((-1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.4e-42) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= -2.8e-274) {
tmp = (180.0 * Math.atan((-1.0 + (C / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.4e-42: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= -2.8e-274: tmp = (180.0 * math.atan((-1.0 + (C / B)))) / math.pi else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.4e-42) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= -2.8e-274) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(C / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.4e-42) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= -2.8e-274) tmp = (180.0 * atan((-1.0 + (C / B)))) / pi; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.4e-42], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.8e-274], N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.4 \cdot 10^{-42}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq -2.8 \cdot 10^{-274}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.4000000000000001e-42Initial program 24.1%
Simplified60.4%
Taylor expanded in B around 0 75.9%
associate-*r/75.9%
Simplified75.9%
if -4.4000000000000001e-42 < A < -2.79999999999999975e-274Initial program 48.3%
Simplified48.3%
Taylor expanded in A around 0 48.7%
unpow248.7%
unpow248.7%
hypot-def71.0%
Simplified71.0%
Taylor expanded in C around 0 54.8%
mul-1-neg54.8%
unsub-neg54.8%
Simplified54.8%
associate-*r/54.8%
div-sub54.8%
*-inverses54.8%
sub-neg54.8%
metadata-eval54.8%
+-commutative54.8%
Applied egg-rr54.8%
if -2.79999999999999975e-274 < A Initial program 65.6%
Simplified65.6%
Taylor expanded in B around -inf 64.9%
associate--l+64.9%
div-sub66.4%
Simplified66.4%
Final simplification67.1%
(FPCore (A B C)
:precision binary64
(if (<= A -3.1e-42)
(/ (atan (/ B (/ (- C A) -0.5))) (* PI 0.005555555555555556))
(if (<= A -2e-274)
(/ (* 180.0 (atan (+ -1.0 (/ C B)))) PI)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e-42) {
tmp = atan((B / ((C - A) / -0.5))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= -2e-274) {
tmp = (180.0 * atan((-1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e-42) {
tmp = Math.atan((B / ((C - A) / -0.5))) / (Math.PI * 0.005555555555555556);
} else if (A <= -2e-274) {
tmp = (180.0 * Math.atan((-1.0 + (C / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.1e-42: tmp = math.atan((B / ((C - A) / -0.5))) / (math.pi * 0.005555555555555556) elif A <= -2e-274: tmp = (180.0 * math.atan((-1.0 + (C / B)))) / math.pi else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.1e-42) tmp = Float64(atan(Float64(B / Float64(Float64(C - A) / -0.5))) / Float64(pi * 0.005555555555555556)); elseif (A <= -2e-274) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(C / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.1e-42) tmp = atan((B / ((C - A) / -0.5))) / (pi * 0.005555555555555556); elseif (A <= -2e-274) tmp = (180.0 * atan((-1.0 + (C / B)))) / pi; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.1e-42], N[(N[ArcTan[N[(B / N[(N[(C - A), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2e-274], N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.1 \cdot 10^{-42}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{\frac{C - A}{-0.5}}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq -2 \cdot 10^{-274}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.1000000000000003e-42Initial program 24.1%
Simplified60.4%
Taylor expanded in B around 0 75.9%
associate-*r/75.9%
Simplified75.9%
*-commutative75.9%
clear-num75.9%
un-div-inv76.0%
div-inv76.0%
associate-/r*76.0%
Applied egg-rr75.9%
Taylor expanded in A around -inf 75.9%
associate-*r/75.9%
*-commutative75.9%
mul-1-neg75.9%
sub-neg75.9%
associate-*r/75.8%
/-rgt-identity75.8%
associate-*r/75.8%
*-commutative75.8%
associate-*r/75.9%
associate-/l*75.9%
associate-*r/76.0%
associate-/l*76.0%
associate-/r/76.0%
metadata-eval76.0%
*-commutative76.0%
Simplified76.0%
if -3.1000000000000003e-42 < A < -1.99999999999999993e-274Initial program 48.3%
Simplified48.3%
Taylor expanded in A around 0 48.7%
unpow248.7%
unpow248.7%
hypot-def71.0%
Simplified71.0%
Taylor expanded in C around 0 54.8%
mul-1-neg54.8%
unsub-neg54.8%
Simplified54.8%
associate-*r/54.8%
div-sub54.8%
*-inverses54.8%
sub-neg54.8%
metadata-eval54.8%
+-commutative54.8%
Applied egg-rr54.8%
if -1.99999999999999993e-274 < A Initial program 65.6%
Simplified65.6%
Taylor expanded in B around -inf 64.9%
associate--l+64.9%
div-sub66.4%
Simplified66.4%
Final simplification67.1%
(FPCore (A B C)
:precision binary64
(if (<= B -4.8e-57)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9.5e-289)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 1.85e-55)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-57) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9.5e-289) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 1.85e-55) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-57) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9.5e-289) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 1.85e-55) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.8e-57: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9.5e-289: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 1.85e-55: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.8e-57) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9.5e-289) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 1.85e-55) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.8e-57) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9.5e-289) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 1.85e-55) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.8e-57], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-289], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.85e-55], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.8 \cdot 10^{-57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-289}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.80000000000000012e-57Initial program 53.5%
Simplified53.5%
Taylor expanded in B around -inf 54.0%
if -4.80000000000000012e-57 < B < -9.4999999999999995e-289Initial program 53.9%
Simplified51.8%
Taylor expanded in A around 0 42.3%
unpow242.3%
unpow242.3%
hypot-def55.1%
Simplified55.1%
Taylor expanded in B around -inf 39.9%
Taylor expanded in B around 0 37.0%
if -9.4999999999999995e-289 < B < 1.84999999999999993e-55Initial program 44.6%
Simplified41.2%
Taylor expanded in C around inf 43.9%
associate-*r/43.9%
distribute-rgt1-in43.9%
metadata-eval43.9%
mul0-lft43.9%
metadata-eval43.9%
Simplified43.9%
if 1.84999999999999993e-55 < B Initial program 50.3%
Simplified50.2%
Taylor expanded in B around inf 53.1%
Final simplification48.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.45e-14)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 50.0)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e-14) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 50.0) {
tmp = 180.0 * (atan(((B + C) / B)) / ((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 <= -1.45e-14) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 50.0) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / 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 <= -1.45e-14: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 50.0: tmp = 180.0 * (math.atan(((B + C) / B)) / 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 <= -1.45e-14) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 50.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.45e-14) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 50.0) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.45e-14], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 50.0], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.45 \cdot 10^{-14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 50:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.4500000000000001e-14Initial program 22.6%
Simplified18.2%
Taylor expanded in A around -inf 72.8%
associate-*r/72.8%
Simplified72.8%
if -1.4500000000000001e-14 < A < 50Initial program 54.5%
Simplified54.4%
Taylor expanded in A around 0 53.1%
unpow253.1%
unpow253.1%
hypot-def77.5%
Simplified77.5%
Taylor expanded in B around -inf 50.0%
if 50 < A Initial program 71.5%
Simplified71.5%
Taylor expanded in C around 0 71.6%
associate-*r/71.6%
mul-1-neg71.6%
+-commutative71.6%
unpow271.6%
unpow271.6%
hypot-def83.8%
Simplified83.8%
Taylor expanded in B around -inf 70.2%
mul-1-neg70.2%
unsub-neg70.2%
Simplified70.2%
Final simplification61.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.1e-156)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.85e-55)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.1e-156) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.85e-55) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.1e-156) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.85e-55) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.1e-156: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.85e-55: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.1e-156) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.85e-55) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.1e-156) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.85e-55) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.1e-156], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.85e-55], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.1 \cdot 10^{-156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.1e-156Initial program 54.8%
Simplified54.8%
Taylor expanded in B around -inf 47.2%
if -1.1e-156 < B < 1.84999999999999993e-55Initial program 46.3%
Simplified43.0%
Taylor expanded in C around inf 40.5%
associate-*r/40.5%
distribute-rgt1-in40.5%
metadata-eval40.5%
mul0-lft40.5%
metadata-eval40.5%
Simplified40.5%
if 1.84999999999999993e-55 < B Initial program 50.3%
Simplified50.2%
Taylor expanded in B around inf 53.1%
Final simplification46.6%
(FPCore (A B C) :precision binary64 (if (<= A -1.35e-281) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e-281) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((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 <= -1.35e-281) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / 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 <= -1.35e-281: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / 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 <= -1.35e-281) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.35e-281) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.35e-281], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.35 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.34999999999999995e-281Initial program 35.0%
Simplified32.6%
Taylor expanded in A around -inf 56.3%
associate-*r/56.3%
Simplified56.3%
if -1.34999999999999995e-281 < A Initial program 64.9%
Simplified64.9%
Taylor expanded in C around 0 59.3%
associate-*r/59.3%
mul-1-neg59.3%
+-commutative59.3%
unpow259.3%
unpow259.3%
hypot-def73.5%
Simplified73.5%
Taylor expanded in B around -inf 58.2%
mul-1-neg58.2%
unsub-neg58.2%
Simplified58.2%
Final simplification57.3%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 53.2%
Simplified52.4%
Taylor expanded in B around -inf 38.2%
if -4.999999999999985e-310 < B Initial program 48.1%
Simplified46.5%
Taylor expanded in B around inf 34.5%
Final simplification36.3%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 50.5%
Simplified49.3%
Taylor expanded in B around inf 19.0%
Final simplification19.0%
herbie shell --seed 2023297
(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)))