
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -3.7e+46) (/ 1.0 (/ (/ PI 180.0) (atan (* 0.5 (/ B A))))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.7e+46) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.7e+46) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.7e+46: tmp = 1.0 / ((math.pi / 180.0) / math.atan((0.5 * (B / A)))) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.7e+46) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.7e+46) tmp = 1.0 / ((pi / 180.0) / atan((0.5 * (B / A)))); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.7e+46], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.7 \cdot 10^{+46}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.6999999999999999e46Initial program 23.5%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
associate-*r/77.5%
*-commutative77.5%
Applied egg-rr77.5%
clear-num77.5%
inv-pow77.5%
associate-/l*77.5%
Applied egg-rr77.5%
unpow-177.5%
associate-/r*77.6%
associate-/r/77.6%
*-commutative77.6%
Simplified77.6%
if -3.6999999999999999e46 < A Initial program 63.2%
Simplified86.4%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.6e+46)
(/ 1.0 (/ (/ PI 180.0) (atan (* 0.5 (/ B A)))))
(if (<= A 2.3e+46)
(* 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.6e+46) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((0.5 * (B / A))));
} else if (A <= 2.3e+46) {
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.6e+46) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((0.5 * (B / A))));
} else if (A <= 2.3e+46) {
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.6e+46: tmp = 1.0 / ((math.pi / 180.0) / math.atan((0.5 * (B / A)))) elif A <= 2.3e+46: 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.6e+46) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 2.3e+46) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.6e+46) tmp = 1.0 / ((pi / 180.0) / atan((0.5 * (B / A)))); elseif (A <= 2.3e+46) 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.6e+46], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.3e+46], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.6 \cdot 10^{+46}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.5999999999999999e46Initial program 23.5%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
associate-*r/77.5%
*-commutative77.5%
Applied egg-rr77.5%
clear-num77.5%
inv-pow77.5%
associate-/l*77.5%
Applied egg-rr77.5%
unpow-177.5%
associate-/r*77.6%
associate-/r/77.6%
*-commutative77.6%
Simplified77.6%
if -1.5999999999999999e46 < A < 2.3000000000000001e46Initial program 57.3%
Taylor expanded in A around 0 54.5%
unpow254.5%
unpow254.5%
hypot-def80.0%
Simplified80.0%
if 2.3000000000000001e46 < A Initial program 79.4%
Taylor expanded in C around 0 77.9%
associate-*r/77.9%
mul-1-neg77.9%
+-commutative77.9%
unpow277.9%
unpow277.9%
hypot-def88.1%
Simplified88.1%
Final simplification81.2%
(FPCore (A B C)
:precision binary64
(if (<= A -3.3e+46)
(/ 1.0 (/ (/ PI 180.0) (atan (* 0.5 (/ B A)))))
(if (<= A 3.3e+46)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.3e+46) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((0.5 * (B / A))));
} else if (A <= 3.3e+46) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.3e+46) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((0.5 * (B / A))));
} else if (A <= 3.3e+46) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.3e+46: tmp = 1.0 / ((math.pi / 180.0) / math.atan((0.5 * (B / A)))) elif A <= 3.3e+46: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.3e+46) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 3.3e+46) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.3e+46) tmp = 1.0 / ((pi / 180.0) / atan((0.5 * (B / A)))); elseif (A <= 3.3e+46) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.3e+46], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.3e+46], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.3 \cdot 10^{+46}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 3.3 \cdot 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.2999999999999998e46Initial program 23.5%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
associate-*r/77.5%
*-commutative77.5%
Applied egg-rr77.5%
clear-num77.5%
inv-pow77.5%
associate-/l*77.5%
Applied egg-rr77.5%
unpow-177.5%
associate-/r*77.6%
associate-/r/77.6%
*-commutative77.6%
Simplified77.6%
if -3.2999999999999998e46 < A < 3.2999999999999998e46Initial program 57.3%
Taylor expanded in A around 0 54.5%
unpow254.5%
unpow254.5%
hypot-def80.0%
Simplified80.0%
if 3.2999999999999998e46 < A Initial program 79.4%
Simplified96.3%
Taylor expanded in B around -inf 84.3%
neg-mul-184.3%
unsub-neg84.3%
Simplified84.3%
Final simplification80.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e+37)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.4e-239)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 2.45e-157)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 1.86e+31)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e+37) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.4e-239) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 2.45e-157) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 1.86e+31) {
tmp = 180.0 * (atan(((C / 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 <= -1.15e+37) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.4e-239) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 2.45e-157) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 1.86e+31) {
tmp = 180.0 * (Math.atan(((C / 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 <= -1.15e+37: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.4e-239: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 2.45e-157: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 1.86e+31: tmp = 180.0 * (math.atan(((C / 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 <= -1.15e+37) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.4e-239) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 2.45e-157) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 1.86e+31) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / 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 <= -1.15e+37) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.4e-239) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 2.45e-157) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 1.86e+31) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e+37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.4e-239], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.45e-157], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.86e+31], N[(180.0 * N[(N[ArcTan[N[(N[(C / 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 -1.15 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.4 \cdot 10^{-239}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.45 \cdot 10^{-157}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.86 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.15000000000000001e37Initial program 49.5%
Taylor expanded in B around -inf 63.9%
if -1.15000000000000001e37 < B < -2.39999999999999993e-239Initial program 64.1%
Taylor expanded in A around inf 47.6%
if -2.39999999999999993e-239 < B < 2.4499999999999999e-157Initial program 50.1%
associate--l-45.1%
+-commutative45.1%
unpow245.1%
unpow245.1%
hypot-udef63.6%
*-commutative63.6%
div-inv63.6%
associate--r+79.5%
div-sub42.6%
Applied egg-rr42.6%
Taylor expanded in C around inf 15.6%
distribute-lft1-in15.6%
metadata-eval15.6%
mul0-lft39.2%
metadata-eval39.2%
Simplified39.2%
if 2.4499999999999999e-157 < B < 1.86000000000000008e31Initial program 72.6%
Taylor expanded in C around -inf 47.8%
if 1.86000000000000008e31 < B Initial program 45.2%
Taylor expanded in B around inf 63.0%
Final simplification53.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
(if (<= A -2.2e+45)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 1e-292)
t_0
(if (<= A 3e-36)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 28500000.0) t_0 (* 180.0 (/ (atan (/ (- B A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
double tmp;
if (A <= -2.2e+45) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 1e-292) {
tmp = t_0;
} else if (A <= 3e-36) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 28500000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
double tmp;
if (A <= -2.2e+45) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 1e-292) {
tmp = t_0;
} else if (A <= 3e-36) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 28500000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) tmp = 0 if A <= -2.2e+45: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 1e-292: tmp = t_0 elif A <= 3e-36: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 28500000.0: tmp = t_0 else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)) tmp = 0.0 if (A <= -2.2e+45) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 1e-292) tmp = t_0; elseif (A <= 3e-36) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 28500000.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C / B) + -1.0)) / pi); tmp = 0.0; if (A <= -2.2e+45) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 1e-292) tmp = t_0; elseif (A <= 3e-36) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 28500000.0) tmp = t_0; else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.2e+45], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1e-292], t$95$0, If[LessEqual[A, 3e-36], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 28500000.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{if}\;A \leq -2.2 \cdot 10^{+45}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 10^{-292}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 28500000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.2e45Initial program 23.5%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
if -2.2e45 < A < 1.0000000000000001e-292 or 3.0000000000000002e-36 < A < 2.85e7Initial program 55.7%
Taylor expanded in A around 0 55.1%
unpow255.1%
unpow255.1%
hypot-def77.5%
Simplified77.5%
Taylor expanded in C around 0 59.6%
if 1.0000000000000001e-292 < A < 3.0000000000000002e-36Initial program 60.2%
Taylor expanded in A around 0 55.5%
unpow255.5%
unpow255.5%
hypot-def83.5%
Simplified83.5%
Taylor expanded in B around -inf 56.7%
if 2.85e7 < A Initial program 75.9%
Simplified95.2%
Taylor expanded in B around -inf 81.3%
neg-mul-181.3%
unsub-neg81.3%
Simplified81.3%
Taylor expanded in C around 0 78.5%
Final simplification67.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
(if (<= A -9.5e+45)
(/ (* 180.0 (atan (/ (* 0.5 B) A))) PI)
(if (<= A 1.6e-294)
t_0
(if (<= A 4.5e-37)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 11.2) t_0 (* 180.0 (/ (atan (/ (- B A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
double tmp;
if (A <= -9.5e+45) {
tmp = (180.0 * atan(((0.5 * B) / A))) / ((double) M_PI);
} else if (A <= 1.6e-294) {
tmp = t_0;
} else if (A <= 4.5e-37) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 11.2) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
double tmp;
if (A <= -9.5e+45) {
tmp = (180.0 * Math.atan(((0.5 * B) / A))) / Math.PI;
} else if (A <= 1.6e-294) {
tmp = t_0;
} else if (A <= 4.5e-37) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 11.2) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) tmp = 0 if A <= -9.5e+45: tmp = (180.0 * math.atan(((0.5 * B) / A))) / math.pi elif A <= 1.6e-294: tmp = t_0 elif A <= 4.5e-37: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 11.2: tmp = t_0 else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)) tmp = 0.0 if (A <= -9.5e+45) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * B) / A))) / pi); elseif (A <= 1.6e-294) tmp = t_0; elseif (A <= 4.5e-37) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 11.2) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C / B) + -1.0)) / pi); tmp = 0.0; if (A <= -9.5e+45) tmp = (180.0 * atan(((0.5 * B) / A))) / pi; elseif (A <= 1.6e-294) tmp = t_0; elseif (A <= 4.5e-37) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 11.2) tmp = t_0; else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -9.5e+45], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.6e-294], t$95$0, If[LessEqual[A, 4.5e-37], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 11.2], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{if}\;A \leq -9.5 \cdot 10^{+45}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.6 \cdot 10^{-294}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 11.2:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.4999999999999998e45Initial program 23.5%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
associate-*r/77.5%
*-commutative77.5%
Applied egg-rr77.5%
if -9.4999999999999998e45 < A < 1.6000000000000001e-294 or 4.5000000000000004e-37 < A < 11.199999999999999Initial program 55.7%
Taylor expanded in A around 0 55.1%
unpow255.1%
unpow255.1%
hypot-def77.5%
Simplified77.5%
Taylor expanded in C around 0 59.6%
if 1.6000000000000001e-294 < A < 4.5000000000000004e-37Initial program 60.2%
Taylor expanded in A around 0 55.5%
unpow255.5%
unpow255.5%
hypot-def83.5%
Simplified83.5%
Taylor expanded in B around -inf 56.7%
if 11.199999999999999 < A Initial program 75.9%
Simplified95.2%
Taylor expanded in B around -inf 81.3%
neg-mul-181.3%
unsub-neg81.3%
Simplified81.3%
Taylor expanded in C around 0 78.5%
Final simplification67.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e+37)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (or (<= B 7.2e-276) (not (<= B 1.95e-100)))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))
(/ (* 180.0 (atan (/ (* 0.5 B) A))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e+37) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if ((B <= 7.2e-276) || !(B <= 1.95e-100)) {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((0.5 * B) / A))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e+37) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if ((B <= 7.2e-276) || !(B <= 1.95e-100)) {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((0.5 * B) / A))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.15e+37: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif (B <= 7.2e-276) or not (B <= 1.95e-100): tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) else: tmp = (180.0 * math.atan(((0.5 * B) / A))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.15e+37) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif ((B <= 7.2e-276) || !(B <= 1.95e-100)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * B) / A))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.15e+37) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif ((B <= 7.2e-276) || ~((B <= 1.95e-100))) tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); else tmp = (180.0 * atan(((0.5 * B) / A))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e+37], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 7.2e-276], N[Not[LessEqual[B, 1.95e-100]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.15 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-276} \lor \neg \left(B \leq 1.95 \cdot 10^{-100}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.15000000000000001e37Initial program 49.5%
Taylor expanded in A around 0 46.7%
unpow246.7%
unpow246.7%
hypot-def77.8%
Simplified77.8%
Taylor expanded in B around -inf 77.7%
if -1.15000000000000001e37 < B < 7.19999999999999988e-276 or 1.94999999999999989e-100 < B Initial program 59.1%
Simplified77.2%
Taylor expanded in B around inf 68.9%
+-commutative68.9%
Simplified68.9%
if 7.19999999999999988e-276 < B < 1.94999999999999989e-100Initial program 44.8%
Taylor expanded in A around -inf 52.7%
associate-*r/52.7%
Simplified52.7%
associate-*r/52.9%
*-commutative52.9%
Applied egg-rr52.9%
Final simplification68.4%
(FPCore (A B C)
:precision binary64
(if (<= B 6.8e-276)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 8e-101)
(* (atan (/ B (/ A 0.5))) (/ 180.0 PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 6.8e-276) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 8e-101) {
tmp = atan((B / (A / 0.5))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 6.8e-276) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 8e-101) {
tmp = Math.atan((B / (A / 0.5))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 6.8e-276: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 8e-101: tmp = math.atan((B / (A / 0.5))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 6.8e-276) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 8e-101) tmp = Float64(atan(Float64(B / Float64(A / 0.5))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 6.8e-276) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 8e-101) tmp = atan((B / (A / 0.5))) * (180.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, 6.8e-276], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8e-101], N[(N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 6.8 \cdot 10^{-276}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-101}:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 6.79999999999999984e-276Initial program 55.8%
Simplified74.8%
Taylor expanded in B around -inf 68.7%
neg-mul-168.7%
unsub-neg68.7%
Simplified68.7%
if 6.79999999999999984e-276 < B < 8.00000000000000041e-101Initial program 44.8%
Taylor expanded in A around -inf 52.7%
associate-*r/52.7%
Simplified52.7%
associate-*r/52.9%
*-commutative52.9%
Applied egg-rr52.9%
*-commutative52.9%
*-un-lft-identity52.9%
times-frac52.9%
associate-/l*52.9%
Applied egg-rr52.9%
if 8.00000000000000041e-101 < B Initial program 57.9%
Taylor expanded in B around inf 79.2%
Final simplification70.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -3500000000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.1e-240)
t_0
(if (<= B 2.8e-158)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 5.5e+16) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -3500000000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.1e-240) {
tmp = t_0;
} else if (B <= 2.8e-158) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 5.5e+16) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -3500000000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.1e-240) {
tmp = t_0;
} else if (B <= 2.8e-158) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 5.5e+16) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -3500000000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.1e-240: tmp = t_0 elif B <= 2.8e-158: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 5.5e+16: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -3500000000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.1e-240) tmp = t_0; elseif (B <= 2.8e-158) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 5.5e+16) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -3500000000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.1e-240) tmp = t_0; elseif (B <= 2.8e-158) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 5.5e+16) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3500000000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.1e-240], t$95$0, If[LessEqual[B, 2.8e-158], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e+16], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3500000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.1 \cdot 10^{-240}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-158}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.5e9Initial program 50.5%
Taylor expanded in B around -inf 59.6%
if -3.5e9 < B < -3.10000000000000017e-240 or 2.80000000000000002e-158 < B < 5.5e16Initial program 66.4%
Simplified70.0%
Taylor expanded in B around -inf 60.7%
neg-mul-160.7%
unsub-neg60.7%
Simplified60.7%
Taylor expanded in C around inf 43.8%
if -3.10000000000000017e-240 < B < 2.80000000000000002e-158Initial program 50.1%
associate--l-45.1%
+-commutative45.1%
unpow245.1%
unpow245.1%
hypot-udef63.6%
*-commutative63.6%
div-inv63.6%
associate--r+79.5%
div-sub42.6%
Applied egg-rr42.6%
Taylor expanded in C around inf 15.6%
distribute-lft1-in15.6%
metadata-eval15.6%
mul0-lft39.2%
metadata-eval39.2%
Simplified39.2%
if 5.5e16 < B Initial program 49.7%
Taylor expanded in B around inf 60.6%
Final simplification51.6%
(FPCore (A B C)
:precision binary64
(if (<= B -7.6e+39)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.1e-238)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B 1.15e-157)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 1.55e+16)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.6e+39) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.1e-238) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= 1.15e-157) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 1.55e+16) {
tmp = 180.0 * (atan((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 <= -7.6e+39) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.1e-238) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= 1.15e-157) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 1.55e+16) {
tmp = 180.0 * (Math.atan((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 <= -7.6e+39: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.1e-238: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= 1.15e-157: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 1.55e+16: tmp = 180.0 * (math.atan((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 <= -7.6e+39) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.1e-238) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= 1.15e-157) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 1.55e+16) tmp = Float64(180.0 * Float64(atan(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 <= -7.6e+39) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.1e-238) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= 1.15e-157) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 1.55e+16) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7.6e+39], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.1e-238], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.15e-157], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.55e+16], N[(180.0 * N[(N[ArcTan[N[(C / 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 -7.6 \cdot 10^{+39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.1 \cdot 10^{-238}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-157}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -7.5999999999999996e39Initial program 49.5%
Taylor expanded in B around -inf 63.9%
if -7.5999999999999996e39 < B < -5.1000000000000001e-238Initial program 64.1%
Simplified67.7%
Taylor expanded in B around -inf 63.5%
neg-mul-163.5%
unsub-neg63.5%
Simplified63.5%
Taylor expanded in A around inf 47.6%
associate-*r/47.6%
mul-1-neg47.6%
Simplified47.6%
if -5.1000000000000001e-238 < B < 1.14999999999999994e-157Initial program 50.1%
associate--l-45.1%
+-commutative45.1%
unpow245.1%
unpow245.1%
hypot-udef63.6%
*-commutative63.6%
div-inv63.6%
associate--r+79.5%
div-sub42.6%
Applied egg-rr42.6%
Taylor expanded in C around inf 15.6%
distribute-lft1-in15.6%
metadata-eval15.6%
mul0-lft39.2%
metadata-eval39.2%
Simplified39.2%
if 1.14999999999999994e-157 < B < 1.55e16Initial program 69.0%
Simplified72.1%
Taylor expanded in B around -inf 56.9%
neg-mul-156.9%
unsub-neg56.9%
Simplified56.9%
Taylor expanded in C around inf 49.6%
if 1.55e16 < B Initial program 49.7%
Taylor expanded in B around inf 60.6%
Final simplification53.7%
(FPCore (A B C)
:precision binary64
(if (<= B -6.5e+39)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.6e-240)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 5.5e-158)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B 1.6e+16)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.5e+39) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.6e-240) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 5.5e-158) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B <= 1.6e+16) {
tmp = 180.0 * (atan((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 <= -6.5e+39) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.6e-240) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 5.5e-158) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B <= 1.6e+16) {
tmp = 180.0 * (Math.atan((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 <= -6.5e+39: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.6e-240: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 5.5e-158: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B <= 1.6e+16: tmp = 180.0 * (math.atan((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 <= -6.5e+39) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.6e-240) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 5.5e-158) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B <= 1.6e+16) tmp = Float64(180.0 * Float64(atan(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 <= -6.5e+39) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.6e-240) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 5.5e-158) tmp = 180.0 * (atan(0.0) / pi); elseif (B <= 1.6e+16) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.5e+39], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-240], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e-158], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e+16], N[(180.0 * N[(N[ArcTan[N[(C / 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 -6.5 \cdot 10^{+39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{-158}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.5000000000000001e39Initial program 49.5%
Taylor expanded in B around -inf 63.9%
if -6.5000000000000001e39 < B < -1.6e-240Initial program 64.1%
Taylor expanded in A around inf 47.6%
if -1.6e-240 < B < 5.50000000000000025e-158Initial program 50.1%
associate--l-45.1%
+-commutative45.1%
unpow245.1%
unpow245.1%
hypot-udef63.6%
*-commutative63.6%
div-inv63.6%
associate--r+79.5%
div-sub42.6%
Applied egg-rr42.6%
Taylor expanded in C around inf 15.6%
distribute-lft1-in15.6%
metadata-eval15.6%
mul0-lft39.2%
metadata-eval39.2%
Simplified39.2%
if 5.50000000000000025e-158 < B < 1.6e16Initial program 69.0%
Simplified72.1%
Taylor expanded in B around -inf 56.9%
neg-mul-156.9%
unsub-neg56.9%
Simplified56.9%
Taylor expanded in C around inf 49.6%
if 1.6e16 < B Initial program 49.7%
Taylor expanded in B around inf 60.6%
Final simplification53.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.3e+37)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.38e-238)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 1.4e-167)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e+37) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.38e-238) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 1.4e-167) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e+37) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.38e-238) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 1.4e-167) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.3e+37: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.38e-238: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 1.4e-167: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.3e+37) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.38e-238) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 1.4e-167) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.3e+37) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.38e-238) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 1.4e-167) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.3e+37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.38e-238], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-167], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.3 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.38 \cdot 10^{-238}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.3e37Initial program 49.5%
Taylor expanded in B around -inf 63.9%
if -1.3e37 < B < -1.37999999999999993e-238Initial program 64.1%
Taylor expanded in A around inf 47.6%
if -1.37999999999999993e-238 < B < 1.39999999999999993e-167Initial program 48.8%
associate--l-43.5%
+-commutative43.5%
unpow243.5%
unpow243.5%
hypot-udef60.9%
*-commutative60.9%
div-inv60.9%
associate--r+78.0%
div-sub40.9%
Applied egg-rr40.9%
Taylor expanded in C around inf 16.6%
distribute-lft1-in16.6%
metadata-eval16.6%
mul0-lft39.5%
metadata-eval39.5%
Simplified39.5%
if 1.39999999999999993e-167 < B Initial program 56.0%
Taylor expanded in A around 0 51.2%
unpow251.2%
unpow251.2%
hypot-def68.4%
Simplified68.4%
Taylor expanded in C around 0 65.9%
Final simplification57.8%
(FPCore (A B C)
:precision binary64
(if (<= B 7.2e-276)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 5.1e-101)
(/ (* 180.0 (atan (/ (* 0.5 B) A))) PI)
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 7.2e-276) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 5.1e-101) {
tmp = (180.0 * atan(((0.5 * B) / A))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 7.2e-276) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 5.1e-101) {
tmp = (180.0 * Math.atan(((0.5 * B) / A))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 7.2e-276: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 5.1e-101: tmp = (180.0 * math.atan(((0.5 * B) / A))) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 7.2e-276) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 5.1e-101) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * B) / A))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 7.2e-276) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 5.1e-101) tmp = (180.0 * atan(((0.5 * B) / A))) / pi; else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 7.2e-276], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.1e-101], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7.2 \cdot 10^{-276}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.1 \cdot 10^{-101}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 7.19999999999999988e-276Initial program 55.8%
Simplified74.8%
Taylor expanded in B around -inf 68.7%
neg-mul-168.7%
unsub-neg68.7%
Simplified68.7%
if 7.19999999999999988e-276 < B < 5.1000000000000002e-101Initial program 44.8%
Taylor expanded in A around -inf 52.7%
associate-*r/52.7%
Simplified52.7%
associate-*r/52.9%
*-commutative52.9%
Applied egg-rr52.9%
if 5.1000000000000002e-101 < B Initial program 57.9%
Simplified82.9%
Taylor expanded in B around inf 79.2%
+-commutative79.2%
Simplified79.2%
Final simplification70.5%
(FPCore (A B C)
:precision binary64
(if (<= B 7.2e-276)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 5.1e-101)
(* (atan (/ B (/ A 0.5))) (/ 180.0 PI))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 7.2e-276) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 5.1e-101) {
tmp = atan((B / (A / 0.5))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 7.2e-276) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 5.1e-101) {
tmp = Math.atan((B / (A / 0.5))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 7.2e-276: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 5.1e-101: tmp = math.atan((B / (A / 0.5))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 7.2e-276) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 5.1e-101) tmp = Float64(atan(Float64(B / Float64(A / 0.5))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 7.2e-276) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 5.1e-101) tmp = atan((B / (A / 0.5))) * (180.0 / pi); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 7.2e-276], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.1e-101], N[(N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7.2 \cdot 10^{-276}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.1 \cdot 10^{-101}:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 7.19999999999999988e-276Initial program 55.8%
Simplified74.8%
Taylor expanded in B around -inf 68.7%
neg-mul-168.7%
unsub-neg68.7%
Simplified68.7%
if 7.19999999999999988e-276 < B < 5.1000000000000002e-101Initial program 44.8%
Taylor expanded in A around -inf 52.7%
associate-*r/52.7%
Simplified52.7%
associate-*r/52.9%
*-commutative52.9%
Applied egg-rr52.9%
*-commutative52.9%
*-un-lft-identity52.9%
times-frac52.9%
associate-/l*52.9%
Applied egg-rr52.9%
if 5.1000000000000002e-101 < B Initial program 57.9%
Simplified82.9%
Taylor expanded in B around inf 79.2%
+-commutative79.2%
Simplified79.2%
Final simplification70.5%
(FPCore (A B C)
:precision binary64
(if (<= B 7.2e-276)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 1.1e-98)
(* (atan (/ B (/ A 0.5))) (/ 180.0 PI))
(/ (* 180.0 (atan (/ (- (- C B) A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 7.2e-276) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 1.1e-98) {
tmp = atan((B / (A / 0.5))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - B) - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 7.2e-276) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 1.1e-98) {
tmp = Math.atan((B / (A / 0.5))) * (180.0 / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - B) - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 7.2e-276: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 1.1e-98: tmp = math.atan((B / (A / 0.5))) * (180.0 / math.pi) else: tmp = (180.0 * math.atan((((C - B) - A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 7.2e-276) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 1.1e-98) tmp = Float64(atan(Float64(B / Float64(A / 0.5))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B) - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 7.2e-276) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 1.1e-98) tmp = atan((B / (A / 0.5))) * (180.0 / pi); else tmp = (180.0 * atan((((C - B) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 7.2e-276], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e-98], N[(N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7.2 \cdot 10^{-276}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-98}:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 7.19999999999999988e-276Initial program 55.8%
Simplified74.8%
Taylor expanded in B around -inf 68.7%
neg-mul-168.7%
unsub-neg68.7%
Simplified68.7%
if 7.19999999999999988e-276 < B < 1.09999999999999998e-98Initial program 44.8%
Taylor expanded in A around -inf 52.7%
associate-*r/52.7%
Simplified52.7%
associate-*r/52.9%
*-commutative52.9%
Applied egg-rr52.9%
*-commutative52.9%
*-un-lft-identity52.9%
times-frac52.9%
associate-/l*52.9%
Applied egg-rr52.9%
if 1.09999999999999998e-98 < B Initial program 57.9%
associate-*r/57.9%
associate-*l/57.9%
*-un-lft-identity57.9%
unpow257.9%
unpow257.9%
hypot-def82.7%
Applied egg-rr82.7%
Taylor expanded in B around inf 79.2%
mul-1-neg79.2%
unsub-neg79.2%
Simplified79.2%
Final simplification70.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.56e+44)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 5e+128)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.56e+44) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 5e+128) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.56e+44) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 5e+128) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.56e+44: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 5e+128: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.56e+44) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 5e+128) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.56e+44) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 5e+128) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.56e+44], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5e+128], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.56 \cdot 10^{+44}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{+128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.56e44Initial program 23.5%
Taylor expanded in A around -inf 77.4%
associate-*r/77.4%
Simplified77.4%
if -1.56e44 < A < 5e128Initial program 59.4%
Taylor expanded in A around 0 55.3%
unpow255.3%
unpow255.3%
hypot-def79.6%
Simplified79.6%
Taylor expanded in C around 0 54.0%
if 5e128 < A Initial program 78.6%
Taylor expanded in A around inf 78.9%
Final simplification62.7%
(FPCore (A B C)
:precision binary64
(if (<= B -8e-240)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= B 7.2e-101)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8e-240) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (B <= 7.2e-101) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8e-240) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (B <= 7.2e-101) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8e-240: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif B <= 7.2e-101: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8e-240) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (B <= 7.2e-101) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8e-240) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (B <= 7.2e-101) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8e-240], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e-101], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.9999999999999998e-240Initial program 56.4%
Taylor expanded in A around 0 47.5%
unpow247.5%
unpow247.5%
hypot-def66.0%
Simplified66.0%
Taylor expanded in B around -inf 62.8%
if -7.9999999999999998e-240 < B < 7.19999999999999999e-101Initial program 46.9%
Taylor expanded in A around -inf 47.2%
associate-*r/47.2%
Simplified47.2%
if 7.19999999999999999e-101 < B Initial program 57.9%
Taylor expanded in A around 0 53.3%
unpow253.3%
unpow253.3%
hypot-def70.8%
Simplified70.8%
Taylor expanded in C around 0 69.9%
Final simplification62.3%
(FPCore (A B C)
:precision binary64
(if (<= B -2.5e-173)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.6e-99)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.5e-173) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.6e-99) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.5e-173) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.6e-99) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.5e-173: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.6e-99: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.5e-173) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.6e-99) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.5e-173) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.6e-99) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.5e-173], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.6e-99], N[(180.0 * N[(N[ArcTan[0.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.5 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.5000000000000001e-173Initial program 56.3%
Taylor expanded in B around -inf 47.0%
if -2.5000000000000001e-173 < B < 5.6000000000000001e-99Initial program 48.6%
associate--l-45.2%
+-commutative45.2%
unpow245.2%
unpow245.2%
hypot-udef60.5%
*-commutative60.5%
div-inv60.5%
associate--r+73.0%
div-sub43.6%
Applied egg-rr43.6%
Taylor expanded in C around inf 14.6%
distribute-lft1-in14.6%
metadata-eval14.6%
mul0-lft32.3%
metadata-eval32.3%
Simplified32.3%
if 5.6000000000000001e-99 < B Initial program 57.9%
Taylor expanded in B around inf 53.2%
Final simplification45.7%
(FPCore (A B C) :precision binary64 (if (<= B 1e-95) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1e-95) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1e-95) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1e-95: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1e-95) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1e-95) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1e-95], N[(180.0 * N[(N[ArcTan[0.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 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 9.99999999999999989e-96Initial program 53.1%
associate--l-51.7%
+-commutative51.7%
unpow251.7%
unpow251.7%
hypot-udef70.0%
*-commutative70.0%
div-inv70.0%
associate--r+75.8%
div-sub62.4%
Applied egg-rr62.4%
Taylor expanded in C around inf 8.6%
distribute-lft1-in8.6%
metadata-eval8.6%
mul0-lft16.7%
metadata-eval16.7%
Simplified16.7%
if 9.99999999999999989e-96 < B Initial program 57.9%
Taylor expanded in B around inf 53.2%
Final simplification30.9%
(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 55.0%
Taylor expanded in B around inf 23.3%
Final simplification23.3%
herbie shell --seed 2023308
(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)))