
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -6.8e+50) (* (/ 180.0 PI) (atan (/ (* -0.5 B) (- C A)))) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e+50) {
tmp = (180.0 / ((double) M_PI)) * atan(((-0.5 * B) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (C - A)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e+50) {
tmp = (180.0 / Math.PI) * Math.atan(((-0.5 * B) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.8e+50: tmp = (180.0 / math.pi) * math.atan(((-0.5 * B) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.8e+50) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-0.5 * B) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.8e+50) tmp = (180.0 / pi) * atan(((-0.5 * B) / (C - A))); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (C - A)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.8e+50], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.8 \cdot 10^{+50}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -6.7999999999999997e50Initial program 17.0%
Simplified27.6%
Taylor expanded in B around 0 80.4%
associate-*r/80.4%
Simplified80.4%
if -6.7999999999999997e50 < A Initial program 67.7%
Simplified84.8%
Final simplification83.8%
(FPCore (A B C) :precision binary64 (if (<= A -1.24e+51) (* (/ 180.0 PI) (atan (/ (* -0.5 B) (- C A)))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.24e+51) {
tmp = (180.0 / ((double) M_PI)) * atan(((-0.5 * B) / (C - A)));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.24e+51) {
tmp = (180.0 / Math.PI) * Math.atan(((-0.5 * B) / (C - A)));
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.24e+51: tmp = (180.0 / math.pi) * math.atan(((-0.5 * B) / (C - A))) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.24e+51) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-0.5 * B) / Float64(C - A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.24e+51) tmp = (180.0 / pi) * atan(((-0.5 * B) / (C - A))); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.24e+51], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.24 \cdot 10^{+51}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.24000000000000001e51Initial program 17.0%
Simplified27.6%
Taylor expanded in B around 0 80.4%
associate-*r/80.4%
Simplified80.4%
if -1.24000000000000001e51 < A Initial program 67.7%
Simplified84.8%
Final simplification83.8%
(FPCore (A B C)
:precision binary64
(if (<= A -7.3e+50)
(* (/ 180.0 PI) (atan (/ (* -0.5 B) (- C A))))
(if (<= A 1.7e-8)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.3e+50) {
tmp = (180.0 / ((double) M_PI)) * atan(((-0.5 * B) / (C - A)));
} else if (A <= 1.7e-8) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.3e+50) {
tmp = (180.0 / Math.PI) * Math.atan(((-0.5 * B) / (C - A)));
} else if (A <= 1.7e-8) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.3e+50: tmp = (180.0 / math.pi) * math.atan(((-0.5 * B) / (C - A))) elif A <= 1.7e-8: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.3e+50) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-0.5 * B) / Float64(C - A)))); elseif (A <= 1.7e-8) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.3e+50) tmp = (180.0 / pi) * atan(((-0.5 * B) / (C - A))); elseif (A <= 1.7e-8) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.3e+50], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.7e-8], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.3 \cdot 10^{+50}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)\\
\mathbf{elif}\;A \leq 1.7 \cdot 10^{-8}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.3000000000000003e50Initial program 17.0%
Simplified27.6%
Taylor expanded in B around 0 80.4%
associate-*r/80.4%
Simplified80.4%
if -7.3000000000000003e50 < A < 1.7e-8Initial program 62.5%
Simplified62.5%
Taylor expanded in A around 0 59.2%
unpow259.2%
unpow259.2%
hypot-def76.7%
Simplified76.7%
if 1.7e-8 < A Initial program 80.1%
associate-*r/80.2%
associate-*l/80.2%
*-un-lft-identity80.2%
associate--l-80.2%
unpow280.2%
pow280.2%
hypot-def96.7%
Applied egg-rr96.7%
Taylor expanded in B around inf 85.6%
mul-1-neg85.6%
unsub-neg85.6%
Simplified85.6%
Taylor expanded in C around 0 85.6%
+-commutative85.6%
remove-double-neg85.6%
sub-neg85.6%
div-sub85.6%
*-inverses85.6%
neg-mul-185.6%
associate-*r/85.6%
cancel-sign-sub-inv85.6%
metadata-eval85.6%
*-lft-identity85.6%
distribute-lft-in85.6%
metadata-eval85.6%
mul-1-neg85.6%
unsub-neg85.6%
Simplified85.6%
Final simplification79.6%
(FPCore (A B C)
:precision binary64
(if (<= A -7.4e+50)
(* (/ 180.0 PI) (atan (/ (* -0.5 B) (- C A))))
(if (<= A 6e-38)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.4e+50) {
tmp = (180.0 / ((double) M_PI)) * atan(((-0.5 * B) / (C - A)));
} else if (A <= 6e-38) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} 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 <= -7.4e+50) {
tmp = (180.0 / Math.PI) * Math.atan(((-0.5 * B) / (C - A)));
} else if (A <= 6e-38) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} 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 <= -7.4e+50: tmp = (180.0 / math.pi) * math.atan(((-0.5 * B) / (C - A))) elif A <= 6e-38: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) 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 <= -7.4e+50) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-0.5 * B) / Float64(C - A)))); elseif (A <= 6e-38) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(B, A)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.4e+50) tmp = (180.0 / pi) * atan(((-0.5 * B) / (C - A))); elseif (A <= 6e-38) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.4e+50], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-38], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.4 \cdot 10^{+50}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.4000000000000001e50Initial program 17.0%
Simplified27.6%
Taylor expanded in B around 0 80.4%
associate-*r/80.4%
Simplified80.4%
if -7.4000000000000001e50 < A < 5.99999999999999977e-38Initial program 60.6%
Simplified60.6%
Taylor expanded in A around 0 59.2%
unpow259.2%
unpow259.2%
hypot-def77.4%
Simplified77.4%
if 5.99999999999999977e-38 < A Initial program 80.7%
Simplified80.7%
Taylor expanded in C around 0 78.5%
associate-*r/78.5%
mul-1-neg78.5%
+-commutative78.5%
unpow278.5%
unpow278.5%
hypot-def92.2%
Simplified92.2%
expm1-log1p-u42.2%
expm1-udef42.2%
associate-*r/42.2%
distribute-frac-neg42.2%
atan-neg42.2%
Applied egg-rr42.2%
expm1-def42.2%
expm1-log1p92.2%
distribute-rgt-neg-out92.2%
distribute-lft-neg-in92.2%
metadata-eval92.2%
Simplified92.2%
Final simplification82.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))
(t_1 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
(t_2 (* 180.0 (/ (atan -1.0) PI))))
(if (<= C -1.42e-32)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -1.65e-304)
t_0
(if (<= C 4.2e-287)
t_1
(if (<= C 7e-269)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(if (<= C 4.2e-247)
t_2
(if (<= C 1.5e-242)
t_1
(if (<= C 1.05e-75)
t_0
(if (<= C 9.8e-26)
t_2
(if (<= C 2700.0)
t_0
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double t_2 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (C <= -1.42e-32) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -1.65e-304) {
tmp = t_0;
} else if (C <= 4.2e-287) {
tmp = t_1;
} else if (C <= 7e-269) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else if (C <= 4.2e-247) {
tmp = t_2;
} else if (C <= 1.5e-242) {
tmp = t_1;
} else if (C <= 1.05e-75) {
tmp = t_0;
} else if (C <= 9.8e-26) {
tmp = t_2;
} else if (C <= 2700.0) {
tmp = t_0;
} else {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double t_1 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double t_2 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (C <= -1.42e-32) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -1.65e-304) {
tmp = t_0;
} else if (C <= 4.2e-287) {
tmp = t_1;
} else if (C <= 7e-269) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else if (C <= 4.2e-247) {
tmp = t_2;
} else if (C <= 1.5e-242) {
tmp = t_1;
} else if (C <= 1.05e-75) {
tmp = t_0;
} else if (C <= 9.8e-26) {
tmp = t_2;
} else if (C <= 2700.0) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) t_1 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) t_2 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if C <= -1.42e-32: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -1.65e-304: tmp = t_0 elif C <= 4.2e-287: tmp = t_1 elif C <= 7e-269: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) elif C <= 4.2e-247: tmp = t_2 elif C <= 1.5e-242: tmp = t_1 elif C <= 1.05e-75: tmp = t_0 elif C <= 9.8e-26: tmp = t_2 elif C <= 2700.0: tmp = t_0 else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) t_2 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (C <= -1.42e-32) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -1.65e-304) tmp = t_0; elseif (C <= 4.2e-287) tmp = t_1; elseif (C <= 7e-269) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); elseif (C <= 4.2e-247) tmp = t_2; elseif (C <= 1.5e-242) tmp = t_1; elseif (C <= 1.05e-75) tmp = t_0; elseif (C <= 9.8e-26) tmp = t_2; elseif (C <= 2700.0) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); t_1 = (180.0 / pi) * atan((0.5 * (B / A))); t_2 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (C <= -1.42e-32) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -1.65e-304) tmp = t_0; elseif (C <= 4.2e-287) tmp = t_1; elseif (C <= 7e-269) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); elseif (C <= 4.2e-247) tmp = t_2; elseif (C <= 1.5e-242) tmp = t_1; elseif (C <= 1.05e-75) tmp = t_0; elseif (C <= 9.8e-26) tmp = t_2; elseif (C <= 2700.0) tmp = t_0; else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.42e-32], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.65e-304], t$95$0, If[LessEqual[C, 4.2e-287], t$95$1, If[LessEqual[C, 7e-269], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.2e-247], t$95$2, If[LessEqual[C, 1.5e-242], t$95$1, If[LessEqual[C, 1.05e-75], t$95$0, If[LessEqual[C, 9.8e-26], t$95$2, If[LessEqual[C, 2700.0], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
t_2 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;C \leq -1.42 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.65 \cdot 10^{-304}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 4.2 \cdot 10^{-287}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 7 \cdot 10^{-269}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.2 \cdot 10^{-247}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;C \leq 1.5 \cdot 10^{-242}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{-75}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 9.8 \cdot 10^{-26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;C \leq 2700:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.4199999999999999e-32Initial program 78.1%
Simplified75.2%
Taylor expanded in C around -inf 68.9%
if -1.4199999999999999e-32 < C < -1.65000000000000006e-304 or 1.5e-242 < C < 1.0500000000000001e-75 or 9.7999999999999998e-26 < C < 2700Initial program 67.7%
Simplified67.7%
Taylor expanded in C around 0 64.8%
associate-*r/64.8%
mul-1-neg64.8%
+-commutative64.8%
unpow264.8%
unpow264.8%
hypot-def83.1%
Simplified83.1%
Taylor expanded in B around -inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
if -1.65000000000000006e-304 < C < 4.1999999999999998e-287 or 4.20000000000000027e-247 < C < 1.5e-242Initial program 26.1%
Simplified25.9%
Taylor expanded in A around -inf 66.9%
associate-*r/66.9%
Simplified66.9%
associate-*r/67.0%
*-commutative67.0%
Applied egg-rr67.0%
Taylor expanded in B around 0 66.9%
associate-*r/66.9%
*-commutative66.9%
associate-*r/67.0%
associate-*l/67.3%
*-commutative67.3%
*-commutative67.3%
associate-*r/67.3%
Simplified67.3%
if 4.1999999999999998e-287 < C < 7.00000000000000038e-269Initial program 75.6%
Simplified75.6%
Taylor expanded in A around inf 75.1%
associate-*r/75.1%
*-commutative75.1%
Simplified75.1%
if 7.00000000000000038e-269 < C < 4.20000000000000027e-247 or 1.0500000000000001e-75 < C < 9.7999999999999998e-26Initial program 49.1%
Simplified49.0%
Taylor expanded in B around inf 63.3%
if 2700 < C Initial program 21.0%
associate-*r/21.0%
associate-*l/21.0%
*-un-lft-identity21.0%
associate--l-20.9%
unpow220.9%
pow220.9%
hypot-def43.8%
Applied egg-rr43.8%
Taylor expanded in A around 0 24.0%
unpow224.0%
unpow224.0%
hypot-def45.3%
Simplified45.3%
Taylor expanded in C around inf 64.0%
Final simplification63.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (+ B C) B))) PI)))
(if (<= A -0.076)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A -1.2e-259)
t_0
(if (<= A -7.4e-278)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(if (<= A 1.65e-215)
t_0
(/ (* 180.0 (atan (/ (- (+ A B)) B))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
double tmp;
if (A <= -0.076) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= -1.2e-259) {
tmp = t_0;
} else if (A <= -7.4e-278) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else if (A <= 1.65e-215) {
tmp = t_0;
} else {
tmp = (180.0 * atan((-(A + B) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
double tmp;
if (A <= -0.076) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= -1.2e-259) {
tmp = t_0;
} else if (A <= -7.4e-278) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else if (A <= 1.65e-215) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-(A + B) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((B + C) / B))) / math.pi tmp = 0 if A <= -0.076: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= -1.2e-259: tmp = t_0 elif A <= -7.4e-278: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi elif A <= 1.65e-215: tmp = t_0 else: tmp = (180.0 * math.atan((-(A + B) / B))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi) tmp = 0.0 if (A <= -0.076) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= -1.2e-259) tmp = t_0; elseif (A <= -7.4e-278) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); elseif (A <= 1.65e-215) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(-Float64(A + B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((B + C) / B))) / pi; tmp = 0.0; if (A <= -0.076) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= -1.2e-259) tmp = t_0; elseif (A <= -7.4e-278) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; elseif (A <= 1.65e-215) tmp = t_0; else tmp = (180.0 * atan((-(A + B) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -0.076], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.2e-259], t$95$0, If[LessEqual[A, -7.4e-278], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.65e-215], t$95$0, N[(N[(180.0 * N[ArcTan[N[((-N[(A + B), $MachinePrecision]) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -0.076:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq -1.2 \cdot 10^{-259}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -7.4 \cdot 10^{-278}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.65 \cdot 10^{-215}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-\left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -0.0759999999999999981Initial program 20.3%
Simplified17.1%
Taylor expanded in A around -inf 69.4%
associate-*r/69.4%
Simplified69.4%
Taylor expanded in B around 0 69.4%
associate-*r/69.5%
associate-*r/69.5%
*-commutative69.5%
associate-/l*70.1%
*-commutative70.1%
associate-*r/70.1%
Simplified70.1%
if -0.0759999999999999981 < A < -1.2e-259 or -7.40000000000000045e-278 < A < 1.6499999999999999e-215Initial program 63.9%
associate-*r/64.0%
associate-*l/64.0%
*-un-lft-identity64.0%
associate--l-63.9%
unpow263.9%
pow263.9%
hypot-def83.0%
Applied egg-rr83.0%
Taylor expanded in A around 0 63.5%
unpow263.5%
unpow263.5%
hypot-def82.6%
Simplified82.6%
Taylor expanded in B around -inf 57.1%
if -1.2e-259 < A < -7.40000000000000045e-278Initial program 6.9%
associate-*r/6.9%
associate-*l/6.9%
*-un-lft-identity6.9%
associate--l-6.9%
unpow26.9%
pow26.9%
hypot-def24.0%
Applied egg-rr24.0%
Taylor expanded in A around 0 6.9%
unpow26.9%
unpow26.9%
hypot-def24.0%
Simplified24.0%
Taylor expanded in C around inf 83.4%
if 1.6499999999999999e-215 < A Initial program 75.0%
associate-*r/75.0%
associate-*l/75.0%
*-un-lft-identity75.0%
associate--l-75.0%
unpow275.0%
pow275.0%
hypot-def90.8%
Applied egg-rr90.8%
Taylor expanded in B around inf 76.3%
mul-1-neg76.3%
unsub-neg76.3%
Simplified76.3%
Taylor expanded in C around 0 70.3%
associate-*r/70.3%
mul-1-neg70.3%
distribute-neg-in70.3%
sub-neg70.3%
Simplified70.3%
Final simplification66.2%
(FPCore (A B C)
:precision binary64
(if (<= A -4.2e-259)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A -1.02e-287)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(if (<= A 1.4e-302)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 2e-283)
(* 180.0 (/ (atan 1.0) PI))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.2e-259) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= -1.02e-287) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else if (A <= 1.4e-302) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 2e-283) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.2e-259) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= -1.02e-287) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else if (A <= 1.4e-302) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 2e-283) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.2e-259: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= -1.02e-287: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi elif A <= 1.4e-302: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 2e-283: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.2e-259) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= -1.02e-287) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); elseif (A <= 1.4e-302) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 2e-283) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.2e-259) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= -1.02e-287) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; elseif (A <= 1.4e-302) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 2e-283) tmp = 180.0 * (atan(1.0) / pi); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.2e-259], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.02e-287], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.4e-302], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-283], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.2 \cdot 10^{-259}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq -1.02 \cdot 10^{-287}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.4 \cdot 10^{-302}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-283}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.19999999999999995e-259Initial program 40.6%
Simplified38.9%
Taylor expanded in A around -inf 56.4%
associate-*r/56.4%
Simplified56.4%
Taylor expanded in B around 0 56.4%
associate-*r/56.4%
associate-*r/56.4%
*-commutative56.4%
associate-/l*56.7%
*-commutative56.7%
associate-*r/56.7%
Simplified56.7%
if -4.19999999999999995e-259 < A < -1.01999999999999999e-287Initial program 29.1%
associate-*r/29.1%
associate-*l/29.1%
*-un-lft-identity29.1%
associate--l-29.1%
unpow229.1%
pow229.1%
hypot-def47.0%
Applied egg-rr47.0%
Taylor expanded in A around 0 29.1%
unpow229.1%
unpow229.1%
hypot-def47.0%
Simplified47.0%
Taylor expanded in C around inf 59.9%
if -1.01999999999999999e-287 < A < 1.4e-302Initial program 74.6%
Simplified74.6%
Taylor expanded in B around inf 60.5%
if 1.4e-302 < A < 1.99999999999999989e-283Initial program 47.8%
Simplified47.8%
Taylor expanded in B around -inf 60.6%
if 1.99999999999999989e-283 < A Initial program 74.3%
associate-*r/74.3%
associate-*l/74.3%
*-un-lft-identity74.3%
associate--l-74.3%
unpow274.3%
pow274.3%
hypot-def90.0%
Applied egg-rr90.0%
Taylor expanded in B around inf 74.3%
mul-1-neg74.3%
unsub-neg74.3%
Simplified74.3%
Taylor expanded in C around 0 66.1%
+-commutative66.1%
remove-double-neg66.1%
sub-neg66.1%
div-sub66.1%
*-inverses66.1%
neg-mul-166.1%
associate-*r/66.1%
cancel-sign-sub-inv66.1%
metadata-eval66.1%
*-lft-identity66.1%
distribute-lft-in66.1%
metadata-eval66.1%
mul-1-neg66.1%
unsub-neg66.1%
Simplified66.1%
Final simplification61.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (+ B C) B))) PI)))
(if (<= A -225.0)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A -1.18e-259)
t_0
(if (<= A -5e-277)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(if (<= A 7e-210) t_0 (/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
double tmp;
if (A <= -225.0) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= -1.18e-259) {
tmp = t_0;
} else if (A <= -5e-277) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else if (A <= 7e-210) {
tmp = t_0;
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
double tmp;
if (A <= -225.0) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= -1.18e-259) {
tmp = t_0;
} else if (A <= -5e-277) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else if (A <= 7e-210) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((B + C) / B))) / math.pi tmp = 0 if A <= -225.0: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= -1.18e-259: tmp = t_0 elif A <= -5e-277: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi elif A <= 7e-210: tmp = t_0 else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi) tmp = 0.0 if (A <= -225.0) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= -1.18e-259) tmp = t_0; elseif (A <= -5e-277) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); elseif (A <= 7e-210) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((B + C) / B))) / pi; tmp = 0.0; if (A <= -225.0) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= -1.18e-259) tmp = t_0; elseif (A <= -5e-277) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; elseif (A <= 7e-210) tmp = t_0; else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -225.0], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.18e-259], t$95$0, If[LessEqual[A, -5e-277], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 7e-210], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -225:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq -1.18 \cdot 10^{-259}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -5 \cdot 10^{-277}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7 \cdot 10^{-210}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -225Initial program 20.3%
Simplified17.1%
Taylor expanded in A around -inf 69.4%
associate-*r/69.4%
Simplified69.4%
Taylor expanded in B around 0 69.4%
associate-*r/69.5%
associate-*r/69.5%
*-commutative69.5%
associate-/l*70.1%
*-commutative70.1%
associate-*r/70.1%
Simplified70.1%
if -225 < A < -1.18e-259 or -5e-277 < A < 7.00000000000000031e-210Initial program 63.9%
associate-*r/64.0%
associate-*l/64.0%
*-un-lft-identity64.0%
associate--l-63.9%
unpow263.9%
pow263.9%
hypot-def83.0%
Applied egg-rr83.0%
Taylor expanded in A around 0 63.5%
unpow263.5%
unpow263.5%
hypot-def82.6%
Simplified82.6%
Taylor expanded in B around -inf 57.1%
if -1.18e-259 < A < -5e-277Initial program 6.9%
associate-*r/6.9%
associate-*l/6.9%
*-un-lft-identity6.9%
associate--l-6.9%
unpow26.9%
pow26.9%
hypot-def24.0%
Applied egg-rr24.0%
Taylor expanded in A around 0 6.9%
unpow26.9%
unpow26.9%
hypot-def24.0%
Simplified24.0%
Taylor expanded in C around inf 83.4%
if 7.00000000000000031e-210 < A Initial program 75.0%
associate-*r/75.0%
associate-*l/75.0%
*-un-lft-identity75.0%
associate--l-75.0%
unpow275.0%
pow275.0%
hypot-def90.8%
Applied egg-rr90.8%
Taylor expanded in B around inf 76.3%
mul-1-neg76.3%
unsub-neg76.3%
Simplified76.3%
Taylor expanded in C around 0 70.3%
+-commutative70.3%
remove-double-neg70.3%
sub-neg70.3%
div-sub70.3%
*-inverses70.3%
neg-mul-170.3%
associate-*r/70.3%
cancel-sign-sub-inv70.3%
metadata-eval70.3%
*-lft-identity70.3%
distribute-lft-in70.3%
metadata-eval70.3%
mul-1-neg70.3%
unsub-neg70.3%
Simplified70.3%
Final simplification66.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B 2.8e-296)
t_0
(if (<= B 1.32e-274)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= B 1.95e-122) t_0 (/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))))
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 (B <= 2.8e-296) {
tmp = t_0;
} else if (B <= 1.32e-274) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (B <= 1.95e-122) {
tmp = t_0;
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= 2.8e-296) {
tmp = t_0;
} else if (B <= 1.32e-274) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (B <= 1.95e-122) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= 2.8e-296: tmp = t_0 elif B <= 1.32e-274: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif B <= 1.95e-122: tmp = t_0 else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi 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 (B <= 2.8e-296) tmp = t_0; elseif (B <= 1.32e-274) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (B <= 1.95e-122) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); 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 (B <= 2.8e-296) tmp = t_0; elseif (B <= 1.32e-274) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (B <= 1.95e-122) tmp = t_0; else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 2.8e-296], t$95$0, If[LessEqual[B, 1.32e-274], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.95e-122], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq 2.8 \cdot 10^{-296}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.32 \cdot 10^{-274}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 2.7999999999999999e-296 or 1.32e-274 < B < 1.94999999999999995e-122Initial program 59.3%
Simplified58.5%
Taylor expanded in B around -inf 63.7%
associate--l+63.7%
div-sub65.0%
Simplified65.0%
if 2.7999999999999999e-296 < B < 1.32e-274Initial program 45.1%
Simplified31.2%
Taylor expanded in A around -inf 81.9%
associate-*r/81.9%
Simplified81.9%
Taylor expanded in B around 0 81.9%
associate-*r/81.7%
associate-*r/81.7%
*-commutative81.7%
associate-/l*85.9%
*-commutative85.9%
associate-*r/85.9%
Simplified85.9%
if 1.94999999999999995e-122 < B Initial program 52.7%
associate-*r/52.7%
associate-*l/52.7%
*-un-lft-identity52.7%
associate--l-52.8%
unpow252.8%
pow252.8%
hypot-def76.3%
Applied egg-rr76.3%
Taylor expanded in B around inf 74.1%
mul-1-neg74.1%
unsub-neg74.1%
Simplified74.1%
Taylor expanded in C around 0 67.6%
+-commutative67.6%
remove-double-neg67.6%
sub-neg67.6%
div-sub67.6%
*-inverses67.6%
neg-mul-167.6%
associate-*r/67.6%
cancel-sign-sub-inv67.6%
metadata-eval67.6%
*-lft-identity67.6%
distribute-lft-in67.6%
metadata-eval67.6%
mul-1-neg67.6%
unsub-neg67.6%
Simplified67.6%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1100000.0)
(* (/ 180.0 PI) (atan (/ (* -0.5 B) (- C A))))
(if (<= A -1.5e-202)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(* (* 180.0 (atan (/ (- C (+ A B)) B))) (/ 1.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1100000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((-0.5 * B) / (C - A)));
} else if (A <= -1.5e-202) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((C - (A + B)) / B))) * (1.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1100000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((-0.5 * B) / (C - A)));
} else if (A <= -1.5e-202) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C - (A + B)) / B))) * (1.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1100000.0: tmp = (180.0 / math.pi) * math.atan(((-0.5 * B) / (C - A))) elif A <= -1.5e-202: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = (180.0 * math.atan(((C - (A + B)) / B))) * (1.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1100000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-0.5 * B) / Float64(C - A)))); elseif (A <= -1.5e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - Float64(A + B)) / B))) * Float64(1.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1100000.0) tmp = (180.0 / pi) * atan(((-0.5 * B) / (C - A))); elseif (A <= -1.5e-202) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (180.0 * atan(((C - (A + B)) / B))) * (1.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1100000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.5e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1100000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)\\
\mathbf{elif}\;A \leq -1.5 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\right) \cdot \frac{1}{\pi}\\
\end{array}
\end{array}
if A < -1.1e6Initial program 20.3%
Simplified31.2%
Taylor expanded in B around 0 78.0%
associate-*r/78.0%
Simplified78.0%
if -1.1e6 < A < -1.50000000000000005e-202Initial program 64.4%
Simplified64.3%
Taylor expanded in B around -inf 64.0%
associate--l+64.0%
div-sub64.0%
Simplified64.0%
if -1.50000000000000005e-202 < A Initial program 69.7%
associate-*r/69.7%
associate-*l/69.7%
*-un-lft-identity69.7%
associate--l-69.7%
unpow269.7%
pow269.7%
hypot-def86.5%
Applied egg-rr86.5%
Taylor expanded in B around inf 68.3%
mul-1-neg68.3%
unsub-neg68.3%
Simplified68.3%
div-inv68.3%
associate--l-68.3%
Applied egg-rr68.3%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -2.4e-61)
t_0
(if (<= B -3.8e-96)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B -5.6e-149)
t_0
(if (<= B 5.2e-97)
(/ (* 180.0 (atan (- (/ A B)))) PI)
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -2.4e-61) {
tmp = t_0;
} else if (B <= -3.8e-96) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= -5.6e-149) {
tmp = t_0;
} else if (B <= 5.2e-97) {
tmp = (180.0 * atan(-(A / 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(1.0) / Math.PI);
double tmp;
if (B <= -2.4e-61) {
tmp = t_0;
} else if (B <= -3.8e-96) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= -5.6e-149) {
tmp = t_0;
} else if (B <= 5.2e-97) {
tmp = (180.0 * Math.atan(-(A / 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(1.0) / math.pi) tmp = 0 if B <= -2.4e-61: tmp = t_0 elif B <= -3.8e-96: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= -5.6e-149: tmp = t_0 elif B <= 5.2e-97: tmp = (180.0 * math.atan(-(A / 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(1.0) / pi)) tmp = 0.0 if (B <= -2.4e-61) tmp = t_0; elseif (B <= -3.8e-96) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= -5.6e-149) tmp = t_0; elseif (B <= 5.2e-97) tmp = Float64(Float64(180.0 * atan(Float64(-Float64(A / 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(1.0) / pi); tmp = 0.0; if (B <= -2.4e-61) tmp = t_0; elseif (B <= -3.8e-96) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= -5.6e-149) tmp = t_0; elseif (B <= 5.2e-97) tmp = (180.0 * atan(-(A / 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[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.4e-61], t$95$0, If[LessEqual[B, -3.8e-96], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -5.6e-149], t$95$0, If[LessEqual[B, 5.2e-97], N[(N[(180.0 * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $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} 1}{\pi}\\
\mathbf{if}\;B \leq -2.4 \cdot 10^{-61}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.8 \cdot 10^{-96}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -5.6 \cdot 10^{-149}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.4000000000000001e-61 or -3.8000000000000001e-96 < B < -5.5999999999999997e-149Initial program 57.0%
Simplified57.0%
Taylor expanded in B around -inf 55.1%
if -2.4000000000000001e-61 < B < -3.8000000000000001e-96Initial program 51.9%
associate-*r/51.9%
associate-*l/51.9%
*-un-lft-identity51.9%
associate--l-51.8%
unpow251.8%
pow251.8%
hypot-def61.8%
Applied egg-rr61.8%
Taylor expanded in B around inf 51.4%
mul-1-neg51.4%
unsub-neg51.4%
Simplified51.4%
Taylor expanded in C around inf 51.9%
if -5.5999999999999997e-149 < B < 5.20000000000000014e-97Initial program 63.3%
associate-*r/63.3%
associate-*l/63.3%
*-un-lft-identity63.3%
associate--l-60.7%
unpow260.7%
pow260.7%
hypot-def64.5%
Applied egg-rr64.5%
Taylor expanded in B around inf 54.5%
mul-1-neg54.5%
unsub-neg54.5%
Simplified54.5%
Taylor expanded in A around inf 40.6%
associate-*r/40.6%
neg-mul-140.6%
Simplified40.6%
if 5.20000000000000014e-97 < B Initial program 50.4%
Simplified50.4%
Taylor expanded in B around inf 55.0%
Final simplification50.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI)))
(if (<= B -1.55e-61)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6.6e-210)
t_0
(if (<= B 6e-126)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.15e-122) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
double tmp;
if (B <= -1.55e-61) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6.6e-210) {
tmp = t_0;
} else if (B <= 6e-126) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.15e-122) {
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((C / B))) / Math.PI;
double tmp;
if (B <= -1.55e-61) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6.6e-210) {
tmp = t_0;
} else if (B <= 6e-126) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.15e-122) {
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((C / B))) / math.pi tmp = 0 if B <= -1.55e-61: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6.6e-210: tmp = t_0 elif B <= 6e-126: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.15e-122: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) tmp = 0.0 if (B <= -1.55e-61) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6.6e-210) tmp = t_0; elseif (B <= 6e-126) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.15e-122) 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((C / B))) / pi; tmp = 0.0; if (B <= -1.55e-61) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6.6e-210) tmp = t_0; elseif (B <= 6e-126) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.15e-122) 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[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.55e-61], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.6e-210], t$95$0, If[LessEqual[B, 6e-126], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.15e-122], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.55 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6.6 \cdot 10^{-210}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-126}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.15 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.54999999999999997e-61Initial program 57.2%
Simplified57.2%
Taylor expanded in B around -inf 57.8%
if -1.54999999999999997e-61 < B < 6.6e-210 or 6.0000000000000003e-126 < B < 2.15000000000000009e-122Initial program 63.7%
associate-*r/63.7%
associate-*l/63.7%
*-un-lft-identity63.7%
associate--l-60.9%
unpow260.9%
pow260.9%
hypot-def63.7%
Applied egg-rr63.7%
Taylor expanded in B around inf 51.3%
mul-1-neg51.3%
unsub-neg51.3%
Simplified51.3%
Taylor expanded in C around inf 37.3%
if 6.6e-210 < B < 6.0000000000000003e-126Initial program 44.4%
Simplified43.9%
Taylor expanded in C around inf 39.4%
mul-1-neg39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
distribute-frac-neg39.4%
metadata-eval39.4%
Simplified39.4%
if 2.15000000000000009e-122 < B Initial program 52.7%
Simplified52.7%
Taylor expanded in B around inf 53.5%
Final simplification48.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= A -7000000.0)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A -1.6e-202)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(* 180.0 (/ (atan (+ -1.0 t_0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -7000000.0) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= -1.6e-202) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 + t_0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -7000000.0) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= -1.6e-202) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 + t_0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if A <= -7000000.0: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= -1.6e-202: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 + t_0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (A <= -7000000.0) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= -1.6e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + t_0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (A <= -7000000.0) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= -1.6e-202) tmp = 180.0 * (atan((1.0 + t_0)) / pi); else tmp = 180.0 * (atan((-1.0 + t_0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[A, -7000000.0], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.6e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;A \leq -7000000:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq -1.6 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + t_0\right)}{\pi}\\
\end{array}
\end{array}
if A < -7e6Initial program 20.3%
Simplified17.1%
Taylor expanded in A around -inf 69.4%
associate-*r/69.4%
Simplified69.4%
Taylor expanded in B around 0 69.4%
associate-*r/69.5%
associate-*r/69.5%
*-commutative69.5%
associate-/l*70.1%
*-commutative70.1%
associate-*r/70.1%
Simplified70.1%
if -7e6 < A < -1.6000000000000001e-202Initial program 64.4%
Simplified64.3%
Taylor expanded in B around -inf 64.0%
associate--l+64.0%
div-sub64.0%
Simplified64.0%
if -1.6000000000000001e-202 < A Initial program 69.7%
Simplified69.7%
Taylor expanded in B around inf 67.5%
+-commutative67.5%
associate--r+67.5%
div-sub68.3%
Simplified68.3%
Final simplification68.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= A -7200000.0)
(* (/ 180.0 PI) (atan (/ (* -0.5 B) (- C A))))
(if (<= A -1.5e-202)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(* 180.0 (/ (atan (+ -1.0 t_0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -7200000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((-0.5 * B) / (C - A)));
} else if (A <= -1.5e-202) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 + t_0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -7200000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((-0.5 * B) / (C - A)));
} else if (A <= -1.5e-202) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 + t_0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if A <= -7200000.0: tmp = (180.0 / math.pi) * math.atan(((-0.5 * B) / (C - A))) elif A <= -1.5e-202: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 + t_0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (A <= -7200000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-0.5 * B) / Float64(C - A)))); elseif (A <= -1.5e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + t_0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (A <= -7200000.0) tmp = (180.0 / pi) * atan(((-0.5 * B) / (C - A))); elseif (A <= -1.5e-202) tmp = 180.0 * (atan((1.0 + t_0)) / pi); else tmp = 180.0 * (atan((-1.0 + t_0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[A, -7200000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.5e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;A \leq -7200000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)\\
\mathbf{elif}\;A \leq -1.5 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + t_0\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.2e6Initial program 20.3%
Simplified31.2%
Taylor expanded in B around 0 78.0%
associate-*r/78.0%
Simplified78.0%
if -7.2e6 < A < -1.50000000000000005e-202Initial program 64.4%
Simplified64.3%
Taylor expanded in B around -inf 64.0%
associate--l+64.0%
div-sub64.0%
Simplified64.0%
if -1.50000000000000005e-202 < A Initial program 69.7%
Simplified69.7%
Taylor expanded in B around inf 67.5%
+-commutative67.5%
associate--r+67.5%
div-sub68.3%
Simplified68.3%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(if (<= A -175000.0)
(* (/ 180.0 PI) (atan (/ (* -0.5 B) (- C A))))
(if (<= A -1.5e-202)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(/ (* 180.0 (atan (/ (- (- C B) A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -175000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((-0.5 * B) / (C - A)));
} else if (A <= -1.5e-202) {
tmp = 180.0 * (atan((1.0 + ((C - A) / 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 <= -175000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((-0.5 * B) / (C - A)));
} else if (A <= -1.5e-202) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / 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 <= -175000.0: tmp = (180.0 / math.pi) * math.atan(((-0.5 * B) / (C - A))) elif A <= -1.5e-202: tmp = 180.0 * (math.atan((1.0 + ((C - A) / 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 <= -175000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-0.5 * B) / Float64(C - A)))); elseif (A <= -1.5e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B) - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -175000.0) tmp = (180.0 / pi) * atan(((-0.5 * B) / (C - A))); elseif (A <= -1.5e-202) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (180.0 * atan((((C - B) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -175000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.5e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -175000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)\\
\mathbf{elif}\;A \leq -1.5 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -175000Initial program 20.3%
Simplified31.2%
Taylor expanded in B around 0 78.0%
associate-*r/78.0%
Simplified78.0%
if -175000 < A < -1.50000000000000005e-202Initial program 64.4%
Simplified64.3%
Taylor expanded in B around -inf 64.0%
associate--l+64.0%
div-sub64.0%
Simplified64.0%
if -1.50000000000000005e-202 < A Initial program 69.7%
associate-*r/69.7%
associate-*l/69.7%
*-un-lft-identity69.7%
associate--l-69.7%
unpow269.7%
pow269.7%
hypot-def86.5%
Applied egg-rr86.5%
Taylor expanded in B around inf 68.3%
mul-1-neg68.3%
unsub-neg68.3%
Simplified68.3%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(if (<= A -2.05e-250)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 9.5e-142)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.05e-250) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 9.5e-142) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.05e-250) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 9.5e-142) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.05e-250: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 9.5e-142: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.05e-250) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 9.5e-142) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.05e-250) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 9.5e-142) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.05e-250], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9.5e-142], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.05 \cdot 10^{-250}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9.5 \cdot 10^{-142}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.05000000000000008e-250Initial program 40.1%
Simplified38.4%
Taylor expanded in A around -inf 56.7%
associate-*r/56.7%
Simplified56.7%
if -2.05000000000000008e-250 < A < 9.49999999999999967e-142Initial program 57.8%
Simplified57.8%
Taylor expanded in B around inf 37.0%
if 9.49999999999999967e-142 < A Initial program 77.9%
Simplified77.9%
Taylor expanded in C around 0 72.2%
associate-*r/72.2%
mul-1-neg72.2%
+-commutative72.2%
unpow272.2%
unpow272.2%
hypot-def83.3%
Simplified83.3%
Taylor expanded in B around -inf 67.8%
mul-1-neg67.8%
unsub-neg67.8%
Simplified67.8%
Final simplification56.6%
(FPCore (A B C)
:precision binary64
(if (<= A -2.1e-249)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 9.2e-142)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e-249) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 9.2e-142) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e-249) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 9.2e-142) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.1e-249: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 9.2e-142: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.1e-249) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 9.2e-142) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.1e-249) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 9.2e-142) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.1e-249], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9.2e-142], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.1 \cdot 10^{-249}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 9.2 \cdot 10^{-142}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.09999999999999993e-249Initial program 40.1%
Simplified38.4%
Taylor expanded in A around -inf 56.7%
associate-*r/56.7%
Simplified56.7%
associate-*r/56.8%
*-commutative56.8%
Applied egg-rr56.8%
Taylor expanded in B around 0 56.7%
associate-*r/56.7%
*-commutative56.7%
associate-*r/56.8%
associate-*l/56.8%
*-commutative56.8%
*-commutative56.8%
associate-*r/56.8%
Simplified56.8%
if -2.09999999999999993e-249 < A < 9.20000000000000009e-142Initial program 57.8%
Simplified57.8%
Taylor expanded in B around inf 37.0%
if 9.20000000000000009e-142 < A Initial program 77.9%
Simplified77.9%
Taylor expanded in C around 0 72.2%
associate-*r/72.2%
mul-1-neg72.2%
+-commutative72.2%
unpow272.2%
unpow272.2%
hypot-def83.3%
Simplified83.3%
Taylor expanded in B around -inf 67.8%
mul-1-neg67.8%
unsub-neg67.8%
Simplified67.8%
Final simplification56.7%
(FPCore (A B C)
:precision binary64
(if (<= A -5.8e-250)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 2.8e-145)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.8e-250) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 2.8e-145) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.8e-250) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 2.8e-145) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.8e-250: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 2.8e-145: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.8e-250) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 2.8e-145) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.8e-250) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 2.8e-145) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.8e-250], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e-145], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.8 \cdot 10^{-250}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.8000000000000004e-250Initial program 40.1%
Simplified38.4%
Taylor expanded in A around -inf 56.7%
associate-*r/56.7%
Simplified56.7%
Taylor expanded in B around 0 56.7%
associate-*r/56.7%
associate-*r/56.8%
*-commutative56.8%
associate-/l*57.0%
*-commutative57.0%
associate-*r/57.0%
Simplified57.0%
if -5.8000000000000004e-250 < A < 2.8000000000000001e-145Initial program 57.8%
Simplified57.8%
Taylor expanded in B around inf 37.0%
if 2.8000000000000001e-145 < A Initial program 77.9%
Simplified77.9%
Taylor expanded in C around 0 72.2%
associate-*r/72.2%
mul-1-neg72.2%
+-commutative72.2%
unpow272.2%
unpow272.2%
hypot-def83.3%
Simplified83.3%
Taylor expanded in B around -inf 67.8%
mul-1-neg67.8%
unsub-neg67.8%
Simplified67.8%
Final simplification56.8%
(FPCore (A B C)
:precision binary64
(if (<= B -2.3e-183)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 9.4e-126)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.3e-183) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 9.4e-126) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.3e-183) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 9.4e-126) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.3e-183: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 9.4e-126: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.3e-183) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 9.4e-126) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.3e-183) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 9.4e-126) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.3e-183], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.4e-126], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.3 \cdot 10^{-183}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 9.4 \cdot 10^{-126}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.30000000000000016e-183Initial program 56.2%
Simplified56.1%
Taylor expanded in B around -inf 47.9%
if -2.30000000000000016e-183 < B < 9.40000000000000035e-126Initial program 61.2%
Simplified57.9%
Taylor expanded in C around inf 33.1%
mul-1-neg33.1%
distribute-rgt1-in33.1%
metadata-eval33.1%
mul0-lft33.1%
distribute-frac-neg33.1%
metadata-eval33.1%
Simplified33.1%
if 9.40000000000000035e-126 < B Initial program 53.6%
Simplified53.7%
Taylor expanded in B around inf 52.8%
Final simplification46.2%
(FPCore (A B C) :precision binary64 (if (<= B 5.2e-97) (* 180.0 (/ (atan (- 1.0 (/ A B))) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.2e-97) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 5.2e-97) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5.2e-97: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5.2e-97) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 5.2e-97) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5.2e-97], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 5.2 \cdot 10^{-97}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 5.20000000000000014e-97Initial program 59.7%
Simplified58.4%
Taylor expanded in C around 0 47.0%
associate-*r/47.0%
mul-1-neg47.0%
+-commutative47.0%
unpow247.0%
unpow247.0%
hypot-def66.1%
Simplified66.1%
Taylor expanded in B around -inf 50.8%
mul-1-neg50.8%
unsub-neg50.8%
Simplified50.8%
if 5.20000000000000014e-97 < B Initial program 50.4%
Simplified50.4%
Taylor expanded in B around inf 55.0%
Final simplification52.3%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 57.7%
Simplified56.8%
Taylor expanded in B around -inf 40.8%
if -1.999999999999994e-310 < B Initial program 55.3%
Simplified54.5%
Taylor expanded in B around inf 41.2%
Final simplification41.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 56.4%
Simplified55.6%
Taylor expanded in B around inf 22.7%
Final simplification22.7%
herbie shell --seed 2023283
(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)))