
(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 (<= C 1.65e+66) (/ (* 180.0 (atan (/ (- (- C A) (hypot B (- A C))) B))) PI) (* (atan (* B (/ -0.5 C))) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.65e+66) {
tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / ((double) M_PI);
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.65e+66) {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot(B, (A - C))) / B))) / Math.PI;
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.65e+66: tmp = (180.0 * math.atan((((C - A) - math.hypot(B, (A - C))) / B))) / math.pi else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.65e+66) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B))) / pi); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.65e+66) tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / pi; else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.65e+66], 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], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.65 \cdot 10^{+66}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < 1.6500000000000001e66Initial program 60.9%
associate-*r/60.9%
Applied egg-rr83.7%
if 1.6500000000000001e66 < C Initial program 10.6%
Taylor expanded in C around inf 80.6%
add-cbrt-cube80.4%
pow380.4%
Applied egg-rr80.4%
Taylor expanded in A around 0 80.6%
Simplified80.8%
(FPCore (A B C)
:precision binary64
(if (<= C -6e+62)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(if (<= C 2.55e+63)
(/ 1.0 (/ (* PI 0.005555555555555556) (atan (/ (+ A (hypot A B)) (- B)))))
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -6e+62) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else if (C <= 2.55e+63) {
tmp = 1.0 / ((((double) M_PI) * 0.005555555555555556) / atan(((A + hypot(A, B)) / -B)));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -6e+62) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else if (C <= 2.55e+63) {
tmp = 1.0 / ((Math.PI * 0.005555555555555556) / Math.atan(((A + Math.hypot(A, B)) / -B)));
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -6e+62: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) elif C <= 2.55e+63: tmp = 1.0 / ((math.pi * 0.005555555555555556) / math.atan(((A + math.hypot(A, B)) / -B))) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -6e+62) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); elseif (C <= 2.55e+63) tmp = Float64(1.0 / Float64(Float64(pi * 0.005555555555555556) / atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))))); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6e+62) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); elseif (C <= 2.55e+63) tmp = 1.0 / ((pi * 0.005555555555555556) / atan(((A + hypot(A, B)) / -B))); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -6e+62], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.55e+63], N[(1.0 / N[(N[(Pi * 0.005555555555555556), $MachinePrecision] / N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6 \cdot 10^{+62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.55 \cdot 10^{+63}:\\
\;\;\;\;\frac{1}{\frac{\pi \cdot 0.005555555555555556}{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -6e62Initial program 77.3%
Taylor expanded in A around 0 75.7%
+-commutative75.7%
unpow275.7%
unpow275.7%
hypot-define93.1%
Simplified93.1%
if -6e62 < C < 2.5499999999999999e63Initial program 54.7%
associate-*r/54.7%
Applied egg-rr79.6%
Taylor expanded in C around 0 53.3%
associate-*r/53.3%
+-commutative53.3%
sub-neg53.3%
mul-1-neg53.3%
unpow253.3%
mul-1-neg53.3%
sub-neg53.3%
unpow253.3%
hypot-undefine72.9%
+-commutative72.9%
Simplified79.6%
Taylor expanded in C around 0 50.4%
mul-1-neg50.4%
distribute-neg-frac250.4%
unpow250.4%
unpow250.4%
hypot-define75.7%
Simplified75.7%
if 2.5499999999999999e63 < C Initial program 12.5%
Taylor expanded in C around inf 79.4%
add-cbrt-cube79.1%
pow379.1%
Applied egg-rr79.1%
Taylor expanded in A around 0 79.4%
Simplified79.6%
(FPCore (A B C)
:precision binary64
(if (<= C -6.2e+62)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(if (<= C 3.1e+60)
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI))
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -6.2e+62) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else if (C <= 3.1e+60) {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -6.2e+62) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else if (C <= 3.1e+60) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -6.2e+62: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) elif C <= 3.1e+60: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -6.2e+62) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); elseif (C <= 3.1e+60) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6.2e+62) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); elseif (C <= 3.1e+60) tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -6.2e+62], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.1e+60], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.2 \cdot 10^{+62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.1 \cdot 10^{+60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -6.20000000000000029e62Initial program 77.3%
Taylor expanded in A around 0 75.7%
+-commutative75.7%
unpow275.7%
unpow275.7%
hypot-define93.1%
Simplified93.1%
if -6.20000000000000029e62 < C < 3.1000000000000001e60Initial program 54.7%
Taylor expanded in C around 0 50.4%
associate-*r/50.4%
mul-1-neg50.4%
unpow250.4%
unpow250.4%
hypot-define75.7%
Simplified75.7%
if 3.1000000000000001e60 < C Initial program 12.5%
Taylor expanded in C around inf 79.4%
add-cbrt-cube79.1%
pow379.1%
Applied egg-rr79.1%
Taylor expanded in A around 0 79.4%
Simplified79.6%
Final simplification80.4%
(FPCore (A B C)
:precision binary64
(if (<= A -2.2e+99)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 2.7e+107)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+99) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 2.7e+107) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+99) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 2.7e+107) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.2e+99: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 2.7e+107: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.2e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 2.7e+107) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.2e+99) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 2.7e+107) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.2e+99], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.7e+107], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.2 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.7 \cdot 10^{+107}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.19999999999999978e99Initial program 17.5%
Taylor expanded in A around -inf 77.5%
associate-*r/77.5%
Simplified77.5%
if -2.19999999999999978e99 < A < 2.7000000000000001e107Initial program 55.2%
associate-*r/55.2%
Applied egg-rr76.6%
Taylor expanded in A around 0 48.6%
+-commutative48.6%
unpow248.6%
unpow248.6%
hypot-define70.6%
Simplified70.6%
if 2.7000000000000001e107 < A Initial program 72.5%
Taylor expanded in B around -inf 83.8%
associate--l+83.8%
div-sub83.8%
Simplified83.8%
Final simplification73.9%
(FPCore (A B C)
:precision binary64
(if (<= A -1.02e+103)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 1.2e+105)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e+103) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 1.2e+105) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e+103) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 1.2e+105) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.02e+103: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 1.2e+105: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.02e+103) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 1.2e+105) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.02e+103) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 1.2e+105) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.02e+103], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e+105], 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[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.02 \cdot 10^{+103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.01999999999999991e103Initial program 17.5%
Taylor expanded in A around -inf 77.5%
associate-*r/77.5%
Simplified77.5%
if -1.01999999999999991e103 < A < 1.19999999999999987e105Initial program 55.2%
Taylor expanded in A around 0 48.6%
+-commutative48.6%
unpow248.6%
unpow248.6%
hypot-define70.6%
Simplified70.6%
if 1.19999999999999987e105 < A Initial program 72.5%
Taylor expanded in B around -inf 83.8%
associate--l+83.8%
div-sub83.8%
Simplified83.8%
Final simplification73.9%
(FPCore (A B C) :precision binary64 (if (<= C 5.8e+65) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* (atan (* B (/ -0.5 C))) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 5.8e+65) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 5.8e+65) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 5.8e+65: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 5.8e+65) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 5.8e+65) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 5.8e+65], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 5.8 \cdot 10^{+65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < 5.8000000000000001e65Initial program 60.9%
associate-*l/60.9%
*-lft-identity60.9%
+-commutative60.9%
unpow260.9%
unpow260.9%
hypot-define83.6%
Simplified83.6%
if 5.8000000000000001e65 < C Initial program 10.6%
Taylor expanded in C around inf 80.6%
add-cbrt-cube80.4%
pow380.4%
Applied egg-rr80.4%
Taylor expanded in A around 0 80.6%
Simplified80.8%
(FPCore (A B C) :precision binary64 (if (<= A -6.4e+99) (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+99) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+99) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.4e+99: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.4e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.4e+99) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e+99], 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[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.4 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.39999999999999999e99Initial program 17.5%
Taylor expanded in A around -inf 77.5%
associate-*r/77.5%
Simplified77.5%
if -6.39999999999999999e99 < A Initial program 58.6%
Simplified79.9%
Final simplification79.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -1.3e-158)
t_0
(if (<= B -6e-231)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 1.4e-205)
t_0
(if (<= B 2.65e-121)
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI))
(if (<= B 7e-13) t_0 (/ (* 180.0 (atan (/ (- C B) 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 <= -1.3e-158) {
tmp = t_0;
} else if (B <= -6e-231) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 1.4e-205) {
tmp = t_0;
} else if (B <= 2.65e-121) {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
} else if (B <= 7e-13) {
tmp = t_0;
} else {
tmp = (180.0 * atan(((C - B) / 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 <= -1.3e-158) {
tmp = t_0;
} else if (B <= -6e-231) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 1.4e-205) {
tmp = t_0;
} else if (B <= 2.65e-121) {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
} else if (B <= 7e-13) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan(((C - B) / 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 <= -1.3e-158: tmp = t_0 elif B <= -6e-231: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 1.4e-205: tmp = t_0 elif B <= 2.65e-121: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) elif B <= 7e-13: tmp = t_0 else: tmp = (180.0 * math.atan(((C - B) / 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 <= -1.3e-158) tmp = t_0; elseif (B <= -6e-231) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 1.4e-205) tmp = t_0; elseif (B <= 2.65e-121) tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); elseif (B <= 7e-13) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / 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 <= -1.3e-158) tmp = t_0; elseif (B <= -6e-231) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 1.4e-205) tmp = t_0; elseif (B <= 2.65e-121) tmp = atan((B * (-0.5 / C))) * (180.0 / pi); elseif (B <= 7e-13) tmp = t_0; else tmp = (180.0 * atan(((C - B) / 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, -1.3e-158], t$95$0, If[LessEqual[B, -6e-231], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.4e-205], t$95$0, If[LessEqual[B, 2.65e-121], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-13], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $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 -1.3 \cdot 10^{-158}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -6 \cdot 10^{-231}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.65 \cdot 10^{-121}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.3e-158 or -6.0000000000000005e-231 < B < 1.39999999999999996e-205 or 2.6499999999999998e-121 < B < 7.0000000000000005e-13Initial program 65.3%
Taylor expanded in B around -inf 71.3%
associate--l+71.3%
div-sub73.3%
Simplified73.3%
if -1.3e-158 < B < -6.0000000000000005e-231Initial program 5.1%
associate-*r/5.1%
Applied egg-rr56.8%
Taylor expanded in C around inf 56.8%
distribute-rgt1-in56.8%
metadata-eval56.8%
mul0-lft56.8%
div056.8%
metadata-eval56.8%
Simplified56.8%
if 1.39999999999999996e-205 < B < 2.6499999999999998e-121Initial program 21.0%
Taylor expanded in C around inf 70.8%
add-cbrt-cube70.2%
pow370.2%
Applied egg-rr70.2%
Taylor expanded in A around 0 70.8%
Simplified71.2%
if 7.0000000000000005e-13 < B Initial program 42.0%
associate-*r/42.0%
Applied egg-rr75.8%
Taylor expanded in A around 0 41.1%
+-commutative41.1%
unpow241.1%
unpow241.1%
hypot-define70.8%
Simplified70.8%
Taylor expanded in C around 0 69.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(/ 1.0 (/ PI (* 180.0 (atan (/ (* B (- (/ (- C A) B) -1.0)) B)))))))
(if (<= B -7.8e-159)
t_0
(if (<= B -4.8e-231)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 1.22e-205)
t_0
(if (<= B 2.4e-121)
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 1.0 / (((double) M_PI) / (180.0 * atan(((B * (((C - A) / B) - -1.0)) / B))));
double tmp;
if (B <= -7.8e-159) {
tmp = t_0;
} else if (B <= -4.8e-231) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 1.22e-205) {
tmp = t_0;
} else if (B <= 2.4e-121) {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 1.0 / (Math.PI / (180.0 * Math.atan(((B * (((C - A) / B) - -1.0)) / B))));
double tmp;
if (B <= -7.8e-159) {
tmp = t_0;
} else if (B <= -4.8e-231) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 1.22e-205) {
tmp = t_0;
} else if (B <= 2.4e-121) {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 1.0 / (math.pi / (180.0 * math.atan(((B * (((C - A) / B) - -1.0)) / B)))) tmp = 0 if B <= -7.8e-159: tmp = t_0 elif B <= -4.8e-231: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 1.22e-205: tmp = t_0 elif B <= 2.4e-121: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(1.0 / Float64(pi / Float64(180.0 * atan(Float64(Float64(B * Float64(Float64(Float64(C - A) / B) - -1.0)) / B))))) tmp = 0.0 if (B <= -7.8e-159) tmp = t_0; elseif (B <= -4.8e-231) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 1.22e-205) tmp = t_0; elseif (B <= 2.4e-121) tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 1.0 / (pi / (180.0 * atan(((B * (((C - A) / B) - -1.0)) / B)))); tmp = 0.0; if (B <= -7.8e-159) tmp = t_0; elseif (B <= -4.8e-231) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 1.22e-205) tmp = t_0; elseif (B <= 2.4e-121) tmp = atan((B * (-0.5 / C))) * (180.0 / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(1.0 / N[(Pi / N[(180.0 * N[ArcTan[N[(N[(B * N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7.8e-159], t$95$0, If[LessEqual[B, -4.8e-231], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.22e-205], t$95$0, If[LessEqual[B, 2.4e-121], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\frac{\pi}{180 \cdot \tan^{-1} \left(\frac{B \cdot \left(\frac{C - A}{B} - -1\right)}{B}\right)}}\\
\mathbf{if}\;B \leq -7.8 \cdot 10^{-159}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -4.8 \cdot 10^{-231}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-121}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.79999999999999953e-159 or -4.79999999999999983e-231 < B < 1.2200000000000001e-205Initial program 62.8%
associate-*r/62.8%
Applied egg-rr83.3%
Taylor expanded in B around -inf 74.7%
mul-1-neg74.7%
distribute-rgt-neg-in74.7%
sub-neg74.7%
associate-*r/74.7%
mul-1-neg74.7%
sub-neg74.7%
distribute-neg-in74.7%
remove-double-neg74.7%
+-commutative74.7%
sub-neg74.7%
metadata-eval74.7%
Simplified74.7%
if -7.79999999999999953e-159 < B < -4.79999999999999983e-231Initial program 5.1%
associate-*r/5.1%
Applied egg-rr56.8%
Taylor expanded in C around inf 56.8%
distribute-rgt1-in56.8%
metadata-eval56.8%
mul0-lft56.8%
div056.8%
metadata-eval56.8%
Simplified56.8%
if 1.2200000000000001e-205 < B < 2.40000000000000003e-121Initial program 21.0%
Taylor expanded in C around inf 70.8%
add-cbrt-cube70.2%
pow370.2%
Applied egg-rr70.2%
Taylor expanded in A around 0 70.8%
Simplified71.2%
if 2.40000000000000003e-121 < B Initial program 51.7%
Taylor expanded in B around inf 72.6%
Final simplification72.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -8.8e-159)
t_0
(if (<= B -2.9e-231)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 1.85e-205)
t_0
(if (<= B 2.4e-121)
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ (/ C B) (- -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 <= -8.8e-159) {
tmp = t_0;
} else if (B <= -2.9e-231) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 1.85e-205) {
tmp = t_0;
} else if (B <= 2.4e-121) {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + (-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 <= -8.8e-159) {
tmp = t_0;
} else if (B <= -2.9e-231) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 1.85e-205) {
tmp = t_0;
} else if (B <= 2.4e-121) {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-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 <= -8.8e-159: tmp = t_0 elif B <= -2.9e-231: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 1.85e-205: tmp = t_0 elif B <= 2.4e-121: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-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 <= -8.8e-159) tmp = t_0; elseif (B <= -2.9e-231) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 1.85e-205) tmp = t_0; elseif (B <= 2.4e-121) tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 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 <= -8.8e-159) tmp = t_0; elseif (B <= -2.9e-231) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 1.85e-205) tmp = t_0; elseif (B <= 2.4e-121) tmp = atan((B * (-0.5 / C))) * (180.0 / pi); else tmp = 180.0 * (atan(((C / B) + (-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, -8.8e-159], t$95$0, If[LessEqual[B, -2.9e-231], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.85e-205], t$95$0, If[LessEqual[B, 2.4e-121], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -8.8 \cdot 10^{-159}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -2.9 \cdot 10^{-231}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-121}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.8e-159 or -2.9000000000000001e-231 < B < 1.85e-205Initial program 62.8%
Taylor expanded in B around -inf 72.3%
associate--l+72.3%
div-sub74.7%
Simplified74.7%
if -8.8e-159 < B < -2.9000000000000001e-231Initial program 5.1%
associate-*r/5.1%
Applied egg-rr56.8%
Taylor expanded in C around inf 56.8%
distribute-rgt1-in56.8%
metadata-eval56.8%
mul0-lft56.8%
div056.8%
metadata-eval56.8%
Simplified56.8%
if 1.85e-205 < B < 2.40000000000000003e-121Initial program 21.0%
Taylor expanded in C around inf 70.8%
add-cbrt-cube70.2%
pow370.2%
Applied egg-rr70.2%
Taylor expanded in A around 0 70.8%
Simplified71.2%
if 2.40000000000000003e-121 < B Initial program 51.7%
Taylor expanded in B around inf 72.6%
Final simplification72.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)) (t_1 (* 180.0 (/ (atan (+ 1.0 t_0)) PI))))
(if (<= B -4.5e-159)
t_1
(if (<= B -6e-231)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 6e-209)
t_1
(if (<= B 2.4e-121)
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI))
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
double tmp;
if (B <= -4.5e-159) {
tmp = t_1;
} else if (B <= -6e-231) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 6e-209) {
tmp = t_1;
} else if (B <= 2.4e-121) {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
double tmp;
if (B <= -4.5e-159) {
tmp = t_1;
} else if (B <= -6e-231) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 6e-209) {
tmp = t_1;
} else if (B <= 2.4e-121) {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B t_1 = 180.0 * (math.atan((1.0 + t_0)) / math.pi) tmp = 0 if B <= -4.5e-159: tmp = t_1 elif B <= -6e-231: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 6e-209: tmp = t_1 elif B <= 2.4e-121: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)) tmp = 0.0 if (B <= -4.5e-159) tmp = t_1; elseif (B <= -6e-231) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 6e-209) tmp = t_1; elseif (B <= 2.4e-121) tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; t_1 = 180.0 * (atan((1.0 + t_0)) / pi); tmp = 0.0; if (B <= -4.5e-159) tmp = t_1; elseif (B <= -6e-231) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 6e-209) tmp = t_1; elseif (B <= 2.4e-121) tmp = atan((B * (-0.5 / C))) * (180.0 / pi); else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.5e-159], t$95$1, If[LessEqual[B, -6e-231], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 6e-209], t$95$1, If[LessEqual[B, 2.4e-121], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{if}\;B \leq -4.5 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -6 \cdot 10^{-231}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-121}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.49999999999999989e-159 or -6.0000000000000005e-231 < B < 5.9999999999999997e-209Initial program 62.8%
Taylor expanded in B around -inf 72.3%
associate--l+72.3%
div-sub74.7%
Simplified74.7%
if -4.49999999999999989e-159 < B < -6.0000000000000005e-231Initial program 5.1%
associate-*r/5.1%
Applied egg-rr56.8%
Taylor expanded in C around inf 56.8%
distribute-rgt1-in56.8%
metadata-eval56.8%
mul0-lft56.8%
div056.8%
metadata-eval56.8%
Simplified56.8%
if 5.9999999999999997e-209 < B < 2.40000000000000003e-121Initial program 21.0%
Taylor expanded in C around inf 70.8%
add-cbrt-cube70.2%
pow370.2%
Applied egg-rr70.2%
Taylor expanded in A around 0 70.8%
Simplified71.2%
if 2.40000000000000003e-121 < B Initial program 51.7%
associate-*r/51.7%
Applied egg-rr76.7%
Taylor expanded in B around inf 72.6%
+-commutative72.6%
associate--r+72.6%
div-sub72.6%
Simplified72.6%
Final simplification72.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI)))
(if (<= B -2.5e-53)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.1e-159)
t_0
(if (<= B -9e-286)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 1.65e+74) 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 <= -2.5e-53) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.1e-159) {
tmp = t_0;
} else if (B <= -9e-286) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 1.65e+74) {
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 <= -2.5e-53) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.1e-159) {
tmp = t_0;
} else if (B <= -9e-286) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 1.65e+74) {
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 <= -2.5e-53: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.1e-159: tmp = t_0 elif B <= -9e-286: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 1.65e+74: 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 <= -2.5e-53) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.1e-159) tmp = t_0; elseif (B <= -9e-286) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 1.65e+74) 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 <= -2.5e-53) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.1e-159) tmp = t_0; elseif (B <= -9e-286) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 1.65e+74) 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, -2.5e-53], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.1e-159], t$95$0, If[LessEqual[B, -9e-286], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.65e+74], 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 -2.5 \cdot 10^{-53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.1 \cdot 10^{-159}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -9 \cdot 10^{-286}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{+74}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.5e-53Initial program 47.6%
Taylor expanded in B around -inf 63.6%
if -2.5e-53 < B < -2.0999999999999999e-159 or -9.0000000000000001e-286 < B < 1.6500000000000001e74Initial program 68.1%
associate-*r/68.1%
Applied egg-rr77.1%
Taylor expanded in A around 0 50.8%
+-commutative50.8%
unpow250.8%
unpow250.8%
hypot-define54.9%
Simplified54.9%
Taylor expanded in C around 0 43.3%
Taylor expanded in C around inf 39.0%
if -2.0999999999999999e-159 < B < -9.0000000000000001e-286Initial program 22.2%
associate-*r/22.2%
Applied egg-rr61.9%
Taylor expanded in C around inf 48.7%
distribute-rgt1-in48.7%
metadata-eval48.7%
mul0-lft48.7%
div048.7%
metadata-eval48.7%
Simplified48.7%
if 1.6500000000000001e74 < B Initial program 39.6%
Taylor expanded in B around inf 65.7%
(FPCore (A B C)
:precision binary64
(if (<= C -6.3e-87)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= C 3.4e-287)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -6.3e-87) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (C <= 3.4e-287) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -6.3e-87) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (C <= 3.4e-287) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -6.3e-87: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif C <= 3.4e-287: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -6.3e-87) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (C <= 3.4e-287) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6.3e-87) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (C <= 3.4e-287) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -6.3e-87], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.4e-287], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.3 \cdot 10^{-87}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.4 \cdot 10^{-287}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -6.29999999999999976e-87Initial program 76.6%
associate-*r/76.7%
Applied egg-rr94.4%
Taylor expanded in A around 0 72.5%
+-commutative72.5%
unpow272.5%
unpow272.5%
hypot-define85.6%
Simplified85.6%
Taylor expanded in C around 0 74.7%
if -6.29999999999999976e-87 < C < 3.3999999999999999e-287Initial program 47.3%
Taylor expanded in A around -inf 43.7%
associate-*r/43.7%
Simplified43.7%
if 3.3999999999999999e-287 < C Initial program 37.8%
Taylor expanded in C around inf 54.8%
add-cbrt-cube54.5%
pow354.5%
Applied egg-rr54.5%
Taylor expanded in A around 0 54.8%
Simplified55.0%
Final simplification59.4%
(FPCore (A B C)
:precision binary64
(if (<= C -7.5e-95)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= C 4.4e-287)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* (atan (* B (/ -0.5 C))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7.5e-95) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (C <= 4.4e-287) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = atan((B * (-0.5 / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7.5e-95) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (C <= 4.4e-287) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = Math.atan((B * (-0.5 / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7.5e-95: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif C <= 4.4e-287: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = math.atan((B * (-0.5 / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7.5e-95) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (C <= 4.4e-287) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(atan(Float64(B * Float64(-0.5 / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7.5e-95) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (C <= 4.4e-287) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = atan((B * (-0.5 / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7.5e-95], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.4e-287], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7.5 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.4 \cdot 10^{-287}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -7.5000000000000003e-95Initial program 77.2%
associate-*l/77.2%
*-lft-identity77.2%
+-commutative77.2%
unpow277.2%
unpow277.2%
hypot-define94.5%
Simplified94.5%
Taylor expanded in C around -inf 60.6%
*-commutative60.6%
Simplified60.6%
if -7.5000000000000003e-95 < C < 4.4e-287Initial program 45.0%
Taylor expanded in A around -inf 43.4%
associate-*r/43.4%
Simplified43.4%
if 4.4e-287 < C Initial program 37.8%
Taylor expanded in C around inf 54.8%
add-cbrt-cube54.5%
pow354.5%
Applied egg-rr54.5%
Taylor expanded in A around 0 54.8%
Simplified55.0%
Final simplification54.8%
(FPCore (A B C)
:precision binary64
(if (<= C -4.5e-91)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= C 7e-287)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.5e-91) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (C <= 7e-287) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.5e-91) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (C <= 7e-287) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.5e-91: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif C <= 7e-287: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.5e-91) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (C <= 7e-287) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.5e-91) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (C <= 7e-287) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.5e-91], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7e-287], 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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.5 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7 \cdot 10^{-287}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.49999999999999976e-91Initial program 77.2%
associate-*l/77.2%
*-lft-identity77.2%
+-commutative77.2%
unpow277.2%
unpow277.2%
hypot-define94.5%
Simplified94.5%
Taylor expanded in C around -inf 60.6%
*-commutative60.6%
Simplified60.6%
if -4.49999999999999976e-91 < C < 7e-287Initial program 45.0%
Taylor expanded in A around -inf 43.4%
associate-*r/43.4%
Simplified43.4%
if 7e-287 < C Initial program 37.8%
Taylor expanded in C around inf 54.8%
Taylor expanded in A around inf 54.8%
Final simplification54.7%
(FPCore (A B C)
:precision binary64
(if (<= C -2.3e-94)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 2.3e-287)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e-94) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 2.3e-287) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e-94) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 2.3e-287) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.3e-94: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 2.3e-287: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.3e-94) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 2.3e-287) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.3e-94) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 2.3e-287) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.3e-94], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.3e-287], 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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.3 \cdot 10^{-94}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.3 \cdot 10^{-287}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.2999999999999999e-94Initial program 77.2%
associate-*r/77.2%
Applied egg-rr94.6%
Taylor expanded in A around 0 73.1%
+-commutative73.1%
unpow273.1%
unpow273.1%
hypot-define85.0%
Simplified85.0%
Taylor expanded in C around 0 74.2%
Taylor expanded in C around inf 60.6%
if -2.2999999999999999e-94 < C < 2.29999999999999986e-287Initial program 45.0%
Taylor expanded in A around -inf 43.4%
associate-*r/43.4%
Simplified43.4%
if 2.29999999999999986e-287 < C Initial program 37.8%
Taylor expanded in C around inf 54.8%
Taylor expanded in A around inf 54.8%
Final simplification54.7%
(FPCore (A B C)
:precision binary64
(if (<= C -2.7e-88)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 5.8e-149)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-88) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 5.8e-149) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-88) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 5.8e-149) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.7e-88: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 5.8e-149: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.7e-88) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 5.8e-149) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.7e-88) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 5.8e-149) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.7e-88], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 5.8e-149], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.7 \cdot 10^{-88}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.8 \cdot 10^{-149}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.69999999999999995e-88Initial program 76.9%
associate-*r/76.9%
Applied egg-rr94.5%
Taylor expanded in A around 0 72.8%
+-commutative72.8%
unpow272.8%
unpow272.8%
hypot-define85.7%
Simplified85.7%
Taylor expanded in C around 0 75.0%
Taylor expanded in C around inf 61.2%
if -2.69999999999999995e-88 < C < 5.8e-149Initial program 52.9%
Taylor expanded in B around -inf 35.5%
if 5.8e-149 < C Initial program 30.9%
Taylor expanded in C around inf 59.9%
Taylor expanded in A around inf 59.9%
(FPCore (A B C)
:precision binary64
(if (<= B -1.45e-129)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.85e-122)
(/ (* 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.45e-129) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.85e-122) {
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.45e-129) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.85e-122) {
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.45e-129: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.85e-122: 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.45e-129) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.85e-122) 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.45e-129) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.85e-122) 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.45e-129], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.85e-122], 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.45 \cdot 10^{-129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.85 \cdot 10^{-122}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.45000000000000008e-129Initial program 57.4%
Taylor expanded in B around -inf 55.9%
if -1.45000000000000008e-129 < B < 3.8500000000000003e-122Initial program 48.3%
associate-*r/48.3%
Applied egg-rr73.2%
Taylor expanded in C around inf 34.7%
distribute-rgt1-in34.7%
metadata-eval34.7%
mul0-lft34.7%
div034.7%
metadata-eval34.7%
Simplified34.7%
if 3.8500000000000003e-122 < B Initial program 51.2%
Taylor expanded in B around inf 46.9%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 52.0%
Taylor expanded in B around -inf 42.9%
if -4.999999999999985e-310 < B Initial program 52.9%
Taylor expanded in B around inf 36.2%
(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 52.5%
Taylor expanded in B around inf 20.4%
herbie shell --seed 2024181
(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)))