
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_0 -1e-7)
(+ -1.0 (fma (atan (/ (- (- C A) (hypot B (- A C))) B)) (/ 180.0 PI) 1.0))
(if (<= t_0 0.0)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_0 <= -1e-7) {
tmp = -1.0 + fma(atan((((C - A) - hypot(B, (A - C))) / B)), (180.0 / ((double) M_PI)), 1.0);
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
}
return tmp;
}
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_0 <= -1e-7) tmp = Float64(-1.0 + fma(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)), Float64(180.0 / pi), 1.0)); elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); end return tmp end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-7], N[(-1.0 + N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-7}:\\
\;\;\;\;-1 + \mathsf{fma}\left(\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right), \frac{180}{\pi}, 1\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -9.9999999999999995e-8Initial program 57.8%
associate-*r/57.8%
associate-*l/57.8%
*-un-lft-identity57.8%
unpow257.8%
unpow257.8%
hypot-define82.4%
Applied egg-rr82.4%
expm1-log1p-u10.0%
expm1-undefine10.0%
associate-/l*10.0%
associate--l-9.0%
Applied egg-rr9.0%
sub-neg9.0%
metadata-eval9.0%
+-commutative9.0%
log1p-undefine9.0%
rem-exp-log81.4%
+-commutative81.4%
associate-*r/81.4%
*-commutative81.4%
associate-*r/81.4%
fma-define81.4%
Simplified82.4%
if -9.9999999999999995e-8 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0Initial program 14.0%
Taylor expanded in A around -inf 34.6%
div-inv34.6%
unpow234.6%
associate-*l*40.3%
Applied egg-rr40.3%
add-log-exp15.4%
un-div-inv15.4%
Applied egg-rr15.4%
Taylor expanded in B around 0 49.8%
associate-*r/49.8%
*-commutative49.8%
associate-/l*50.1%
Simplified50.1%
if -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 63.3%
Applied egg-rr89.6%
Final simplification80.3%
(FPCore (A B C)
:precision binary64
(if (<= A -8.5e+185)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 5.5e-70)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e+185) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 5.5e-70) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e+185) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 5.5e-70) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.5e+185: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 5.5e-70: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.5e+185) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 5.5e-70) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.5e+185) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 5.5e-70) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.5e+185], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.5e-70], 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[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.5 \cdot 10^{+185}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{-70}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.50000000000000013e185Initial program 5.3%
Applied egg-rr41.5%
Taylor expanded in A around -inf 94.6%
if -8.50000000000000013e185 < A < 5.5000000000000001e-70Initial program 47.5%
Applied egg-rr68.8%
Taylor expanded in A around 0 46.1%
unpow246.1%
unpow246.1%
hypot-define67.5%
Simplified67.5%
if 5.5000000000000001e-70 < A Initial program 77.8%
Taylor expanded in C around 0 76.2%
mul-1-neg76.2%
distribute-neg-frac276.2%
+-commutative76.2%
unpow276.2%
unpow276.2%
hypot-define90.2%
Simplified90.2%
Final simplification75.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e+186)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 1.3e+81)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+186) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 1.3e+81) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+186) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 1.3e+81) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.8e+186: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 1.3e+81: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.8e+186) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 1.3e+81) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e+186) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 1.3e+81) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e+186], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.3e+81], 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[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.8 \cdot 10^{+186}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{+81}:\\
\;\;\;\;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(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.8000000000000001e186Initial program 5.3%
Applied egg-rr41.5%
Taylor expanded in A around -inf 94.6%
if -1.8000000000000001e186 < A < 1.29999999999999996e81Initial program 49.4%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-define69.3%
Simplified69.3%
if 1.29999999999999996e81 < A Initial program 88.0%
Simplified97.8%
Taylor expanded in B around -inf 94.4%
neg-mul-194.4%
unsub-neg94.4%
Simplified94.4%
Final simplification75.1%
(FPCore (A B C)
:precision binary64
(if (<= A -8.5e+185)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 3.5e+78)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e+185) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 3.5e+78) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e+185) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 3.5e+78) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.5e+185: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 3.5e+78: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.5e+185) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 3.5e+78) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.5e+185) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 3.5e+78) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.5e+185], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e+78], 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[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.5 \cdot 10^{+185}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{+78}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.50000000000000013e185Initial program 5.3%
Applied egg-rr41.5%
Taylor expanded in A around -inf 94.6%
if -8.50000000000000013e185 < A < 3.5000000000000001e78Initial program 49.4%
Applied egg-rr72.1%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-define69.3%
Simplified69.3%
if 3.5000000000000001e78 < A Initial program 88.0%
Simplified97.8%
Taylor expanded in B around -inf 94.4%
neg-mul-194.4%
unsub-neg94.4%
Simplified94.4%
Final simplification75.1%
(FPCore (A B C) :precision binary64 (if (<= A -8.5e+185) (/ 180.0 (/ PI (atan (* 0.5 (/ B A))))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e+185) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e+185) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.5e+185: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.5e+185) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.5e+185) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.5e+185], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.5 \cdot 10^{+185}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.50000000000000013e185Initial program 5.3%
Applied egg-rr41.5%
Taylor expanded in A around -inf 94.6%
if -8.50000000000000013e185 < A Initial program 56.3%
Simplified76.3%
Final simplification77.4%
(FPCore (A B C) :precision binary64 (if (<= A -2.05e+190) (/ 180.0 (/ PI (atan (* 0.5 (/ B A))))) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.05e+190) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.05e+190) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.05e+190: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.05e+190) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.05e+190) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.05e+190], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.05 \cdot 10^{+190}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.0500000000000001e190Initial program 5.3%
Applied egg-rr41.5%
Taylor expanded in A around -inf 94.6%
if -2.0500000000000001e190 < A Initial program 56.3%
Simplified76.7%
Final simplification77.8%
(FPCore (A B C) :precision binary64 (if (<= A -2.2e+186) (/ 180.0 (/ PI (atan (* 0.5 (/ B A))))) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+186) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+186) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.2e+186: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) else: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.2e+186) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.2e+186) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); else tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.2e+186], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.2 \cdot 10^{+186}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.1999999999999998e186Initial program 5.3%
Applied egg-rr41.5%
Taylor expanded in A around -inf 94.6%
if -2.1999999999999998e186 < A Initial program 56.3%
Applied egg-rr76.7%
Final simplification77.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))
(t_1 (* 180.0 (/ (atan (* B (/ 0.5 A))) PI))))
(if (<= B -1.6e-84)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.05e-296)
t_0
(if (<= B 2.3e-256)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 9e-205)
t_0
(if (<= B 1.1e-139)
t_1
(if (<= B 7.8e-44)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 3.1e-10) t_1 (* 180.0 (/ (atan -1.0) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double t_1 = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
double tmp;
if (B <= -1.6e-84) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.05e-296) {
tmp = t_0;
} else if (B <= 2.3e-256) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 9e-205) {
tmp = t_0;
} else if (B <= 1.1e-139) {
tmp = t_1;
} else if (B <= 7.8e-44) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 3.1e-10) {
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((-2.0 * (A / B))) / Math.PI);
double t_1 = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
double tmp;
if (B <= -1.6e-84) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.05e-296) {
tmp = t_0;
} else if (B <= 2.3e-256) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 9e-205) {
tmp = t_0;
} else if (B <= 1.1e-139) {
tmp = t_1;
} else if (B <= 7.8e-44) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 3.1e-10) {
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((-2.0 * (A / B))) / math.pi) t_1 = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) tmp = 0 if B <= -1.6e-84: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.05e-296: tmp = t_0 elif B <= 2.3e-256: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 9e-205: tmp = t_0 elif B <= 1.1e-139: tmp = t_1 elif B <= 7.8e-44: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 3.1e-10: 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(-2.0 * Float64(A / B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)) tmp = 0.0 if (B <= -1.6e-84) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.05e-296) tmp = t_0; elseif (B <= 2.3e-256) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 9e-205) tmp = t_0; elseif (B <= 1.1e-139) tmp = t_1; elseif (B <= 7.8e-44) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 3.1e-10) 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((-2.0 * (A / B))) / pi); t_1 = 180.0 * (atan((B * (0.5 / A))) / pi); tmp = 0.0; if (B <= -1.6e-84) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.05e-296) tmp = t_0; elseif (B <= 2.3e-256) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 9e-205) tmp = t_0; elseif (B <= 1.1e-139) tmp = t_1; elseif (B <= 7.8e-44) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 3.1e-10) 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[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.6e-84], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.05e-296], t$95$0, If[LessEqual[B, 2.3e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-205], t$95$0, If[LessEqual[B, 1.1e-139], t$95$1, If[LessEqual[B, 7.8e-44], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-10], 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(-2 \cdot \frac{A}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.6 \cdot 10^{-84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.05 \cdot 10^{-296}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.6e-84Initial program 54.4%
Taylor expanded in B around -inf 58.2%
if -1.6e-84 < B < -2.04999999999999997e-296 or 2.3e-256 < B < 8.99999999999999912e-205Initial program 61.0%
Taylor expanded in A around inf 46.5%
if -2.04999999999999997e-296 < B < 2.3e-256Initial program 52.0%
Taylor expanded in C around inf 64.1%
associate-*r/64.1%
distribute-rgt1-in64.1%
metadata-eval64.1%
mul0-lft64.1%
metadata-eval64.1%
Simplified64.1%
if 8.99999999999999912e-205 < B < 1.10000000000000005e-139 or 7.8000000000000004e-44 < B < 3.10000000000000015e-10Initial program 34.5%
Taylor expanded in A around -inf 45.0%
div-inv45.0%
unpow245.0%
associate-*l*46.8%
Applied egg-rr46.8%
add-log-exp28.7%
un-div-inv28.7%
Applied egg-rr28.7%
Taylor expanded in B around 0 55.3%
associate-*r/55.3%
*-commutative55.3%
associate-/l*55.5%
Simplified55.5%
if 1.10000000000000005e-139 < B < 7.8000000000000004e-44Initial program 64.4%
Taylor expanded in C around -inf 50.2%
if 3.10000000000000015e-10 < B Initial program 45.9%
Taylor expanded in B around inf 57.9%
Final simplification55.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))
(t_1 (* 180.0 (/ (atan (* B (/ 0.5 A))) PI))))
(if (<= B -5.1e-85)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.8e-296)
t_0
(if (<= B 1.65e-256)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 7.8e-197)
t_0
(if (<= B 6e-140)
t_1
(if (<= B 8.5e-45)
(/ 180.0 (/ PI (atan (/ (* C 2.0) B))))
(if (<= B 1.3e-9) t_1 (* 180.0 (/ (atan -1.0) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double t_1 = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
double tmp;
if (B <= -5.1e-85) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.8e-296) {
tmp = t_0;
} else if (B <= 1.65e-256) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 7.8e-197) {
tmp = t_0;
} else if (B <= 6e-140) {
tmp = t_1;
} else if (B <= 8.5e-45) {
tmp = 180.0 / (((double) M_PI) / atan(((C * 2.0) / B)));
} else if (B <= 1.3e-9) {
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((-2.0 * (A / B))) / Math.PI);
double t_1 = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
double tmp;
if (B <= -5.1e-85) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.8e-296) {
tmp = t_0;
} else if (B <= 1.65e-256) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 7.8e-197) {
tmp = t_0;
} else if (B <= 6e-140) {
tmp = t_1;
} else if (B <= 8.5e-45) {
tmp = 180.0 / (Math.PI / Math.atan(((C * 2.0) / B)));
} else if (B <= 1.3e-9) {
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((-2.0 * (A / B))) / math.pi) t_1 = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) tmp = 0 if B <= -5.1e-85: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.8e-296: tmp = t_0 elif B <= 1.65e-256: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 7.8e-197: tmp = t_0 elif B <= 6e-140: tmp = t_1 elif B <= 8.5e-45: tmp = 180.0 / (math.pi / math.atan(((C * 2.0) / B))) elif B <= 1.3e-9: 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(-2.0 * Float64(A / B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)) tmp = 0.0 if (B <= -5.1e-85) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.8e-296) tmp = t_0; elseif (B <= 1.65e-256) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 7.8e-197) tmp = t_0; elseif (B <= 6e-140) tmp = t_1; elseif (B <= 8.5e-45) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C * 2.0) / B)))); elseif (B <= 1.3e-9) 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((-2.0 * (A / B))) / pi); t_1 = 180.0 * (atan((B * (0.5 / A))) / pi); tmp = 0.0; if (B <= -5.1e-85) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.8e-296) tmp = t_0; elseif (B <= 1.65e-256) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 7.8e-197) tmp = t_0; elseif (B <= 6e-140) tmp = t_1; elseif (B <= 8.5e-45) tmp = 180.0 / (pi / atan(((C * 2.0) / B))); elseif (B <= 1.3e-9) 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[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.1e-85], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.8e-296], t$95$0, If[LessEqual[B, 1.65e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.8e-197], t$95$0, If[LessEqual[B, 6e-140], t$95$1, If[LessEqual[B, 8.5e-45], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-9], 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(-2 \cdot \frac{A}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{if}\;B \leq -5.1 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.8 \cdot 10^{-296}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-197}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-45}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.1000000000000002e-85Initial program 54.4%
Taylor expanded in B around -inf 58.2%
if -5.1000000000000002e-85 < B < -6.79999999999999993e-296 or 1.65e-256 < B < 7.7999999999999998e-197Initial program 61.0%
Taylor expanded in A around inf 46.5%
if -6.79999999999999993e-296 < B < 1.65e-256Initial program 52.0%
Taylor expanded in C around inf 64.1%
associate-*r/64.1%
distribute-rgt1-in64.1%
metadata-eval64.1%
mul0-lft64.1%
metadata-eval64.1%
Simplified64.1%
if 7.7999999999999998e-197 < B < 6.00000000000000037e-140 or 8.50000000000000041e-45 < B < 1.3000000000000001e-9Initial program 34.5%
Taylor expanded in A around -inf 45.0%
div-inv45.0%
unpow245.0%
associate-*l*46.8%
Applied egg-rr46.8%
add-log-exp28.7%
un-div-inv28.7%
Applied egg-rr28.7%
Taylor expanded in B around 0 55.3%
associate-*r/55.3%
*-commutative55.3%
associate-/l*55.5%
Simplified55.5%
if 6.00000000000000037e-140 < B < 8.50000000000000041e-45Initial program 64.4%
Applied egg-rr69.0%
Taylor expanded in C around -inf 50.2%
if 1.3000000000000001e-9 < B Initial program 45.9%
Taylor expanded in B around inf 57.9%
Final simplification55.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))
(t_1 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -1500000.0)
t_1
(if (<= B -4e-61)
t_0
(if (<= B -2.9e-84)
t_1
(if (or (<= B -6.8e-299) (not (<= B 1.04e-256)))
t_0
(* 180.0 (/ (atan (/ 0.0 B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -1500000.0) {
tmp = t_1;
} else if (B <= -4e-61) {
tmp = t_0;
} else if (B <= -2.9e-84) {
tmp = t_1;
} else if ((B <= -6.8e-299) || !(B <= 1.04e-256)) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((0.0 / 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 + A)) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -1500000.0) {
tmp = t_1;
} else if (B <= -4e-61) {
tmp = t_0;
} else if (B <= -2.9e-84) {
tmp = t_1;
} else if ((B <= -6.8e-299) || !(B <= 1.04e-256)) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) t_1 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -1500000.0: tmp = t_1 elif B <= -4e-61: tmp = t_0 elif B <= -2.9e-84: tmp = t_1 elif (B <= -6.8e-299) or not (B <= 1.04e-256): tmp = t_0 else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -1500000.0) tmp = t_1; elseif (B <= -4e-61) tmp = t_0; elseif (B <= -2.9e-84) tmp = t_1; elseif ((B <= -6.8e-299) || !(B <= 1.04e-256)) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - (B + A)) / B)) / pi); t_1 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -1500000.0) tmp = t_1; elseif (B <= -4e-61) tmp = t_0; elseif (B <= -2.9e-84) tmp = t_1; elseif ((B <= -6.8e-299) || ~((B <= 1.04e-256))) tmp = t_0; else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1500000.0], t$95$1, If[LessEqual[B, -4e-61], t$95$0, If[LessEqual[B, -2.9e-84], t$95$1, If[Or[LessEqual[B, -6.8e-299], N[Not[LessEqual[B, 1.04e-256]], $MachinePrecision]], t$95$0, N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -1500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -4 \cdot 10^{-61}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -2.9 \cdot 10^{-84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -6.8 \cdot 10^{-299} \lor \neg \left(B \leq 1.04 \cdot 10^{-256}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.5e6 or -4.0000000000000002e-61 < B < -2.90000000000000019e-84Initial program 52.9%
Taylor expanded in B around -inf 65.4%
if -1.5e6 < B < -4.0000000000000002e-61 or -2.90000000000000019e-84 < B < -6.7999999999999996e-299 or 1.04e-256 < B Initial program 53.3%
Simplified67.8%
Taylor expanded in B around inf 61.5%
+-commutative61.5%
Simplified61.5%
if -6.7999999999999996e-299 < B < 1.04e-256Initial program 52.0%
Taylor expanded in C around inf 64.1%
associate-*r/64.1%
distribute-rgt1-in64.1%
metadata-eval64.1%
mul0-lft64.1%
metadata-eval64.1%
Simplified64.1%
Final simplification62.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -7e-84)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.6e-297)
t_0
(if (<= B 2.2e-256)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.15e-124)
t_0
(if (<= B 5e-35)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double tmp;
if (B <= -7e-84) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.6e-297) {
tmp = t_0;
} else if (B <= 2.2e-256) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.15e-124) {
tmp = t_0;
} else if (B <= 5e-35) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
double tmp;
if (B <= -7e-84) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.6e-297) {
tmp = t_0;
} else if (B <= 2.2e-256) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.15e-124) {
tmp = t_0;
} else if (B <= 5e-35) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) tmp = 0 if B <= -7e-84: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.6e-297: tmp = t_0 elif B <= 2.2e-256: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.15e-124: tmp = t_0 elif B <= 5e-35: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)) tmp = 0.0 if (B <= -7e-84) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.6e-297) tmp = t_0; elseif (B <= 2.2e-256) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.15e-124) tmp = t_0; elseif (B <= 5e-35) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-2.0 * (A / B))) / pi); tmp = 0.0; if (B <= -7e-84) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.6e-297) tmp = t_0; elseif (B <= 2.2e-256) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.15e-124) tmp = t_0; elseif (B <= 5e-35) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7e-84], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-297], t$95$0, If[LessEqual[B, 2.2e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.15e-124], t$95$0, If[LessEqual[B, 5e-35], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -7 \cdot 10^{-84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-297}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-124}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -7.0000000000000002e-84Initial program 54.4%
Taylor expanded in B around -inf 58.2%
if -7.0000000000000002e-84 < B < -1.59999999999999986e-297 or 2.2000000000000001e-256 < B < 1.15000000000000006e-124Initial program 55.0%
Taylor expanded in A around inf 40.5%
if -1.59999999999999986e-297 < B < 2.2000000000000001e-256Initial program 52.0%
Taylor expanded in C around inf 64.1%
associate-*r/64.1%
distribute-rgt1-in64.1%
metadata-eval64.1%
mul0-lft64.1%
metadata-eval64.1%
Simplified64.1%
if 1.15000000000000006e-124 < B < 4.99999999999999964e-35Initial program 61.4%
Taylor expanded in C around -inf 54.0%
if 4.99999999999999964e-35 < B Initial program 46.3%
Taylor expanded in B around inf 56.4%
Final simplification52.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -2.3e-85)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -7e-296)
t_0
(if (<= B 2.15e-256)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 7.6e-65) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double tmp;
if (B <= -2.3e-85) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -7e-296) {
tmp = t_0;
} else if (B <= 2.15e-256) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 7.6e-65) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
double tmp;
if (B <= -2.3e-85) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -7e-296) {
tmp = t_0;
} else if (B <= 2.15e-256) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 7.6e-65) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) tmp = 0 if B <= -2.3e-85: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -7e-296: tmp = t_0 elif B <= 2.15e-256: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 7.6e-65: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)) tmp = 0.0 if (B <= -2.3e-85) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -7e-296) tmp = t_0; elseif (B <= 2.15e-256) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 7.6e-65) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-2.0 * (A / B))) / pi); tmp = 0.0; if (B <= -2.3e-85) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -7e-296) tmp = t_0; elseif (B <= 2.15e-256) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 7.6e-65) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.3e-85], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7e-296], t$95$0, If[LessEqual[B, 2.15e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.6e-65], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.3 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -7 \cdot 10^{-296}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.15 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{-65}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.3e-85Initial program 54.4%
Taylor expanded in B around -inf 58.2%
if -2.3e-85 < B < -6.9999999999999998e-296 or 2.1500000000000001e-256 < B < 7.6000000000000003e-65Initial program 55.6%
Taylor expanded in A around inf 37.8%
if -6.9999999999999998e-296 < B < 2.1500000000000001e-256Initial program 52.0%
Taylor expanded in C around inf 64.1%
associate-*r/64.1%
distribute-rgt1-in64.1%
metadata-eval64.1%
mul0-lft64.1%
metadata-eval64.1%
Simplified64.1%
if 7.6000000000000003e-65 < B Initial program 49.1%
Taylor expanded in B around inf 51.1%
Final simplification49.6%
(FPCore (A B C)
:precision binary64
(if (<= B -6.8e-299)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 1.1e-256)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-299) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 1.1e-256) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-299) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 1.1e-256) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.8e-299: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 1.1e-256: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.8e-299) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 1.1e-256) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.8e-299) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 1.1e-256) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.8e-299], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.8 \cdot 10^{-299}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.7999999999999996e-299Initial program 56.4%
Simplified77.0%
Taylor expanded in B around -inf 70.1%
neg-mul-170.1%
unsub-neg70.1%
Simplified70.1%
if -6.7999999999999996e-299 < B < 1.10000000000000005e-256Initial program 52.0%
Taylor expanded in C around inf 64.1%
associate-*r/64.1%
distribute-rgt1-in64.1%
metadata-eval64.1%
mul0-lft64.1%
metadata-eval64.1%
Simplified64.1%
if 1.10000000000000005e-256 < B Initial program 50.0%
Simplified66.6%
Taylor expanded in B around inf 62.7%
+-commutative62.7%
Simplified62.7%
Final simplification66.3%
(FPCore (A B C)
:precision binary64
(if (<= B -9.2e-299)
(/ (* 180.0 (atan (/ (- (+ B C) A) B))) PI)
(if (<= B 1.1e-256)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9.2e-299) {
tmp = (180.0 * atan((((B + C) - A) / B))) / ((double) M_PI);
} else if (B <= 1.1e-256) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -9.2e-299) {
tmp = (180.0 * Math.atan((((B + C) - A) / B))) / Math.PI;
} else if (B <= 1.1e-256) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9.2e-299: tmp = (180.0 * math.atan((((B + C) - A) / B))) / math.pi elif B <= 1.1e-256: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -9.2e-299) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(B + C) - A) / B))) / pi); elseif (B <= 1.1e-256) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -9.2e-299) tmp = (180.0 * atan((((B + C) - A) / B))) / pi; elseif (B <= 1.1e-256) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9.2e-299], N[(N[(180.0 * N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.1e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -9.2 \cdot 10^{-299}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -9.2000000000000003e-299Initial program 56.4%
associate-*r/56.4%
associate-*l/56.4%
*-un-lft-identity56.4%
unpow256.4%
unpow256.4%
hypot-define77.9%
Applied egg-rr77.9%
Taylor expanded in B around -inf 70.1%
if -9.2000000000000003e-299 < B < 1.10000000000000005e-256Initial program 52.0%
Taylor expanded in C around inf 64.1%
associate-*r/64.1%
distribute-rgt1-in64.1%
metadata-eval64.1%
mul0-lft64.1%
metadata-eval64.1%
Simplified64.1%
if 1.10000000000000005e-256 < B Initial program 50.0%
Simplified66.6%
Taylor expanded in B around inf 62.7%
+-commutative62.7%
Simplified62.7%
Final simplification66.3%
(FPCore (A B C)
:precision binary64
(if (<= B -7.6e-106)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.6e-161)
(* 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 <= -7.6e-106) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.6e-161) {
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 <= -7.6e-106) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.6e-161) {
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 <= -7.6e-106: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.6e-161: 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 <= -7.6e-106) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.6e-161) 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 <= -7.6e-106) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.6e-161) 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, -7.6e-106], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-161], 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 -7.6 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-161}:\\
\;\;\;\;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 < -7.5999999999999999e-106Initial program 56.6%
Taylor expanded in B around -inf 56.3%
if -7.5999999999999999e-106 < B < 1.59999999999999993e-161Initial program 53.4%
Taylor expanded in C around inf 30.6%
associate-*r/30.6%
distribute-rgt1-in30.6%
metadata-eval30.6%
mul0-lft30.6%
metadata-eval30.6%
Simplified30.6%
if 1.59999999999999993e-161 < B Initial program 50.1%
Taylor expanded in B around inf 42.2%
Final simplification43.6%
(FPCore (A B C) :precision binary64 (if (<= B -1.02e-305) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.02e-305) {
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 <= -1.02e-305) {
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 <= -1.02e-305: 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 <= -1.02e-305) 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 <= -1.02e-305) 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, -1.02e-305], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.02 \cdot 10^{-305}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.01999999999999994e-305Initial program 56.6%
Taylor expanded in B around -inf 41.5%
if -1.01999999999999994e-305 < B Initial program 49.8%
Taylor expanded in B around inf 34.6%
Final simplification38.0%
(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 53.1%
Taylor expanded in B around inf 18.5%
Final simplification18.5%
herbie shell --seed 2024043
(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)))