
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(t_1 (atan (/ (- (- C A) (hypot (- A C) B)) B))))
(if (<= t_0 -0.5)
(/ 180.0 (/ PI t_1))
(if (<= t_0 0.0)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(/ (* 180.0 t_1) PI)))))
double code(double A, double B, double C) {
double t_0 = atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))))));
double t_1 = atan((((C - A) - hypot((A - C), B)) / B));
double tmp;
if (t_0 <= -0.5) {
tmp = 180.0 / (((double) M_PI) / t_1);
} else if (t_0 <= 0.0) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else {
tmp = (180.0 * t_1) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))))));
double t_1 = Math.atan((((C - A) - Math.hypot((A - C), B)) / B));
double tmp;
if (t_0 <= -0.5) {
tmp = 180.0 / (Math.PI / t_1);
} else if (t_0 <= 0.0) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else {
tmp = (180.0 * t_1) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) t_1 = math.atan((((C - A) - math.hypot((A - C), B)) / B)) tmp = 0 if t_0 <= -0.5: tmp = 180.0 / (math.pi / t_1) elif t_0 <= 0.0: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi else: tmp = (180.0 * t_1) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) t_1 = atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) tmp = 0.0 if (t_0 <= -0.5) tmp = Float64(180.0 / Float64(pi / t_1)); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); else tmp = Float64(Float64(180.0 * t_1) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))); t_1 = atan((((C - A) - hypot((A - C), B)) / B)); tmp = 0.0; if (t_0 <= -0.5) tmp = 180.0 / (pi / t_1); elseif (t_0 <= 0.0) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; else tmp = (180.0 * t_1) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -0.5], N[(180.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\\
t_1 := \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)\\
\mathbf{if}\;t\_0 \leq -0.5:\\
\;\;\;\;\frac{180}{\frac{\pi}{t\_1}}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot t\_1}{\pi}\\
\end{array}
\end{array}
if (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < -0.5Initial program 66.5%
Applied egg-rr87.9%
if -0.5 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < 0.0Initial program 24.8%
associate-*r/24.8%
associate-*l/24.8%
*-un-lft-identity24.8%
unpow224.8%
unpow224.8%
hypot-define24.8%
Applied egg-rr24.8%
Taylor expanded in A around -inf 55.6%
associate-*r/55.6%
Simplified55.6%
if 0.0 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) Initial program 65.9%
associate-*r/65.9%
associate-*l/65.9%
*-un-lft-identity65.9%
unpow265.9%
unpow265.9%
hypot-define93.2%
Applied egg-rr93.2%
Final simplification84.7%
(FPCore (A B C)
:precision binary64
(if (<= C -14600000000.0)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(if (<= C 2.05e+48)
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI))
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -14600000000.0) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else if (C <= 2.05e+48) {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -14600000000.0) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else if (C <= 2.05e+48) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -14600000000.0: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) elif C <= 2.05e+48: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -14600000000.0) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); elseif (C <= 2.05e+48) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -14600000000.0) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); elseif (C <= 2.05e+48) tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -14600000000.0], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.05e+48], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -14600000000:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{elif}\;C \leq 2.05 \cdot 10^{+48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -1.46e10Initial program 82.5%
Applied egg-rr92.3%
Taylor expanded in A around 0 82.6%
unpow282.6%
unpow282.6%
hypot-define89.2%
Simplified89.2%
if -1.46e10 < C < 2.0500000000000001e48Initial program 62.8%
Taylor expanded in C around 0 58.2%
mul-1-neg58.2%
distribute-neg-frac258.2%
+-commutative58.2%
unpow258.2%
unpow258.2%
hypot-define77.3%
Simplified77.3%
if 2.0500000000000001e48 < C Initial program 22.9%
associate-*r/22.9%
associate-*l/22.9%
*-un-lft-identity22.9%
unpow222.9%
unpow222.9%
hypot-define58.5%
Applied egg-rr58.5%
Taylor expanded in C around inf 73.6%
Taylor expanded in A around 0 73.6%
Simplified73.7%
Final simplification79.4%
(FPCore (A B C)
:precision binary64
(if (<= A -5.4e-6)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI))
(if (<= A 6.5e-17)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ 180.0 (/ PI (atan (+ (/ (- C A) B) -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-6) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else if (A <= 6.5e-17) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) / B) + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-6) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else if (A <= 6.5e-17) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) / B) + -1.0)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.4e-6: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) elif A <= 6.5e-17: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - A) / B) + -1.0))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.4e-6) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); elseif (A <= 6.5e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) / B) + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.4e-6) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); elseif (A <= 6.5e-17) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 / (pi / atan((((C - A) / B) + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.4e-6], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-17], 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[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.4 \cdot 10^{-6}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\
\end{array}
\end{array}
if A < -5.39999999999999997e-6Initial program 27.6%
Taylor expanded in A around -inf 63.3%
mul-1-neg63.3%
distribute-neg-frac263.3%
distribute-lft-out63.3%
associate-/l*65.1%
Simplified65.1%
if -5.39999999999999997e-6 < A < 6.4999999999999996e-17Initial program 64.3%
Taylor expanded in A around 0 60.6%
unpow260.6%
unpow260.6%
hypot-define79.1%
Simplified79.1%
if 6.4999999999999996e-17 < A Initial program 80.1%
Applied egg-rr94.5%
Taylor expanded in B around inf 79.9%
+-commutative79.9%
associate--r+79.9%
div-sub80.0%
Simplified80.0%
Final simplification75.8%
(FPCore (A B C)
:precision binary64
(if (<= A -8.6e-9)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI))
(if (<= A 6.3e-18)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(/ 180.0 (/ PI (atan (+ (/ (- C A) B) -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-9) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else if (A <= 6.3e-18) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) / B) + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-9) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else if (A <= 6.3e-18) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) / B) + -1.0)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.6e-9: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) elif A <= 6.3e-18: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 / (math.pi / math.atan((((C - A) / B) + -1.0))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.6e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); elseif (A <= 6.3e-18) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) / B) + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.6e-9) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); elseif (A <= 6.3e-18) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 / (pi / atan((((C - A) / B) + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.6e-9], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.3e-18], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.6 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\
\end{array}
\end{array}
if A < -8.59999999999999925e-9Initial program 27.6%
Taylor expanded in A around -inf 63.3%
mul-1-neg63.3%
distribute-neg-frac263.3%
distribute-lft-out63.3%
associate-/l*65.1%
Simplified65.1%
if -8.59999999999999925e-9 < A < 6.3000000000000004e-18Initial program 64.3%
Applied egg-rr82.5%
Taylor expanded in A around 0 60.6%
unpow260.6%
unpow260.6%
hypot-define79.2%
Simplified79.2%
if 6.3000000000000004e-18 < A Initial program 80.1%
Applied egg-rr94.5%
Taylor expanded in B around inf 79.9%
+-commutative79.9%
associate--r+79.9%
div-sub80.0%
Simplified80.0%
Final simplification75.8%
(FPCore (A B C) :precision binary64 (if (<= A -6.4e-7) (* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e-7) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e-7) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.4e-7: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.4e-7) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.4e-7) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e-7], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.4 \cdot 10^{-7}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.4000000000000001e-7Initial program 27.6%
Taylor expanded in A around -inf 63.3%
mul-1-neg63.3%
distribute-neg-frac263.3%
distribute-lft-out63.3%
associate-/l*65.1%
Simplified65.1%
if -6.4000000000000001e-7 < A Initial program 69.8%
Simplified86.6%
Final simplification81.1%
(FPCore (A B C) :precision binary64 (if (<= C 4.8e+86) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* (atan (* B (/ -0.5 C))) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 4.8e+86) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 4.8e+86) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 4.8e+86: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 4.8e+86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 4.8e+86) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 4.8e+86], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4.8 \cdot 10^{+86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < 4.8000000000000001e86Initial program 67.5%
associate-*l/67.5%
*-lft-identity67.5%
+-commutative67.5%
unpow267.5%
unpow267.5%
hypot-define83.8%
Simplified83.8%
if 4.8000000000000001e86 < C Initial program 18.1%
associate-*r/18.1%
associate-*l/18.1%
*-un-lft-identity18.1%
unpow218.1%
unpow218.1%
hypot-define57.8%
Applied egg-rr57.8%
Taylor expanded in C around inf 78.1%
Taylor expanded in A around 0 78.0%
Simplified78.2%
Final simplification82.8%
(FPCore (A B C) :precision binary64 (if (<= C 4.25e+83) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B)))) (* (atan (* B (/ -0.5 C))) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 4.25e+83) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 4.25e+83) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 4.25e+83: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 4.25e+83) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 4.25e+83) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 4.25e+83], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4.25 \cdot 10^{+83}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < 4.2499999999999998e83Initial program 67.5%
Applied egg-rr83.8%
if 4.2499999999999998e83 < C Initial program 18.1%
associate-*r/18.1%
associate-*l/18.1%
*-un-lft-identity18.1%
unpow218.1%
unpow218.1%
hypot-define57.8%
Applied egg-rr57.8%
Taylor expanded in C around inf 78.1%
Taylor expanded in A around 0 78.0%
Simplified78.2%
Final simplification82.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -3.1e-87)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (or (<= B -7.6e-166) (and (not (<= B 2.9e-254)) (<= B 1.45e-192)))
(/ 180.0 (/ PI (atan (/ (* 0.5 (+ B (* B (/ C A)))) A))))
(/ 180.0 (/ PI (atan (+ t_0 -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -3.1e-87) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if ((B <= -7.6e-166) || (!(B <= 2.9e-254) && (B <= 1.45e-192))) {
tmp = 180.0 / (((double) M_PI) / atan(((0.5 * (B + (B * (C / A)))) / A)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((t_0 + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -3.1e-87) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if ((B <= -7.6e-166) || (!(B <= 2.9e-254) && (B <= 1.45e-192))) {
tmp = 180.0 / (Math.PI / Math.atan(((0.5 * (B + (B * (C / A)))) / A)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((t_0 + -1.0)));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -3.1e-87: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif (B <= -7.6e-166) or (not (B <= 2.9e-254) and (B <= 1.45e-192)): tmp = 180.0 / (math.pi / math.atan(((0.5 * (B + (B * (C / A)))) / A))) else: tmp = 180.0 / (math.pi / math.atan((t_0 + -1.0))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -3.1e-87) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif ((B <= -7.6e-166) || (!(B <= 2.9e-254) && (B <= 1.45e-192))) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(t_0 + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -3.1e-87) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif ((B <= -7.6e-166) || (~((B <= 2.9e-254)) && (B <= 1.45e-192))) tmp = 180.0 / (pi / atan(((0.5 * (B + (B * (C / A)))) / A))); else tmp = 180.0 / (pi / atan((t_0 + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -3.1e-87], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, -7.6e-166], And[N[Not[LessEqual[B, 2.9e-254]], $MachinePrecision], LessEqual[B, 1.45e-192]]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -3.1 \cdot 10^{-87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -7.6 \cdot 10^{-166} \lor \neg \left(B \leq 2.9 \cdot 10^{-254}\right) \land B \leq 1.45 \cdot 10^{-192}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(t\_0 + -1\right)}}\\
\end{array}
\end{array}
if B < -3.09999999999999998e-87Initial program 63.2%
Taylor expanded in B around -inf 86.6%
associate--l+86.6%
div-sub86.6%
Simplified86.6%
if -3.09999999999999998e-87 < B < -7.59999999999999964e-166 or 2.9e-254 < B < 1.45000000000000008e-192Initial program 40.0%
Applied egg-rr65.5%
Taylor expanded in A around -inf 67.6%
associate-*r/67.6%
distribute-lft-out67.6%
associate-*r*67.6%
metadata-eval67.6%
associate-/l*67.6%
Simplified67.6%
if -7.59999999999999964e-166 < B < 2.9e-254 or 1.45000000000000008e-192 < B Initial program 62.4%
Applied egg-rr78.9%
Taylor expanded in B around inf 67.4%
+-commutative67.4%
associate--r+67.4%
div-sub67.4%
Simplified67.4%
Final simplification72.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI)))
(t_1 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -1.25e-87)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.7e-215)
t_0
(if (<= B 4.4e-308)
t_1
(if (<= B 5e-205)
t_0
(if (<= B 9.6e-44) t_1 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -1.25e-87) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.7e-215) {
tmp = t_0;
} else if (B <= 4.4e-308) {
tmp = t_1;
} else if (B <= 5e-205) {
tmp = t_0;
} else if (B <= 9.6e-44) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -1.25e-87) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.7e-215) {
tmp = t_0;
} else if (B <= 4.4e-308) {
tmp = t_1;
} else if (B <= 5e-205) {
tmp = t_0;
} else if (B <= 9.6e-44) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) t_1 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -1.25e-87: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.7e-215: tmp = t_0 elif B <= 4.4e-308: tmp = t_1 elif B <= 5e-205: tmp = t_0 elif B <= 9.6e-44: tmp = t_1 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -1.25e-87) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.7e-215) tmp = t_0; elseif (B <= 4.4e-308) tmp = t_1; elseif (B <= 5e-205) tmp = t_0; elseif (B <= 9.6e-44) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.0 / B)) / pi); t_1 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -1.25e-87) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.7e-215) tmp = t_0; elseif (B <= 4.4e-308) tmp = t_1; elseif (B <= 5e-205) tmp = t_0; elseif (B <= 9.6e-44) tmp = t_1; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.25e-87], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.7e-215], t$95$0, If[LessEqual[B, 4.4e-308], t$95$1, If[LessEqual[B, 5e-205], t$95$0, If[LessEqual[B, 9.6e-44], t$95$1, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.25 \cdot 10^{-87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.7 \cdot 10^{-215}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{-308}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 9.6 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.25000000000000011e-87Initial program 63.2%
Taylor expanded in B around -inf 61.3%
if -1.25000000000000011e-87 < B < -3.70000000000000009e-215 or 4.3999999999999999e-308 < B < 5.00000000000000001e-205Initial program 43.6%
Taylor expanded in C around inf 38.1%
associate-*r/38.1%
distribute-rgt1-in38.1%
metadata-eval38.1%
mul0-lft38.1%
metadata-eval38.1%
Simplified38.1%
if -3.70000000000000009e-215 < B < 4.3999999999999999e-308 or 5.00000000000000001e-205 < B < 9.60000000000000035e-44Initial program 71.0%
Taylor expanded in B around -inf 58.7%
neg-mul-158.7%
Simplified58.7%
Taylor expanded in C around inf 42.7%
if 9.60000000000000035e-44 < B Initial program 57.3%
Taylor expanded in B around inf 53.7%
Final simplification49.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -1.05e-84)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.06e-182)
t_0
(if (<= B 9e-274)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B 4.4e-203)
t_0
(if (<= B 1.7e-43)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -1.05e-84) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.06e-182) {
tmp = t_0;
} else if (B <= 9e-274) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= 4.4e-203) {
tmp = t_0;
} else if (B <= 1.7e-43) {
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 t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -1.05e-84) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.06e-182) {
tmp = t_0;
} else if (B <= 9e-274) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= 4.4e-203) {
tmp = t_0;
} else if (B <= 1.7e-43) {
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): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -1.05e-84: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.06e-182: tmp = t_0 elif B <= 9e-274: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= 4.4e-203: tmp = t_0 elif B <= 1.7e-43: 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) t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -1.05e-84) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.06e-182) tmp = t_0; elseif (B <= 9e-274) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= 4.4e-203) tmp = t_0; elseif (B <= 1.7e-43) 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) t_0 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -1.05e-84) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.06e-182) tmp = t_0; elseif (B <= 9e-274) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= 4.4e-203) tmp = t_0; elseif (B <= 1.7e-43) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.05e-84], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.06e-182], t$95$0, If[LessEqual[B, 9e-274], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.4e-203], t$95$0, If[LessEqual[B, 1.7e-43], 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}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.05 \cdot 10^{-84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.06 \cdot 10^{-182}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-274}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{-203}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.7 \cdot 10^{-43}:\\
\;\;\;\;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 < -1.04999999999999999e-84Initial program 63.2%
Taylor expanded in B around -inf 61.3%
if -1.04999999999999999e-84 < B < -1.0600000000000001e-182 or 8.99999999999999982e-274 < B < 4.3999999999999999e-203Initial program 35.4%
Taylor expanded in C around inf 39.4%
associate-*r/39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
metadata-eval39.4%
Simplified39.4%
if -1.0600000000000001e-182 < B < 8.99999999999999982e-274Initial program 80.1%
Taylor expanded in B around -inf 66.8%
neg-mul-166.8%
Simplified66.8%
Taylor expanded in A around inf 54.1%
associate-*r/54.1%
mul-1-neg54.1%
Simplified54.1%
if 4.3999999999999999e-203 < B < 1.7e-43Initial program 60.9%
Taylor expanded in B around -inf 48.3%
neg-mul-148.3%
Simplified48.3%
Taylor expanded in C around inf 34.6%
if 1.7e-43 < B Initial program 57.3%
Taylor expanded in B around inf 53.7%
Final simplification50.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -3.5e-88)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.9e-181)
t_0
(if (<= B 9.2e-274)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 3.8e-206)
t_0
(if (<= B 1.65e-43)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -3.5e-88) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.9e-181) {
tmp = t_0;
} else if (B <= 9.2e-274) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 3.8e-206) {
tmp = t_0;
} else if (B <= 1.65e-43) {
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 t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -3.5e-88) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.9e-181) {
tmp = t_0;
} else if (B <= 9.2e-274) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 3.8e-206) {
tmp = t_0;
} else if (B <= 1.65e-43) {
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): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -3.5e-88: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.9e-181: tmp = t_0 elif B <= 9.2e-274: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 3.8e-206: tmp = t_0 elif B <= 1.65e-43: 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) t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -3.5e-88) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.9e-181) tmp = t_0; elseif (B <= 9.2e-274) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 3.8e-206) tmp = t_0; elseif (B <= 1.65e-43) 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) t_0 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -3.5e-88) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.9e-181) tmp = t_0; elseif (B <= 9.2e-274) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 3.8e-206) tmp = t_0; elseif (B <= 1.65e-43) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.5e-88], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.9e-181], t$95$0, If[LessEqual[B, 9.2e-274], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-206], t$95$0, If[LessEqual[B, 1.65e-43], 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}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.5 \cdot 10^{-88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.9 \cdot 10^{-181}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-274}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-206}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-43}:\\
\;\;\;\;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 < -3.5000000000000001e-88Initial program 63.2%
Taylor expanded in B around -inf 61.3%
if -3.5000000000000001e-88 < B < -1.8999999999999999e-181 or 9.19999999999999984e-274 < B < 3.80000000000000003e-206Initial program 35.4%
Taylor expanded in C around inf 39.4%
associate-*r/39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
metadata-eval39.4%
Simplified39.4%
if -1.8999999999999999e-181 < B < 9.19999999999999984e-274Initial program 80.1%
Taylor expanded in A around inf 54.1%
if 3.80000000000000003e-206 < B < 1.65000000000000008e-43Initial program 60.9%
Taylor expanded in B around -inf 48.3%
neg-mul-148.3%
Simplified48.3%
Taylor expanded in C around inf 34.6%
if 1.65000000000000008e-43 < B Initial program 57.3%
Taylor expanded in B around inf 53.7%
Final simplification50.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -5e-128)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -7.8e-215)
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI))
(if (or (<= B 2.65e-253) (not (<= B 5.2e-208)))
(/ 180.0 (/ PI (atan (+ t_0 -1.0))))
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -5e-128) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -7.8e-215) {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
} else if ((B <= 2.65e-253) || !(B <= 5.2e-208)) {
tmp = 180.0 / (((double) M_PI) / atan((t_0 + -1.0)));
} else {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -5e-128) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -7.8e-215) {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
} else if ((B <= 2.65e-253) || !(B <= 5.2e-208)) {
tmp = 180.0 / (Math.PI / Math.atan((t_0 + -1.0)));
} else {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -5e-128: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -7.8e-215: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) elif (B <= 2.65e-253) or not (B <= 5.2e-208): tmp = 180.0 / (math.pi / math.atan((t_0 + -1.0))) else: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -5e-128) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -7.8e-215) tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); elseif ((B <= 2.65e-253) || !(B <= 5.2e-208)) tmp = Float64(180.0 / Float64(pi / atan(Float64(t_0 + -1.0)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -5e-128) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -7.8e-215) tmp = atan((B * (-0.5 / C))) * (180.0 / pi); elseif ((B <= 2.65e-253) || ~((B <= 5.2e-208))) tmp = 180.0 / (pi / atan((t_0 + -1.0))); else tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -5e-128], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.8e-215], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 2.65e-253], N[Not[LessEqual[B, 5.2e-208]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -5 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -7.8 \cdot 10^{-215}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;B \leq 2.65 \cdot 10^{-253} \lor \neg \left(B \leq 5.2 \cdot 10^{-208}\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(t\_0 + -1\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.0000000000000001e-128Initial program 60.2%
Taylor expanded in B around -inf 79.6%
associate--l+79.6%
div-sub79.6%
Simplified79.6%
if -5.0000000000000001e-128 < B < -7.7999999999999999e-215Initial program 21.8%
associate-*r/21.8%
associate-*l/21.9%
*-un-lft-identity21.9%
unpow221.9%
unpow221.9%
hypot-define61.1%
Applied egg-rr61.1%
Taylor expanded in C around inf 55.4%
Taylor expanded in A around 0 55.3%
Simplified55.3%
if -7.7999999999999999e-215 < B < 2.6500000000000001e-253 or 5.20000000000000034e-208 < B Initial program 64.5%
Applied egg-rr79.9%
Taylor expanded in B around inf 69.0%
+-commutative69.0%
associate--r+69.0%
div-sub69.0%
Simplified69.0%
if 2.6500000000000001e-253 < B < 5.20000000000000034e-208Initial program 42.3%
Taylor expanded in A around -inf 80.5%
associate-*r/80.5%
Simplified80.5%
Final simplification72.0%
(FPCore (A B C)
:precision binary64
(if (<= C -2.3e-131)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 1.1e-304)
(* 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 <= -2.3e-131) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 1.1e-304) {
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 <= -2.3e-131) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 1.1e-304) {
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 <= -2.3e-131: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 1.1e-304: 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 <= -2.3e-131) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 1.1e-304) 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 <= -2.3e-131) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 1.1e-304) 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, -2.3e-131], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.1e-304], 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 -2.3 \cdot 10^{-131}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.1 \cdot 10^{-304}:\\
\;\;\;\;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 < -2.30000000000000022e-131Initial program 79.3%
Taylor expanded in B around -inf 76.4%
neg-mul-176.4%
Simplified76.4%
Taylor expanded in C around inf 64.1%
if -2.30000000000000022e-131 < C < 1.1e-304Initial program 57.0%
Taylor expanded in B around -inf 35.9%
if 1.1e-304 < C Initial program 46.3%
associate-*r/46.2%
associate-*l/46.3%
*-un-lft-identity46.3%
unpow246.3%
unpow246.3%
hypot-define71.4%
Applied egg-rr71.4%
Taylor expanded in C around inf 51.6%
Taylor expanded in A around inf 51.6%
Final simplification53.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2.6e-131)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 3.7e-306)
(* 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 <= -2.6e-131) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 3.7e-306) {
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 <= -2.6e-131) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 3.7e-306) {
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 <= -2.6e-131: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 3.7e-306: 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 <= -2.6e-131) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 3.7e-306) 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 <= -2.6e-131) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 3.7e-306) 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, -2.6e-131], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.7e-306], 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 -2.6 \cdot 10^{-131}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.7 \cdot 10^{-306}:\\
\;\;\;\;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 < -2.59999999999999996e-131Initial program 79.3%
Taylor expanded in C around -inf 64.1%
if -2.59999999999999996e-131 < C < 3.7e-306Initial program 57.0%
Taylor expanded in B around -inf 35.9%
if 3.7e-306 < C Initial program 46.3%
associate-*r/46.2%
associate-*l/46.3%
*-un-lft-identity46.3%
unpow246.3%
unpow246.3%
hypot-define71.4%
Applied egg-rr71.4%
Taylor expanded in C around inf 51.6%
Taylor expanded in A around inf 51.6%
Final simplification53.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2e+80)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 1e+31)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2e+80) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 1e+31) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((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 <= -2e+80) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 1e+31) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / 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 <= -2e+80: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 1e+31: tmp = 180.0 * (math.atan((1.0 - (A / B))) / 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 <= -2e+80) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 1e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / 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 <= -2e+80) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 1e+31) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2e+80], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $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 -2 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2e80Initial program 86.0%
Taylor expanded in C around -inf 81.6%
if -2e80 < C < 9.9999999999999996e30Initial program 63.8%
Taylor expanded in B around -inf 55.0%
neg-mul-155.0%
Simplified55.0%
Taylor expanded in C around 0 50.7%
div-sub50.7%
*-inverses50.7%
Simplified50.7%
if 9.9999999999999996e30 < C Initial program 24.7%
associate-*r/24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.5%
Applied egg-rr59.5%
Taylor expanded in C around inf 70.9%
Taylor expanded in A around inf 70.8%
Final simplification61.6%
(FPCore (A B C)
:precision binary64
(if (<= C -3.25e-167)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= C 1.25e+31)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.25e-167) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (C <= 1.25e+31) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((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.25e-167) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (C <= 1.25e+31) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / 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.25e-167: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif C <= 1.25e+31: tmp = 180.0 * (math.atan((1.0 - (A / B))) / 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.25e-167) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (C <= 1.25e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / 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.25e-167) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (C <= 1.25e+31) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.25e-167], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.25e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $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.25 \cdot 10^{-167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.24999999999999987e-167Initial program 78.4%
Taylor expanded in B around -inf 74.5%
neg-mul-174.5%
Simplified74.5%
Taylor expanded in A around 0 70.7%
if -3.24999999999999987e-167 < C < 1.25000000000000007e31Initial program 61.1%
Taylor expanded in B around -inf 51.4%
neg-mul-151.4%
Simplified51.4%
Taylor expanded in C around 0 51.5%
div-sub51.5%
*-inverses51.5%
Simplified51.5%
if 1.25000000000000007e31 < C Initial program 24.7%
associate-*r/24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.5%
Applied egg-rr59.5%
Taylor expanded in C around inf 70.9%
Taylor expanded in A around inf 70.8%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= C -1.25e-164)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= C 7.5e+31)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e-164) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (C <= 7.5e+31) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e-164) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (C <= 7.5e+31) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.25e-164: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif C <= 7.5e+31: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.25e-164) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (C <= 7.5e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.25e-164) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (C <= 7.5e+31) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.25e-164], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.5e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.25 \cdot 10^{-164}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -1.2499999999999999e-164Initial program 78.4%
Taylor expanded in B around -inf 74.5%
neg-mul-174.5%
Simplified74.5%
Taylor expanded in A around 0 70.7%
if -1.2499999999999999e-164 < C < 7.5e31Initial program 61.1%
Taylor expanded in B around -inf 51.4%
neg-mul-151.4%
Simplified51.4%
Taylor expanded in C around 0 51.5%
div-sub51.5%
*-inverses51.5%
Simplified51.5%
if 7.5e31 < C Initial program 24.7%
associate-*r/24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.5%
Applied egg-rr59.5%
Taylor expanded in C around inf 70.9%
Taylor expanded in A around 0 70.8%
Simplified70.9%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= C -6.8e-37)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= C 9e+30)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -6.8e-37) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (C <= 9e+30) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -6.8e-37) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (C <= 9e+30) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -6.8e-37: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif C <= 9e+30: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -6.8e-37) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (C <= 9e+30) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6.8e-37) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (C <= 9e+30) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -6.8e-37], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 9e+30], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.8 \cdot 10^{-37}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 9 \cdot 10^{+30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -6.80000000000000037e-37Initial program 80.3%
associate-*r/80.4%
associate-*l/80.4%
*-un-lft-identity80.4%
unpow280.4%
unpow280.4%
hypot-define92.3%
Applied egg-rr92.3%
Taylor expanded in A around 0 80.4%
unpow280.4%
unpow280.4%
hypot-define87.0%
Simplified87.0%
Taylor expanded in C around 0 79.8%
if -6.80000000000000037e-37 < C < 8.9999999999999999e30Initial program 63.2%
Taylor expanded in B around -inf 54.1%
neg-mul-154.1%
Simplified54.1%
Taylor expanded in C around 0 51.1%
div-sub51.1%
*-inverses51.1%
Simplified51.1%
if 8.9999999999999999e30 < C Initial program 24.7%
associate-*r/24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.5%
Applied egg-rr59.5%
Taylor expanded in C around inf 70.9%
Taylor expanded in A around 0 70.8%
Simplified70.9%
Final simplification63.9%
(FPCore (A B C)
:precision binary64
(if (<= B -2.55e-85)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.65e-189)
(* 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 <= -2.55e-85) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.65e-189) {
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 <= -2.55e-85) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.65e-189) {
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 <= -2.55e-85: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.65e-189: 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 <= -2.55e-85) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.65e-189) 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 <= -2.55e-85) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.65e-189) 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, -2.55e-85], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.65e-189], 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 -2.55 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-189}:\\
\;\;\;\;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 < -2.5500000000000001e-85Initial program 63.2%
Taylor expanded in B around -inf 61.3%
if -2.5500000000000001e-85 < B < 1.65e-189Initial program 58.1%
Taylor expanded in C around inf 34.3%
associate-*r/34.3%
distribute-rgt1-in34.3%
metadata-eval34.3%
mul0-lft34.3%
metadata-eval34.3%
Simplified34.3%
if 1.65e-189 < B Initial program 56.8%
Taylor expanded in B around inf 43.4%
Final simplification45.4%
(FPCore (A B C) :precision binary64 (if (<= C 9e+30) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* (atan (* B (/ -0.5 C))) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 9e+30) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 9e+30) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 9e+30: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 9e+30) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 9e+30) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 9e+30], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 9 \cdot 10^{+30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < 8.9999999999999999e30Initial program 69.6%
Taylor expanded in B around -inf 62.7%
associate--l+62.7%
div-sub62.7%
Simplified62.7%
if 8.9999999999999999e30 < C Initial program 24.7%
associate-*r/24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.5%
Applied egg-rr59.5%
Taylor expanded in C around inf 70.9%
Taylor expanded in A around 0 70.8%
Simplified70.9%
Final simplification64.6%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 59.3%
Taylor expanded in B around -inf 39.5%
if -4.999999999999985e-310 < B Initial program 58.8%
Taylor expanded in B around inf 36.0%
Final simplification37.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 59.1%
Taylor expanded in B around inf 18.7%
Final simplification18.7%
herbie shell --seed 2024096
(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)))