
(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 18 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 -1.16e+148) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (/ (* 180.0 (atan (/ (- (- C A) (hypot B (- A C))) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.16e+148) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.16e+148) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot(B, (A - C))) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.16e+148: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = (180.0 * math.atan((((C - A) - math.hypot(B, (A - C))) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.16e+148) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.16e+148) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.16e+148], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.16 \cdot 10^{+148}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.1599999999999999e148Initial program 5.8%
associate-*r/5.8%
Applied egg-rr54.3%
Taylor expanded in A around -inf 83.3%
if -1.1599999999999999e148 < A Initial program 65.9%
associate-*r/65.9%
Applied egg-rr84.1%
(FPCore (A B C)
:precision binary64
(if (<= A -2.6e+59)
(/ (* 180.0 (atan (/ (* 0.5 (+ B (* B (/ C A)))) A))) PI)
(if (<= A 3.8e-7)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e+59) {
tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / ((double) M_PI);
} else if (A <= 3.8e-7) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e+59) {
tmp = (180.0 * Math.atan(((0.5 * (B + (B * (C / A)))) / A))) / Math.PI;
} else if (A <= 3.8e-7) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.6e+59: tmp = (180.0 * math.atan(((0.5 * (B + (B * (C / A)))) / A))) / math.pi elif A <= 3.8e-7: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi else: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.6e+59) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A))) / pi); elseif (A <= 3.8e-7) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.6e+59) tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / pi; elseif (A <= 3.8e-7) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; else tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.6e+59], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 3.8e-7], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.6 \cdot 10^{+59}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.59999999999999999e59Initial program 23.4%
associate-*r/23.4%
Applied egg-rr58.4%
Taylor expanded in A around -inf 75.7%
associate-*r/75.7%
distribute-lft-out75.7%
associate-*r*75.7%
metadata-eval75.7%
associate-/l*76.1%
Simplified76.1%
if -2.59999999999999999e59 < A < 3.80000000000000015e-7Initial program 60.9%
associate-*r/60.9%
Applied egg-rr80.1%
Taylor expanded in A around 0 58.7%
+-commutative58.7%
unpow258.7%
unpow258.7%
hypot-define78.1%
Simplified78.1%
if 3.80000000000000015e-7 < A Initial program 80.9%
Taylor expanded in C around 0 80.1%
associate-*r/80.1%
mul-1-neg80.1%
unpow280.1%
unpow280.1%
hypot-define93.4%
Simplified93.4%
Final simplification81.5%
(FPCore (A B C)
:precision binary64
(if (<= A -6e+58)
(/ (* 180.0 (atan (/ (* 0.5 (+ B (* B (/ C A)))) A))) PI)
(if (<= A 5e+33)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(* (atan (- -1.0 (/ (- A C) B))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6e+58) {
tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / ((double) M_PI);
} else if (A <= 5e+33) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else {
tmp = atan((-1.0 - ((A - C) / B))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6e+58) {
tmp = (180.0 * Math.atan(((0.5 * (B + (B * (C / A)))) / A))) / Math.PI;
} else if (A <= 5e+33) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else {
tmp = Math.atan((-1.0 - ((A - C) / B))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6e+58: tmp = (180.0 * math.atan(((0.5 * (B + (B * (C / A)))) / A))) / math.pi elif A <= 5e+33: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi else: tmp = math.atan((-1.0 - ((A - C) / B))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6e+58) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A))) / pi); elseif (A <= 5e+33) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); else tmp = Float64(atan(Float64(-1.0 - Float64(Float64(A - C) / B))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6e+58) tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / pi; elseif (A <= 5e+33) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; else tmp = atan((-1.0 - ((A - C) / B))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6e+58], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5e+33], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(-1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6 \cdot 10^{+58}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{+33}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(-1 - \frac{A - C}{B}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if A < -6.0000000000000005e58Initial program 23.4%
associate-*r/23.4%
Applied egg-rr58.4%
Taylor expanded in A around -inf 75.7%
associate-*r/75.7%
distribute-lft-out75.7%
associate-*r*75.7%
metadata-eval75.7%
associate-/l*76.1%
Simplified76.1%
if -6.0000000000000005e58 < A < 4.99999999999999973e33Initial program 61.0%
associate-*r/61.0%
Applied egg-rr80.4%
Taylor expanded in A around 0 58.4%
+-commutative58.4%
unpow258.4%
unpow258.4%
hypot-define77.9%
Simplified77.9%
if 4.99999999999999973e33 < A Initial program 83.1%
associate-*r/83.1%
Applied egg-rr100.0%
Taylor expanded in B around inf 90.6%
+-commutative90.6%
associate--r+90.6%
div-sub92.5%
Simplified92.5%
Taylor expanded in C around -inf 92.5%
associate-*r/92.5%
*-commutative92.5%
associate-/l*92.5%
sub-neg92.5%
metadata-eval92.5%
+-commutative92.5%
mul-1-neg92.5%
unsub-neg92.5%
mul-1-neg92.5%
sub-neg92.5%
Simplified92.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.2e+59)
(/ (* 180.0 (atan (/ (* 0.5 (+ B (* B (/ C A)))) A))) PI)
(if (<= A 4.6e+33)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* (atan (- -1.0 (/ (- A C) B))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.2e+59) {
tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / ((double) M_PI);
} else if (A <= 4.6e+33) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = atan((-1.0 - ((A - C) / B))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.2e+59) {
tmp = (180.0 * Math.atan(((0.5 * (B + (B * (C / A)))) / A))) / Math.PI;
} else if (A <= 4.6e+33) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = Math.atan((-1.0 - ((A - C) / B))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.2e+59: tmp = (180.0 * math.atan(((0.5 * (B + (B * (C / A)))) / A))) / math.pi elif A <= 4.6e+33: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = math.atan((-1.0 - ((A - C) / B))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.2e+59) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A))) / pi); elseif (A <= 4.6e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(atan(Float64(-1.0 - Float64(Float64(A - C) / B))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.2e+59) tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / pi; elseif (A <= 4.6e+33) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = atan((-1.0 - ((A - C) / B))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.2e+59], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4.6e+33], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.6 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(-1 - \frac{A - C}{B}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if A < -1.2000000000000001e59Initial program 23.4%
associate-*r/23.4%
Applied egg-rr58.4%
Taylor expanded in A around -inf 75.7%
associate-*r/75.7%
distribute-lft-out75.7%
associate-*r*75.7%
metadata-eval75.7%
associate-/l*76.1%
Simplified76.1%
if -1.2000000000000001e59 < A < 4.60000000000000021e33Initial program 61.0%
Taylor expanded in A around 0 58.4%
+-commutative58.4%
unpow258.4%
unpow258.4%
hypot-define77.9%
Simplified77.9%
if 4.60000000000000021e33 < A Initial program 83.1%
associate-*r/83.1%
Applied egg-rr100.0%
Taylor expanded in B around inf 90.6%
+-commutative90.6%
associate--r+90.6%
div-sub92.5%
Simplified92.5%
Taylor expanded in C around -inf 92.5%
associate-*r/92.5%
*-commutative92.5%
associate-/l*92.5%
sub-neg92.5%
metadata-eval92.5%
+-commutative92.5%
mul-1-neg92.5%
unsub-neg92.5%
mul-1-neg92.5%
sub-neg92.5%
Simplified92.5%
(FPCore (A B C) :precision binary64 (if (<= A -1.55e+147) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e+147) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e+147) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.55e+147: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.55e+147) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.55e+147) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.55e+147], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.55 \cdot 10^{+147}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.55e147Initial program 5.8%
associate-*r/5.8%
Applied egg-rr54.3%
Taylor expanded in A around -inf 83.3%
if -1.55e147 < A Initial program 65.9%
associate-*l/65.9%
*-lft-identity65.9%
+-commutative65.9%
unpow265.9%
unpow265.9%
hypot-define84.0%
Simplified84.0%
(FPCore (A B C) :precision binary64 (if (<= A -2.7e+59) (/ (* 180.0 (atan (/ (* 0.5 (+ B (* B (/ C A)))) A))) PI) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e+59) {
tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e+59) {
tmp = (180.0 * Math.atan(((0.5 * (B + (B * (C / A)))) / A))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.7e+59: tmp = (180.0 * math.atan(((0.5 * (B + (B * (C / A)))) / A))) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.7e+59) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.7e+59) tmp = (180.0 * atan(((0.5 * (B + (B * (C / A)))) / A))) / pi; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.7e+59], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.7 \cdot 10^{+59}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.7000000000000001e59Initial program 23.4%
associate-*r/23.4%
Applied egg-rr58.4%
Taylor expanded in A around -inf 75.7%
associate-*r/75.7%
distribute-lft-out75.7%
associate-*r*75.7%
metadata-eval75.7%
associate-/l*76.1%
Simplified76.1%
if -2.7000000000000001e59 < A Initial program 67.2%
Simplified85.8%
(FPCore (A B C)
:precision binary64
(if (<= B -3.4e-140)
(/ (* 180.0 (atan (+ 1.0 (/ (- C A) B)))) PI)
(if (<= B -4.5e-185)
(/ (* 180.0 (atan 0.0)) PI)
(* (atan (- -1.0 (/ (- A C) B))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.4e-140) {
tmp = (180.0 * atan((1.0 + ((C - A) / B)))) / ((double) M_PI);
} else if (B <= -4.5e-185) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = atan((-1.0 - ((A - C) / B))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.4e-140) {
tmp = (180.0 * Math.atan((1.0 + ((C - A) / B)))) / Math.PI;
} else if (B <= -4.5e-185) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = Math.atan((-1.0 - ((A - C) / B))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.4e-140: tmp = (180.0 * math.atan((1.0 + ((C - A) / B)))) / math.pi elif B <= -4.5e-185: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = math.atan((-1.0 - ((A - C) / B))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.4e-140) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(Float64(C - A) / B)))) / pi); elseif (B <= -4.5e-185) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(atan(Float64(-1.0 - Float64(Float64(A - C) / B))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.4e-140) tmp = (180.0 * atan((1.0 + ((C - A) / B)))) / pi; elseif (B <= -4.5e-185) tmp = (180.0 * atan(0.0)) / pi; else tmp = atan((-1.0 - ((A - C) / B))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.4e-140], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -4.5e-185], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(-1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.4 \cdot 10^{-140}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -4.5 \cdot 10^{-185}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(-1 - \frac{A - C}{B}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if B < -3.40000000000000008e-140Initial program 55.7%
associate-*r/55.7%
Applied egg-rr73.6%
Taylor expanded in B around -inf 70.3%
associate--l+70.3%
div-sub70.3%
Simplified70.3%
if -3.40000000000000008e-140 < B < -4.5000000000000001e-185Initial program 21.1%
associate-*r/21.1%
Applied egg-rr82.7%
Taylor expanded in C around inf 65.1%
distribute-rgt1-in65.1%
metadata-eval65.1%
mul0-lft65.1%
div065.1%
metadata-eval65.1%
Simplified65.1%
if -4.5000000000000001e-185 < B Initial program 63.2%
associate-*r/63.2%
Applied egg-rr84.5%
Taylor expanded in B around inf 71.6%
+-commutative71.6%
associate--r+71.6%
div-sub72.3%
Simplified72.3%
Taylor expanded in C around -inf 72.3%
associate-*r/72.3%
*-commutative72.3%
associate-/l*72.3%
sub-neg72.3%
metadata-eval72.3%
+-commutative72.3%
mul-1-neg72.3%
unsub-neg72.3%
mul-1-neg72.3%
sub-neg72.3%
Simplified72.3%
(FPCore (A B C)
:precision binary64
(if (<= B -3.4e-140)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B -4.4e-185)
(/ (* 180.0 (atan 0.0)) PI)
(* (atan (- -1.0 (/ (- A C) B))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.4e-140) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= -4.4e-185) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = atan((-1.0 - ((A - C) / B))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.4e-140) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= -4.4e-185) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = Math.atan((-1.0 - ((A - C) / B))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.4e-140: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= -4.4e-185: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = math.atan((-1.0 - ((A - C) / B))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.4e-140) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= -4.4e-185) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(atan(Float64(-1.0 - Float64(Float64(A - C) / B))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.4e-140) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= -4.4e-185) tmp = (180.0 * atan(0.0)) / pi; else tmp = atan((-1.0 - ((A - C) / B))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.4e-140], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-185], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(-1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.4 \cdot 10^{-140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -4.4 \cdot 10^{-185}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(-1 - \frac{A - C}{B}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if B < -3.40000000000000008e-140Initial program 55.7%
Taylor expanded in B around -inf 70.2%
associate--l+70.2%
div-sub70.2%
Simplified70.2%
if -3.40000000000000008e-140 < B < -4.4000000000000001e-185Initial program 21.1%
associate-*r/21.1%
Applied egg-rr82.7%
Taylor expanded in C around inf 65.1%
distribute-rgt1-in65.1%
metadata-eval65.1%
mul0-lft65.1%
div065.1%
metadata-eval65.1%
Simplified65.1%
if -4.4000000000000001e-185 < B Initial program 63.2%
associate-*r/63.2%
Applied egg-rr84.5%
Taylor expanded in B around inf 71.6%
+-commutative71.6%
associate--r+71.6%
div-sub72.3%
Simplified72.3%
Taylor expanded in C around -inf 72.3%
associate-*r/72.3%
*-commutative72.3%
associate-/l*72.3%
sub-neg72.3%
metadata-eval72.3%
+-commutative72.3%
mul-1-neg72.3%
unsub-neg72.3%
mul-1-neg72.3%
sub-neg72.3%
Simplified72.3%
(FPCore (A B C)
:precision binary64
(if (<= C -4.8e+50)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 1450.0)
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.8e+50) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 1450.0) {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.8e+50) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 1450.0) {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.8e+50: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 1450.0: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.8e+50) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 1450.0) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.8e+50) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 1450.0) tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.8e+50], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1450.0], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.8 \cdot 10^{+50}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1450:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -4.8000000000000004e50Initial program 84.9%
Taylor expanded in B around -inf 83.8%
associate--l+83.8%
div-sub83.9%
Simplified83.9%
Taylor expanded in A around 0 83.3%
if -4.8000000000000004e50 < C < 1450Initial program 59.3%
associate-*r/59.3%
Applied egg-rr83.8%
Taylor expanded in B around inf 59.7%
+-commutative59.7%
associate--r+59.7%
div-sub59.7%
Simplified59.7%
Taylor expanded in C around 0 57.5%
distribute-lft-in57.5%
metadata-eval57.5%
mul-1-neg57.5%
unsub-neg57.5%
Simplified57.5%
if 1450 < C Initial program 27.1%
Taylor expanded in C around inf 66.5%
Taylor expanded in A around inf 66.5%
Simplified66.7%
(FPCore (A B C)
:precision binary64
(if (<= A -4.3e+57)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 1.4e+31)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.3e+57) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 1.4e+31) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.3e+57) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 1.4e+31) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.3e+57: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 1.4e+31: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.3e+57) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 1.4e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.3e+57) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 1.4e+31) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.3e+57], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.4e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.3 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.4 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.30000000000000033e57Initial program 23.0%
Taylor expanded in A around -inf 70.7%
associate-*r/70.7%
Simplified70.7%
if -4.30000000000000033e57 < A < 1.40000000000000008e31Initial program 61.4%
Taylor expanded in B around -inf 48.7%
associate--l+48.7%
div-sub48.7%
Simplified48.7%
Taylor expanded in A around 0 46.3%
if 1.40000000000000008e31 < A Initial program 83.1%
associate-*l/83.1%
*-lft-identity83.1%
+-commutative83.1%
unpow283.1%
unpow283.1%
hypot-define100.0%
Simplified100.0%
Taylor expanded in A around inf 77.6%
*-commutative77.6%
Simplified77.6%
(FPCore (A B C)
:precision binary64
(if (<= A -6.2e+56)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 2.7e+33)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (/ A (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e+56) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 2.7e+33) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e+56) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 2.7e+33) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.2e+56: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 2.7e+33: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((A / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.2e+56) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 2.7e+33) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.2e+56) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 2.7e+33) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((A / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.2e+56], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.7e+33], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.2 \cdot 10^{+56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.7 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.20000000000000009e56Initial program 23.0%
Taylor expanded in A around -inf 70.7%
associate-*r/70.7%
Simplified70.7%
if -6.20000000000000009e56 < A < 2.69999999999999991e33Initial program 61.4%
Taylor expanded in B around -inf 48.7%
associate--l+48.7%
div-sub48.7%
Simplified48.7%
Taylor expanded in A around 0 46.3%
if 2.69999999999999991e33 < A Initial program 83.1%
Taylor expanded in B around -inf 80.2%
associate--l+80.2%
div-sub82.1%
Simplified82.1%
Taylor expanded in A around inf 76.9%
associate-*r/76.9%
mul-1-neg76.9%
Simplified76.9%
Final simplification58.0%
(FPCore (A B C)
:precision binary64
(if (<= C -1.42e-241)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 4400.0)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.42e-241) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 4400.0) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.42e-241) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 4400.0) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.42e-241: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 4400.0: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.42e-241) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 4400.0) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.42e-241) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 4400.0) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.42e-241], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4400.0], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.42 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4400:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.41999999999999992e-241Initial program 73.7%
Taylor expanded in B around -inf 69.3%
associate--l+69.3%
div-sub69.3%
Simplified69.3%
Taylor expanded in A around 0 63.4%
if -1.41999999999999992e-241 < C < 4400Initial program 58.0%
Taylor expanded in B around inf 40.8%
if 4400 < C Initial program 27.1%
Taylor expanded in C around inf 66.5%
Taylor expanded in B around inf 49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
div066.4%
metadata-eval66.4%
neg-sub066.4%
associate-*r/66.4%
metadata-eval66.4%
distribute-neg-frac66.4%
metadata-eval66.4%
Simplified66.4%
(FPCore (A B C)
:precision binary64
(if (<= C -4.2e-182)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 370.0)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.2e-182) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 370.0) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.2e-182) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 370.0) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.2e-182: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 370.0: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.2e-182) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 370.0) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.2e-182) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 370.0) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.2e-182], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 370.0], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.2 \cdot 10^{-182}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 370:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.2000000000000001e-182Initial program 75.2%
associate-*r/75.2%
Applied egg-rr93.3%
Taylor expanded in B around inf 74.3%
+-commutative74.3%
associate--r+74.3%
div-sub74.3%
Simplified74.3%
Taylor expanded in C around inf 57.1%
if -4.2000000000000001e-182 < C < 370Initial program 58.0%
Taylor expanded in B around inf 38.3%
if 370 < C Initial program 27.1%
Taylor expanded in C around inf 66.5%
Taylor expanded in B around inf 49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
div066.4%
metadata-eval66.4%
neg-sub066.4%
associate-*r/66.4%
metadata-eval66.4%
distribute-neg-frac66.4%
metadata-eval66.4%
Simplified66.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.6e+78)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 9e-27)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.6e+78) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 9e-27) {
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 <= -1.6e+78) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 9e-27) {
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 <= -1.6e+78: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 9e-27: 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 <= -1.6e+78) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 9e-27) tmp = Float64(Float64(180.0 * 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 <= -1.6e+78) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 9e-27) 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, -1.6e+78], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-27], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.6 \cdot 10^{+78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-27}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.59999999999999997e78Initial program 51.3%
Taylor expanded in B around -inf 64.4%
if -1.59999999999999997e78 < B < 9.0000000000000003e-27Initial program 61.9%
associate-*r/61.9%
Applied egg-rr76.7%
Taylor expanded in B around inf 55.7%
+-commutative55.7%
associate--r+55.7%
div-sub56.5%
Simplified56.5%
Taylor expanded in C around inf 38.9%
if 9.0000000000000003e-27 < B Initial program 57.5%
Taylor expanded in B around inf 63.3%
(FPCore (A B C) :precision binary64 (if (<= B 2.6e-212) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (/ (* 180.0 (atan (+ -1.0 (/ C B)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= 2.6e-212) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-1.0 + (C / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2.6e-212) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 + (C / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2.6e-212: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = (180.0 * math.atan((-1.0 + (C / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2.6e-212) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(C / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2.6e-212) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (180.0 * atan((-1.0 + (C / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2.6e-212], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.6 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 2.6e-212Initial program 56.2%
Taylor expanded in B around -inf 62.7%
associate--l+62.7%
div-sub63.4%
Simplified63.4%
if 2.6e-212 < B Initial program 61.7%
associate-*r/61.7%
Applied egg-rr84.3%
Taylor expanded in B around inf 75.9%
+-commutative75.9%
associate--r+75.9%
div-sub75.9%
Simplified75.9%
Taylor expanded in A around 0 69.9%
Final simplification66.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.9e-136)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.75e-157)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-136) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.75e-157) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-136) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.75e-157) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.9e-136: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.75e-157: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.9e-136) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.75e-157) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.9e-136) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.75e-157) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.9e-136], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.75e-157], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.9 \cdot 10^{-136}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.75 \cdot 10^{-157}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.9000000000000001e-136Initial program 55.7%
Taylor expanded in B around -inf 41.0%
if -1.9000000000000001e-136 < B < 1.7500000000000001e-157Initial program 57.1%
associate-*r/57.1%
Applied egg-rr81.6%
Taylor expanded in C around inf 33.9%
distribute-rgt1-in33.9%
metadata-eval33.9%
mul0-lft33.9%
div033.9%
metadata-eval33.9%
Simplified33.9%
if 1.7500000000000001e-157 < B Initial program 62.4%
Taylor expanded in B around inf 55.6%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 54.7%
Taylor expanded in B around -inf 33.0%
if -4.999999999999985e-310 < B Initial program 62.5%
Taylor expanded in B around inf 46.3%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 58.6%
Taylor expanded in B around inf 24.1%
herbie shell --seed 2024185
(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)))