
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -4e-41) (not (<= t_0 0.0)))
(* (/ 180.0 PI) (atan (/ 1.0 (/ B (- (- C A) (hypot B (- C A)))))))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
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 <= -4e-41) || !(t_0 <= 0.0)) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 / (B / ((C - A) - hypot(B, (C - A))))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
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 <= -4e-41) || !(t_0 <= 0.0)) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 / (B / ((C - A) - Math.hypot(B, (C - A))))));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
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 <= -4e-41) or not (t_0 <= 0.0): tmp = (180.0 / math.pi) * math.atan((1.0 / (B / ((C - A) - math.hypot(B, (C - A)))))) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) 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 <= -4e-41) || !(t_0 <= 0.0)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 / Float64(B / Float64(Float64(C - A) - hypot(B, Float64(C - A))))))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); 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 <= -4e-41) || ~((t_0 <= 0.0))) tmp = (180.0 / pi) * atan((1.0 / (B / ((C - A) - hypot(B, (C - A)))))); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); 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, -4e-41], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 / N[(B / N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $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 -4 \cdot 10^{-41} \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{B}{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\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))))) < -4.00000000000000002e-41 or -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 61.9%
Simplified82.3%
clear-num82.3%
inv-pow82.3%
Applied egg-rr82.3%
unpow-182.3%
associate--r+86.3%
Simplified86.3%
if -4.00000000000000002e-41 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0Initial program 27.2%
Simplified19.5%
Taylor expanded in B around 0 99.1%
associate-*r/99.2%
Simplified99.2%
Final simplification87.6%
(FPCore (A B C) :precision binary64 (if (<= A -8.8e+30) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+30) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+30) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.8e+30: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.8e+30) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.8e+30) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.8e+30], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.7999999999999999e30Initial program 20.2%
Simplified30.9%
Taylor expanded in B around 0 75.8%
associate-*r/75.8%
Simplified75.8%
if -8.7999999999999999e30 < A Initial program 67.7%
Simplified86.8%
Final simplification84.6%
(FPCore (A B C) :precision binary64 (if (<= A -8.8e+30) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+30) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (C - A)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+30) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.8e+30: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.8e+30) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.8e+30) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (C - A)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.8e+30], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -8.7999999999999999e30Initial program 20.2%
Simplified30.9%
Taylor expanded in B around 0 75.8%
associate-*r/75.8%
Simplified75.8%
if -8.7999999999999999e30 < A Initial program 67.7%
Simplified86.8%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -8.8e+30)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 4.5e-7)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+30) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 4.5e-7) {
tmp = 180.0 * (atan(((C - hypot(B, 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 <= -8.8e+30) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 4.5e-7) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, 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 <= -8.8e+30: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 4.5e-7: tmp = 180.0 * (math.atan(((C - math.hypot(B, 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 <= -8.8e+30) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 4.5e-7) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, 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 <= -8.8e+30) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 4.5e-7) tmp = 180.0 * (atan(((C - hypot(B, 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, -8.8e+30], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.5e-7], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $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 -8.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{-7}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.7999999999999999e30Initial program 20.2%
Simplified30.9%
Taylor expanded in B around 0 75.8%
associate-*r/75.8%
Simplified75.8%
if -8.7999999999999999e30 < A < 4.4999999999999998e-7Initial program 66.1%
Simplified66.1%
Taylor expanded in A around 0 64.1%
unpow264.1%
unpow264.1%
hypot-def81.9%
Simplified81.9%
if 4.4999999999999998e-7 < A Initial program 70.6%
Simplified70.6%
Taylor expanded in B around -inf 77.5%
associate--l+77.5%
div-sub80.3%
Simplified80.3%
Final simplification80.3%
(FPCore (A B C)
:precision binary64
(if (<= A -8.8e+30)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 6.5e-8)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+30) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 6.5e-8) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} 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 <= -8.8e+30) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 6.5e-8) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.8e+30: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 6.5e-8: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) 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 <= -8.8e+30) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 6.5e-8) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); 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 <= -8.8e+30) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 6.5e-8) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.8e+30], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-8], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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 -8.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.7999999999999999e30Initial program 20.2%
Simplified30.9%
Taylor expanded in B around 0 75.8%
associate-*r/75.8%
Simplified75.8%
if -8.7999999999999999e30 < A < 6.49999999999999997e-8Initial program 66.1%
Simplified84.1%
clear-num84.1%
inv-pow84.1%
Applied egg-rr84.1%
unpow-184.1%
associate--r+84.1%
Simplified84.1%
Taylor expanded in A around 0 64.2%
unpow264.2%
unpow264.2%
hypot-def81.9%
Simplified81.9%
if 6.49999999999999997e-8 < A Initial program 70.6%
Simplified70.6%
Taylor expanded in B around -inf 77.5%
associate--l+77.5%
div-sub80.3%
Simplified80.3%
Final simplification80.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.18e-107)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (or (<= B 1.75e-289) (and (not (<= B 7.2e+81)) (<= B 6.2e+104)))
(* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI))
(/ (* 180.0 (atan (/ (- C B) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.18e-107) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if ((B <= 1.75e-289) || (!(B <= 7.2e+81) && (B <= 6.2e+104))) {
tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.18e-107) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if ((B <= 1.75e-289) || (!(B <= 7.2e+81) && (B <= 6.2e+104))) {
tmp = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.18e-107: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif (B <= 1.75e-289) or (not (B <= 7.2e+81) and (B <= 6.2e+104)): tmp = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) else: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.18e-107) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif ((B <= 1.75e-289) || (!(B <= 7.2e+81) && (B <= 6.2e+104))) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.18e-107) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif ((B <= 1.75e-289) || (~((B <= 7.2e+81)) && (B <= 6.2e+104))) tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); else tmp = (180.0 * atan(((C - B) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.18e-107], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.75e-289], And[N[Not[LessEqual[B, 7.2e+81]], $MachinePrecision], LessEqual[B, 6.2e+104]]], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.18 \cdot 10^{-107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.75 \cdot 10^{-289} \lor \neg \left(B \leq 7.2 \cdot 10^{+81}\right) \land B \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.17999999999999993e-107Initial program 60.2%
Simplified60.2%
Taylor expanded in B around -inf 82.9%
associate--l+82.9%
div-sub82.9%
Simplified82.9%
Taylor expanded in C around inf 79.9%
if -1.17999999999999993e-107 < B < 1.75e-289 or 7.20000000000000011e81 < B < 6.20000000000000033e104Initial program 52.9%
Simplified57.7%
clear-num57.7%
inv-pow57.7%
Applied egg-rr57.7%
unpow-157.7%
associate--r+71.7%
Simplified71.7%
Taylor expanded in B around 0 55.5%
Taylor expanded in C around -inf 56.6%
associate-*r/56.5%
associate-*r/56.5%
mul-1-neg56.5%
sub-neg56.5%
Simplified56.5%
Taylor expanded in B around 0 56.6%
sub-neg56.6%
mul-1-neg56.6%
associate-*r/56.6%
mul-1-neg56.6%
sub-neg56.6%
*-commutative56.6%
associate-*r/56.6%
Simplified56.6%
if 1.75e-289 < B < 7.20000000000000011e81 or 6.20000000000000033e104 < B Initial program 60.2%
associate-*r/60.2%
associate-*l/60.2%
*-un-lft-identity60.2%
associate--l-59.1%
unpow259.1%
pow259.1%
hypot-def79.1%
Applied egg-rr79.1%
Taylor expanded in B around inf 68.0%
Final simplification69.8%
(FPCore (A B C)
:precision binary64
(if (<= B -2.55e-256)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (or (<= B 8.6e-290) (and (not (<= B 2.8e+81)) (<= B 9.8e+101)))
(* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI))
(/ (* 180.0 (atan (/ (- C B) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.55e-256) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if ((B <= 8.6e-290) || (!(B <= 2.8e+81) && (B <= 9.8e+101))) {
tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.55e-256) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if ((B <= 8.6e-290) || (!(B <= 2.8e+81) && (B <= 9.8e+101))) {
tmp = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.55e-256: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif (B <= 8.6e-290) or (not (B <= 2.8e+81) and (B <= 9.8e+101)): tmp = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) else: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.55e-256) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif ((B <= 8.6e-290) || (!(B <= 2.8e+81) && (B <= 9.8e+101))) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.55e-256) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif ((B <= 8.6e-290) || (~((B <= 2.8e+81)) && (B <= 9.8e+101))) tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); else tmp = (180.0 * atan(((C - B) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.55e-256], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 8.6e-290], And[N[Not[LessEqual[B, 2.8e+81]], $MachinePrecision], LessEqual[B, 9.8e+101]]], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.55 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.6 \cdot 10^{-290} \lor \neg \left(B \leq 2.8 \cdot 10^{+81}\right) \land B \leq 9.8 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.55000000000000005e-256Initial program 60.1%
Simplified60.0%
Taylor expanded in B around -inf 74.5%
associate--l+74.5%
div-sub76.0%
Simplified76.0%
if -2.55000000000000005e-256 < B < 8.6000000000000004e-290 or 2.79999999999999995e81 < B < 9.79999999999999965e101Initial program 45.9%
Simplified46.3%
clear-num46.3%
inv-pow46.3%
Applied egg-rr46.3%
unpow-146.3%
associate--r+68.0%
Simplified68.0%
Taylor expanded in B around 0 66.9%
Taylor expanded in C around -inf 68.2%
associate-*r/67.9%
associate-*r/67.9%
mul-1-neg67.9%
sub-neg67.9%
Simplified67.9%
Taylor expanded in B around 0 68.2%
sub-neg68.2%
mul-1-neg68.2%
associate-*r/68.2%
mul-1-neg68.2%
sub-neg68.2%
*-commutative68.2%
associate-*r/68.1%
Simplified68.1%
if 8.6000000000000004e-290 < B < 2.79999999999999995e81 or 9.79999999999999965e101 < B Initial program 60.2%
associate-*r/60.2%
associate-*l/60.2%
*-un-lft-identity60.2%
associate--l-59.1%
unpow259.1%
pow259.1%
hypot-def79.1%
Applied egg-rr79.1%
Taylor expanded in B around inf 68.0%
Final simplification72.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -5.4e-28)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6e-256)
t_0
(if (<= B 4.5e-290)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.2e-217) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -5.4e-28) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6e-256) {
tmp = t_0;
} else if (B <= 4.5e-290) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.2e-217) {
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((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -5.4e-28) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6e-256) {
tmp = t_0;
} else if (B <= 4.5e-290) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.2e-217) {
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((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -5.4e-28: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6e-256: tmp = t_0 elif B <= 4.5e-290: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.2e-217: 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(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -5.4e-28) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6e-256) tmp = t_0; elseif (B <= 4.5e-290) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.2e-217) 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((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -5.4e-28) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6e-256) tmp = t_0; elseif (B <= 4.5e-290) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.2e-217) 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[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.4e-28], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6e-256], t$95$0, If[LessEqual[B, 4.5e-290], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.2e-217], 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(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5.4 \cdot 10^{-28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6 \cdot 10^{-256}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-217}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.3999999999999998e-28Initial program 58.3%
Simplified58.3%
Taylor expanded in B around -inf 68.8%
if -5.3999999999999998e-28 < B < -5.9999999999999996e-256 or 4.5e-290 < B < 2.19999999999999982e-217Initial program 67.3%
Simplified65.4%
Taylor expanded in C around -inf 45.9%
if -5.9999999999999996e-256 < B < 4.5e-290Initial program 49.7%
Simplified44.7%
Taylor expanded in C around inf 54.6%
mul-1-neg54.6%
distribute-rgt1-in54.6%
metadata-eval54.6%
mul0-lft54.6%
distribute-frac-neg54.6%
metadata-eval54.6%
Simplified54.6%
if 2.19999999999999982e-217 < B Initial program 55.1%
Simplified55.2%
Taylor expanded in B around inf 51.7%
Final simplification56.1%
(FPCore (A B C)
:precision binary64
(if (<= B -5.2e-259)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B 1.12e-290)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.2e-217)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-259) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= 1.12e-290) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.2e-217) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-259) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= 1.12e-290) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.2e-217) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.2e-259: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= 1.12e-290: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.2e-217: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.2e-259) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= 1.12e-290) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.2e-217) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.2e-259) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= 1.12e-290) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.2e-217) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.2e-259], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.12e-290], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.2e-217], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $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 -5.2 \cdot 10^{-259}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.12 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-217}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.20000000000000002e-259Initial program 60.1%
Simplified60.0%
Taylor expanded in B around -inf 74.5%
associate--l+74.5%
div-sub76.0%
Simplified76.0%
Taylor expanded in C around inf 69.7%
if -5.20000000000000002e-259 < B < 1.12e-290Initial program 49.7%
Simplified44.7%
Taylor expanded in C around inf 54.6%
mul-1-neg54.6%
distribute-rgt1-in54.6%
metadata-eval54.6%
mul0-lft54.6%
distribute-frac-neg54.6%
metadata-eval54.6%
Simplified54.6%
if 1.12e-290 < B < 2.19999999999999982e-217Initial program 89.7%
Simplified78.5%
Taylor expanded in C around -inf 67.6%
if 2.19999999999999982e-217 < B Initial program 55.1%
Simplified55.2%
Taylor expanded in B around inf 51.7%
Final simplification61.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.3e-256)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B -1.55e-281)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 9e-47)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e-256) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= -1.55e-281) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 9e-47) {
tmp = 180.0 * (atan(((A * -2.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.3e-256) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= -1.55e-281) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 9e-47) {
tmp = 180.0 * (Math.atan(((A * -2.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.3e-256: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= -1.55e-281: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 9e-47: tmp = 180.0 * (math.atan(((A * -2.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.3e-256) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= -1.55e-281) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 9e-47) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.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.3e-256) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= -1.55e-281) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 9e-47) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.3e-256], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.55e-281], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-47], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / 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.3 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.55 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.3e-256Initial program 60.1%
Simplified60.0%
Taylor expanded in B around -inf 74.5%
associate--l+74.5%
div-sub76.0%
Simplified76.0%
Taylor expanded in C around inf 69.7%
if -1.3e-256 < B < -1.5500000000000001e-281Initial program 34.6%
Simplified22.5%
Taylor expanded in C around inf 83.0%
mul-1-neg83.0%
distribute-rgt1-in83.0%
metadata-eval83.0%
mul0-lft83.0%
distribute-frac-neg83.0%
metadata-eval83.0%
Simplified83.0%
if -1.5500000000000001e-281 < B < 9e-47Initial program 67.3%
Simplified65.1%
Taylor expanded in A around inf 46.7%
associate-*r/46.7%
*-commutative46.7%
Simplified46.7%
if 9e-47 < B Initial program 52.2%
Simplified52.3%
Taylor expanded in B around inf 57.5%
Final simplification62.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.2e-258)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -2.1e-281)
(* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.2e-258) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -2.1e-281) {
tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.2e-258) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -2.1e-281) {
tmp = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.2e-258: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -2.1e-281: tmp = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.2e-258) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -2.1e-281) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.2e-258) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -2.1e-281) tmp = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.2e-258], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.1e-281], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.2 \cdot 10^{-258}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.1 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.2000000000000001e-258Initial program 60.1%
Simplified60.0%
Taylor expanded in B around -inf 74.5%
associate--l+74.5%
div-sub76.0%
Simplified76.0%
if -1.2000000000000001e-258 < B < -2.0999999999999999e-281Initial program 34.6%
Simplified34.6%
clear-num34.6%
inv-pow34.6%
Applied egg-rr34.6%
unpow-134.6%
associate--r+83.0%
Simplified83.0%
Taylor expanded in B around 0 94.5%
Taylor expanded in C around -inf 98.7%
associate-*r/98.8%
associate-*r/98.9%
mul-1-neg98.9%
sub-neg98.9%
Simplified98.9%
Taylor expanded in B around 0 98.7%
sub-neg98.7%
mul-1-neg98.7%
associate-*r/98.7%
mul-1-neg98.7%
sub-neg98.7%
*-commutative98.7%
associate-*r/98.7%
Simplified98.7%
if -2.0999999999999999e-281 < B Initial program 58.2%
Simplified57.4%
Taylor expanded in B around inf 68.7%
+-commutative68.7%
associate--r+68.7%
div-sub69.6%
Simplified69.6%
Final simplification73.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -4.2e-256)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -1.5e-281)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -4.2e-256) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -1.5e-281) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -4.2e-256) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -1.5e-281) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -4.2e-256: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -1.5e-281: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -4.2e-256) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -1.5e-281) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -4.2e-256) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -1.5e-281) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -4.2e-256], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.5e-281], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -4.2 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.5 \cdot 10^{-281}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.20000000000000005e-256Initial program 60.1%
Simplified60.0%
Taylor expanded in B around -inf 74.5%
associate--l+74.5%
div-sub76.0%
Simplified76.0%
if -4.20000000000000005e-256 < B < -1.49999999999999987e-281Initial program 34.6%
Simplified34.6%
Taylor expanded in B around 0 98.8%
associate-*r/98.9%
Simplified98.9%
if -1.49999999999999987e-281 < B Initial program 58.2%
Simplified57.4%
Taylor expanded in B around inf 68.7%
+-commutative68.7%
associate--r+68.7%
div-sub69.6%
Simplified69.6%
Final simplification73.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.52e-257)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B -1.35e-281)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(/ (* 180.0 (atan (/ (- (- C B) A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.52e-257) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= -1.35e-281) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * atan((((C - B) - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.52e-257) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= -1.35e-281) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * Math.atan((((C - B) - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.52e-257: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= -1.35e-281: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 * math.atan((((C - B) - A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.52e-257) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= -1.35e-281) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B) - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.52e-257) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= -1.35e-281) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 * atan((((C - B) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.52e-257], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.35e-281], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.52 \cdot 10^{-257}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.35 \cdot 10^{-281}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.5199999999999999e-257Initial program 60.1%
Simplified60.0%
Taylor expanded in B around -inf 74.5%
associate--l+74.5%
div-sub76.0%
Simplified76.0%
if -1.5199999999999999e-257 < B < -1.34999999999999995e-281Initial program 34.6%
Simplified34.6%
Taylor expanded in B around 0 98.8%
associate-*r/98.9%
Simplified98.9%
if -1.34999999999999995e-281 < B Initial program 58.2%
associate-*r/58.2%
associate-*l/58.2%
*-un-lft-identity58.2%
associate--l-57.4%
unpow257.4%
pow257.4%
hypot-def73.5%
Applied egg-rr73.5%
Taylor expanded in B around inf 69.7%
mul-1-neg69.7%
unsub-neg69.7%
Simplified69.7%
Final simplification73.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.8e-258)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B 9.6e-290)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ (* 180.0 (atan (/ (- C B) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-258) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= 9.6e-290) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-258) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= 9.6e-290) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.8e-258: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= 9.6e-290: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.8e-258) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= 9.6e-290) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.8e-258) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= 9.6e-290) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = (180.0 * atan(((C - B) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.8e-258], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.6e-290], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.8 \cdot 10^{-258}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.6 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.79999999999999989e-258Initial program 60.1%
Simplified60.0%
Taylor expanded in B around -inf 74.5%
associate--l+74.5%
div-sub76.0%
Simplified76.0%
Taylor expanded in C around inf 69.7%
if -1.79999999999999989e-258 < B < 9.6000000000000002e-290Initial program 49.7%
Simplified44.7%
Taylor expanded in C around inf 54.6%
mul-1-neg54.6%
distribute-rgt1-in54.6%
metadata-eval54.6%
mul0-lft54.6%
distribute-frac-neg54.6%
metadata-eval54.6%
Simplified54.6%
if 9.6000000000000002e-290 < B Initial program 58.0%
associate-*r/58.0%
associate-*l/58.0%
*-un-lft-identity58.0%
associate--l-57.1%
unpow257.1%
pow257.1%
hypot-def75.1%
Applied egg-rr75.1%
Taylor expanded in B around inf 63.7%
Final simplification66.1%
(FPCore (A B C)
:precision binary64
(if (<= B -3.9e-144)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 8.5e-227)
(* 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 <= -3.9e-144) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8.5e-227) {
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 <= -3.9e-144) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8.5e-227) {
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 <= -3.9e-144: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8.5e-227: 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 <= -3.9e-144) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8.5e-227) 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 <= -3.9e-144) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8.5e-227) 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, -3.9e-144], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-227], 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 -3.9 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-227}:\\
\;\;\;\;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 < -3.90000000000000015e-144Initial program 58.5%
Simplified58.5%
Taylor expanded in B around -inf 56.8%
if -3.90000000000000015e-144 < B < 8.50000000000000018e-227Initial program 63.1%
Simplified58.9%
Taylor expanded in C around inf 35.4%
mul-1-neg35.4%
distribute-rgt1-in35.4%
metadata-eval35.4%
mul0-lft35.4%
distribute-frac-neg35.4%
metadata-eval35.4%
Simplified35.4%
if 8.50000000000000018e-227 < B Initial program 56.0%
Simplified56.1%
Taylor expanded in B around inf 51.1%
Final simplification50.5%
(FPCore (A B C) :precision binary64 (if (<= B -1e-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 <= -1e-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 <= -1e-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 <= -1e-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 <= -1e-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 <= -1e-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, -1e-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 -1 \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 < -9.999999999999969e-311Initial program 59.9%
Simplified59.2%
Taylor expanded in B around -inf 45.8%
if -9.999999999999969e-311 < B Initial program 56.4%
Simplified55.6%
Taylor expanded in B around inf 46.8%
Final simplification46.2%
(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 58.4%
Simplified57.6%
Taylor expanded in B around inf 21.3%
Final simplification21.3%
herbie shell --seed 2023293
(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)))