
(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 15 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 -2.5e+119) (* (/ 180.0 PI) (atan (/ (* B 0.5) A))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e+119) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e+119) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.5e+119: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.5e+119) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.5e+119) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.5e+119], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.5 \cdot 10^{+119}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.5e119Initial program 18.1%
Taylor expanded in A around -inf 81.7%
associate-*r/81.7%
Simplified81.7%
expm1-log1p-u80.7%
expm1-udef39.6%
associate-/l*39.6%
Applied egg-rr39.6%
expm1-def80.8%
expm1-log1p81.7%
associate-*r/81.7%
associate-/l*81.7%
associate-/r/81.6%
Simplified81.6%
Taylor expanded in A around 0 81.7%
associate-*r/81.6%
associate-*r/81.6%
*-commutative81.6%
associate-*r/81.7%
associate-*l/81.7%
associate-*r/81.7%
Simplified81.7%
if -2.5e119 < A Initial program 65.2%
Simplified84.8%
Final simplification84.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e+125)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 1.5e+57)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+125) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 1.5e+57) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+125) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 1.5e+57) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.8e+125: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 1.5e+57: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.8e+125) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 1.5e+57) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e+125) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 1.5e+57) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e+125], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.5e+57], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.8 \cdot 10^{+125}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.8000000000000002e125Initial program 18.1%
Taylor expanded in A around -inf 81.7%
associate-*r/81.7%
Simplified81.7%
expm1-log1p-u80.7%
expm1-udef39.6%
associate-/l*39.6%
Applied egg-rr39.6%
expm1-def80.8%
expm1-log1p81.7%
associate-*r/81.7%
associate-/l*81.7%
associate-/r/81.6%
Simplified81.6%
Taylor expanded in A around 0 81.7%
associate-*r/81.6%
associate-*r/81.6%
*-commutative81.6%
associate-*r/81.7%
associate-*l/81.7%
associate-*r/81.7%
Simplified81.7%
if -1.8000000000000002e125 < A < 1.5e57Initial program 59.8%
Taylor expanded in A around 0 55.6%
unpow255.6%
unpow255.6%
hypot-def80.8%
Simplified80.8%
expm1-log1p-u42.2%
Applied egg-rr42.2%
Taylor expanded in C around 0 80.8%
associate-*r/80.8%
associate-/l*80.8%
associate-/r/80.8%
Simplified80.8%
if 1.5e57 < A Initial program 80.9%
Taylor expanded in C around 0 80.9%
associate-*r/80.9%
mul-1-neg80.9%
+-commutative80.9%
unpow280.9%
unpow280.9%
hypot-def90.7%
Simplified90.7%
Final simplification83.1%
(FPCore (A B C)
:precision binary64
(if (<= A -5.5e+131)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 1.1e+61)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.5e+131) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 1.1e+61) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.5e+131) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 1.1e+61) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.5e+131: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 1.1e+61: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.5e+131) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 1.1e+61) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.5e+131) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 1.1e+61) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.5e+131], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.1e+61], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.5 \cdot 10^{+131}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{+61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.49999999999999971e131Initial program 18.1%
Taylor expanded in A around -inf 81.7%
associate-*r/81.7%
Simplified81.7%
expm1-log1p-u80.7%
expm1-udef39.6%
associate-/l*39.6%
Applied egg-rr39.6%
expm1-def80.8%
expm1-log1p81.7%
associate-*r/81.7%
associate-/l*81.7%
associate-/r/81.6%
Simplified81.6%
Taylor expanded in A around 0 81.7%
associate-*r/81.6%
associate-*r/81.6%
*-commutative81.6%
associate-*r/81.7%
associate-*l/81.7%
associate-*r/81.7%
Simplified81.7%
if -5.49999999999999971e131 < A < 1.1e61Initial program 59.8%
Taylor expanded in A around 0 55.6%
unpow255.6%
unpow255.6%
hypot-def80.8%
Simplified80.8%
if 1.1e61 < A Initial program 80.9%
Simplified96.5%
Taylor expanded in B around -inf 83.8%
neg-mul-183.8%
unsub-neg83.8%
Simplified83.8%
Final simplification81.6%
(FPCore (A B C)
:precision binary64
(if (<= A -2.8e+124)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 7e+60)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+124) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 7e+60) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+124) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 7e+60) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.8e+124: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 7e+60: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.8e+124) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 7e+60) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.8e+124) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 7e+60) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.8e+124], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e+60], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.8 \cdot 10^{+124}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 7 \cdot 10^{+60}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.8e124Initial program 18.1%
Taylor expanded in A around -inf 81.7%
associate-*r/81.7%
Simplified81.7%
expm1-log1p-u80.7%
expm1-udef39.6%
associate-/l*39.6%
Applied egg-rr39.6%
expm1-def80.8%
expm1-log1p81.7%
associate-*r/81.7%
associate-/l*81.7%
associate-/r/81.6%
Simplified81.6%
Taylor expanded in A around 0 81.7%
associate-*r/81.6%
associate-*r/81.6%
*-commutative81.6%
associate-*r/81.7%
associate-*l/81.7%
associate-*r/81.7%
Simplified81.7%
if -2.8e124 < A < 7.0000000000000004e60Initial program 59.8%
Taylor expanded in A around 0 55.6%
unpow255.6%
unpow255.6%
hypot-def80.8%
Simplified80.8%
expm1-log1p-u42.2%
Applied egg-rr42.2%
Taylor expanded in C around 0 80.8%
associate-*r/80.8%
associate-/l*80.8%
associate-/r/80.8%
Simplified80.8%
if 7.0000000000000004e60 < A Initial program 80.9%
Simplified96.5%
Taylor expanded in B around -inf 83.8%
neg-mul-183.8%
unsub-neg83.8%
Simplified83.8%
Final simplification81.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= C -7.5e+39)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -2.1e-32)
t_0
(if (<= C -3.8e-121)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C -1.45e-252)
t_0
(if (<= C 4.6e-203)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (C <= -7.5e+39) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -2.1e-32) {
tmp = t_0;
} else if (C <= -3.8e-121) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= -1.45e-252) {
tmp = t_0;
} else if (C <= 4.6e-203) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (C <= -7.5e+39) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -2.1e-32) {
tmp = t_0;
} else if (C <= -3.8e-121) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= -1.45e-252) {
tmp = t_0;
} else if (C <= 4.6e-203) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if C <= -7.5e+39: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -2.1e-32: tmp = t_0 elif C <= -3.8e-121: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= -1.45e-252: tmp = t_0 elif C <= 4.6e-203: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (C <= -7.5e+39) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -2.1e-32) tmp = t_0; elseif (C <= -3.8e-121) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= -1.45e-252) tmp = t_0; elseif (C <= 4.6e-203) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (C <= -7.5e+39) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -2.1e-32) tmp = t_0; elseif (C <= -3.8e-121) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= -1.45e-252) tmp = t_0; elseif (C <= 4.6e-203) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7.5e+39], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.1e-32], t$95$0, If[LessEqual[C, -3.8e-121], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.45e-252], t$95$0, If[LessEqual[C, 4.6e-203], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;C \leq -7.5 \cdot 10^{+39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.1 \cdot 10^{-32}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -3.8 \cdot 10^{-121}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.45 \cdot 10^{-252}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 4.6 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.5000000000000005e39Initial program 82.1%
Taylor expanded in C around -inf 79.1%
if -7.5000000000000005e39 < C < -2.0999999999999999e-32 or -3.8000000000000001e-121 < C < -1.45e-252Initial program 64.2%
Taylor expanded in B around inf 43.8%
if -2.0999999999999999e-32 < C < -3.8000000000000001e-121Initial program 72.5%
Taylor expanded in A around inf 42.8%
if -1.45e-252 < C < 4.59999999999999983e-203Initial program 59.5%
Taylor expanded in B around -inf 47.8%
if 4.59999999999999983e-203 < C Initial program 38.7%
Taylor expanded in C around inf 37.6%
Taylor expanded in A around 0 46.3%
Taylor expanded in A around 0 53.7%
metadata-eval53.7%
cancel-sign-sub-inv53.7%
distribute-rgt1-in53.7%
metadata-eval53.7%
associate-*r/46.9%
mul0-lft53.7%
metadata-eval53.7%
neg-sub053.7%
distribute-lft-neg-in53.7%
metadata-eval53.7%
associate-*r/53.7%
associate-/l*54.8%
associate-/r/53.7%
*-commutative53.7%
Simplified53.7%
Final simplification57.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -5.2e-28)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.3e-169)
t_0
(if (<= B 3.55e-71)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.25e+15) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double tmp;
if (B <= -5.2e-28) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.3e-169) {
tmp = t_0;
} else if (B <= 3.55e-71) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.25e+15) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
double tmp;
if (B <= -5.2e-28) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.3e-169) {
tmp = t_0;
} else if (B <= 3.55e-71) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.25e+15) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) tmp = 0 if B <= -5.2e-28: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.3e-169: tmp = t_0 elif B <= 3.55e-71: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.25e+15: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)) tmp = 0.0 if (B <= -5.2e-28) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.3e-169) tmp = t_0; elseif (B <= 3.55e-71) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.25e+15) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-2.0 * (A / B))) / pi); tmp = 0.0; if (B <= -5.2e-28) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.3e-169) tmp = t_0; elseif (B <= 3.55e-71) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.25e+15) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.2e-28], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-169], t$95$0, If[LessEqual[B, 3.55e-71], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e+15], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5.2 \cdot 10^{-28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-169}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 3.55 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{+15}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.2e-28Initial program 44.5%
Taylor expanded in B around -inf 56.5%
if -5.2e-28 < B < -1.30000000000000007e-169 or 3.55000000000000004e-71 < B < 1.25e15Initial program 68.5%
Taylor expanded in A around inf 43.5%
if -1.30000000000000007e-169 < B < 3.55000000000000004e-71Initial program 63.5%
Taylor expanded in C around inf 48.2%
associate-*r/48.2%
distribute-rgt1-in48.2%
metadata-eval48.2%
mul0-lft48.2%
metadata-eval48.2%
Simplified48.2%
if 1.25e15 < B Initial program 53.5%
Taylor expanded in B around inf 68.4%
Final simplification54.0%
(FPCore (A B C)
:precision binary64
(if (<= B -6.2e-51)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -8.5e-198)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 1.55e-71)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.02e+15)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.2e-51) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -8.5e-198) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 1.55e-71) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.02e+15) {
tmp = 180.0 * (atan((-2.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.2e-51) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -8.5e-198) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 1.55e-71) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.02e+15) {
tmp = 180.0 * (Math.atan((-2.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.2e-51: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -8.5e-198: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 1.55e-71: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.02e+15: tmp = 180.0 * (math.atan((-2.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.2e-51) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -8.5e-198) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 1.55e-71) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.02e+15) tmp = Float64(180.0 * Float64(atan(Float64(-2.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.2e-51) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -8.5e-198) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 1.55e-71) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.02e+15) tmp = 180.0 * (atan((-2.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.2e-51], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-198], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.55e-71], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.02e+15], N[(180.0 * N[(N[ArcTan[N[(-2.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.2 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-198}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.02 \cdot 10^{+15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.1999999999999995e-51Initial program 46.1%
Taylor expanded in B around -inf 51.8%
if -6.1999999999999995e-51 < B < -8.4999999999999994e-198Initial program 69.7%
Taylor expanded in C around -inf 54.5%
if -8.4999999999999994e-198 < B < 1.55000000000000001e-71Initial program 63.7%
Taylor expanded in C around inf 50.2%
associate-*r/50.2%
distribute-rgt1-in50.2%
metadata-eval50.2%
mul0-lft50.2%
metadata-eval50.2%
Simplified50.2%
if 1.55000000000000001e-71 < B < 1.02e15Initial program 67.8%
Taylor expanded in A around inf 43.1%
if 1.02e15 < B Initial program 53.5%
Taylor expanded in B around inf 68.4%
Final simplification55.3%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-21)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (or (<= B -8.5e-198) (not (<= B 3.2e-228)))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))
(* 180.0 (/ (atan (/ 0.0 B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-21) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if ((B <= -8.5e-198) || !(B <= 3.2e-228)) {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-21) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if ((B <= -8.5e-198) || !(B <= 3.2e-228)) {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-21: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif (B <= -8.5e-198) or not (B <= 3.2e-228): tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-21) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif ((B <= -8.5e-198) || !(B <= 3.2e-228)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.6e-21) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif ((B <= -8.5e-198) || ~((B <= 3.2e-228))) tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-21], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, -8.5e-198], N[Not[LessEqual[B, 3.2e-228]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-21}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-198} \lor \neg \left(B \leq 3.2 \cdot 10^{-228}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.60000000000000017e-21Initial program 44.5%
Taylor expanded in A around 0 37.5%
unpow237.5%
unpow237.5%
hypot-def64.5%
Simplified64.5%
expm1-log1p-u64.3%
Applied egg-rr64.3%
Taylor expanded in C around 0 64.5%
associate-*r/64.5%
associate-/l*64.5%
associate-/r/64.5%
Simplified64.5%
Taylor expanded in B around -inf 64.1%
if -2.60000000000000017e-21 < B < -8.4999999999999994e-198 or 3.20000000000000022e-228 < B Initial program 62.5%
Simplified80.1%
Taylor expanded in B around inf 71.6%
+-commutative71.6%
Simplified71.6%
if -8.4999999999999994e-198 < B < 3.20000000000000022e-228Initial program 59.3%
Taylor expanded in C around inf 59.4%
associate-*r/59.4%
distribute-rgt1-in59.4%
metadata-eval59.4%
mul0-lft59.4%
metadata-eval59.4%
Simplified59.4%
Final simplification68.1%
(FPCore (A B C)
:precision binary64
(if (<= C -2.7e-123)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= C -4e-253)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 6.3e-204)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-123) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (C <= -4e-253) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 6.3e-204) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-123) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (C <= -4e-253) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 6.3e-204) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.7e-123: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif C <= -4e-253: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 6.3e-204: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.7e-123) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (C <= -4e-253) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 6.3e-204) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.7e-123) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (C <= -4e-253) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 6.3e-204) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.7e-123], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4e-253], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.3e-204], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.7 \cdot 10^{-123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 6.3 \cdot 10^{-204}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.7000000000000001e-123Initial program 74.0%
Taylor expanded in A around 0 68.9%
unpow268.9%
unpow268.9%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around -inf 67.9%
if -2.7000000000000001e-123 < C < -4.0000000000000003e-253Initial program 80.0%
Taylor expanded in B around inf 46.5%
if -4.0000000000000003e-253 < C < 6.29999999999999992e-204Initial program 59.5%
Taylor expanded in B around -inf 47.8%
if 6.29999999999999992e-204 < C Initial program 38.7%
Taylor expanded in C around inf 37.6%
Taylor expanded in A around 0 46.3%
Taylor expanded in A around 0 53.7%
metadata-eval53.7%
cancel-sign-sub-inv53.7%
distribute-rgt1-in53.7%
metadata-eval53.7%
associate-*r/46.9%
mul0-lft53.7%
metadata-eval53.7%
neg-sub053.7%
distribute-lft-neg-in53.7%
metadata-eval53.7%
associate-*r/53.7%
associate-/l*54.8%
associate-/r/53.7%
*-commutative53.7%
Simplified53.7%
Final simplification58.5%
(FPCore (A B C)
:precision binary64
(if (<= B -8.5e-198)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 5e-244)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.5e-198) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 5e-244) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.5e-198) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 5e-244) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.5e-198: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 5e-244: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.5e-198) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 5e-244) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.5e-198) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 5e-244) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.5e-198], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-244], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.5 \cdot 10^{-198}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-244}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.4999999999999994e-198Initial program 55.3%
Simplified71.8%
Taylor expanded in B around -inf 66.7%
neg-mul-166.7%
unsub-neg66.7%
Simplified66.7%
if -8.4999999999999994e-198 < B < 4.99999999999999998e-244Initial program 59.3%
Taylor expanded in C around inf 59.4%
associate-*r/59.4%
distribute-rgt1-in59.4%
metadata-eval59.4%
mul0-lft59.4%
metadata-eval59.4%
Simplified59.4%
if 4.99999999999999998e-244 < B Initial program 60.1%
Simplified83.6%
Taylor expanded in B around inf 75.9%
+-commutative75.9%
Simplified75.9%
Final simplification69.7%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e+71)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 0.0215)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+71) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 0.0215) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+71) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 0.0215) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.8e+71: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 0.0215: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.8e+71) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 0.0215) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e+71) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 0.0215) tmp = 180.0 * (atan(((C - B) / B)) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e+71], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 0.0215], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.8 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.0215:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.8e71Initial program 24.2%
Taylor expanded in A around -inf 71.9%
associate-*r/71.9%
Simplified71.9%
if -1.8e71 < A < 0.021499999999999998Initial program 61.0%
Taylor expanded in A around 0 58.7%
unpow258.7%
unpow258.7%
hypot-def80.7%
Simplified80.7%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
unsub-neg56.4%
Simplified56.4%
if 0.021499999999999998 < A Initial program 77.9%
Taylor expanded in A around inf 72.4%
Final simplification63.8%
(FPCore (A B C)
:precision binary64
(if (<= A -4.05e+68)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 400.0)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.05e+68) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 400.0) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.05e+68) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 400.0) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.05e+68: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 400.0: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.05e+68) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 400.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.05e+68) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 400.0) tmp = 180.0 * (atan(((C - B) / B)) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.05e+68], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 400.0], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.05 \cdot 10^{+68}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 400:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.0500000000000001e68Initial program 25.2%
Taylor expanded in A around -inf 71.1%
associate-*r/71.1%
Simplified71.1%
expm1-log1p-u69.4%
expm1-udef38.0%
associate-/l*38.0%
Applied egg-rr38.0%
expm1-def69.4%
expm1-log1p71.1%
associate-*r/71.1%
associate-/l*71.1%
associate-/r/71.1%
Simplified71.1%
Taylor expanded in A around 0 71.1%
associate-*r/71.1%
associate-*r/71.1%
*-commutative71.1%
associate-*r/71.1%
associate-*l/71.2%
associate-*r/71.2%
Simplified71.2%
if -4.0500000000000001e68 < A < 400Initial program 61.1%
Taylor expanded in A around 0 58.8%
unpow258.8%
unpow258.8%
hypot-def81.1%
Simplified81.1%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
unsub-neg56.4%
Simplified56.4%
if 400 < A Initial program 77.9%
Taylor expanded in A around inf 72.4%
Final simplification63.8%
(FPCore (A B C)
:precision binary64
(if (<= B -5.5e-81)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.9e-52)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.5e-81) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.9e-52) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.5e-81) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.9e-52) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.5e-81: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.9e-52: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.5e-81) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.9e-52) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.5e-81) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.9e-52) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.5e-81], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e-52], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.5 \cdot 10^{-81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.50000000000000026e-81Initial program 48.5%
Taylor expanded in B around -inf 50.3%
if -5.50000000000000026e-81 < B < 2.9000000000000002e-52Initial program 65.2%
Taylor expanded in C around inf 37.2%
associate-*r/37.2%
distribute-rgt1-in37.2%
metadata-eval37.2%
mul0-lft37.2%
metadata-eval37.2%
Simplified37.2%
if 2.9000000000000002e-52 < B Initial program 56.2%
Taylor expanded in B around inf 60.2%
Final simplification47.8%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 57.6%
Taylor expanded in B around -inf 32.1%
if -1.999999999999994e-310 < B Initial program 58.4%
Taylor expanded in B around inf 43.6%
Final simplification37.8%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 58.0%
Taylor expanded in B around inf 22.6%
Final simplification22.6%
herbie shell --seed 2024017
(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)))