
(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 29 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) (+ (- A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -5e-9) (not (<= t_0 4e-5)))
(/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)
(*
(atan
(* B (+ (* 0.125 (/ (pow B 2.0) (pow (- C A) 3.0))) (/ 0.5 (- A C)))))
(/ 180.0 PI)))))
double code(double A, double B, double C) {
double t_0 = (-1.0 / B) * ((A - C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -5e-9) || !(t_0 <= 4e-5)) {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
} else {
tmp = atan((B * ((0.125 * (pow(B, 2.0) / pow((C - A), 3.0))) + (0.5 / (A - C))))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (-1.0 / B) * ((A - C) + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -5e-9) || !(t_0 <= 4e-5)) {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
} else {
tmp = Math.atan((B * ((0.125 * (Math.pow(B, 2.0) / Math.pow((C - A), 3.0))) + (0.5 / (A - C))))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (-1.0 / B) * ((A - C) + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -5e-9) or not (t_0 <= 4e-5): tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi else: tmp = math.atan((B * ((0.125 * (math.pow(B, 2.0) / math.pow((C - A), 3.0))) + (0.5 / (A - C))))) * (180.0 / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(-1.0 / B) * Float64(Float64(A - C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -5e-9) || !(t_0 <= 4e-5)) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); else tmp = Float64(atan(Float64(B * Float64(Float64(0.125 * Float64((B ^ 2.0) / (Float64(C - A) ^ 3.0))) + Float64(0.5 / Float64(A - C))))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (-1.0 / B) * ((A - C) + sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -5e-9) || ~((t_0 <= 4e-5))) tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; else tmp = atan((B * ((0.125 * ((B ^ 2.0) / ((C - A) ^ 3.0))) + (0.5 / (A - C))))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] * N[(N[(A - C), $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, -5e-9], N[Not[LessEqual[t$95$0, 4e-5]], $MachinePrecision]], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(B * N[(N[(0.125 * N[(N[Power[B, 2.0], $MachinePrecision] / N[Power[N[(C - A), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} \cdot \left(\left(A - C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-9} \lor \neg \left(t\_0 \leq 4 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \left(0.125 \cdot \frac{{B}^{2}}{{\left(C - A\right)}^{3}} + \frac{0.5}{A - C}\right)\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -5.0000000000000001e-9 or 4.00000000000000033e-5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 63.6%
associate-*r/63.6%
associate-*l/63.6%
*-un-lft-identity63.6%
unpow263.6%
unpow263.6%
hypot-define86.8%
Applied egg-rr86.8%
if -5.0000000000000001e-9 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 4.00000000000000033e-5Initial program 17.8%
Simplified7.3%
Taylor expanded in B around 0 98.7%
associate-*r/98.7%
metadata-eval98.7%
Simplified98.7%
Final simplification88.4%
(FPCore (A B C)
:precision binary64
(if (<= A -3.9e-8)
(* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A)))))
(if (<= A 6e-136)
(/ (* 180.0 (atan (/ 1.0 (/ B (- C (hypot B C)))))) PI)
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B A))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.9e-8) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
} else if (A <= 6e-136) {
tmp = (180.0 * atan((1.0 / (B / (C - hypot(B, C)))))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, A))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.9e-8) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
} else if (A <= 6e-136) {
tmp = (180.0 * Math.atan((1.0 / (B / (C - Math.hypot(B, C)))))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, A))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.9e-8: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) elif A <= 6e-136: tmp = (180.0 * math.atan((1.0 / (B / (C - math.hypot(B, C)))))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, A))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.9e-8) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))); elseif (A <= 6e-136) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(B / Float64(C - hypot(B, C)))))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, A))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.9e-8) tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); elseif (A <= 6e-136) tmp = (180.0 * atan((1.0 / (B / (C - hypot(B, C)))))) / pi; else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, A))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.9e-8], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-136], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(B / N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.9 \cdot 10^{-8}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-136}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{C - \mathsf{hypot}\left(B, C\right)}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -3.89999999999999985e-8Initial program 23.6%
Simplified27.6%
Taylor expanded in B around 0 80.8%
if -3.89999999999999985e-8 < A < 5.9999999999999996e-136Initial program 64.0%
associate-*r/64.0%
associate-*l/64.0%
*-un-lft-identity64.0%
unpow264.0%
unpow264.0%
hypot-define83.3%
Applied egg-rr83.3%
clear-num83.3%
associate--l-83.3%
Applied egg-rr83.3%
Taylor expanded in A around 0 63.3%
unpow263.3%
unpow263.3%
hypot-undefine82.3%
Simplified82.3%
if 5.9999999999999996e-136 < A Initial program 73.9%
Simplified93.2%
Taylor expanded in C around 0 73.0%
+-commutative73.0%
unpow273.0%
unpow273.0%
hypot-define86.4%
Simplified86.4%
Final simplification83.3%
(FPCore (A B C)
:precision binary64
(if (<= A -3.8e-9)
(* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A)))))
(if (<= A 1.3e-135)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B A))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e-9) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
} else if (A <= 1.3e-135) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, A))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e-9) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
} else if (A <= 1.3e-135) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, A))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e-9: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) elif A <= 1.3e-135: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, A))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e-9) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))); elseif (A <= 1.3e-135) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, A))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e-9) tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); elseif (A <= 1.3e-135) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, A))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e-9], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.3e-135], 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 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -3.80000000000000011e-9Initial program 23.6%
Simplified27.6%
Taylor expanded in B around 0 80.8%
if -3.80000000000000011e-9 < A < 1.30000000000000002e-135Initial program 64.0%
Taylor expanded in A around 0 63.3%
unpow263.3%
unpow263.3%
hypot-define82.3%
Simplified82.3%
if 1.30000000000000002e-135 < A Initial program 73.9%
Simplified93.2%
Taylor expanded in C around 0 73.0%
+-commutative73.0%
unpow273.0%
unpow273.0%
hypot-define86.4%
Simplified86.4%
Final simplification83.3%
(FPCore (A B C)
:precision binary64
(if (<= C -5.2e+16)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 8.8e-13)
(/ (* 180.0 (atan (/ (+ A (hypot A B)) (- B)))) PI)
(* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.2e+16) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 8.8e-13) {
tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5.2e+16) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 8.8e-13) {
tmp = (180.0 * Math.atan(((A + Math.hypot(A, B)) / -B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.2e+16: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 8.8e-13: tmp = (180.0 * math.atan(((A + math.hypot(A, B)) / -B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.2e+16) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 8.8e-13) tmp = Float64(Float64(180.0 * atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.2e+16) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 8.8e-13) tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / pi; else tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.2e+16], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.8e-13], N[(N[(180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.2 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\end{array}
\end{array}
if C < -5.2e16Initial program 79.4%
Taylor expanded in A around 0 79.4%
unpow279.4%
unpow279.4%
hypot-define91.1%
Simplified91.1%
if -5.2e16 < C < 8.79999999999999986e-13Initial program 64.4%
associate-*r/64.4%
associate-*l/64.4%
*-un-lft-identity64.4%
unpow264.4%
unpow264.4%
hypot-define83.9%
Applied egg-rr83.9%
Taylor expanded in C around 0 61.9%
mul-1-neg61.9%
distribute-neg-frac261.9%
unpow261.9%
unpow261.9%
hypot-define81.5%
Simplified81.5%
if 8.79999999999999986e-13 < C Initial program 24.8%
Simplified47.3%
Taylor expanded in B around 0 75.7%
Final simplification82.4%
(FPCore (A B C) :precision binary64 (if (<= A -5e-10) (* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A))))) (* (/ 180.0 PI) (atan (/ 1.0 (/ B (- C (+ A (hypot B (- C A))))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5e-10) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 / (B / (C - (A + hypot(B, (C - A)))))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5e-10) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 / (B / (C - (A + Math.hypot(B, (C - A)))))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5e-10: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) else: tmp = (180.0 / math.pi) * math.atan((1.0 / (B / (C - (A + math.hypot(B, (C - A))))))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5e-10) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 / Float64(B / Float64(C - Float64(A + hypot(B, Float64(C - A)))))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5e-10) tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); else tmp = (180.0 / pi) * atan((1.0 / (B / (C - (A + hypot(B, (C - A))))))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5e-10], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 / N[(B / N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5 \cdot 10^{-10}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{B}{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}}\right)\\
\end{array}
\end{array}
if A < -5.00000000000000031e-10Initial program 23.6%
Simplified27.6%
Taylor expanded in B around 0 80.8%
if -5.00000000000000031e-10 < A Initial program 68.3%
Simplified87.6%
clear-num87.6%
Applied egg-rr87.6%
Final simplification85.9%
(FPCore (A B C)
:precision binary64
(if (<= A -2.9e-7)
(* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A)))))
(if (<= A 9e+132)
(* 180.0 (/ (atan (/ (- C (hypot 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-7) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
} else if (A <= 9e+132) {
tmp = 180.0 * (atan(((C - hypot(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-7) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
} else if (A <= 9e+132) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(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-7: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) elif A <= 9e+132: tmp = 180.0 * (math.atan(((C - math.hypot(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-7) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))); elseif (A <= 9e+132) 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(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.9e-7) tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); elseif (A <= 9e+132) tmp = 180.0 * (atan(((C - hypot(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-7], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e+132], 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[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.9 \cdot 10^{-7}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+132}:\\
\;\;\;\;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{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.8999999999999998e-7Initial program 23.6%
Simplified27.6%
Taylor expanded in B around 0 80.8%
if -2.8999999999999998e-7 < A < 8.99999999999999944e132Initial program 65.4%
Taylor expanded in A around 0 60.3%
unpow260.3%
unpow260.3%
hypot-define80.3%
Simplified80.3%
if 8.99999999999999944e132 < A Initial program 82.0%
Taylor expanded in B around inf 85.4%
Taylor expanded in C around 0 88.5%
neg-mul-188.5%
distribute-neg-in88.5%
metadata-eval88.5%
Simplified88.5%
Final simplification81.5%
(FPCore (A B C) :precision binary64 (if (<= A -2.9e-7) (* (/ 180.0 PI) (atan (* -0.5 (/ B (- 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 <= -2.9e-7) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (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 <= -2.9e-7) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (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 <= -2.9e-7: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (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 <= -2.9e-7) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / 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 <= -2.9e-7) tmp = (180.0 / pi) * atan((-0.5 * (B / (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, -2.9e-7], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $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 -2.9 \cdot 10^{-7}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{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 < -2.8999999999999998e-7Initial program 23.6%
Simplified27.6%
Taylor expanded in B around 0 80.8%
if -2.8999999999999998e-7 < A Initial program 68.3%
Simplified87.6%
Final simplification85.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ A (- B))) PI))))
(if (<= B -2.2e-118)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.1e-204)
t_0
(if (<= B 6.2e-190)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.1e-158)
t_0
(if (<= B 1.45e-127)
(/ (* 180.0 (atan (/ B A))) PI)
(if (or (<= B 2.4e-121) (not (<= B 3.2e-28)))
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (/ C B)) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((A / -B)) / ((double) M_PI));
double tmp;
if (B <= -2.2e-118) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.1e-204) {
tmp = t_0;
} else if (B <= 6.2e-190) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.1e-158) {
tmp = t_0;
} else if (B <= 1.45e-127) {
tmp = (180.0 * atan((B / A))) / ((double) M_PI);
} else if ((B <= 2.4e-121) || !(B <= 3.2e-28)) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((A / -B)) / Math.PI);
double tmp;
if (B <= -2.2e-118) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.1e-204) {
tmp = t_0;
} else if (B <= 6.2e-190) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.1e-158) {
tmp = t_0;
} else if (B <= 1.45e-127) {
tmp = (180.0 * Math.atan((B / A))) / Math.PI;
} else if ((B <= 2.4e-121) || !(B <= 3.2e-28)) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((A / -B)) / math.pi) tmp = 0 if B <= -2.2e-118: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.1e-204: tmp = t_0 elif B <= 6.2e-190: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.1e-158: tmp = t_0 elif B <= 1.45e-127: tmp = (180.0 * math.atan((B / A))) / math.pi elif (B <= 2.4e-121) or not (B <= 3.2e-28): tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((C / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)) tmp = 0.0 if (B <= -2.2e-118) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.1e-204) tmp = t_0; elseif (B <= 6.2e-190) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.1e-158) tmp = t_0; elseif (B <= 1.45e-127) tmp = Float64(Float64(180.0 * atan(Float64(B / A))) / pi); elseif ((B <= 2.4e-121) || !(B <= 3.2e-28)) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((A / -B)) / pi); tmp = 0.0; if (B <= -2.2e-118) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.1e-204) tmp = t_0; elseif (B <= 6.2e-190) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.1e-158) tmp = t_0; elseif (B <= 1.45e-127) tmp = (180.0 * atan((B / A))) / pi; elseif ((B <= 2.4e-121) || ~((B <= 3.2e-28))) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((C / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.2e-118], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.1e-204], t$95$0, If[LessEqual[B, 6.2e-190], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e-158], t$95$0, If[LessEqual[B, 1.45e-127], N[(N[(180.0 * N[ArcTan[N[(B / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[B, 2.4e-121], N[Not[LessEqual[B, 3.2e-28]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.2 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.1 \cdot 10^{-204}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 6.2 \cdot 10^{-190}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-158}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-127}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-121} \lor \neg \left(B \leq 3.2 \cdot 10^{-28}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.19999999999999984e-118Initial program 56.1%
Taylor expanded in B around -inf 50.4%
if -2.19999999999999984e-118 < B < -3.0999999999999999e-204 or 6.19999999999999987e-190 < B < 1.1000000000000001e-158Initial program 75.0%
Taylor expanded in B around inf 67.6%
Taylor expanded in A around inf 51.6%
mul-1-neg51.6%
Simplified51.6%
if -3.0999999999999999e-204 < B < 6.19999999999999987e-190Initial program 48.7%
Taylor expanded in C around inf 46.2%
associate-*r/46.2%
mul-1-neg46.2%
distribute-rgt1-in46.2%
metadata-eval46.2%
mul0-lft46.2%
metadata-eval46.2%
Simplified46.2%
if 1.1000000000000001e-158 < B < 1.45e-127Initial program 44.9%
associate-*r/44.9%
associate-*l/44.9%
*-un-lft-identity44.9%
unpow244.9%
unpow244.9%
hypot-define86.4%
Applied egg-rr86.4%
clear-num86.4%
associate--l-45.1%
Applied egg-rr45.1%
Taylor expanded in B around -inf 46.7%
associate-*r/46.7%
mul-1-neg46.7%
Simplified46.7%
Taylor expanded in A around inf 74.5%
if 1.45e-127 < B < 2.40000000000000003e-121 or 3.19999999999999982e-28 < B Initial program 56.4%
Taylor expanded in B around inf 61.7%
if 2.40000000000000003e-121 < B < 3.19999999999999982e-28Initial program 61.5%
Taylor expanded in B around inf 54.0%
Taylor expanded in C around inf 47.8%
Final simplification53.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A)))))))
(if (<= A -1.65e-7)
t_0
(if (<= A -1.12e-183)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A -1.3e-234)
t_0
(if (<= A -1.1e-286)
(/ (* 180.0 (atan (/ 1.0 (- -1.0 (/ C B))))) PI)
(/ (* 180.0 (atan (+ 1.0 (/ (- C A) B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
double tmp;
if (A <= -1.65e-7) {
tmp = t_0;
} else if (A <= -1.12e-183) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= -1.3e-234) {
tmp = t_0;
} else if (A <= -1.1e-286) {
tmp = (180.0 * atan((1.0 / (-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 t_0 = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
double tmp;
if (A <= -1.65e-7) {
tmp = t_0;
} else if (A <= -1.12e-183) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= -1.3e-234) {
tmp = t_0;
} else if (A <= -1.1e-286) {
tmp = (180.0 * Math.atan((1.0 / (-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): t_0 = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) tmp = 0 if A <= -1.65e-7: tmp = t_0 elif A <= -1.12e-183: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= -1.3e-234: tmp = t_0 elif A <= -1.1e-286: tmp = (180.0 * math.atan((1.0 / (-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) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))) tmp = 0.0 if (A <= -1.65e-7) tmp = t_0; elseif (A <= -1.12e-183) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= -1.3e-234) tmp = t_0; elseif (A <= -1.1e-286) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(-1.0 - Float64(C / B))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(Float64(C - A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); tmp = 0.0; if (A <= -1.65e-7) tmp = t_0; elseif (A <= -1.12e-183) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= -1.3e-234) tmp = t_0; elseif (A <= -1.1e-286) tmp = (180.0 * atan((1.0 / (-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_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.65e-7], t$95$0, If[LessEqual[A, -1.12e-183], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.3e-234], t$95$0, If[LessEqual[A, -1.1e-286], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(-1.0 - N[(C / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\mathbf{if}\;A \leq -1.65 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -1.12 \cdot 10^{-183}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-234}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -1.1 \cdot 10^{-286}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-1 - \frac{C}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.6500000000000001e-7 or -1.1199999999999999e-183 < A < -1.29999999999999995e-234Initial program 27.9%
Simplified34.6%
Taylor expanded in B around 0 77.0%
if -1.6500000000000001e-7 < A < -1.1199999999999999e-183Initial program 70.4%
Taylor expanded in A around 0 68.6%
unpow268.6%
unpow268.6%
hypot-define86.3%
Simplified86.3%
Taylor expanded in C around 0 65.7%
if -1.29999999999999995e-234 < A < -1.1e-286Initial program 60.8%
associate-*r/60.8%
associate-*l/60.9%
*-un-lft-identity60.9%
unpow260.9%
unpow260.9%
hypot-define89.8%
Applied egg-rr89.8%
clear-num89.8%
associate--l-89.8%
Applied egg-rr89.8%
Taylor expanded in A around 0 60.9%
unpow260.9%
unpow260.9%
hypot-undefine89.8%
Simplified89.8%
Taylor expanded in B around inf 79.5%
sub-neg79.5%
metadata-eval79.5%
+-commutative79.5%
associate-*r/79.5%
mul-1-neg79.5%
Simplified79.5%
if -1.1e-286 < A Initial program 71.5%
associate-*r/71.6%
associate-*l/71.6%
*-un-lft-identity71.6%
unpow271.6%
unpow271.6%
hypot-define90.9%
Applied egg-rr90.9%
Taylor expanded in B around -inf 68.7%
associate--l+68.7%
div-sub69.6%
Simplified69.6%
Final simplification71.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A)))))))
(if (<= A -4.3e-10)
t_1
(if (<= A -1.15e-183)
t_0
(if (<= A -7.5e-226)
t_1
(if (<= A -5.2e-289)
t_0
(/ (* 180.0 (atan (+ 1.0 (/ (- C A) B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
double t_1 = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
double tmp;
if (A <= -4.3e-10) {
tmp = t_1;
} else if (A <= -1.15e-183) {
tmp = t_0;
} else if (A <= -7.5e-226) {
tmp = t_1;
} else if (A <= -5.2e-289) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
double t_1 = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
double tmp;
if (A <= -4.3e-10) {
tmp = t_1;
} else if (A <= -1.15e-183) {
tmp = t_0;
} else if (A <= -7.5e-226) {
tmp = t_1;
} else if (A <= -5.2e-289) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((1.0 + ((C - A) / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - B) / B)) / math.pi) t_1 = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) tmp = 0 if A <= -4.3e-10: tmp = t_1 elif A <= -1.15e-183: tmp = t_0 elif A <= -7.5e-226: tmp = t_1 elif A <= -5.2e-289: tmp = t_0 else: tmp = (180.0 * math.atan((1.0 + ((C - A) / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))) tmp = 0.0 if (A <= -4.3e-10) tmp = t_1; elseif (A <= -1.15e-183) tmp = t_0; elseif (A <= -7.5e-226) tmp = t_1; elseif (A <= -5.2e-289) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(Float64(C - A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - B) / B)) / pi); t_1 = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); tmp = 0.0; if (A <= -4.3e-10) tmp = t_1; elseif (A <= -1.15e-183) tmp = t_0; elseif (A <= -7.5e-226) tmp = t_1; elseif (A <= -5.2e-289) tmp = t_0; else tmp = (180.0 * atan((1.0 + ((C - A) / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.3e-10], t$95$1, If[LessEqual[A, -1.15e-183], t$95$0, If[LessEqual[A, -7.5e-226], t$95$1, If[LessEqual[A, -5.2e-289], t$95$0, N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\mathbf{if}\;A \leq -4.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -1.15 \cdot 10^{-183}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -5.2 \cdot 10^{-289}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.30000000000000014e-10 or -1.15000000000000008e-183 < A < -7.50000000000000044e-226Initial program 26.6%
Simplified33.6%
Taylor expanded in B around 0 78.5%
if -4.30000000000000014e-10 < A < -1.15000000000000008e-183 or -7.50000000000000044e-226 < A < -5.1999999999999998e-289Initial program 67.4%
Taylor expanded in A around 0 66.0%
unpow266.0%
unpow266.0%
hypot-define84.4%
Simplified84.4%
Taylor expanded in C around 0 66.6%
if -5.1999999999999998e-289 < A Initial program 71.5%
associate-*r/71.6%
associate-*l/71.6%
*-un-lft-identity71.6%
unpow271.6%
unpow271.6%
hypot-define90.9%
Applied egg-rr90.9%
Taylor expanded in B around -inf 68.7%
associate--l+68.7%
div-sub69.6%
Simplified69.6%
Final simplification71.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A)))))))
(if (<= A -2.15e-10)
t_1
(if (<= A -3.15e-183)
t_0
(if (<= A -1.18e-225)
t_1
(if (<= A -2.2e-288)
t_0
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
double t_1 = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
double tmp;
if (A <= -2.15e-10) {
tmp = t_1;
} else if (A <= -3.15e-183) {
tmp = t_0;
} else if (A <= -1.18e-225) {
tmp = t_1;
} else if (A <= -2.2e-288) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
double t_1 = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
double tmp;
if (A <= -2.15e-10) {
tmp = t_1;
} else if (A <= -3.15e-183) {
tmp = t_0;
} else if (A <= -1.18e-225) {
tmp = t_1;
} else if (A <= -2.2e-288) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - B) / B)) / math.pi) t_1 = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) tmp = 0 if A <= -2.15e-10: tmp = t_1 elif A <= -3.15e-183: tmp = t_0 elif A <= -1.18e-225: tmp = t_1 elif A <= -2.2e-288: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))) tmp = 0.0 if (A <= -2.15e-10) tmp = t_1; elseif (A <= -3.15e-183) tmp = t_0; elseif (A <= -1.18e-225) tmp = t_1; elseif (A <= -2.2e-288) tmp = t_0; 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) t_0 = 180.0 * (atan(((C - B) / B)) / pi); t_1 = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); tmp = 0.0; if (A <= -2.15e-10) tmp = t_1; elseif (A <= -3.15e-183) tmp = t_0; elseif (A <= -1.18e-225) tmp = t_1; elseif (A <= -2.2e-288) tmp = t_0; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.15e-10], t$95$1, If[LessEqual[A, -3.15e-183], t$95$0, If[LessEqual[A, -1.18e-225], t$95$1, If[LessEqual[A, -2.2e-288], t$95$0, 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}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\mathbf{if}\;A \leq -2.15 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -3.15 \cdot 10^{-183}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -1.18 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -2.2 \cdot 10^{-288}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.15000000000000007e-10 or -3.1499999999999999e-183 < A < -1.18e-225Initial program 26.6%
Simplified33.6%
Taylor expanded in B around 0 78.5%
if -2.15000000000000007e-10 < A < -3.1499999999999999e-183 or -1.18e-225 < A < -2.2000000000000002e-288Initial program 67.4%
Taylor expanded in A around 0 66.0%
unpow266.0%
unpow266.0%
hypot-define84.4%
Simplified84.4%
Taylor expanded in C around 0 66.6%
if -2.2000000000000002e-288 < A Initial program 71.5%
Taylor expanded in B around -inf 68.7%
associate--l+68.7%
div-sub69.6%
Simplified69.6%
Final simplification71.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))))
(if (<= A -6.8e-63)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.3e-181)
t_0
(if (<= A -3.1e-273)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 4.4e+135) t_0 (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double tmp;
if (A <= -6.8e-63) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.3e-181) {
tmp = t_0;
} else if (A <= -3.1e-273) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 4.4e+135) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double tmp;
if (A <= -6.8e-63) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.3e-181) {
tmp = t_0;
} else if (A <= -3.1e-273) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 4.4e+135) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) tmp = 0 if A <= -6.8e-63: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.3e-181: tmp = t_0 elif A <= -3.1e-273: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 4.4e+135: tmp = t_0 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) tmp = 0.0 if (A <= -6.8e-63) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.3e-181) tmp = t_0; elseif (A <= -3.1e-273) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 4.4e+135) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -6.8e-63) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.3e-181) tmp = t_0; elseif (A <= -3.1e-273) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 4.4e+135) tmp = t_0; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -6.8e-63], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.3e-181], t$95$0, If[LessEqual[A, -3.1e-273], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e+135], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -6.8 \cdot 10^{-63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-181}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -3.1 \cdot 10^{-273}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{+135}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.79999999999999997e-63Initial program 27.0%
Taylor expanded in A around -inf 65.0%
if -6.79999999999999997e-63 < A < -1.29999999999999999e-181 or -3.09999999999999988e-273 < A < 4.3999999999999999e135Initial program 70.1%
Taylor expanded in B around -inf 63.1%
associate--l+63.1%
div-sub63.1%
Simplified63.1%
Taylor expanded in C around inf 57.4%
if -1.29999999999999999e-181 < A < -3.09999999999999988e-273Initial program 44.1%
Taylor expanded in C around inf 46.4%
Taylor expanded in A around inf 54.6%
if 4.3999999999999999e135 < A Initial program 82.0%
Taylor expanded in A around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
Simplified80.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))))
(if (<= A -8e-64)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.1e-183)
t_0
(if (<= A -1.3e-272)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 9e+132) t_0 (* 180.0 (/ (atan (/ A (- B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double tmp;
if (A <= -8e-64) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.1e-183) {
tmp = t_0;
} else if (A <= -1.3e-272) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 9e+132) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double tmp;
if (A <= -8e-64) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.1e-183) {
tmp = t_0;
} else if (A <= -1.3e-272) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 9e+132) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) tmp = 0 if A <= -8e-64: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.1e-183: tmp = t_0 elif A <= -1.3e-272: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 9e+132: tmp = t_0 else: tmp = 180.0 * (math.atan((A / -B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) tmp = 0.0 if (A <= -8e-64) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.1e-183) tmp = t_0; elseif (A <= -1.3e-272) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 9e+132) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -8e-64) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.1e-183) tmp = t_0; elseif (A <= -1.3e-272) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 9e+132) tmp = t_0; else tmp = 180.0 * (atan((A / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -8e-64], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.1e-183], t$95$0, If[LessEqual[A, -1.3e-272], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e+132], t$95$0, N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -8 \cdot 10^{-64}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.1 \cdot 10^{-183}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-272}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+132}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.99999999999999972e-64Initial program 27.0%
Taylor expanded in A around -inf 65.0%
if -7.99999999999999972e-64 < A < -1.1e-183 or -1.29999999999999996e-272 < A < 8.99999999999999944e132Initial program 70.1%
Taylor expanded in B around -inf 63.1%
associate--l+63.1%
div-sub63.1%
Simplified63.1%
Taylor expanded in C around inf 57.4%
if -1.1e-183 < A < -1.29999999999999996e-272Initial program 44.1%
Taylor expanded in C around inf 46.4%
Taylor expanded in A around inf 54.6%
if 8.99999999999999944e132 < A Initial program 82.0%
Taylor expanded in B around inf 85.4%
Taylor expanded in A around inf 80.8%
mul-1-neg80.8%
Simplified80.8%
Final simplification62.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (- -1.0 (/ A B))))
(if (<= C -6.3e-165)
(* (/ 180.0 PI) (atan (/ (+ C (* B t_0)) B)))
(if (<= C -2.5e-240)
(/ (* 180.0 (atan (/ -1.0 t_0))) PI)
(if (<= C 2.75e-61)
(* 180.0 (/ (atan t_0) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A))))))))))
double code(double A, double B, double C) {
double t_0 = -1.0 - (A / B);
double tmp;
if (C <= -6.3e-165) {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B * t_0)) / B));
} else if (C <= -2.5e-240) {
tmp = (180.0 * atan((-1.0 / t_0))) / ((double) M_PI);
} else if (C <= 2.75e-61) {
tmp = 180.0 * (atan(t_0) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = -1.0 - (A / B);
double tmp;
if (C <= -6.3e-165) {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B * t_0)) / B));
} else if (C <= -2.5e-240) {
tmp = (180.0 * Math.atan((-1.0 / t_0))) / Math.PI;
} else if (C <= 2.75e-61) {
tmp = 180.0 * (Math.atan(t_0) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
}
return tmp;
}
def code(A, B, C): t_0 = -1.0 - (A / B) tmp = 0 if C <= -6.3e-165: tmp = (180.0 / math.pi) * math.atan(((C + (B * t_0)) / B)) elif C <= -2.5e-240: tmp = (180.0 * math.atan((-1.0 / t_0))) / math.pi elif C <= 2.75e-61: tmp = 180.0 * (math.atan(t_0) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) return tmp
function code(A, B, C) t_0 = Float64(-1.0 - Float64(A / B)) tmp = 0.0 if (C <= -6.3e-165) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B * t_0)) / B))); elseif (C <= -2.5e-240) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 / t_0))) / pi); elseif (C <= 2.75e-61) tmp = Float64(180.0 * Float64(atan(t_0) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = -1.0 - (A / B); tmp = 0.0; if (C <= -6.3e-165) tmp = (180.0 / pi) * atan(((C + (B * t_0)) / B)); elseif (C <= -2.5e-240) tmp = (180.0 * atan((-1.0 / t_0))) / pi; elseif (C <= 2.75e-61) tmp = 180.0 * (atan(t_0) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -6.3e-165], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B * t$95$0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.5e-240], N[(N[(180.0 * N[ArcTan[N[(-1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.75e-61], N[(180.0 * N[(N[ArcTan[t$95$0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - \frac{A}{B}\\
\mathbf{if}\;C \leq -6.3 \cdot 10^{-165}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + B \cdot t\_0}{B}\right)\\
\mathbf{elif}\;C \leq -2.5 \cdot 10^{-240}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-1}{t\_0}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.75 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} t\_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\end{array}
\end{array}
if C < -6.3000000000000001e-165Initial program 72.9%
Simplified86.5%
Taylor expanded in B around inf 74.2%
if -6.3000000000000001e-165 < C < -2.5000000000000002e-240Initial program 63.1%
associate-*r/63.1%
associate-*l/63.1%
*-un-lft-identity63.1%
unpow263.1%
unpow263.1%
hypot-define83.1%
Applied egg-rr83.1%
clear-num83.1%
associate--l-63.3%
Applied egg-rr63.3%
Taylor expanded in B around -inf 62.6%
associate-*r/62.6%
mul-1-neg62.6%
Simplified62.6%
Taylor expanded in C around 0 62.6%
if -2.5000000000000002e-240 < C < 2.7499999999999998e-61Initial program 66.5%
Taylor expanded in B around inf 61.2%
Taylor expanded in C around 0 61.2%
neg-mul-161.2%
distribute-neg-in61.2%
metadata-eval61.2%
Simplified61.2%
if 2.7499999999999998e-61 < C Initial program 27.7%
Simplified48.4%
Taylor expanded in B around 0 73.6%
Final simplification70.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (- -1.0 (/ A B))))
(if (<= C -6.3e-165)
(* 180.0 (/ 1.0 (/ PI (atan (+ (/ C B) t_0)))))
(if (<= C -8e-240)
(/ (* 180.0 (atan (/ -1.0 t_0))) PI)
(if (<= C 2.85e-61)
(* 180.0 (/ (atan t_0) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A))))))))))
double code(double A, double B, double C) {
double t_0 = -1.0 - (A / B);
double tmp;
if (C <= -6.3e-165) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((C / B) + t_0))));
} else if (C <= -8e-240) {
tmp = (180.0 * atan((-1.0 / t_0))) / ((double) M_PI);
} else if (C <= 2.85e-61) {
tmp = 180.0 * (atan(t_0) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = -1.0 - (A / B);
double tmp;
if (C <= -6.3e-165) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((C / B) + t_0))));
} else if (C <= -8e-240) {
tmp = (180.0 * Math.atan((-1.0 / t_0))) / Math.PI;
} else if (C <= 2.85e-61) {
tmp = 180.0 * (Math.atan(t_0) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
}
return tmp;
}
def code(A, B, C): t_0 = -1.0 - (A / B) tmp = 0 if C <= -6.3e-165: tmp = 180.0 * (1.0 / (math.pi / math.atan(((C / B) + t_0)))) elif C <= -8e-240: tmp = (180.0 * math.atan((-1.0 / t_0))) / math.pi elif C <= 2.85e-61: tmp = 180.0 * (math.atan(t_0) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) return tmp
function code(A, B, C) t_0 = Float64(-1.0 - Float64(A / B)) tmp = 0.0 if (C <= -6.3e-165) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(Float64(C / B) + t_0))))); elseif (C <= -8e-240) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 / t_0))) / pi); elseif (C <= 2.85e-61) tmp = Float64(180.0 * Float64(atan(t_0) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = -1.0 - (A / B); tmp = 0.0; if (C <= -6.3e-165) tmp = 180.0 * (1.0 / (pi / atan(((C / B) + t_0)))); elseif (C <= -8e-240) tmp = (180.0 * atan((-1.0 / t_0))) / pi; elseif (C <= 2.85e-61) tmp = 180.0 * (atan(t_0) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -6.3e-165], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(N[(C / B), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -8e-240], N[(N[(180.0 * N[ArcTan[N[(-1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.85e-61], N[(180.0 * N[(N[ArcTan[t$95$0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - \frac{A}{B}\\
\mathbf{if}\;C \leq -6.3 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B} + t\_0\right)}}\\
\mathbf{elif}\;C \leq -8 \cdot 10^{-240}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-1}{t\_0}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.85 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} t\_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\end{array}
\end{array}
if C < -6.3000000000000001e-165Initial program 72.9%
Taylor expanded in B around inf 74.1%
clear-num74.1%
Applied egg-rr74.1%
if -6.3000000000000001e-165 < C < -7.9999999999999998e-240Initial program 63.1%
associate-*r/63.1%
associate-*l/63.1%
*-un-lft-identity63.1%
unpow263.1%
unpow263.1%
hypot-define83.1%
Applied egg-rr83.1%
clear-num83.1%
associate--l-63.3%
Applied egg-rr63.3%
Taylor expanded in B around -inf 62.6%
associate-*r/62.6%
mul-1-neg62.6%
Simplified62.6%
Taylor expanded in C around 0 62.6%
if -7.9999999999999998e-240 < C < 2.85000000000000003e-61Initial program 66.5%
Taylor expanded in B around inf 61.2%
Taylor expanded in C around 0 61.2%
neg-mul-161.2%
distribute-neg-in61.2%
metadata-eval61.2%
Simplified61.2%
if 2.85000000000000003e-61 < C Initial program 27.7%
Simplified48.4%
Taylor expanded in B around 0 73.6%
Final simplification70.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (- -1.0 (/ A B))))
(if (<= C -1.5e-165)
(* 180.0 (/ (atan (+ (/ C B) t_0)) PI))
(if (<= C -1e-239)
(/ (* 180.0 (atan (/ -1.0 t_0))) PI)
(if (<= C 2.5e-61)
(* 180.0 (/ (atan t_0) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B (- C A))))))))))
double code(double A, double B, double C) {
double t_0 = -1.0 - (A / B);
double tmp;
if (C <= -1.5e-165) {
tmp = 180.0 * (atan(((C / B) + t_0)) / ((double) M_PI));
} else if (C <= -1e-239) {
tmp = (180.0 * atan((-1.0 / t_0))) / ((double) M_PI);
} else if (C <= 2.5e-61) {
tmp = 180.0 * (atan(t_0) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / (C - A))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = -1.0 - (A / B);
double tmp;
if (C <= -1.5e-165) {
tmp = 180.0 * (Math.atan(((C / B) + t_0)) / Math.PI);
} else if (C <= -1e-239) {
tmp = (180.0 * Math.atan((-1.0 / t_0))) / Math.PI;
} else if (C <= 2.5e-61) {
tmp = 180.0 * (Math.atan(t_0) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / (C - A))));
}
return tmp;
}
def code(A, B, C): t_0 = -1.0 - (A / B) tmp = 0 if C <= -1.5e-165: tmp = 180.0 * (math.atan(((C / B) + t_0)) / math.pi) elif C <= -1e-239: tmp = (180.0 * math.atan((-1.0 / t_0))) / math.pi elif C <= 2.5e-61: tmp = 180.0 * (math.atan(t_0) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / (C - A)))) return tmp
function code(A, B, C) t_0 = Float64(-1.0 - Float64(A / B)) tmp = 0.0 if (C <= -1.5e-165) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + t_0)) / pi)); elseif (C <= -1e-239) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 / t_0))) / pi); elseif (C <= 2.5e-61) tmp = Float64(180.0 * Float64(atan(t_0) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / Float64(C - A))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = -1.0 - (A / B); tmp = 0.0; if (C <= -1.5e-165) tmp = 180.0 * (atan(((C / B) + t_0)) / pi); elseif (C <= -1e-239) tmp = (180.0 * atan((-1.0 / t_0))) / pi; elseif (C <= 2.5e-61) tmp = 180.0 * (atan(t_0) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / (C - A)))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.5e-165], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1e-239], N[(N[(180.0 * N[ArcTan[N[(-1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.5e-61], N[(180.0 * N[(N[ArcTan[t$95$0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - \frac{A}{B}\\
\mathbf{if}\;C \leq -1.5 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + t\_0\right)}{\pi}\\
\mathbf{elif}\;C \leq -1 \cdot 10^{-239}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-1}{t\_0}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.5 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} t\_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
\end{array}
\end{array}
if C < -1.49999999999999989e-165Initial program 72.9%
Taylor expanded in B around inf 74.1%
if -1.49999999999999989e-165 < C < -1.0000000000000001e-239Initial program 63.1%
associate-*r/63.1%
associate-*l/63.1%
*-un-lft-identity63.1%
unpow263.1%
unpow263.1%
hypot-define83.1%
Applied egg-rr83.1%
clear-num83.1%
associate--l-63.3%
Applied egg-rr63.3%
Taylor expanded in B around -inf 62.6%
associate-*r/62.6%
mul-1-neg62.6%
Simplified62.6%
Taylor expanded in C around 0 62.6%
if -1.0000000000000001e-239 < C < 2.4999999999999999e-61Initial program 66.5%
Taylor expanded in B around inf 61.2%
Taylor expanded in C around 0 61.2%
neg-mul-161.2%
distribute-neg-in61.2%
metadata-eval61.2%
Simplified61.2%
if 2.4999999999999999e-61 < C Initial program 27.7%
Simplified48.4%
Taylor expanded in B around 0 73.6%
Final simplification70.4%
(FPCore (A B C)
:precision binary64
(if (<= A -2.2e-7)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A -3.7e-289)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 9e+132)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e-7) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= -3.7e-289) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 9e+132) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e-7) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= -3.7e-289) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 9e+132) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.2e-7: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= -3.7e-289: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 9e+132: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.2e-7) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= -3.7e-289) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 9e+132) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.2e-7) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= -3.7e-289) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 9e+132) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.2e-7], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -3.7e-289], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e+132], 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[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.7 \cdot 10^{-289}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+132}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.2000000000000001e-7Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
Taylor expanded in A around -inf 69.7%
*-commutative69.7%
associate-*r/69.7%
Applied egg-rr69.7%
if -2.2000000000000001e-7 < A < -3.69999999999999989e-289Initial program 62.3%
Taylor expanded in A around 0 61.2%
unpow261.2%
unpow261.2%
hypot-define80.3%
Simplified80.3%
Taylor expanded in C around 0 60.0%
if -3.69999999999999989e-289 < A < 8.99999999999999944e132Initial program 67.7%
associate-*r/67.7%
associate-*l/67.7%
*-un-lft-identity67.7%
unpow267.7%
unpow267.7%
hypot-define88.6%
Applied egg-rr88.6%
clear-num88.6%
associate--l-88.6%
Applied egg-rr88.6%
Taylor expanded in A around 0 59.6%
unpow259.6%
unpow259.6%
hypot-undefine80.3%
Simplified80.3%
Taylor expanded in B around -inf 56.7%
+-commutative56.7%
Simplified56.7%
if 8.99999999999999944e132 < A Initial program 82.0%
Taylor expanded in A around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
Simplified80.8%
Final simplification64.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.55e-8)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -5e-286)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 9e+132)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e-8) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -5e-286) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 9e+132) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e-8) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -5e-286) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 9e+132) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.55e-8: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -5e-286: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 9e+132: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.55e-8) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -5e-286) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 9e+132) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.55e-8) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -5e-286) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 9e+132) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.55e-8], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -5e-286], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e+132], 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[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.55 \cdot 10^{-8}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5 \cdot 10^{-286}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+132}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.55e-8Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
Taylor expanded in A around -inf 69.7%
if -1.55e-8 < A < -5.00000000000000037e-286Initial program 62.3%
Taylor expanded in A around 0 61.2%
unpow261.2%
unpow261.2%
hypot-define80.3%
Simplified80.3%
Taylor expanded in C around 0 60.0%
if -5.00000000000000037e-286 < A < 8.99999999999999944e132Initial program 67.7%
associate-*r/67.7%
associate-*l/67.7%
*-un-lft-identity67.7%
unpow267.7%
unpow267.7%
hypot-define88.6%
Applied egg-rr88.6%
clear-num88.6%
associate--l-88.6%
Applied egg-rr88.6%
Taylor expanded in A around 0 59.6%
unpow259.6%
unpow259.6%
hypot-undefine80.3%
Simplified80.3%
Taylor expanded in B around -inf 56.7%
+-commutative56.7%
Simplified56.7%
if 8.99999999999999944e132 < A Initial program 82.0%
Taylor expanded in A around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
Simplified80.8%
Final simplification64.0%
(FPCore (A B C)
:precision binary64
(if (<= A -8e-8)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -3.8e-288)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 9e+132)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8e-8) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -3.8e-288) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 9e+132) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8e-8) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -3.8e-288) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 9e+132) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8e-8: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -3.8e-288: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 9e+132: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8e-8) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -3.8e-288) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 9e+132) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8e-8) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -3.8e-288) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 9e+132) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8e-8], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -3.8e-288], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e+132], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8 \cdot 10^{-8}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.8 \cdot 10^{-288}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.0000000000000002e-8Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
Taylor expanded in A around -inf 69.7%
if -8.0000000000000002e-8 < A < -3.7999999999999998e-288Initial program 62.3%
Taylor expanded in A around 0 61.2%
unpow261.2%
unpow261.2%
hypot-define80.3%
Simplified80.3%
Taylor expanded in C around 0 60.0%
if -3.7999999999999998e-288 < A < 8.99999999999999944e132Initial program 67.7%
Taylor expanded in B around -inf 64.6%
associate--l+64.6%
div-sub64.7%
Simplified64.7%
Taylor expanded in C around inf 56.7%
if 8.99999999999999944e132 < A Initial program 82.0%
Taylor expanded in A around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
Simplified80.8%
(FPCore (A B C)
:precision binary64
(if (<= A -4.4e-8)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -6e-287)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 9e+132)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.4e-8) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -6e-287) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 9e+132) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.4e-8) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -6e-287) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 9e+132) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.4e-8: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -6e-287: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 9e+132: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.4e-8) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -6e-287) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 9e+132) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.4e-8) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -6e-287) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 9e+132) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.4e-8], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6e-287], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e+132], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.4 \cdot 10^{-8}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -6 \cdot 10^{-287}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.3999999999999997e-8Initial program 23.6%
Taylor expanded in A around -inf 69.6%
if -4.3999999999999997e-8 < A < -5.99999999999999984e-287Initial program 62.3%
Taylor expanded in A around 0 61.2%
unpow261.2%
unpow261.2%
hypot-define80.3%
Simplified80.3%
Taylor expanded in C around 0 60.0%
if -5.99999999999999984e-287 < A < 8.99999999999999944e132Initial program 67.7%
Taylor expanded in B around -inf 64.6%
associate--l+64.6%
div-sub64.7%
Simplified64.7%
Taylor expanded in C around inf 56.7%
if 8.99999999999999944e132 < A Initial program 82.0%
Taylor expanded in A around inf 80.8%
associate-*r/80.8%
*-commutative80.8%
Simplified80.8%
(FPCore (A B C)
:precision binary64
(if (<= C -5.8e-69)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -6.8e-240)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C 4.2e-74)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.8e-69) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -6.8e-240) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= 4.2e-74) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5.8e-69) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -6.8e-240) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= 4.2e-74) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.8e-69: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -6.8e-240: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= 4.2e-74: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.8e-69) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -6.8e-240) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= 4.2e-74) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.8e-69) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -6.8e-240) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= 4.2e-74) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.8e-69], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -6.8e-240], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.2e-74], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.8 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -6.8 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.2 \cdot 10^{-74}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.7999999999999997e-69Initial program 77.5%
Taylor expanded in C around -inf 66.2%
if -5.7999999999999997e-69 < C < -6.79999999999999979e-240Initial program 59.2%
Taylor expanded in A around -inf 44.4%
if -6.79999999999999979e-240 < C < 4.2e-74Initial program 66.2%
Taylor expanded in B around inf 38.6%
if 4.2e-74 < C Initial program 29.4%
Taylor expanded in C around inf 52.3%
Taylor expanded in A around inf 63.3%
(FPCore (A B C)
:precision binary64
(if (<= C -3.3e-69)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C -1.26e-241)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C 5.4e-73)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.3e-69) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= -1.26e-241) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= 5.4e-73) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.3e-69) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= -1.26e-241) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= 5.4e-73) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.3e-69: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= -1.26e-241: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= 5.4e-73: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.3e-69) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= -1.26e-241) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= 5.4e-73) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.3e-69) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= -1.26e-241) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= 5.4e-73) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.3e-69], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.26e-241], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.4e-73], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.3 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.26 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.4 \cdot 10^{-73}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.3e-69Initial program 77.5%
Taylor expanded in B around inf 82.0%
Taylor expanded in C around inf 65.8%
if -3.3e-69 < C < -1.26e-241Initial program 59.2%
Taylor expanded in A around -inf 44.4%
if -1.26e-241 < C < 5.39999999999999989e-73Initial program 66.2%
Taylor expanded in B around inf 38.6%
if 5.39999999999999989e-73 < C Initial program 29.4%
Taylor expanded in C around inf 52.3%
Taylor expanded in A around inf 63.3%
(FPCore (A B C)
:precision binary64
(if (<= A -5e-9)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A -3.8e-289)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5e-9) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= -3.8e-289) {
tmp = 180.0 * (atan(((C - B) / 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 <= -5e-9) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= -3.8e-289) {
tmp = 180.0 * (Math.atan(((C - B) / 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 <= -5e-9: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= -3.8e-289: tmp = 180.0 * (math.atan(((C - B) / 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 <= -5e-9) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= -3.8e-289) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / 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 <= -5e-9) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= -3.8e-289) tmp = 180.0 * (atan(((C - B) / 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, -5e-9], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -3.8e-289], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $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 -5 \cdot 10^{-9}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.8 \cdot 10^{-289}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.0000000000000001e-9Initial program 23.6%
associate-*r/23.6%
associate-*l/23.6%
*-un-lft-identity23.6%
unpow223.6%
unpow223.6%
hypot-define46.1%
Applied egg-rr46.1%
Taylor expanded in A around -inf 69.7%
*-commutative69.7%
associate-*r/69.7%
Applied egg-rr69.7%
if -5.0000000000000001e-9 < A < -3.80000000000000009e-289Initial program 62.3%
Taylor expanded in A around 0 61.2%
unpow261.2%
unpow261.2%
hypot-define80.3%
Simplified80.3%
Taylor expanded in C around 0 60.0%
if -3.80000000000000009e-289 < A Initial program 71.5%
Taylor expanded in B around -inf 68.7%
associate--l+68.7%
div-sub69.6%
Simplified69.6%
Final simplification67.1%
(FPCore (A B C)
:precision binary64
(if (<= C -4.7e+16)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 2.8e-61)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(/ (* 180.0 (atan (* B (/ -0.5 C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.7e+16) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 2.8e-61) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.7e+16) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 2.8e-61) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.7e+16: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 2.8e-61: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.7e+16) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 2.8e-61) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.7e+16) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 2.8e-61) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.7e+16], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.8e-61], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.7 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.8 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.7e16Initial program 79.4%
Taylor expanded in A around 0 79.4%
unpow279.4%
unpow279.4%
hypot-define91.1%
Simplified91.1%
Taylor expanded in C around 0 85.4%
if -4.7e16 < C < 2.8000000000000001e-61Initial program 64.5%
Taylor expanded in B around inf 55.0%
Taylor expanded in C around 0 54.0%
neg-mul-154.0%
distribute-neg-in54.0%
metadata-eval54.0%
Simplified54.0%
if 2.8000000000000001e-61 < C Initial program 27.7%
associate-*r/27.7%
associate-*l/27.7%
*-un-lft-identity27.7%
unpow227.7%
unpow227.7%
hypot-define51.4%
Applied egg-rr51.4%
clear-num51.4%
associate--l-48.3%
Applied egg-rr48.3%
Taylor expanded in A around 0 21.8%
unpow221.8%
unpow221.8%
hypot-undefine41.4%
Simplified41.4%
Taylor expanded in B around 0 64.3%
associate-*r/64.3%
*-commutative64.3%
associate-/l*64.2%
Simplified64.2%
Final simplification65.3%
(FPCore (A B C)
:precision binary64
(if (<= C -4.8e+16)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 1.25e-73)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.8e+16) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 1.25e-73) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.8e+16) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 1.25e-73) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.8e+16: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 1.25e-73: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.8e+16) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 1.25e-73) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.8e+16) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 1.25e-73) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.8e+16], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.25e-73], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.8 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{-73}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.8e16Initial program 79.4%
Taylor expanded in B around inf 85.1%
Taylor expanded in C around inf 74.4%
if -4.8e16 < C < 1.25e-73Initial program 64.3%
Taylor expanded in B around inf 34.4%
if 1.25e-73 < C Initial program 29.4%
Taylor expanded in C around inf 52.3%
Taylor expanded in A around inf 63.3%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-93)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 8.2e-28)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-93) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8.2e-28) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-93) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8.2e-28) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-93: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8.2e-28: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-93) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8.2e-28) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.6e-93) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8.2e-28) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-93], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.2e-28], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-93}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8.2 \cdot 10^{-28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.5999999999999998e-93Initial program 54.3%
Taylor expanded in B around -inf 50.6%
if -2.5999999999999998e-93 < B < 8.2000000000000005e-28Initial program 60.6%
Taylor expanded in B around inf 52.7%
Taylor expanded in C around inf 39.7%
if 8.2000000000000005e-28 < B Initial program 55.9%
Taylor expanded in B around inf 62.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.2e-177)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.4e-127)
(* 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.2e-177) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.4e-127) {
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.2e-177) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.4e-127) {
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.2e-177: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.4e-127: 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.2e-177) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.4e-127) 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.2e-177) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.4e-127) 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.2e-177], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e-127], 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.2 \cdot 10^{-177}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-127}:\\
\;\;\;\;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.1999999999999999e-177Initial program 59.4%
Taylor expanded in B around -inf 47.1%
if -1.1999999999999999e-177 < B < 5.3999999999999999e-127Initial program 54.6%
Taylor expanded in C around inf 38.6%
associate-*r/38.6%
mul-1-neg38.6%
distribute-rgt1-in38.6%
metadata-eval38.6%
mul0-lft38.6%
metadata-eval38.6%
Simplified38.6%
if 5.3999999999999999e-127 < B Initial program 57.4%
Taylor expanded in B around inf 52.3%
(FPCore (A B C) :precision binary64 (if (<= B -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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, -2e-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 -2 \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 < -1.999999999999994e-310Initial program 56.3%
Taylor expanded in B around -inf 37.5%
if -1.999999999999994e-310 < B Initial program 58.2%
Taylor expanded in B around inf 41.8%
(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 57.3%
Taylor expanded in B around inf 23.2%
herbie shell --seed 2024095
(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)))