
(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 20 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 -8.6e-60) (/ (* 180.0 (atan (/ (+ (* -0.5 B) (* -0.5 (/ (* B C) A))) (- A)))) PI) (/ (* 180.0 (atan (/ (- (- C A) (hypot B (- A C))) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-60) {
tmp = (180.0 * atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-60) {
tmp = (180.0 * Math.atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot(B, (A - C))) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.6e-60: tmp = (180.0 * math.atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / math.pi else: tmp = (180.0 * math.atan((((C - A) - math.hypot(B, (A - C))) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.6e-60) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-0.5 * B) + Float64(-0.5 * Float64(Float64(B * C) / A))) / Float64(-A)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.6e-60) tmp = (180.0 * atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / pi; else tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.6e-60], N[(N[(180.0 * N[ArcTan[N[(N[(N[(-0.5 * B), $MachinePrecision] + N[(-0.5 * N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5 \cdot B + -0.5 \cdot \frac{B \cdot C}{A}}{-A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.6000000000000001e-60Initial program 29.5%
associate-*r/29.5%
Applied egg-rr51.6%
Taylor expanded in A around -inf 75.7%
if -8.6000000000000001e-60 < A Initial program 67.5%
associate-*r/67.5%
Applied egg-rr87.1%
Final simplification84.0%
(FPCore (A B C)
:precision binary64
(if (<= A -8.6e-60)
(/ (* 180.0 (atan (/ (+ (* -0.5 B) (* -0.5 (/ (* B C) A))) (- A)))) PI)
(if (<= A 1.8e-52)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-60) {
tmp = (180.0 * atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / ((double) M_PI);
} else if (A <= 1.8e-52) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / 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 <= -8.6e-60) {
tmp = (180.0 * Math.atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / Math.PI;
} else if (A <= 1.8e-52) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / 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 <= -8.6e-60: tmp = (180.0 * math.atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / math.pi elif A <= 1.8e-52: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / 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 <= -8.6e-60) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-0.5 * B) + Float64(-0.5 * Float64(Float64(B * C) / A))) / Float64(-A)))) / pi); elseif (A <= 1.8e-52) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / 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 <= -8.6e-60) tmp = (180.0 * atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / pi; elseif (A <= 1.8e-52) tmp = 180.0 * (atan(((C - hypot(C, B)) / 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, -8.6e-60], N[(N[(180.0 * N[ArcTan[N[(N[(N[(-0.5 * B), $MachinePrecision] + N[(-0.5 * N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.8e-52], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 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 -8.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5 \cdot B + -0.5 \cdot \frac{B \cdot C}{A}}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\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 < -8.6000000000000001e-60Initial program 29.5%
associate-*r/29.5%
Applied egg-rr51.6%
Taylor expanded in A around -inf 75.7%
if -8.6000000000000001e-60 < A < 1.79999999999999994e-52Initial program 60.2%
Taylor expanded in A around 0 56.9%
+-commutative56.9%
unpow256.9%
unpow256.9%
hypot-define81.7%
Simplified81.7%
if 1.79999999999999994e-52 < A Initial program 76.5%
Taylor expanded in C around 0 73.1%
associate-*r/73.1%
mul-1-neg73.1%
unpow273.1%
unpow273.1%
hypot-define85.8%
Simplified85.8%
associate-*r/85.9%
distribute-frac-neg85.9%
atan-neg85.9%
Applied egg-rr85.9%
distribute-rgt-neg-out85.9%
distribute-lft-neg-in85.9%
metadata-eval85.9%
hypot-undefine73.2%
unpow273.2%
unpow273.2%
+-commutative73.2%
unpow273.2%
unpow273.2%
hypot-define85.9%
Simplified85.9%
Final simplification81.4%
(FPCore (A B C)
:precision binary64
(if (<= A -8.2e-60)
(/ (* 180.0 (atan (/ (+ (* -0.5 B) (* -0.5 (/ (* B C) A))) (- A)))) PI)
(if (<= A 5.9e-36)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ 180.0 (/ PI (atan (+ -1.0 (/ (- C A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e-60) {
tmp = (180.0 * atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / ((double) M_PI);
} else if (A <= 5.9e-36) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / 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 <= -8.2e-60) {
tmp = (180.0 * Math.atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / Math.PI;
} else if (A <= 5.9e-36) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / 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 <= -8.2e-60: tmp = (180.0 * math.atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / math.pi elif A <= 5.9e-36: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / 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 <= -8.2e-60) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-0.5 * B) + Float64(-0.5 * Float64(Float64(B * C) / A))) / Float64(-A)))) / pi); elseif (A <= 5.9e-36) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / 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 <= -8.2e-60) tmp = (180.0 * atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / pi; elseif (A <= 5.9e-36) tmp = 180.0 * (atan(((C - hypot(C, B)) / 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, -8.2e-60], N[(N[(180.0 * N[ArcTan[N[(N[(N[(-0.5 * B), $MachinePrecision] + N[(-0.5 * N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5.9e-36], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 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 -8.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5 \cdot B + -0.5 \cdot \frac{B \cdot C}{A}}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.9 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\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 < -8.20000000000000025e-60Initial program 29.5%
associate-*r/29.5%
Applied egg-rr51.6%
Taylor expanded in A around -inf 75.7%
if -8.20000000000000025e-60 < A < 5.89999999999999995e-36Initial program 59.1%
Taylor expanded in A around 0 56.0%
+-commutative56.0%
unpow256.0%
unpow256.0%
hypot-define80.6%
Simplified80.6%
if 5.89999999999999995e-36 < A Initial program 78.8%
*-commutative78.8%
associate--l-78.8%
+-commutative78.8%
unpow278.8%
unpow278.8%
hypot-undefine92.0%
div-inv92.0%
clear-num92.0%
un-div-inv92.0%
Applied egg-rr92.0%
Taylor expanded in B around inf 79.5%
+-commutative79.5%
associate--r+79.5%
div-sub79.5%
Simplified79.5%
Final simplification79.0%
(FPCore (A B C) :precision binary64 (if (<= A -8.6e-60) (/ (* 180.0 (atan (/ (+ (* -0.5 B) (* -0.5 (/ (* B C) A))) (- A)))) PI) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-60) {
tmp = (180.0 * atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-60) {
tmp = (180.0 * Math.atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.6e-60: tmp = (180.0 * math.atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.6e-60) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-0.5 * B) + Float64(-0.5 * Float64(Float64(B * C) / A))) / Float64(-A)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.6e-60) tmp = (180.0 * atan((((-0.5 * B) + (-0.5 * ((B * C) / A))) / -A))) / pi; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.6e-60], N[(N[(180.0 * N[ArcTan[N[(N[(N[(-0.5 * B), $MachinePrecision] + N[(-0.5 * N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5 \cdot B + -0.5 \cdot \frac{B \cdot C}{A}}{-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 < -8.6000000000000001e-60Initial program 29.5%
associate-*r/29.5%
Applied egg-rr51.6%
Taylor expanded in A around -inf 75.7%
if -8.6000000000000001e-60 < A Initial program 67.5%
Simplified87.1%
Final simplification84.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.1e-306)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(if (<= B 8.5e+24)
(/ (* 180.0 (- (atan (* -0.5 (/ (+ B (* B (/ C A))) A))))) 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 (B <= -1.1e-306) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else if (B <= 8.5e+24) {
tmp = (180.0 * -atan((-0.5 * ((B + (B * (C / A))) / A)))) / ((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 (B <= -1.1e-306) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else if (B <= 8.5e+24) {
tmp = (180.0 * -Math.atan((-0.5 * ((B + (B * (C / A))) / A)))) / 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 B <= -1.1e-306: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi elif B <= 8.5e+24: tmp = (180.0 * -math.atan((-0.5 * ((B + (B * (C / A))) / A)))) / 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 (B <= -1.1e-306) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); elseif (B <= 8.5e+24) tmp = Float64(Float64(180.0 * Float64(-atan(Float64(-0.5 * Float64(Float64(B + Float64(B * Float64(C / A))) / A))))) / pi); else tmp = Float64(Float64(180.0 * 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 (B <= -1.1e-306) tmp = (180.0 * atan((t_0 + 1.0))) / pi; elseif (B <= 8.5e+24) tmp = (180.0 * -atan((-0.5 * ((B + (B * (C / A))) / A)))) / 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[B, -1.1e-306], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 8.5e+24], N[(N[(180.0 * (-N[ArcTan[N[(-0.5 * N[(N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.1 \cdot 10^{-306}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{180 \cdot \left(-\tan^{-1} \left(-0.5 \cdot \frac{B + B \cdot \frac{C}{A}}{A}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + t\_0\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.10000000000000008e-306Initial program 66.0%
associate-*r/66.0%
Applied egg-rr80.7%
Taylor expanded in B around -inf 73.9%
associate--l+73.9%
div-sub73.9%
Simplified73.9%
if -1.10000000000000008e-306 < B < 8.49999999999999959e24Initial program 47.0%
associate-*r/47.0%
Applied egg-rr64.6%
Taylor expanded in A around -inf 56.2%
pow156.2%
mul-1-neg56.2%
atan-neg56.2%
distribute-lft-out56.2%
associate-/l*57.9%
Applied egg-rr57.9%
unpow157.9%
associate-/l*57.9%
Simplified57.9%
if 8.49999999999999959e24 < B Initial program 45.2%
associate-*r/45.2%
Applied egg-rr82.1%
Taylor expanded in B around inf 76.5%
+-commutative76.5%
associate--r+76.5%
div-sub76.5%
Simplified76.5%
Final simplification70.9%
(FPCore (A B C)
:precision binary64
(if (<= B -2.8e-202)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 1.95e-302)
(/ 180.0 (/ PI (atan (/ (* C 2.0) B))))
(if (<= B 1.25e+19)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(* 180.0 (/ (atan (/ (+ A B) (- B))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.8e-202) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 1.95e-302) {
tmp = 180.0 / (((double) M_PI) / atan(((C * 2.0) / B)));
} else if (B <= 1.25e+19) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (atan(((A + B) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.8e-202) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 1.95e-302) {
tmp = 180.0 / (Math.PI / Math.atan(((C * 2.0) / B)));
} else if (B <= 1.25e+19) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan(((A + B) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.8e-202: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 1.95e-302: tmp = 180.0 / (math.pi / math.atan(((C * 2.0) / B))) elif B <= 1.25e+19: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan(((A + B) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.8e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 1.95e-302) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C * 2.0) / B)))); elseif (B <= 1.25e+19) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + B) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.8e-202) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 1.95e-302) tmp = 180.0 / (pi / atan(((C * 2.0) / B))); elseif (B <= 1.25e+19) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan(((A + B) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.8e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.95e-302], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e+19], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + B), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.8 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-302}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{+19}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.8000000000000001e-202Initial program 65.0%
Taylor expanded in C around 0 51.0%
associate-*r/51.0%
mul-1-neg51.0%
unpow251.0%
unpow251.0%
hypot-define62.0%
Simplified62.0%
Taylor expanded in B around -inf 58.8%
mul-1-neg58.8%
unsub-neg58.8%
Simplified58.8%
if -2.8000000000000001e-202 < B < 1.95e-302Initial program 69.8%
*-commutative69.8%
associate--l-69.4%
+-commutative69.4%
unpow269.4%
unpow269.4%
hypot-undefine75.3%
div-inv75.3%
clear-num75.3%
un-div-inv75.3%
Applied egg-rr79.6%
Taylor expanded in C around -inf 65.0%
*-commutative65.0%
Simplified65.0%
if 1.95e-302 < B < 1.25e19Initial program 48.4%
associate-*l/48.4%
*-lft-identity48.4%
+-commutative48.4%
unpow248.4%
unpow248.4%
hypot-define67.3%
Simplified67.3%
Taylor expanded in A around -inf 49.1%
associate-*r/49.1%
associate-/l*49.4%
Applied egg-rr49.4%
*-commutative49.4%
associate-/l*49.4%
*-commutative49.4%
associate-/r*45.0%
associate-*l/45.0%
Simplified45.0%
Taylor expanded in B around 0 48.9%
if 1.25e19 < B Initial program 43.8%
Taylor expanded in C around 0 38.4%
associate-*r/38.4%
mul-1-neg38.4%
unpow238.4%
unpow238.4%
hypot-define70.5%
Simplified70.5%
Taylor expanded in A around 0 68.0%
+-commutative68.0%
Simplified68.0%
Final simplification59.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -5.4e-307)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(if (<= B 8.5e+24)
(* 180.0 (/ (atan (* 0.5 (/ (+ B (/ (* B C) A)) A))) 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 (B <= -5.4e-307) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else if (B <= 8.5e+24) {
tmp = 180.0 * (atan((0.5 * ((B + ((B * C) / A)) / A))) / ((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 (B <= -5.4e-307) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else if (B <= 8.5e+24) {
tmp = 180.0 * (Math.atan((0.5 * ((B + ((B * C) / A)) / A))) / 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 B <= -5.4e-307: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi elif B <= 8.5e+24: tmp = 180.0 * (math.atan((0.5 * ((B + ((B * C) / A)) / A))) / 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 (B <= -5.4e-307) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); elseif (B <= 8.5e+24) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(Float64(B * C) / A)) / A))) / pi)); else tmp = Float64(Float64(180.0 * 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 (B <= -5.4e-307) tmp = (180.0 * atan((t_0 + 1.0))) / pi; elseif (B <= 8.5e+24) tmp = 180.0 * (atan((0.5 * ((B + ((B * C) / A)) / A))) / 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[B, -5.4e-307], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 8.5e+24], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -5.4 \cdot 10^{-307}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B + \frac{B \cdot C}{A}}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + t\_0\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.39999999999999971e-307Initial program 66.0%
associate-*r/66.0%
Applied egg-rr80.7%
Taylor expanded in B around -inf 73.9%
associate--l+73.9%
div-sub73.9%
Simplified73.9%
if -5.39999999999999971e-307 < B < 8.49999999999999959e24Initial program 47.0%
Taylor expanded in A around -inf 56.2%
associate-*r/56.2%
mul-1-neg56.2%
distribute-lft-out56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in B around 0 56.2%
if 8.49999999999999959e24 < B Initial program 45.2%
associate-*r/45.2%
Applied egg-rr82.1%
Taylor expanded in B around inf 76.5%
+-commutative76.5%
associate--r+76.5%
div-sub76.5%
Simplified76.5%
Final simplification70.5%
(FPCore (A B C)
:precision binary64
(if (<= B -6.4e-203)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 1.8e-301)
(/ 180.0 (/ PI (atan (/ (* C 2.0) B))))
(if (<= B 3.3e+53)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.4e-203) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 1.8e-301) {
tmp = 180.0 / (((double) M_PI) / atan(((C * 2.0) / B)));
} else if (B <= 3.3e+53) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} 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 <= -6.4e-203) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 1.8e-301) {
tmp = 180.0 / (Math.PI / Math.atan(((C * 2.0) / B)));
} else if (B <= 3.3e+53) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.4e-203: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 1.8e-301: tmp = 180.0 / (math.pi / math.atan(((C * 2.0) / B))) elif B <= 3.3e+53: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.4e-203) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 1.8e-301) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C * 2.0) / B)))); elseif (B <= 3.3e+53) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); 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 <= -6.4e-203) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 1.8e-301) tmp = 180.0 / (pi / atan(((C * 2.0) / B))); elseif (B <= 3.3e+53) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.4e-203], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-301], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.3e+53], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.4 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-301}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\
\mathbf{elif}\;B \leq 3.3 \cdot 10^{+53}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.40000000000000001e-203Initial program 65.0%
Taylor expanded in C around 0 51.0%
associate-*r/51.0%
mul-1-neg51.0%
unpow251.0%
unpow251.0%
hypot-define62.0%
Simplified62.0%
Taylor expanded in B around -inf 58.8%
mul-1-neg58.8%
unsub-neg58.8%
Simplified58.8%
if -6.40000000000000001e-203 < B < 1.80000000000000004e-301Initial program 69.8%
*-commutative69.8%
associate--l-69.4%
+-commutative69.4%
unpow269.4%
unpow269.4%
hypot-undefine75.3%
div-inv75.3%
clear-num75.3%
un-div-inv75.3%
Applied egg-rr79.6%
Taylor expanded in C around -inf 65.0%
*-commutative65.0%
Simplified65.0%
if 1.80000000000000004e-301 < B < 3.3000000000000002e53Initial program 49.7%
associate-*l/49.7%
*-lft-identity49.7%
+-commutative49.7%
unpow249.7%
unpow249.7%
hypot-define65.9%
Simplified65.9%
Taylor expanded in A around -inf 47.0%
associate-*r/47.0%
associate-/l*47.3%
Applied egg-rr47.3%
*-commutative47.3%
associate-/l*47.3%
*-commutative47.3%
associate-/r*43.5%
associate-*l/43.5%
Simplified43.5%
Taylor expanded in B around 0 46.9%
if 3.3000000000000002e53 < B Initial program 41.4%
Taylor expanded in B around inf 68.5%
Final simplification58.3%
(FPCore (A B C)
:precision binary64
(if (<= B -6.8e-203)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 1.55e-301)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= B 3.5e+57)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-203) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 1.55e-301) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (B <= 3.5e+57) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} 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 <= -6.8e-203) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 1.55e-301) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (B <= 3.5e+57) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.8e-203: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 1.55e-301: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif B <= 3.5e+57: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.8e-203) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 1.55e-301) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (B <= 3.5e+57) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); 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 <= -6.8e-203) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 1.55e-301) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (B <= 3.5e+57) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.8e-203], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.55e-301], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e+57], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.8 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.7999999999999998e-203Initial program 65.0%
Taylor expanded in C around 0 51.0%
associate-*r/51.0%
mul-1-neg51.0%
unpow251.0%
unpow251.0%
hypot-define62.0%
Simplified62.0%
Taylor expanded in B around -inf 58.8%
mul-1-neg58.8%
unsub-neg58.8%
Simplified58.8%
if -6.7999999999999998e-203 < B < 1.55000000000000007e-301Initial program 69.8%
Taylor expanded in C around -inf 65.0%
associate-*r/65.0%
*-commutative65.0%
Simplified65.0%
if 1.55000000000000007e-301 < B < 3.4999999999999997e57Initial program 49.7%
associate-*l/49.7%
*-lft-identity49.7%
+-commutative49.7%
unpow249.7%
unpow249.7%
hypot-define65.9%
Simplified65.9%
Taylor expanded in A around -inf 47.0%
associate-*r/47.0%
associate-/l*47.3%
Applied egg-rr47.3%
*-commutative47.3%
associate-/l*47.3%
*-commutative47.3%
associate-/r*43.5%
associate-*l/43.5%
Simplified43.5%
Taylor expanded in B around 0 46.9%
if 3.4999999999999997e57 < B Initial program 41.4%
Taylor expanded in B around inf 68.5%
Final simplification58.3%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-202)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 8.8e-302)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= B 1.22e+57)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-202) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 8.8e-302) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (B <= 1.22e+57) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-202) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 8.8e-302) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (B <= 1.22e+57) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-202: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 8.8e-302: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif B <= 1.22e+57: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 8.8e-302) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (B <= 1.22e+57) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.6e-202) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 8.8e-302) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (B <= 1.22e+57) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.8e-302], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.22e+57], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.8 \cdot 10^{-302}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.60000000000000009e-202Initial program 65.0%
Taylor expanded in C around 0 51.0%
associate-*r/51.0%
mul-1-neg51.0%
unpow251.0%
unpow251.0%
hypot-define62.0%
Simplified62.0%
Taylor expanded in B around -inf 58.8%
mul-1-neg58.8%
unsub-neg58.8%
Simplified58.8%
if -2.60000000000000009e-202 < B < 8.8000000000000003e-302Initial program 69.8%
Taylor expanded in C around -inf 65.0%
associate-*r/65.0%
*-commutative65.0%
Simplified65.0%
if 8.8000000000000003e-302 < B < 1.22e57Initial program 49.7%
Taylor expanded in A around -inf 46.8%
associate-*r/46.8%
Simplified46.8%
if 1.22e57 < B Initial program 41.4%
Taylor expanded in B around inf 68.5%
Final simplification58.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 9e-72)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(if (<= B 8.5e+24)
(* (atan (/ 1.0 (/ (/ A B) 0.5))) (/ 180.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 (B <= 9e-72) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else if (B <= 8.5e+24) {
tmp = atan((1.0 / ((A / B) / 0.5))) * (180.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 (B <= 9e-72) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else if (B <= 8.5e+24) {
tmp = Math.atan((1.0 / ((A / B) / 0.5))) * (180.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 B <= 9e-72: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi elif B <= 8.5e+24: tmp = math.atan((1.0 / ((A / B) / 0.5))) * (180.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 (B <= 9e-72) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); elseif (B <= 8.5e+24) tmp = Float64(atan(Float64(1.0 / Float64(Float64(A / B) / 0.5))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * 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 (B <= 9e-72) tmp = (180.0 * atan((t_0 + 1.0))) / pi; elseif (B <= 8.5e+24) tmp = atan((1.0 / ((A / B) / 0.5))) * (180.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[B, 9e-72], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 8.5e+24], N[(N[ArcTan[N[(1.0 / N[(N[(A / B), $MachinePrecision] / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 9 \cdot 10^{-72}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;\tan^{-1} \left(\frac{1}{\frac{\frac{A}{B}}{0.5}}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + t\_0\right)}{\pi}\\
\end{array}
\end{array}
if B < 9e-72Initial program 64.9%
associate-*r/64.9%
Applied egg-rr82.3%
Taylor expanded in B around -inf 69.5%
associate--l+69.5%
div-sub69.5%
Simplified69.5%
if 9e-72 < B < 8.49999999999999959e24Initial program 27.9%
associate-*l/27.9%
*-lft-identity27.9%
+-commutative27.9%
unpow227.9%
unpow227.9%
hypot-define30.1%
Simplified30.1%
Taylor expanded in A around -inf 50.1%
associate-*r/50.2%
associate-/l*50.8%
Applied egg-rr50.8%
*-commutative50.8%
associate-/l*50.8%
*-commutative50.8%
associate-/r*53.8%
associate-*l/53.8%
Simplified53.8%
*-un-lft-identity53.8%
associate-/l*53.7%
Applied egg-rr53.7%
*-lft-identity53.7%
metadata-eval53.7%
associate-*r/53.7%
associate-*l*53.7%
*-commutative53.7%
associate-/r/53.9%
associate-/r*53.9%
*-commutative53.9%
unpow253.9%
times-frac57.8%
*-inverses57.8%
Simplified57.8%
if 8.49999999999999959e24 < B Initial program 45.2%
associate-*r/45.2%
Applied egg-rr82.1%
Taylor expanded in B around inf 76.5%
+-commutative76.5%
associate--r+76.5%
div-sub76.5%
Simplified76.5%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 9e-71)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(if (<= B 5e+26)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(/ (* 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 (B <= 9e-71) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else if (B <= 5e+26) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} 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 (B <= 9e-71) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else if (B <= 5e+26) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} 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 B <= 9e-71: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi elif B <= 5e+26: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) 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 (B <= 9e-71) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); elseif (B <= 5e+26) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(Float64(180.0 * 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 (B <= 9e-71) tmp = (180.0 * atan((t_0 + 1.0))) / pi; elseif (B <= 5e+26) tmp = (180.0 / pi) * atan((0.5 * (B / A))); 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[B, 9e-71], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5e+26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 9 \cdot 10^{-71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq 5 \cdot 10^{+26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + t\_0\right)}{\pi}\\
\end{array}
\end{array}
if B < 9.0000000000000004e-71Initial program 64.9%
associate-*r/64.9%
Applied egg-rr82.3%
Taylor expanded in B around -inf 69.5%
associate--l+69.5%
div-sub69.5%
Simplified69.5%
if 9.0000000000000004e-71 < B < 5.0000000000000001e26Initial program 27.9%
associate-*l/27.9%
*-lft-identity27.9%
+-commutative27.9%
unpow227.9%
unpow227.9%
hypot-define30.1%
Simplified30.1%
Taylor expanded in A around -inf 50.1%
associate-*r/50.2%
associate-/l*50.8%
Applied egg-rr50.8%
*-commutative50.8%
associate-/l*50.8%
*-commutative50.8%
associate-/r*53.8%
associate-*l/53.8%
Simplified53.8%
Taylor expanded in B around 0 57.8%
if 5.0000000000000001e26 < B Initial program 45.2%
associate-*r/45.2%
Applied egg-rr82.1%
Taylor expanded in B around inf 76.5%
+-commutative76.5%
associate--r+76.5%
div-sub76.5%
Simplified76.5%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 5.5e-71)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(if (<= B 8.5e+24)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(/ 180.0 (/ PI (atan (+ -1.0 t_0))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 5.5e-71) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else if (B <= 8.5e+24) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-1.0 + t_0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 5.5e-71) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else if (B <= 8.5e+24) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((-1.0 + t_0)));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= 5.5e-71: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi elif B <= 8.5e+24: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 / (math.pi / math.atan((-1.0 + t_0))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= 5.5e-71) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); elseif (B <= 8.5e+24) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-1.0 + t_0)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= 5.5e-71) tmp = (180.0 * atan((t_0 + 1.0))) / pi; elseif (B <= 8.5e+24) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 / (pi / atan((-1.0 + t_0))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 5.5e-71], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 8.5e+24], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 5.5 \cdot 10^{-71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-1 + t\_0\right)}}\\
\end{array}
\end{array}
if B < 5.4999999999999997e-71Initial program 64.9%
associate-*r/64.9%
Applied egg-rr82.3%
Taylor expanded in B around -inf 69.5%
associate--l+69.5%
div-sub69.5%
Simplified69.5%
if 5.4999999999999997e-71 < B < 8.49999999999999959e24Initial program 27.9%
associate-*l/27.9%
*-lft-identity27.9%
+-commutative27.9%
unpow227.9%
unpow227.9%
hypot-define30.1%
Simplified30.1%
Taylor expanded in A around -inf 50.1%
associate-*r/50.2%
associate-/l*50.8%
Applied egg-rr50.8%
*-commutative50.8%
associate-/l*50.8%
*-commutative50.8%
associate-/r*53.8%
associate-*l/53.8%
Simplified53.8%
Taylor expanded in B around 0 57.8%
if 8.49999999999999959e24 < B Initial program 45.2%
*-commutative45.2%
associate--l-45.2%
+-commutative45.2%
unpow245.2%
unpow245.2%
hypot-undefine82.1%
div-inv82.1%
clear-num82.0%
un-div-inv82.0%
Applied egg-rr82.0%
Taylor expanded in B around inf 76.5%
+-commutative76.5%
associate--r+76.5%
div-sub76.5%
Simplified76.5%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 5.5e-71)
(* 180.0 (/ (atan (+ t_0 1.0)) PI))
(if (<= B 8.5e+24)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(/ 180.0 (/ PI (atan (+ -1.0 t_0))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 5.5e-71) {
tmp = 180.0 * (atan((t_0 + 1.0)) / ((double) M_PI));
} else if (B <= 8.5e+24) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-1.0 + t_0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 5.5e-71) {
tmp = 180.0 * (Math.atan((t_0 + 1.0)) / Math.PI);
} else if (B <= 8.5e+24) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((-1.0 + t_0)));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= 5.5e-71: tmp = 180.0 * (math.atan((t_0 + 1.0)) / math.pi) elif B <= 8.5e+24: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 / (math.pi / math.atan((-1.0 + t_0))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= 5.5e-71) tmp = Float64(180.0 * Float64(atan(Float64(t_0 + 1.0)) / pi)); elseif (B <= 8.5e+24) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-1.0 + t_0)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= 5.5e-71) tmp = 180.0 * (atan((t_0 + 1.0)) / pi); elseif (B <= 8.5e+24) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 / (pi / atan((-1.0 + t_0))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 5.5e-71], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e+24], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 5.5 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-1 + t\_0\right)}}\\
\end{array}
\end{array}
if B < 5.4999999999999997e-71Initial program 64.9%
Taylor expanded in B around -inf 69.5%
associate--l+69.5%
div-sub69.5%
Simplified69.5%
if 5.4999999999999997e-71 < B < 8.49999999999999959e24Initial program 27.9%
associate-*l/27.9%
*-lft-identity27.9%
+-commutative27.9%
unpow227.9%
unpow227.9%
hypot-define30.1%
Simplified30.1%
Taylor expanded in A around -inf 50.1%
associate-*r/50.2%
associate-/l*50.8%
Applied egg-rr50.8%
*-commutative50.8%
associate-/l*50.8%
*-commutative50.8%
associate-/r*53.8%
associate-*l/53.8%
Simplified53.8%
Taylor expanded in B around 0 57.8%
if 8.49999999999999959e24 < B Initial program 45.2%
*-commutative45.2%
associate--l-45.2%
+-commutative45.2%
unpow245.2%
unpow245.2%
hypot-undefine82.1%
div-inv82.1%
clear-num82.0%
un-div-inv82.0%
Applied egg-rr82.0%
Taylor expanded in B around inf 76.5%
+-commutative76.5%
associate--r+76.5%
div-sub76.5%
Simplified76.5%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(if (<= B 9e-71)
(* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))
(if (<= B 1.25e+19)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(* 180.0 (/ (atan (/ (+ A B) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 9e-71) {
tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
} else if (B <= 1.25e+19) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (atan(((A + B) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 9e-71) {
tmp = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
} else if (B <= 1.25e+19) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan(((A + B) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 9e-71: tmp = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi) elif B <= 1.25e+19: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan(((A + B) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 9e-71) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi)); elseif (B <= 1.25e+19) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + B) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 9e-71) tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); elseif (B <= 1.25e+19) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan(((A + B) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 9e-71], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e+19], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + B), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 9 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{+19}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 9.0000000000000004e-71Initial program 64.9%
Taylor expanded in B around -inf 69.5%
associate--l+69.5%
div-sub69.5%
Simplified69.5%
if 9.0000000000000004e-71 < B < 1.25e19Initial program 30.1%
associate-*l/30.1%
*-lft-identity30.1%
+-commutative30.1%
unpow230.1%
unpow230.1%
hypot-define32.4%
Simplified32.4%
Taylor expanded in A around -inf 54.3%
associate-*r/54.4%
associate-/l*55.2%
Applied egg-rr55.2%
*-commutative55.2%
associate-/l*55.1%
*-commutative55.1%
associate-/r*58.4%
associate-*l/58.4%
Simplified58.4%
Taylor expanded in B around 0 62.8%
if 1.25e19 < B Initial program 43.8%
Taylor expanded in C around 0 38.4%
associate-*r/38.4%
mul-1-neg38.4%
unpow238.4%
unpow238.4%
hypot-define70.5%
Simplified70.5%
Taylor expanded in A around 0 68.0%
+-commutative68.0%
Simplified68.0%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.2e-144)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.68e-102)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-144) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.68e-102) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.2e-144) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.68e-102) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.2e-144: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.68e-102: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.2e-144) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.68e-102) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.2e-144) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.68e-102) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.2e-144], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.68e-102], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.2 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.68 \cdot 10^{-102}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.19999999999999997e-144Initial program 66.0%
Taylor expanded in B around -inf 46.5%
if -1.19999999999999997e-144 < B < 1.68000000000000004e-102Initial program 60.5%
associate-*r/60.5%
Applied egg-rr81.5%
div-sub54.4%
Applied egg-rr54.4%
Taylor expanded in C around inf 14.4%
distribute-lft1-in14.4%
metadata-eval14.4%
mul0-lft30.1%
metadata-eval30.1%
Simplified30.1%
if 1.68000000000000004e-102 < B Initial program 43.6%
Taylor expanded in B around inf 44.5%
(FPCore (A B C) :precision binary64 (if (<= A -6.6e-104) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.6e-104) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((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 <= -6.6e-104) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / 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 <= -6.6e-104: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / 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 <= -6.6e-104) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / 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 <= -6.6e-104) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.6e-104], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.6 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.60000000000000004e-104Initial program 31.6%
Taylor expanded in A around -inf 63.2%
associate-*r/63.2%
Simplified63.2%
if -6.60000000000000004e-104 < A Initial program 68.4%
Taylor expanded in C around 0 52.3%
associate-*r/52.3%
mul-1-neg52.3%
unpow252.3%
unpow252.3%
hypot-define67.8%
Simplified67.8%
Taylor expanded in B around -inf 50.6%
mul-1-neg50.6%
unsub-neg50.6%
Simplified50.6%
Final simplification54.5%
(FPCore (A B C) :precision binary64 (if (<= B 6.4e+66) (* 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 <= 6.4e+66) {
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 <= 6.4e+66) {
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 <= 6.4e+66: 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 <= 6.4e+66) 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 <= 6.4e+66) 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, 6.4e+66], 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 6.4 \cdot 10^{+66}:\\
\;\;\;\;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 < 6.3999999999999999e66Initial program 61.3%
Taylor expanded in C around 0 45.2%
associate-*r/45.2%
mul-1-neg45.2%
unpow245.2%
unpow245.2%
hypot-define55.2%
Simplified55.2%
Taylor expanded in B around -inf 47.1%
mul-1-neg47.1%
unsub-neg47.1%
Simplified47.1%
if 6.3999999999999999e66 < B Initial program 38.9%
Taylor expanded in B around inf 70.5%
(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 65.6%
Taylor expanded in B around -inf 37.7%
if -4.999999999999985e-310 < B Initial program 46.5%
Taylor expanded in B around inf 36.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 57.1%
Taylor expanded in B around inf 17.0%
herbie shell --seed 2024145
(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)))