
(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 16 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))))))
(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 (* -0.5 (/ (+ B (/ (* B A) C)) C))) (cbrt (pow PI 3.0))))
(/ 180.0 (/ 1.0 (/ t_1 PI)))))))
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 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((-0.5 * ((B + ((B * A) / C)) / C))) / cbrt(pow(((double) M_PI), 3.0)));
} else {
tmp = 180.0 / (1.0 / (t_1 / ((double) M_PI)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double 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((-0.5 * ((B + ((B * A) / C)) / C))) / Math.cbrt(Math.pow(Math.PI, 3.0)));
} else {
tmp = 180.0 / (1.0 / (t_1 / Math.PI));
}
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))))) 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(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(B + Float64(Float64(B * A) / C)) / C))) / cbrt((pi ^ 3.0)))); else tmp = Float64(180.0 / Float64(1.0 / Float64(t_1 / pi))); 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]}, 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[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(B + N[(N[(B * A), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(1.0 / N[(t$95$1 / Pi), $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)\\
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:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B + \frac{B \cdot A}{C}}{C}\right)}{\sqrt[3]{{\pi}^{3}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{1}{\frac{t\_1}{\pi}}}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5Initial program 62.7%
Applied egg-rr87.9%
if -0.5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0Initial program 16.3%
Taylor expanded in C around inf 66.9%
Taylor expanded in C around inf 67.1%
+-commutative67.1%
distribute-lft-out67.1%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in A around inf 67.1%
rem-cbrt-cube67.1%
Applied egg-rr67.1%
if -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 67.2%
Applied egg-rr91.9%
clear-num92.0%
inv-pow92.0%
associate--l-88.8%
Applied egg-rr88.8%
Simplified92.0%
Final simplification86.8%
(FPCore (A B C) :precision binary64 (if (<= C 3.1e+114) (/ 180.0 (/ 1.0 (/ (atan (/ (- (- C A) (hypot (- A C) B)) B)) PI))) (* 180.0 (/ (atan (* -0.5 (/ (+ B (/ (* B A) C)) C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 3.1e+114) {
tmp = 180.0 / (1.0 / (atan((((C - A) - hypot((A - C), B)) / B)) / ((double) M_PI)));
} else {
tmp = 180.0 * (atan((-0.5 * ((B + ((B * A) / C)) / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 3.1e+114) {
tmp = 180.0 / (1.0 / (Math.atan((((C - A) - Math.hypot((A - C), B)) / B)) / Math.PI));
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((B + ((B * A) / C)) / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 3.1e+114: tmp = 180.0 / (1.0 / (math.atan((((C - A) - math.hypot((A - C), B)) / B)) / math.pi)) else: tmp = 180.0 * (math.atan((-0.5 * ((B + ((B * A) / C)) / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 3.1e+114) tmp = Float64(180.0 / Float64(1.0 / Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) / pi))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(B + Float64(Float64(B * A) / C)) / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3.1e+114) tmp = 180.0 / (1.0 / (atan((((C - A) - hypot((A - C), B)) / B)) / pi)); else tmp = 180.0 * (atan((-0.5 * ((B + ((B * A) / C)) / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 3.1e+114], N[(180.0 / N[(1.0 / N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(B + N[(N[(B * A), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.1 \cdot 10^{+114}:\\
\;\;\;\;\frac{180}{\frac{1}{\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B + \frac{B \cdot A}{C}}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.1e114Initial program 66.9%
Applied egg-rr85.4%
clear-num85.5%
inv-pow85.5%
associate--l-81.3%
Applied egg-rr81.3%
Simplified85.5%
if 3.1e114 < C Initial program 14.1%
Taylor expanded in C around inf 77.3%
Taylor expanded in C around inf 79.6%
+-commutative79.6%
distribute-lft-out79.6%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in A around inf 79.6%
Final simplification84.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.02e+116)
(* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) A))) PI))
(if (<= A 1.15e+68)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e+116) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / ((double) M_PI));
} else if (A <= 1.15e+68) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e+116) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / Math.PI);
} else if (A <= 1.15e+68) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.02e+116: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / math.pi) elif A <= 1.15e+68: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.02e+116) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / A))) / pi)); elseif (A <= 1.15e+68) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.02e+116) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / pi); elseif (A <= 1.15e+68) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.02e+116], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.15e+68], 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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.02 \cdot 10^{+116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.15 \cdot 10^{+68}:\\
\;\;\;\;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(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.0199999999999999e116Initial program 18.3%
Taylor expanded in A around -inf 76.0%
mul-1-neg76.0%
distribute-neg-frac276.0%
distribute-lft-out76.0%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in B around 0 77.8%
if -1.0199999999999999e116 < A < 1.15e68Initial program 57.4%
Taylor expanded in A around 0 55.6%
unpow255.6%
unpow255.6%
hypot-define76.7%
Simplified76.7%
if 1.15e68 < A Initial program 87.4%
Applied egg-rr97.6%
Taylor expanded in B around -inf 87.6%
associate--l+87.6%
div-sub90.0%
Simplified90.0%
(FPCore (A B C) :precision binary64 (if (<= C 1.6e+116) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* 180.0 (/ (atan (* -0.5 (/ (+ B (/ (* B A) C)) C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.6e+116) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((B + ((B * A) / C)) / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.6e+116) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((B + ((B * A) / C)) / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.6e+116: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((B + ((B * A) / C)) / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.6e+116) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(B + Float64(Float64(B * A) / C)) / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.6e+116) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan((-0.5 * ((B + ((B * A) / C)) / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.6e+116], 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[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(B + N[(N[(B * A), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.6 \cdot 10^{+116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B + \frac{B \cdot A}{C}}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 1.6e116Initial program 66.9%
associate-*l/66.9%
*-lft-identity66.9%
+-commutative66.9%
unpow266.9%
unpow266.9%
hypot-define85.4%
Simplified85.4%
if 1.6e116 < C Initial program 14.1%
Taylor expanded in C around inf 77.3%
Taylor expanded in C around inf 79.6%
+-commutative79.6%
distribute-lft-out79.6%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in A around inf 79.6%
Final simplification84.5%
(FPCore (A B C) :precision binary64 (if (<= A -2.5e+118) (* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ 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 <= -2.5e+118) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (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 <= -2.5e+118) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (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 <= -2.5e+118: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (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 <= -2.5e+118) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / 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 <= -2.5e+118) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (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, -2.5e+118], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $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 -2.5 \cdot 10^{+118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \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 < -2.49999999999999986e118Initial program 18.3%
Taylor expanded in A around -inf 76.0%
mul-1-neg76.0%
distribute-neg-frac276.0%
distribute-lft-out76.0%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in B around 0 77.8%
if -2.49999999999999986e118 < A Initial program 62.7%
Simplified81.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -4.2e-91)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.1e-210)
t_0
(if (<= B 3.2e-202)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= B 2500000000.0)
t_0
(if (<= B 3.5e+67)
(/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -4.2e-91) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.1e-210) {
tmp = t_0;
} else if (B <= 3.2e-202) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (B <= 2500000000.0) {
tmp = t_0;
} else if (B <= 3.5e+67) {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -4.2e-91) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.1e-210) {
tmp = t_0;
} else if (B <= 3.2e-202) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (B <= 2500000000.0) {
tmp = t_0;
} else if (B <= 3.5e+67) {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -4.2e-91: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.1e-210: tmp = t_0 elif B <= 3.2e-202: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif B <= 2500000000.0: tmp = t_0 elif B <= 3.5e+67: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -4.2e-91) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.1e-210) tmp = t_0; elseif (B <= 3.2e-202) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (B <= 2500000000.0) tmp = t_0; elseif (B <= 3.5e+67) tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -4.2e-91) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.1e-210) tmp = t_0; elseif (B <= 3.2e-202) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (B <= 2500000000.0) tmp = t_0; elseif (B <= 3.5e+67) tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.2e-91], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.1e-210], t$95$0, If[LessEqual[B, 3.2e-202], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2500000000.0], t$95$0, If[LessEqual[B, 3.5e+67], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -4.2 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.1 \cdot 10^{-210}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2500000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{+67}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.1999999999999998e-91Initial program 62.0%
Taylor expanded in B around -inf 66.3%
if -4.1999999999999998e-91 < B < -2.10000000000000016e-210 or 3.2000000000000001e-202 < B < 2.5e9Initial program 62.6%
Taylor expanded in C around -inf 43.1%
if -2.10000000000000016e-210 < B < 3.2000000000000001e-202Initial program 45.0%
Taylor expanded in A around -inf 44.3%
associate-*r/44.3%
Simplified44.3%
if 2.5e9 < B < 3.5e67Initial program 68.1%
Applied egg-rr68.1%
Taylor expanded in C around inf 57.0%
distribute-rgt1-in57.0%
metadata-eval57.0%
mul0-lft57.0%
div057.0%
metadata-eval57.0%
metadata-eval57.0%
associate-+l-57.0%
neg-sub057.0%
distribute-lft-neg-in57.0%
metadata-eval57.0%
neg-sub057.0%
distribute-lft-neg-in57.0%
metadata-eval57.0%
Simplified57.0%
if 3.5e67 < B Initial program 51.0%
Taylor expanded in B around inf 74.0%
Final simplification57.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -4.2e-217)
(/ 180.0 (/ PI (atan (+ 1.0 t_0))))
(if (<= B 5.5e-303)
(* 180.0 (/ (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) A))) PI))
(if (or (<= B 1.06e-252) (not (<= B 1.85e-202)))
(/ 180.0 (/ PI (atan (+ t_0 -1.0))))
(* 180.0 (/ (atan (/ 0.0 B)) PI)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -4.2e-217) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + t_0)));
} else if (B <= 5.5e-303) {
tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / ((double) M_PI));
} else if ((B <= 1.06e-252) || !(B <= 1.85e-202)) {
tmp = 180.0 / (((double) M_PI) / atan((t_0 + -1.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 = (C - A) / B;
double tmp;
if (B <= -4.2e-217) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + t_0)));
} else if (B <= 5.5e-303) {
tmp = 180.0 * (Math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / Math.PI);
} else if ((B <= 1.06e-252) || !(B <= 1.85e-202)) {
tmp = 180.0 / (Math.PI / Math.atan((t_0 + -1.0)));
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -4.2e-217: tmp = 180.0 / (math.pi / math.atan((1.0 + t_0))) elif B <= 5.5e-303: tmp = 180.0 * (math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) / math.pi) elif (B <= 1.06e-252) or not (B <= 1.85e-202): tmp = 180.0 / (math.pi / math.atan((t_0 + -1.0))) else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -4.2e-217) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + t_0)))); elseif (B <= 5.5e-303) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / A))) / pi)); elseif ((B <= 1.06e-252) || !(B <= 1.85e-202)) tmp = Float64(180.0 / Float64(pi / atan(Float64(t_0 + -1.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 = (C - A) / B; tmp = 0.0; if (B <= -4.2e-217) tmp = 180.0 / (pi / atan((1.0 + t_0))); elseif (B <= 5.5e-303) tmp = 180.0 * (atan((0.5 * ((B * (1.0 + (C / A))) / A))) / pi); elseif ((B <= 1.06e-252) || ~((B <= 1.85e-202))) tmp = 180.0 / (pi / atan((t_0 + -1.0))); else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -4.2e-217], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e-303], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.06e-252], N[Not[LessEqual[B, 1.85e-202]], $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[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -4.2 \cdot 10^{-217}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + t\_0\right)}}\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{-303}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.06 \cdot 10^{-252} \lor \neg \left(B \leq 1.85 \cdot 10^{-202}\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(t\_0 + -1\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.2e-217Initial program 62.8%
Applied egg-rr83.0%
Taylor expanded in B around -inf 78.0%
associate--l+78.0%
div-sub78.8%
Simplified78.8%
if -4.2e-217 < B < 5.50000000000000018e-303Initial program 39.8%
Taylor expanded in A around -inf 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
distribute-lft-out50.3%
associate-/l*51.6%
Simplified51.6%
Taylor expanded in B around 0 51.6%
if 5.50000000000000018e-303 < B < 1.06e-252 or 1.84999999999999995e-202 < B Initial program 58.2%
Applied egg-rr77.8%
Taylor expanded in B around inf 71.8%
+-commutative71.8%
associate--r+71.8%
div-sub73.6%
Simplified73.6%
if 1.06e-252 < B < 1.84999999999999995e-202Initial program 41.9%
Taylor expanded in C around inf 100.0%
associate-*r/100.0%
distribute-rgt1-in100.0%
metadata-eval100.0%
mul0-lft100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification74.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -4.1e-213)
(/ 180.0 (/ PI (atan (+ 1.0 t_0))))
(if (<= B 4.3e-303)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (or (<= B 3.2e-258) (not (<= B 1.8e-202)))
(/ 180.0 (/ PI (atan (+ t_0 -1.0))))
(* 180.0 (/ (atan (/ 0.0 B)) PI)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -4.1e-213) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + t_0)));
} else if (B <= 4.3e-303) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if ((B <= 3.2e-258) || !(B <= 1.8e-202)) {
tmp = 180.0 / (((double) M_PI) / atan((t_0 + -1.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 = (C - A) / B;
double tmp;
if (B <= -4.1e-213) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + t_0)));
} else if (B <= 4.3e-303) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if ((B <= 3.2e-258) || !(B <= 1.8e-202)) {
tmp = 180.0 / (Math.PI / Math.atan((t_0 + -1.0)));
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -4.1e-213: tmp = 180.0 / (math.pi / math.atan((1.0 + t_0))) elif B <= 4.3e-303: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif (B <= 3.2e-258) or not (B <= 1.8e-202): tmp = 180.0 / (math.pi / math.atan((t_0 + -1.0))) else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -4.1e-213) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + t_0)))); elseif (B <= 4.3e-303) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif ((B <= 3.2e-258) || !(B <= 1.8e-202)) tmp = Float64(180.0 / Float64(pi / atan(Float64(t_0 + -1.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 = (C - A) / B; tmp = 0.0; if (B <= -4.1e-213) tmp = 180.0 / (pi / atan((1.0 + t_0))); elseif (B <= 4.3e-303) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif ((B <= 3.2e-258) || ~((B <= 1.8e-202))) tmp = 180.0 / (pi / atan((t_0 + -1.0))); else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -4.1e-213], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.3e-303], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 3.2e-258], N[Not[LessEqual[B, 1.8e-202]], $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[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -4.1 \cdot 10^{-213}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + t\_0\right)}}\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-303}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-258} \lor \neg \left(B \leq 1.8 \cdot 10^{-202}\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(t\_0 + -1\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.09999999999999975e-213Initial program 62.8%
Applied egg-rr83.0%
Taylor expanded in B around -inf 78.0%
associate--l+78.0%
div-sub78.8%
Simplified78.8%
if -4.09999999999999975e-213 < B < 4.29999999999999981e-303Initial program 39.8%
Taylor expanded in A around -inf 50.8%
associate-*r/50.8%
Simplified50.8%
if 4.29999999999999981e-303 < B < 3.2000000000000002e-258 or 1.8000000000000001e-202 < B Initial program 58.2%
Applied egg-rr77.8%
Taylor expanded in B around inf 71.8%
+-commutative71.8%
associate--r+71.8%
div-sub73.6%
Simplified73.6%
if 3.2000000000000002e-258 < B < 1.8000000000000001e-202Initial program 41.9%
Taylor expanded in C around inf 100.0%
associate-*r/100.0%
distribute-rgt1-in100.0%
metadata-eval100.0%
mul0-lft100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification74.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -3.8e-91)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.6e-210)
t_0
(if (<= B 2.6e-202)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= B 2.9e-7) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -3.8e-91) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.6e-210) {
tmp = t_0;
} else if (B <= 2.6e-202) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (B <= 2.9e-7) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -3.8e-91) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.6e-210) {
tmp = t_0;
} else if (B <= 2.6e-202) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (B <= 2.9e-7) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -3.8e-91: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.6e-210: tmp = t_0 elif B <= 2.6e-202: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif B <= 2.9e-7: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -3.8e-91) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.6e-210) tmp = t_0; elseif (B <= 2.6e-202) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (B <= 2.9e-7) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -3.8e-91) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.6e-210) tmp = t_0; elseif (B <= 2.6e-202) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (B <= 2.9e-7) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.8e-91], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-210], t$95$0, If[LessEqual[B, 2.6e-202], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e-7], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.8 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-210}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.79999999999999978e-91Initial program 62.0%
Taylor expanded in B around -inf 66.3%
if -3.79999999999999978e-91 < B < -1.60000000000000014e-210 or 2.60000000000000009e-202 < B < 2.8999999999999998e-7Initial program 62.1%
Taylor expanded in C around -inf 43.5%
if -1.60000000000000014e-210 < B < 2.60000000000000009e-202Initial program 45.0%
Taylor expanded in A around -inf 44.3%
associate-*r/44.3%
Simplified44.3%
if 2.8999999999999998e-7 < B Initial program 55.9%
Taylor expanded in B around inf 65.0%
Final simplification56.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -5.5e-92)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9.2e-211)
t_0
(if (<= B 1.95e-202)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.8e-6) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -5.5e-92) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9.2e-211) {
tmp = t_0;
} else if (B <= 1.95e-202) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.8e-6) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -5.5e-92) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9.2e-211) {
tmp = t_0;
} else if (B <= 1.95e-202) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.8e-6) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -5.5e-92: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9.2e-211: tmp = t_0 elif B <= 1.95e-202: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.8e-6: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -5.5e-92) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9.2e-211) tmp = t_0; elseif (B <= 1.95e-202) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.8e-6) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -5.5e-92) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9.2e-211) tmp = t_0; elseif (B <= 1.95e-202) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.8e-6) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.5e-92], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.2e-211], t$95$0, If[LessEqual[B, 1.95e-202], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.8e-6], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5.5 \cdot 10^{-92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9.2 \cdot 10^{-211}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.8 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.5000000000000002e-92Initial program 62.0%
Taylor expanded in B around -inf 66.3%
if -5.5000000000000002e-92 < B < -9.19999999999999953e-211 or 1.95e-202 < B < 5.8000000000000004e-6Initial program 62.1%
Taylor expanded in C around -inf 43.5%
if -9.19999999999999953e-211 < B < 1.95e-202Initial program 45.0%
Taylor expanded in C around inf 42.4%
associate-*r/42.4%
distribute-rgt1-in42.4%
metadata-eval42.4%
mul0-lft42.4%
metadata-eval42.4%
Simplified42.4%
if 5.8000000000000004e-6 < B Initial program 55.9%
Taylor expanded in B around inf 65.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -1.18e-91)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.1e-211)
t_0
(if (<= B 2.7e-202)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4.6e-111) 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 <= -1.18e-91) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.1e-211) {
tmp = t_0;
} else if (B <= 2.7e-202) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4.6e-111) {
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 <= -1.18e-91) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.1e-211) {
tmp = t_0;
} else if (B <= 2.7e-202) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4.6e-111) {
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 <= -1.18e-91: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.1e-211: tmp = t_0 elif B <= 2.7e-202: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4.6e-111: 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 <= -1.18e-91) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.1e-211) tmp = t_0; elseif (B <= 2.7e-202) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4.6e-111) 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 <= -1.18e-91) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.1e-211) tmp = t_0; elseif (B <= 2.7e-202) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4.6e-111) 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, -1.18e-91], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.1e-211], t$95$0, If[LessEqual[B, 2.7e-202], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e-111], 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 -1.18 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.1 \cdot 10^{-211}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-111}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.18e-91Initial program 62.0%
Taylor expanded in B around -inf 66.3%
if -1.18e-91 < B < -1.09999999999999999e-211 or 2.6999999999999999e-202 < B < 4.6e-111Initial program 63.4%
Taylor expanded in A around inf 38.6%
if -1.09999999999999999e-211 < B < 2.6999999999999999e-202Initial program 43.4%
Taylor expanded in C around inf 43.6%
associate-*r/43.6%
distribute-rgt1-in43.6%
metadata-eval43.6%
mul0-lft43.6%
metadata-eval43.6%
Simplified43.6%
if 4.6e-111 < B Initial program 57.1%
Taylor expanded in B around inf 54.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (+ 1.0 (/ (- C A) B)))))
(if (<= C -1.2e-262)
(* 180.0 (/ t_0 PI))
(if (<= C -2.9e-303)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 3.3e+19)
(/ 180.0 (/ PI t_0))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))))
double code(double A, double B, double C) {
double t_0 = atan((1.0 + ((C - A) / B)));
double tmp;
if (C <= -1.2e-262) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (C <= -2.9e-303) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 3.3e+19) {
tmp = 180.0 / (((double) M_PI) / t_0);
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((1.0 + ((C - A) / B)));
double tmp;
if (C <= -1.2e-262) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (C <= -2.9e-303) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 3.3e+19) {
tmp = 180.0 / (Math.PI / t_0);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((1.0 + ((C - A) / B))) tmp = 0 if C <= -1.2e-262: tmp = 180.0 * (t_0 / math.pi) elif C <= -2.9e-303: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 3.3e+19: tmp = 180.0 / (math.pi / t_0) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) t_0 = atan(Float64(1.0 + Float64(Float64(C - A) / B))) tmp = 0.0 if (C <= -1.2e-262) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (C <= -2.9e-303) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 3.3e+19) tmp = Float64(180.0 / Float64(pi / t_0)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((1.0 + ((C - A) / B))); tmp = 0.0; if (C <= -1.2e-262) tmp = 180.0 * (t_0 / pi); elseif (C <= -2.9e-303) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 3.3e+19) tmp = 180.0 / (pi / t_0); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[C, -1.2e-262], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.9e-303], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.3e+19], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\mathbf{if}\;C \leq -1.2 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;C \leq -2.9 \cdot 10^{-303}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 3.3 \cdot 10^{+19}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -1.2e-262Initial program 77.0%
Taylor expanded in B around -inf 71.5%
associate--l+71.5%
div-sub73.2%
Simplified73.2%
if -1.2e-262 < C < -2.90000000000000014e-303Initial program 57.2%
Applied egg-rr68.2%
Taylor expanded in A around -inf 57.9%
associate-/r/58.2%
Applied egg-rr58.2%
if -2.90000000000000014e-303 < C < 3.3e19Initial program 56.8%
Applied egg-rr81.4%
Taylor expanded in B around -inf 57.6%
associate--l+57.6%
div-sub57.6%
Simplified57.6%
if 3.3e19 < C Initial program 22.2%
Applied egg-rr52.7%
Taylor expanded in C around inf 71.7%
distribute-rgt1-in71.7%
metadata-eval71.7%
mul0-lft71.7%
div071.7%
metadata-eval71.7%
metadata-eval71.7%
associate-+l-71.7%
neg-sub071.7%
distribute-lft-neg-in71.7%
metadata-eval71.7%
neg-sub071.7%
distribute-lft-neg-in71.7%
metadata-eval71.7%
Simplified71.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= C -1.2e-262)
t_0
(if (<= C -1.12e-303)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 2.9e+19) t_0 (/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (C <= -1.2e-262) {
tmp = t_0;
} else if (C <= -1.12e-303) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 2.9e+19) {
tmp = t_0;
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (C <= -1.2e-262) {
tmp = t_0;
} else if (C <= -1.12e-303) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 2.9e+19) {
tmp = t_0;
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if C <= -1.2e-262: tmp = t_0 elif C <= -1.12e-303: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 2.9e+19: tmp = t_0 else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (C <= -1.2e-262) tmp = t_0; elseif (C <= -1.12e-303) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 2.9e+19) tmp = t_0; else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (C <= -1.2e-262) tmp = t_0; elseif (C <= -1.12e-303) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 2.9e+19) tmp = t_0; else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.2e-262], t$95$0, If[LessEqual[C, -1.12e-303], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.9e+19], t$95$0, N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.2 \cdot 10^{-262}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -1.12 \cdot 10^{-303}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 2.9 \cdot 10^{+19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -1.2e-262 or -1.1199999999999999e-303 < C < 2.9e19Initial program 69.3%
Taylor expanded in B around -inf 66.2%
associate--l+66.2%
div-sub67.2%
Simplified67.2%
if -1.2e-262 < C < -1.1199999999999999e-303Initial program 57.2%
Applied egg-rr68.2%
Taylor expanded in A around -inf 57.9%
associate-/r/58.2%
Applied egg-rr58.2%
if 2.9e19 < C Initial program 22.2%
Applied egg-rr52.7%
Taylor expanded in C around inf 71.7%
distribute-rgt1-in71.7%
metadata-eval71.7%
mul0-lft71.7%
div071.7%
metadata-eval71.7%
metadata-eval71.7%
associate-+l-71.7%
neg-sub071.7%
distribute-lft-neg-in71.7%
metadata-eval71.7%
neg-sub071.7%
distribute-lft-neg-in71.7%
metadata-eval71.7%
Simplified71.7%
(FPCore (A B C)
:precision binary64
(if (<= B -5.3e-123)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3e-93)
(* 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 <= -5.3e-123) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3e-93) {
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 <= -5.3e-123) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3e-93) {
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 <= -5.3e-123: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3e-93: 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 <= -5.3e-123) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3e-93) 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 <= -5.3e-123) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3e-93) 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, -5.3e-123], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3e-93], 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 -5.3 \cdot 10^{-123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3 \cdot 10^{-93}:\\
\;\;\;\;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 < -5.29999999999999971e-123Initial program 63.0%
Taylor expanded in B around -inf 60.8%
if -5.29999999999999971e-123 < B < 3.0000000000000001e-93Initial program 53.0%
Taylor expanded in C around inf 29.2%
associate-*r/29.2%
distribute-rgt1-in29.2%
metadata-eval29.2%
mul0-lft29.2%
metadata-eval29.2%
Simplified29.2%
if 3.0000000000000001e-93 < B Initial program 57.9%
Taylor expanded in B around inf 55.9%
(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.7%
Taylor expanded in B around -inf 44.8%
if -4.999999999999985e-310 < B Initial program 56.5%
Taylor expanded in B around inf 41.8%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 58.2%
Taylor expanded in B around inf 20.2%
herbie shell --seed 2024087
(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)))