
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(t_1 (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B)))))
(if (<= t_0 -5e-43)
(/ t_1 PI)
(if (<= t_0 0.0)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(/ 1.0 (/ PI t_1))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double t_1 = 180.0 * atan((((C - A) - hypot((A - C), B)) / B));
double tmp;
if (t_0 <= -5e-43) {
tmp = t_1 / ((double) M_PI);
} else if (t_0 <= 0.0) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 1.0 / (((double) M_PI) / t_1);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double t_1 = 180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B));
double tmp;
if (t_0 <= -5e-43) {
tmp = t_1 / Math.PI;
} else if (t_0 <= 0.0) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 1.0 / (Math.PI / t_1);
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) t_1 = 180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B)) tmp = 0 if t_0 <= -5e-43: tmp = t_1 / math.pi elif t_0 <= 0.0: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 1.0 / (math.pi / t_1) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) t_1 = Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) tmp = 0.0 if (t_0 <= -5e-43) tmp = Float64(t_1 / pi); elseif (t_0 <= 0.0) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(1.0 / Float64(pi / t_1)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); t_1 = 180.0 * atan((((C - A) - hypot((A - C), B)) / B)); tmp = 0.0; if (t_0 <= -5e-43) tmp = t_1 / pi; elseif (t_0 <= 0.0) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 1.0 / (pi / t_1); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-43], N[(t$95$1 / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := 180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-43}:\\
\;\;\;\;\frac{t\_1}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\pi}{t\_1}}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -5.00000000000000019e-43Initial program 59.3%
associate-*r/59.3%
associate-*l/59.3%
*-un-lft-identity59.3%
unpow259.3%
unpow259.3%
hypot-define89.6%
Applied egg-rr89.6%
if -5.00000000000000019e-43 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.0Initial program 14.9%
Applied egg-rr14.9%
Taylor expanded in A around -inf 73.5%
mul-1-neg73.5%
distribute-neg-frac273.5%
distribute-lft-out73.5%
associate-/l*73.4%
Simplified73.4%
Taylor expanded in B around 0 73.6%
Simplified73.6%
Taylor expanded in C around 0 74.0%
if 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 56.1%
Applied egg-rr87.8%
(FPCore (A B C)
:precision binary64
(if (<= A -5.8e+30)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 4.6)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ 1.0 (/ PI (* 180.0 (atan (/ (+ A (hypot B A)) (- B)))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.8e+30) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 4.6) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 1.0 / (((double) M_PI) / (180.0 * atan(((A + hypot(B, A)) / -B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.8e+30) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 4.6) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 1.0 / (Math.PI / (180.0 * Math.atan(((A + Math.hypot(B, A)) / -B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.8e+30: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 4.6: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 1.0 / (math.pi / (180.0 * math.atan(((A + math.hypot(B, A)) / -B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.8e+30) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 4.6) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(1.0 / Float64(pi / Float64(180.0 * atan(Float64(Float64(A + hypot(B, A)) / Float64(-B)))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.8e+30) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 4.6) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 1.0 / (pi / (180.0 * atan(((A + hypot(B, A)) / -B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.8e+30], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.6], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(1.0 / N[(Pi / N[(180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.8 \cdot 10^{+30}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 4.6:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\pi}{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}}\\
\end{array}
\end{array}
if A < -5.7999999999999996e30Initial program 19.7%
Applied egg-rr51.5%
Taylor expanded in A around -inf 72.9%
mul-1-neg72.9%
distribute-neg-frac272.9%
distribute-lft-out72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in B around 0 73.0%
Simplified73.0%
Taylor expanded in C around 0 73.4%
if -5.7999999999999996e30 < A < 4.5999999999999996Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
unpow254.8%
unpow254.8%
hypot-define85.6%
Applied egg-rr85.6%
Taylor expanded in A around 0 54.1%
unpow254.1%
unpow254.1%
hypot-define84.9%
Simplified84.9%
if 4.5999999999999996 < A Initial program 74.5%
Applied egg-rr91.4%
Taylor expanded in C around 0 74.5%
associate-*r/74.5%
mul-1-neg74.5%
+-commutative74.5%
unpow274.5%
unpow274.5%
hypot-undefine88.2%
distribute-neg-frac88.2%
distribute-neg-frac288.2%
Simplified88.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.15e+31)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 6.8)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ (* 180.0 (atan (/ (+ A (hypot B A)) (- B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+31) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 6.8) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((A + hypot(B, A)) / -B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+31) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 6.8) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((A + Math.hypot(B, A)) / -B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+31: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 6.8: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = (180.0 * math.atan(((A + math.hypot(B, A)) / -B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+31) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 6.8) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(A + hypot(B, A)) / Float64(-B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+31) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 6.8) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 * atan(((A + hypot(B, A)) / -B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+31], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.8], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+31}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 6.8:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.15e31Initial program 19.7%
Applied egg-rr51.5%
Taylor expanded in A around -inf 72.9%
mul-1-neg72.9%
distribute-neg-frac272.9%
distribute-lft-out72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in B around 0 73.0%
Simplified73.0%
Taylor expanded in C around 0 73.4%
if -1.15e31 < A < 6.79999999999999982Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
unpow254.8%
unpow254.8%
hypot-define85.6%
Applied egg-rr85.6%
Taylor expanded in A around 0 54.1%
unpow254.1%
unpow254.1%
hypot-define84.9%
Simplified84.9%
if 6.79999999999999982 < A Initial program 74.5%
associate-*r/74.5%
associate-*l/74.5%
*-un-lft-identity74.5%
unpow274.5%
unpow274.5%
hypot-define91.4%
Applied egg-rr91.4%
Taylor expanded in C around 0 74.5%
associate-*r/74.5%
mul-1-neg74.5%
+-commutative74.5%
unpow274.5%
unpow274.5%
hypot-undefine88.2%
distribute-neg-frac88.2%
distribute-neg-frac288.2%
Simplified88.2%
(FPCore (A B C)
:precision binary64
(if (<= A -3.7e+32)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 3.1)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.7e+32) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 3.1) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.7e+32) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 3.1) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.7e+32: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 3.1: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.7e+32) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 3.1) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.7e+32) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 3.1) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.7e+32], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.1], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -3.7 \cdot 10^{+32}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 3.1:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.7e32Initial program 19.7%
Applied egg-rr51.5%
Taylor expanded in A around -inf 72.9%
mul-1-neg72.9%
distribute-neg-frac272.9%
distribute-lft-out72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in B around 0 73.0%
Simplified73.0%
Taylor expanded in C around 0 73.4%
if -3.7e32 < A < 3.10000000000000009Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
unpow254.8%
unpow254.8%
hypot-define85.6%
Applied egg-rr85.6%
Taylor expanded in A around 0 54.1%
unpow254.1%
unpow254.1%
hypot-define84.9%
Simplified84.9%
if 3.10000000000000009 < A Initial program 74.5%
Taylor expanded in C around 0 74.5%
mul-1-neg74.5%
distribute-neg-frac274.5%
+-commutative74.5%
unpow274.5%
unpow274.5%
hypot-define88.2%
Simplified88.2%
(FPCore (A B C)
:precision binary64
(if (<= A -3.8e+32)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 6.6)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (* (atan (+ 1.0 (/ (- C A) B))) (/ 1.0 PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+32) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 6.6) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / ((double) M_PI)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+32) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 6.6) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) * (1.0 / Math.PI));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e+32: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 6.6: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) * (1.0 / math.pi)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e+32) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 6.6) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) * Float64(1.0 / pi))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e+32) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 6.6) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / pi)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e+32], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.6], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 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] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{+32}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 6.6:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot \frac{1}{\pi}\right)\\
\end{array}
\end{array}
if A < -3.8000000000000003e32Initial program 19.7%
Applied egg-rr51.5%
Taylor expanded in A around -inf 72.9%
mul-1-neg72.9%
distribute-neg-frac272.9%
distribute-lft-out72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in B around 0 73.0%
Simplified73.0%
Taylor expanded in C around 0 73.4%
if -3.8000000000000003e32 < A < 6.5999999999999996Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
unpow254.8%
unpow254.8%
hypot-define85.6%
Applied egg-rr85.6%
Taylor expanded in A around 0 54.1%
unpow254.1%
unpow254.1%
hypot-define84.9%
Simplified84.9%
if 6.5999999999999996 < A Initial program 74.5%
Taylor expanded in B around -inf 75.0%
associate--l+75.0%
div-sub76.5%
Simplified76.5%
div-inv76.5%
Applied egg-rr76.5%
(FPCore (A B C)
:precision binary64
(if (<= A -6.5e+30)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 5.9)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (* (atan (+ 1.0 (/ (- C A) B))) (/ 1.0 PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.5e+30) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 5.9) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / ((double) M_PI)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.5e+30) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 5.9) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) * (1.0 / Math.PI));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.5e+30: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 5.9: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) * (1.0 / math.pi)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.5e+30) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 5.9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) * Float64(1.0 / pi))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.5e+30) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 5.9) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / pi)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.5e+30], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.9], 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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.5 \cdot 10^{+30}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 5.9:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot \frac{1}{\pi}\right)\\
\end{array}
\end{array}
if A < -6.5e30Initial program 19.7%
Applied egg-rr51.5%
Taylor expanded in A around -inf 72.9%
mul-1-neg72.9%
distribute-neg-frac272.9%
distribute-lft-out72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in B around 0 73.0%
Simplified73.0%
Taylor expanded in C around 0 73.4%
if -6.5e30 < A < 5.9000000000000004Initial program 54.8%
Taylor expanded in A around 0 54.1%
unpow254.1%
unpow254.1%
hypot-define84.9%
Simplified84.9%
if 5.9000000000000004 < A Initial program 74.5%
Taylor expanded in B around -inf 75.0%
associate--l+75.0%
div-sub76.5%
Simplified76.5%
div-inv76.5%
Applied egg-rr76.5%
(FPCore (A B C) :precision binary64 (if (<= C 2e+148) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B)))) (* 180.0 (/ (atan (+ (/ (- A A) B) (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2e+148) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = 180.0 * (atan((((A - A) / B) + (-0.5 * (B / C)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2e+148) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = 180.0 * (Math.atan((((A - A) / B) + (-0.5 * (B / C)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2e+148: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = 180.0 * (math.atan((((A - A) / B) + (-0.5 * (B / C)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2e+148) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(A - A) / B) + Float64(-0.5 * Float64(B / C)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2e+148) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = 180.0 * (atan((((A - A) / B) + (-0.5 * (B / C)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2e+148], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2 \cdot 10^{+148}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 2.0000000000000001e148Initial program 59.4%
Applied egg-rr84.7%
if 2.0000000000000001e148 < C Initial program 6.3%
Taylor expanded in C around inf 85.7%
Final simplification84.8%
(FPCore (A B C) :precision binary64 (if (<= C 3.75e+152) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* 180.0 (/ (atan (+ (/ (- A A) B) (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 3.75e+152) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((A - A) / B) + (-0.5 * (B / C)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 3.75e+152) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((A - A) / B) + (-0.5 * (B / C)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 3.75e+152: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan((((A - A) / B) + (-0.5 * (B / C)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 3.75e+152) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(A - A) / B) + Float64(-0.5 * Float64(B / C)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3.75e+152) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan((((A - A) / B) + (-0.5 * (B / C)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 3.75e+152], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.75 \cdot 10^{+152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.75000000000000023e152Initial program 59.4%
associate-*l/59.4%
*-lft-identity59.4%
+-commutative59.4%
unpow259.4%
unpow259.4%
hypot-define84.7%
Simplified84.7%
if 3.75000000000000023e152 < C Initial program 6.3%
Taylor expanded in C around inf 85.7%
Final simplification84.8%
(FPCore (A B C) :precision binary64 (if (<= A -1.95e+30) (* (atan (* 0.5 (/ B A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.95e+30) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((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 <= -1.95e+30) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / 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 <= -1.95e+30: tmp = math.atan((0.5 * (B / A))) * (180.0 / 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 <= -1.95e+30) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / 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 <= -1.95e+30) tmp = atan((0.5 * (B / A))) * (180.0 / 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, -1.95e+30], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / 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 -1.95 \cdot 10^{+30}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\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 < -1.95000000000000005e30Initial program 19.7%
Applied egg-rr51.5%
Taylor expanded in A around -inf 72.9%
mul-1-neg72.9%
distribute-neg-frac272.9%
distribute-lft-out72.9%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in B around 0 73.0%
Simplified73.0%
Taylor expanded in C around 0 73.4%
if -1.95000000000000005e30 < A Initial program 61.3%
Simplified87.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -8.5e-85)
(* 180.0 (/ (atan (+ 1.0 (+ 1.0 (+ -1.0 t_0)))) PI))
(if (<= B -2e-144)
(/ (* 180.0 (atan (+ (/ (- A A) B) (* -0.5 (/ B C))))) PI)
(if (<= B 1.32e-279)
(* 180.0 (* (atan (+ 1.0 t_0)) (/ 1.0 PI)))
(if (<= B 4.3e-188)
(/ (* 180.0 (atan (* 0.5 (/ (+ B (/ (* B C) A)) A)))) PI)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -8.5e-85) {
tmp = 180.0 * (atan((1.0 + (1.0 + (-1.0 + t_0)))) / ((double) M_PI));
} else if (B <= -2e-144) {
tmp = (180.0 * atan((((A - A) / B) + (-0.5 * (B / C))))) / ((double) M_PI);
} else if (B <= 1.32e-279) {
tmp = 180.0 * (atan((1.0 + t_0)) * (1.0 / ((double) M_PI)));
} else if (B <= 4.3e-188) {
tmp = (180.0 * atan((0.5 * ((B + ((B * C) / A)) / A)))) / ((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 = (C - A) / B;
double tmp;
if (B <= -8.5e-85) {
tmp = 180.0 * (Math.atan((1.0 + (1.0 + (-1.0 + t_0)))) / Math.PI);
} else if (B <= -2e-144) {
tmp = (180.0 * Math.atan((((A - A) / B) + (-0.5 * (B / C))))) / Math.PI;
} else if (B <= 1.32e-279) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) * (1.0 / Math.PI));
} else if (B <= 4.3e-188) {
tmp = (180.0 * Math.atan((0.5 * ((B + ((B * C) / A)) / A)))) / 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 = (C - A) / B tmp = 0 if B <= -8.5e-85: tmp = 180.0 * (math.atan((1.0 + (1.0 + (-1.0 + t_0)))) / math.pi) elif B <= -2e-144: tmp = (180.0 * math.atan((((A - A) / B) + (-0.5 * (B / C))))) / math.pi elif B <= 1.32e-279: tmp = 180.0 * (math.atan((1.0 + t_0)) * (1.0 / math.pi)) elif B <= 4.3e-188: tmp = (180.0 * math.atan((0.5 * ((B + ((B * C) / A)) / A)))) / 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(Float64(C - A) / B) tmp = 0.0 if (B <= -8.5e-85) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(1.0 + Float64(-1.0 + t_0)))) / pi)); elseif (B <= -2e-144) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(A - A) / B) + Float64(-0.5 * Float64(B / C))))) / pi); elseif (B <= 1.32e-279) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) * Float64(1.0 / pi))); elseif (B <= 4.3e-188) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(Float64(B + Float64(Float64(B * C) / A)) / A)))) / 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 = (C - A) / B; tmp = 0.0; if (B <= -8.5e-85) tmp = 180.0 * (atan((1.0 + (1.0 + (-1.0 + t_0)))) / pi); elseif (B <= -2e-144) tmp = (180.0 * atan((((A - A) / B) + (-0.5 * (B / C))))) / pi; elseif (B <= 1.32e-279) tmp = 180.0 * (atan((1.0 + t_0)) * (1.0 / pi)); elseif (B <= 4.3e-188) tmp = (180.0 * atan((0.5 * ((B + ((B * C) / A)) / A)))) / 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[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -8.5e-85], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(1.0 + N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-144], N[(N[(180.0 * N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.32e-279], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.3e-188], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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{C - A}{B}\\
\mathbf{if}\;B \leq -8.5 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \left(1 + \left(-1 + t\_0\right)\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-144}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.32 \cdot 10^{-279}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + t\_0\right) \cdot \frac{1}{\pi}\right)\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-188}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B + \frac{B \cdot C}{A}}{A}\right)}{\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.50000000000000052e-85Initial program 48.4%
Taylor expanded in B around -inf 76.2%
associate--l+76.2%
div-sub76.2%
Simplified76.2%
expm1-log1p-u75.7%
log1p-define75.7%
expm1-undefine75.7%
add-exp-log76.2%
Applied egg-rr76.2%
associate--l+76.2%
Simplified76.2%
if -8.50000000000000052e-85 < B < -1.9999999999999999e-144Initial program 29.3%
associate-*r/29.3%
associate-*l/29.3%
*-un-lft-identity29.3%
unpow229.3%
unpow229.3%
hypot-define72.6%
Applied egg-rr72.6%
Taylor expanded in C around inf 56.6%
if -1.9999999999999999e-144 < B < 1.31999999999999996e-279Initial program 74.2%
Taylor expanded in B around -inf 64.5%
associate--l+64.5%
div-sub70.6%
Simplified70.6%
div-inv70.6%
Applied egg-rr70.6%
if 1.31999999999999996e-279 < B < 4.29999999999999988e-188Initial program 47.7%
associate-*r/47.7%
associate-*l/47.7%
*-un-lft-identity47.7%
unpow247.7%
unpow247.7%
hypot-define71.9%
Applied egg-rr71.9%
Taylor expanded in A around -inf 65.9%
mul-1-neg65.9%
distribute-neg-frac265.9%
distribute-lft-out65.9%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in B around 0 65.9%
if 4.29999999999999988e-188 < B Initial program 53.7%
Taylor expanded in B around inf 74.6%
Final simplification72.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -8.5e-85)
(* 180.0 (/ (atan (+ 1.0 (+ 1.0 (+ -1.0 t_0)))) PI))
(if (<= B -2e-144)
(* 180.0 (/ (atan (+ (/ (- A A) B) (* -0.5 (/ B C)))) PI))
(if (<= B 1.5e-281)
(* 180.0 (* (atan (+ 1.0 t_0)) (/ 1.0 PI)))
(if (<= B 2.15e-187)
(/ (* 180.0 (atan (* 0.5 (/ (+ B (/ (* B C) A)) A)))) PI)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -8.5e-85) {
tmp = 180.0 * (atan((1.0 + (1.0 + (-1.0 + t_0)))) / ((double) M_PI));
} else if (B <= -2e-144) {
tmp = 180.0 * (atan((((A - A) / B) + (-0.5 * (B / C)))) / ((double) M_PI));
} else if (B <= 1.5e-281) {
tmp = 180.0 * (atan((1.0 + t_0)) * (1.0 / ((double) M_PI)));
} else if (B <= 2.15e-187) {
tmp = (180.0 * atan((0.5 * ((B + ((B * C) / A)) / A)))) / ((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 = (C - A) / B;
double tmp;
if (B <= -8.5e-85) {
tmp = 180.0 * (Math.atan((1.0 + (1.0 + (-1.0 + t_0)))) / Math.PI);
} else if (B <= -2e-144) {
tmp = 180.0 * (Math.atan((((A - A) / B) + (-0.5 * (B / C)))) / Math.PI);
} else if (B <= 1.5e-281) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) * (1.0 / Math.PI));
} else if (B <= 2.15e-187) {
tmp = (180.0 * Math.atan((0.5 * ((B + ((B * C) / A)) / A)))) / 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 = (C - A) / B tmp = 0 if B <= -8.5e-85: tmp = 180.0 * (math.atan((1.0 + (1.0 + (-1.0 + t_0)))) / math.pi) elif B <= -2e-144: tmp = 180.0 * (math.atan((((A - A) / B) + (-0.5 * (B / C)))) / math.pi) elif B <= 1.5e-281: tmp = 180.0 * (math.atan((1.0 + t_0)) * (1.0 / math.pi)) elif B <= 2.15e-187: tmp = (180.0 * math.atan((0.5 * ((B + ((B * C) / A)) / A)))) / 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(Float64(C - A) / B) tmp = 0.0 if (B <= -8.5e-85) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(1.0 + Float64(-1.0 + t_0)))) / pi)); elseif (B <= -2e-144) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(A - A) / B) + Float64(-0.5 * Float64(B / C)))) / pi)); elseif (B <= 1.5e-281) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) * Float64(1.0 / pi))); elseif (B <= 2.15e-187) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(Float64(B + Float64(Float64(B * C) / A)) / A)))) / 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 = (C - A) / B; tmp = 0.0; if (B <= -8.5e-85) tmp = 180.0 * (atan((1.0 + (1.0 + (-1.0 + t_0)))) / pi); elseif (B <= -2e-144) tmp = 180.0 * (atan((((A - A) / B) + (-0.5 * (B / C)))) / pi); elseif (B <= 1.5e-281) tmp = 180.0 * (atan((1.0 + t_0)) * (1.0 / pi)); elseif (B <= 2.15e-187) tmp = (180.0 * atan((0.5 * ((B + ((B * C) / A)) / A)))) / 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[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -8.5e-85], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(1.0 + N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-144], N[(180.0 * N[(N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.5e-281], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.15e-187], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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{C - A}{B}\\
\mathbf{if}\;B \leq -8.5 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \left(1 + \left(-1 + t\_0\right)\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + t\_0\right) \cdot \frac{1}{\pi}\right)\\
\mathbf{elif}\;B \leq 2.15 \cdot 10^{-187}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B + \frac{B \cdot C}{A}}{A}\right)}{\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.50000000000000052e-85Initial program 48.4%
Taylor expanded in B around -inf 76.2%
associate--l+76.2%
div-sub76.2%
Simplified76.2%
expm1-log1p-u75.7%
log1p-define75.7%
expm1-undefine75.7%
add-exp-log76.2%
Applied egg-rr76.2%
associate--l+76.2%
Simplified76.2%
if -8.50000000000000052e-85 < B < -1.9999999999999999e-144Initial program 29.3%
Taylor expanded in C around inf 56.4%
if -1.9999999999999999e-144 < B < 1.49999999999999987e-281Initial program 74.2%
Taylor expanded in B around -inf 64.5%
associate--l+64.5%
div-sub70.6%
Simplified70.6%
div-inv70.6%
Applied egg-rr70.6%
if 1.49999999999999987e-281 < B < 2.15e-187Initial program 47.7%
associate-*r/47.7%
associate-*l/47.7%
*-un-lft-identity47.7%
unpow247.7%
unpow247.7%
hypot-define71.9%
Applied egg-rr71.9%
Taylor expanded in A around -inf 65.9%
mul-1-neg65.9%
distribute-neg-frac265.9%
distribute-lft-out65.9%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in B around 0 65.9%
if 2.15e-187 < B Initial program 53.7%
Taylor expanded in B around inf 74.6%
Final simplification72.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))))
(if (<= A -1.75e-46)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A -1.8e-306)
t_0
(if (<= A 1.2e-196)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 1.95e-76) t_0 (* (/ (atan (+ 1.0 (/ A B))) PI) -180.0)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double tmp;
if (A <= -1.75e-46) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= -1.8e-306) {
tmp = t_0;
} else if (A <= 1.2e-196) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 1.95e-76) {
tmp = t_0;
} else {
tmp = (atan((1.0 + (A / B))) / ((double) M_PI)) * -180.0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double tmp;
if (A <= -1.75e-46) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= -1.8e-306) {
tmp = t_0;
} else if (A <= 1.2e-196) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 1.95e-76) {
tmp = t_0;
} else {
tmp = (Math.atan((1.0 + (A / B))) / Math.PI) * -180.0;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) tmp = 0 if A <= -1.75e-46: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= -1.8e-306: tmp = t_0 elif A <= 1.2e-196: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 1.95e-76: tmp = t_0 else: tmp = (math.atan((1.0 + (A / B))) / math.pi) * -180.0 return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) tmp = 0.0 if (A <= -1.75e-46) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= -1.8e-306) tmp = t_0; elseif (A <= 1.2e-196) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 1.95e-76) tmp = t_0; else tmp = Float64(Float64(atan(Float64(1.0 + Float64(A / B))) / pi) * -180.0); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -1.75e-46) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= -1.8e-306) tmp = t_0; elseif (A <= 1.2e-196) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 1.95e-76) tmp = t_0; else tmp = (atan((1.0 + (A / B))) / pi) * -180.0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.75e-46], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.8e-306], t$95$0, If[LessEqual[A, 1.2e-196], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.95e-76], t$95$0, N[(N[(N[ArcTan[N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * -180.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.75 \cdot 10^{-46}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq -1.8 \cdot 10^{-306}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-196}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 1.95 \cdot 10^{-76}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 + \frac{A}{B}\right)}{\pi} \cdot -180\\
\end{array}
\end{array}
if A < -1.7500000000000001e-46Initial program 21.3%
Applied egg-rr53.9%
Taylor expanded in A around -inf 66.8%
mul-1-neg66.8%
distribute-neg-frac266.8%
distribute-lft-out66.8%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in B around 0 66.9%
Simplified67.0%
Taylor expanded in C around 0 67.7%
if -1.7500000000000001e-46 < A < -1.79999999999999996e-306 or 1.2000000000000001e-196 < A < 1.95000000000000013e-76Initial program 62.1%
Taylor expanded in B around -inf 64.7%
associate--l+64.7%
div-sub64.7%
Simplified64.7%
Taylor expanded in C around inf 64.7%
if -1.79999999999999996e-306 < A < 1.2000000000000001e-196Initial program 46.9%
Taylor expanded in B around inf 51.8%
if 1.95000000000000013e-76 < A Initial program 67.9%
Taylor expanded in C around 0 67.9%
mul-1-neg67.9%
distribute-neg-frac267.9%
+-commutative67.9%
unpow267.9%
unpow267.9%
hypot-define85.7%
Simplified85.7%
Taylor expanded in A around 0 71.4%
associate-*r/71.4%
distribute-frac-neg271.4%
atan-neg71.4%
Applied egg-rr71.4%
associate-*r/71.4%
*-commutative71.4%
distribute-frac-neg71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
remove-double-neg71.4%
neg-mul-171.4%
sub-neg71.4%
div-sub71.4%
sub-neg71.4%
associate-/l*71.4%
*-inverses71.4%
metadata-eval71.4%
metadata-eval71.4%
metadata-eval71.4%
Simplified71.4%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))))
(if (<= A -2.4e-47)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A -1.45e-306)
t_0
(if (<= A 4.1e-199)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 3.8e-93) t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double tmp;
if (A <= -2.4e-47) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= -1.45e-306) {
tmp = t_0;
} else if (A <= 4.1e-199) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 3.8e-93) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double tmp;
if (A <= -2.4e-47) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= -1.45e-306) {
tmp = t_0;
} else if (A <= 4.1e-199) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 3.8e-93) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) tmp = 0 if A <= -2.4e-47: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= -1.45e-306: tmp = t_0 elif A <= 4.1e-199: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 3.8e-93: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) tmp = 0.0 if (A <= -2.4e-47) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= -1.45e-306) tmp = t_0; elseif (A <= 4.1e-199) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 3.8e-93) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -2.4e-47) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= -1.45e-306) tmp = t_0; elseif (A <= 4.1e-199) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 3.8e-93) tmp = t_0; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.4e-47], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.45e-306], t$95$0, If[LessEqual[A, 4.1e-199], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-93], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -2.4 \cdot 10^{-47}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{-306}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{-199}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.3999999999999999e-47Initial program 21.3%
Applied egg-rr53.9%
Taylor expanded in A around -inf 66.8%
mul-1-neg66.8%
distribute-neg-frac266.8%
distribute-lft-out66.8%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in B around 0 66.9%
Simplified67.0%
Taylor expanded in C around 0 67.7%
if -2.3999999999999999e-47 < A < -1.4499999999999999e-306 or 4.10000000000000022e-199 < A < 3.7999999999999999e-93Initial program 64.5%
Taylor expanded in B around -inf 64.6%
associate--l+64.6%
div-sub64.6%
Simplified64.6%
Taylor expanded in C around inf 64.6%
if -1.4499999999999999e-306 < A < 4.10000000000000022e-199Initial program 46.9%
Taylor expanded in B around inf 51.8%
if 3.7999999999999999e-93 < A Initial program 65.3%
Taylor expanded in C around 0 65.3%
mul-1-neg65.3%
distribute-neg-frac265.3%
+-commutative65.3%
unpow265.3%
unpow265.3%
hypot-define84.6%
Simplified84.6%
Taylor expanded in B around -inf 69.0%
mul-1-neg69.0%
unsub-neg69.0%
Simplified69.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))))
(if (<= A -1.7e-46)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.45e-306)
t_0
(if (<= A 1.92e-199)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 2.6e-93) t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double tmp;
if (A <= -1.7e-46) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.45e-306) {
tmp = t_0;
} else if (A <= 1.92e-199) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 2.6e-93) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double tmp;
if (A <= -1.7e-46) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.45e-306) {
tmp = t_0;
} else if (A <= 1.92e-199) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 2.6e-93) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) tmp = 0 if A <= -1.7e-46: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.45e-306: tmp = t_0 elif A <= 1.92e-199: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 2.6e-93: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) tmp = 0.0 if (A <= -1.7e-46) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.45e-306) tmp = t_0; elseif (A <= 1.92e-199) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 2.6e-93) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -1.7e-46) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.45e-306) tmp = t_0; elseif (A <= 1.92e-199) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 2.6e-93) tmp = t_0; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.7e-46], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.45e-306], t$95$0, If[LessEqual[A, 1.92e-199], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.6e-93], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.7 \cdot 10^{-46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{-306}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 1.92 \cdot 10^{-199}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 2.6 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.69999999999999998e-46Initial program 21.3%
Taylor expanded in A around -inf 67.6%
associate-*r/67.6%
Simplified67.6%
if -1.69999999999999998e-46 < A < -1.4499999999999999e-306 or 1.92000000000000001e-199 < A < 2.5999999999999998e-93Initial program 64.5%
Taylor expanded in B around -inf 64.6%
associate--l+64.6%
div-sub64.6%
Simplified64.6%
Taylor expanded in C around inf 64.6%
if -1.4499999999999999e-306 < A < 1.92000000000000001e-199Initial program 46.9%
Taylor expanded in B around inf 51.8%
if 2.5999999999999998e-93 < A Initial program 65.3%
Taylor expanded in C around 0 65.3%
mul-1-neg65.3%
distribute-neg-frac265.3%
+-commutative65.3%
unpow265.3%
unpow265.3%
hypot-define84.6%
Simplified84.6%
Taylor expanded in B around -inf 69.0%
mul-1-neg69.0%
unsub-neg69.0%
Simplified69.0%
Final simplification66.0%
(FPCore (A B C)
:precision binary64
(if (<= B -5.6e-83)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.3e-148)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B -2.4e-210)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 1.1e-32)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.6e-83) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.3e-148) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= -2.4e-210) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 1.1e-32) {
tmp = 180.0 * (atan((2.0 * (C / 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.6e-83) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.3e-148) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= -2.4e-210) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 1.1e-32) {
tmp = 180.0 * (Math.atan((2.0 * (C / 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.6e-83: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.3e-148: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= -2.4e-210: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 1.1e-32: tmp = 180.0 * (math.atan((2.0 * (C / 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.6e-83) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.3e-148) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= -2.4e-210) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 1.1e-32) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / 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.6e-83) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.3e-148) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= -2.4e-210) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 1.1e-32) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.6e-83], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-148], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.4e-210], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e-32], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.6 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.4 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.6000000000000002e-83Initial program 48.4%
Taylor expanded in B around -inf 61.6%
if -5.6000000000000002e-83 < B < -1.30000000000000004e-148Initial program 28.0%
Taylor expanded in C around inf 44.4%
associate-*r/44.4%
distribute-rgt1-in44.4%
metadata-eval44.4%
mul0-lft44.4%
metadata-eval44.4%
Simplified44.4%
if -1.30000000000000004e-148 < B < -2.40000000000000004e-210Initial program 68.4%
Taylor expanded in A around inf 54.3%
if -2.40000000000000004e-210 < B < 1.1e-32Initial program 67.3%
Taylor expanded in C around -inf 42.2%
if 1.1e-32 < B Initial program 47.5%
Taylor expanded in B around inf 59.4%
Final simplification54.4%
(FPCore (A B C)
:precision binary64
(if (<= B 5.4e-280)
(* 180.0 (/ (atan (+ 1.0 (+ 1.0 (+ -1.0 (/ (- C A) B))))) PI))
(if (<= B 2.15e-187)
(/ (* 180.0 (atan (* 0.5 (/ (+ B (/ (* B C) A)) A)))) PI)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.4e-280) {
tmp = 180.0 * (atan((1.0 + (1.0 + (-1.0 + ((C - A) / B))))) / ((double) M_PI));
} else if (B <= 2.15e-187) {
tmp = (180.0 * atan((0.5 * ((B + ((B * C) / A)) / A)))) / ((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 tmp;
if (B <= 5.4e-280) {
tmp = 180.0 * (Math.atan((1.0 + (1.0 + (-1.0 + ((C - A) / B))))) / Math.PI);
} else if (B <= 2.15e-187) {
tmp = (180.0 * Math.atan((0.5 * ((B + ((B * C) / A)) / A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5.4e-280: tmp = 180.0 * (math.atan((1.0 + (1.0 + (-1.0 + ((C - A) / B))))) / math.pi) elif B <= 2.15e-187: tmp = (180.0 * math.atan((0.5 * ((B + ((B * C) / A)) / A)))) / math.pi else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5.4e-280) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(1.0 + Float64(-1.0 + Float64(Float64(C - A) / B))))) / pi)); elseif (B <= 2.15e-187) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(Float64(B + Float64(Float64(B * C) / A)) / A)))) / 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) tmp = 0.0; if (B <= 5.4e-280) tmp = 180.0 * (atan((1.0 + (1.0 + (-1.0 + ((C - A) / B))))) / pi); elseif (B <= 2.15e-187) tmp = (180.0 * atan((0.5 * ((B + ((B * C) / A)) / A)))) / pi; else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5.4e-280], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(1.0 + N[(-1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.15e-187], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}
\mathbf{if}\;B \leq 5.4 \cdot 10^{-280}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \left(1 + \left(-1 + \frac{C - A}{B}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.15 \cdot 10^{-187}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B + \frac{B \cdot C}{A}}{A}\right)}{\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 < 5.39999999999999967e-280Initial program 52.7%
Taylor expanded in B around -inf 67.8%
associate--l+67.8%
div-sub69.3%
Simplified69.3%
expm1-log1p-u66.3%
log1p-define66.3%
expm1-undefine66.3%
add-exp-log69.3%
Applied egg-rr69.3%
associate--l+69.3%
Simplified69.3%
if 5.39999999999999967e-280 < B < 2.15e-187Initial program 47.7%
associate-*r/47.7%
associate-*l/47.7%
*-un-lft-identity47.7%
unpow247.7%
unpow247.7%
hypot-define71.9%
Applied egg-rr71.9%
Taylor expanded in A around -inf 65.9%
mul-1-neg65.9%
distribute-neg-frac265.9%
distribute-lft-out65.9%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in B around 0 65.9%
if 2.15e-187 < B Initial program 53.7%
Taylor expanded in B around inf 74.6%
Final simplification71.2%
(FPCore (A B C)
:precision binary64
(if (<= B 3.5e-281)
(* 180.0 (/ (atan (+ 1.0 (+ 1.0 (+ -1.0 (/ (- C A) B))))) PI))
(if (<= B 8.5e-188)
(* 180.0 (/ (atan (* 0.5 (/ (+ B (/ (* B C) A)) A))) PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.5e-281) {
tmp = 180.0 * (atan((1.0 + (1.0 + (-1.0 + ((C - A) / B))))) / ((double) M_PI));
} else if (B <= 8.5e-188) {
tmp = 180.0 * (atan((0.5 * ((B + ((B * C) / A)) / A))) / ((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 tmp;
if (B <= 3.5e-281) {
tmp = 180.0 * (Math.atan((1.0 + (1.0 + (-1.0 + ((C - A) / B))))) / Math.PI);
} else if (B <= 8.5e-188) {
tmp = 180.0 * (Math.atan((0.5 * ((B + ((B * C) / A)) / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.5e-281: tmp = 180.0 * (math.atan((1.0 + (1.0 + (-1.0 + ((C - A) / B))))) / math.pi) elif B <= 8.5e-188: tmp = 180.0 * (math.atan((0.5 * ((B + ((B * C) / A)) / A))) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.5e-281) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(1.0 + Float64(-1.0 + Float64(Float64(C - A) / B))))) / pi)); elseif (B <= 8.5e-188) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(Float64(B * C) / A)) / A))) / 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) tmp = 0.0; if (B <= 3.5e-281) tmp = 180.0 * (atan((1.0 + (1.0 + (-1.0 + ((C - A) / B))))) / pi); elseif (B <= 8.5e-188) tmp = 180.0 * (atan((0.5 * ((B + ((B * C) / A)) / A))) / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.5e-281], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(1.0 + N[(-1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-188], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(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}
\mathbf{if}\;B \leq 3.5 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \left(1 + \left(-1 + \frac{C - A}{B}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-188}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B + \frac{B \cdot C}{A}}{A}\right)}{\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 < 3.50000000000000022e-281Initial program 52.7%
Taylor expanded in B around -inf 67.8%
associate--l+67.8%
div-sub69.3%
Simplified69.3%
expm1-log1p-u66.3%
log1p-define66.3%
expm1-undefine66.3%
add-exp-log69.3%
Applied egg-rr69.3%
associate--l+69.3%
Simplified69.3%
if 3.50000000000000022e-281 < B < 8.5000000000000004e-188Initial program 47.7%
Applied egg-rr71.9%
Taylor expanded in A around -inf 65.9%
mul-1-neg65.9%
distribute-neg-frac265.9%
distribute-lft-out65.9%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in B around 0 65.8%
if 8.5000000000000004e-188 < B Initial program 53.7%
Taylor expanded in B around inf 74.6%
Final simplification71.2%
(FPCore (A B C)
:precision binary64
(if (<= B 2.15e-278)
(* 180.0 (* (atan (+ 1.0 (/ (- C A) B))) (/ 1.0 PI)))
(if (<= B 5.6e-188)
(* 180.0 (/ (atan (* 0.5 (/ (+ B (/ (* B C) A)) A))) PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2.15e-278) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / ((double) M_PI)));
} else if (B <= 5.6e-188) {
tmp = 180.0 * (atan((0.5 * ((B + ((B * C) / A)) / A))) / ((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 tmp;
if (B <= 2.15e-278) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) * (1.0 / Math.PI));
} else if (B <= 5.6e-188) {
tmp = 180.0 * (Math.atan((0.5 * ((B + ((B * C) / A)) / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2.15e-278: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) * (1.0 / math.pi)) elif B <= 5.6e-188: tmp = 180.0 * (math.atan((0.5 * ((B + ((B * C) / A)) / A))) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2.15e-278) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) * Float64(1.0 / pi))); elseif (B <= 5.6e-188) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(Float64(B * C) / A)) / A))) / 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) tmp = 0.0; if (B <= 2.15e-278) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / pi)); elseif (B <= 5.6e-188) tmp = 180.0 * (atan((0.5 * ((B + ((B * C) / A)) / A))) / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2.15e-278], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.6e-188], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(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}
\mathbf{if}\;B \leq 2.15 \cdot 10^{-278}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot \frac{1}{\pi}\right)\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-188}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B + \frac{B \cdot C}{A}}{A}\right)}{\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 < 2.15e-278Initial program 52.7%
Taylor expanded in B around -inf 67.8%
associate--l+67.8%
div-sub69.3%
Simplified69.3%
div-inv69.3%
Applied egg-rr69.3%
if 2.15e-278 < B < 5.6000000000000002e-188Initial program 47.7%
Applied egg-rr71.9%
Taylor expanded in A around -inf 65.9%
mul-1-neg65.9%
distribute-neg-frac265.9%
distribute-lft-out65.9%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in B around 0 65.8%
if 5.6000000000000002e-188 < B Initial program 53.7%
Taylor expanded in B around inf 74.6%
Final simplification71.2%
(FPCore (A B C)
:precision binary64
(if (<= B 2.9e-211)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B 1.06e-150)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= B 1.3e-26)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2.9e-211) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= 1.06e-150) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (B <= 1.3e-26) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2.9e-211) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= 1.06e-150) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (B <= 1.3e-26) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2.9e-211: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= 1.06e-150: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif B <= 1.3e-26: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2.9e-211) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= 1.06e-150) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (B <= 1.3e-26) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2.9e-211) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= 1.06e-150) tmp = 180.0 * (atan((A / -B)) / pi); elseif (B <= 1.3e-26) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2.9e-211], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.06e-150], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-26], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / 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 2.9 \cdot 10^{-211}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.06 \cdot 10^{-150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-26}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 2.90000000000000014e-211Initial program 52.6%
Taylor expanded in B around -inf 65.5%
associate--l+65.5%
div-sub66.9%
Simplified66.9%
Taylor expanded in C around inf 57.2%
if 2.90000000000000014e-211 < B < 1.05999999999999996e-150Initial program 60.8%
Taylor expanded in C around 0 68.9%
mul-1-neg68.9%
distribute-neg-frac268.9%
+-commutative68.9%
unpow268.9%
unpow268.9%
hypot-define68.9%
Simplified68.9%
Taylor expanded in A around 0 59.4%
Taylor expanded in A around inf 59.4%
associate-*r/59.4%
mul-1-neg59.4%
Simplified59.4%
if 1.05999999999999996e-150 < B < 1.30000000000000005e-26Initial program 68.2%
Taylor expanded in C around -inf 44.9%
if 1.30000000000000005e-26 < B Initial program 47.5%
Taylor expanded in B around inf 59.4%
Final simplification57.0%
(FPCore (A B C)
:precision binary64
(if (<= B -8.5e-85)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.15e-146)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4.6e-134)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.5e-85) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.15e-146) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4.6e-134) {
tmp = 180.0 * (atan(((A / B) * -2.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 <= -8.5e-85) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.15e-146) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4.6e-134) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.5e-85: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.15e-146: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4.6e-134: tmp = 180.0 * (math.atan(((A / B) * -2.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 <= -8.5e-85) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.15e-146) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4.6e-134) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.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 <= -8.5e-85) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.15e-146) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4.6e-134) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.5e-85], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.15e-146], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e-134], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $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 -8.5 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.15 \cdot 10^{-146}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.50000000000000052e-85Initial program 48.4%
Taylor expanded in B around -inf 61.6%
if -8.50000000000000052e-85 < B < -1.15e-146Initial program 28.0%
Taylor expanded in C around inf 44.4%
associate-*r/44.4%
distribute-rgt1-in44.4%
metadata-eval44.4%
mul0-lft44.4%
metadata-eval44.4%
Simplified44.4%
if -1.15e-146 < B < 4.6000000000000001e-134Initial program 65.6%
Taylor expanded in A around inf 38.3%
if 4.6000000000000001e-134 < B Initial program 52.4%
Taylor expanded in B around inf 53.6%
Final simplification51.9%
(FPCore (A B C)
:precision binary64
(if (<= B -2.1e-83)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.02e-145)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4.8e-134)
(* 180.0 (/ (atan (/ A (- B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-83) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.02e-145) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4.8e-134) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-83) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.02e-145) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4.8e-134) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.1e-83: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.02e-145: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4.8e-134: tmp = 180.0 * (math.atan((A / -B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.1e-83) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.02e-145) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4.8e-134) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.1e-83) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.02e-145) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4.8e-134) tmp = 180.0 * (atan((A / -B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.1e-83], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.02e-145], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-134], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.1 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.02 \cdot 10^{-145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.0999999999999999e-83Initial program 48.4%
Taylor expanded in B around -inf 61.6%
if -2.0999999999999999e-83 < B < -1.01999999999999993e-145Initial program 28.0%
Taylor expanded in C around inf 44.4%
associate-*r/44.4%
distribute-rgt1-in44.4%
metadata-eval44.4%
mul0-lft44.4%
metadata-eval44.4%
Simplified44.4%
if -1.01999999999999993e-145 < B < 4.80000000000000019e-134Initial program 65.6%
Taylor expanded in C around 0 50.1%
mul-1-neg50.1%
distribute-neg-frac250.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-define55.6%
Simplified55.6%
Taylor expanded in A around 0 38.4%
Taylor expanded in A around inf 38.3%
associate-*r/38.3%
mul-1-neg38.3%
Simplified38.3%
if 4.80000000000000019e-134 < B Initial program 52.4%
Taylor expanded in B around inf 53.6%
Final simplification51.9%
(FPCore (A B C) :precision binary64 (if (<= B 5e-150) (* 180.0 (* (atan (+ 1.0 (/ (- C A) B))) (/ 1.0 PI))) (* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5e-150) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.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 tmp;
if (B <= 5e-150) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) * (1.0 / Math.PI));
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5e-150: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) * (1.0 / math.pi)) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5e-150) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) * Float64(1.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) tmp = 0.0; if (B <= 5e-150) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / pi)); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5e-150], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $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}
\mathbf{if}\;B \leq 5 \cdot 10^{-150}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot \frac{1}{\pi}\right)\\
\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 < 4.9999999999999999e-150Initial program 52.6%
Taylor expanded in B around -inf 63.6%
associate--l+63.6%
div-sub65.5%
Simplified65.5%
div-inv65.5%
Applied egg-rr65.5%
if 4.9999999999999999e-150 < B Initial program 52.8%
Taylor expanded in B around inf 75.5%
Final simplification69.4%
(FPCore (A B C) :precision binary64 (if (<= B 3.5e-34) (* 180.0 (* (atan (+ 1.0 (/ (- C A) B))) (/ 1.0 PI))) (* (/ (atan (+ 1.0 (/ A B))) PI) -180.0)))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.5e-34) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / ((double) M_PI)));
} else {
tmp = (atan((1.0 + (A / B))) / ((double) M_PI)) * -180.0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.5e-34) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) * (1.0 / Math.PI));
} else {
tmp = (Math.atan((1.0 + (A / B))) / Math.PI) * -180.0;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.5e-34: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) * (1.0 / math.pi)) else: tmp = (math.atan((1.0 + (A / B))) / math.pi) * -180.0 return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.5e-34) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) * Float64(1.0 / pi))); else tmp = Float64(Float64(atan(Float64(1.0 + Float64(A / B))) / pi) * -180.0); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.5e-34) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) * (1.0 / pi)); else tmp = (atan((1.0 + (A / B))) / pi) * -180.0; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.5e-34], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * -180.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.5 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(1 + \frac{C - A}{B}\right) \cdot \frac{1}{\pi}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 + \frac{A}{B}\right)}{\pi} \cdot -180\\
\end{array}
\end{array}
if B < 3.5e-34Initial program 54.8%
Taylor expanded in B around -inf 62.9%
associate--l+62.9%
div-sub64.6%
Simplified64.6%
div-inv64.6%
Applied egg-rr64.6%
if 3.5e-34 < B Initial program 48.2%
Taylor expanded in C around 0 46.2%
mul-1-neg46.2%
distribute-neg-frac246.2%
+-commutative46.2%
unpow246.2%
unpow246.2%
hypot-define74.7%
Simplified74.7%
Taylor expanded in A around 0 72.7%
associate-*r/72.7%
distribute-frac-neg272.7%
atan-neg72.7%
Applied egg-rr72.7%
associate-*r/72.7%
*-commutative72.7%
distribute-frac-neg72.7%
distribute-lft-neg-out72.7%
distribute-rgt-neg-in72.7%
remove-double-neg72.7%
neg-mul-172.7%
sub-neg72.7%
div-sub72.7%
sub-neg72.7%
associate-/l*72.7%
*-inverses72.7%
metadata-eval72.7%
metadata-eval72.7%
metadata-eval72.7%
Simplified72.7%
Final simplification67.1%
(FPCore (A B C)
:precision binary64
(if (<= B -4.8e-82)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.8e-145)
(* 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 <= -4.8e-82) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.8e-145) {
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 <= -4.8e-82) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.8e-145) {
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 <= -4.8e-82: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.8e-145: 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 <= -4.8e-82) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.8e-145) 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 <= -4.8e-82) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.8e-145) 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, -4.8e-82], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.8e-145], 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 -4.8 \cdot 10^{-82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.8 \cdot 10^{-145}:\\
\;\;\;\;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 < -4.80000000000000017e-82Initial program 48.4%
Taylor expanded in B around -inf 61.6%
if -4.80000000000000017e-82 < B < 5.79999999999999968e-145Initial program 57.3%
Taylor expanded in C around inf 28.9%
associate-*r/28.9%
distribute-rgt1-in28.9%
metadata-eval28.9%
mul0-lft28.9%
metadata-eval28.9%
Simplified28.9%
if 5.79999999999999968e-145 < B Initial program 52.8%
Taylor expanded in B around inf 53.3%
(FPCore (A B C) :precision binary64 (if (<= B 1.5e-37) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* (/ (atan (+ 1.0 (/ A B))) PI) -180.0)))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.5e-37) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = (atan((1.0 + (A / B))) / ((double) M_PI)) * -180.0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.5e-37) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = (Math.atan((1.0 + (A / B))) / Math.PI) * -180.0;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.5e-37: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = (math.atan((1.0 + (A / B))) / math.pi) * -180.0 return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.5e-37) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(atan(Float64(1.0 + Float64(A / B))) / pi) * -180.0); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.5e-37) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (atan((1.0 + (A / B))) / pi) * -180.0; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.5e-37], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * -180.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.5 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(1 + \frac{A}{B}\right)}{\pi} \cdot -180\\
\end{array}
\end{array}
if B < 1.5e-37Initial program 55.1%
Taylor expanded in B around -inf 63.2%
associate--l+63.2%
div-sub64.9%
Simplified64.9%
if 1.5e-37 < B Initial program 47.6%
Taylor expanded in C around 0 45.7%
mul-1-neg45.7%
distribute-neg-frac245.7%
+-commutative45.7%
unpow245.7%
unpow245.7%
hypot-define73.9%
Simplified73.9%
Taylor expanded in A around 0 71.8%
associate-*r/71.8%
distribute-frac-neg271.8%
atan-neg71.8%
Applied egg-rr71.8%
associate-*r/71.8%
*-commutative71.8%
distribute-frac-neg71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
remove-double-neg71.8%
neg-mul-171.8%
sub-neg71.8%
div-sub71.8%
sub-neg71.8%
associate-/l*71.8%
*-inverses71.8%
metadata-eval71.8%
metadata-eval71.8%
metadata-eval71.8%
Simplified71.8%
Final simplification67.1%
(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 51.6%
Taylor expanded in B around -inf 46.5%
if -1.999999999999994e-310 < B Initial program 53.8%
Taylor expanded in B around inf 42.6%
(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.7%
Taylor expanded in B around inf 22.7%
herbie shell --seed 2024089
(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)))