
(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 16 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 -5e+19) (* (/ 180.0 PI) (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 <= -5e+19) {
tmp = (180.0 / ((double) M_PI)) * 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 <= -5e+19) {
tmp = (180.0 / Math.PI) * 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 <= -5e+19: tmp = (180.0 / math.pi) * 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 <= -5e+19) tmp = Float64(Float64(180.0 / pi) * 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 <= -5e+19) tmp = (180.0 / pi) * 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, -5e+19], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $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 -5 \cdot 10^{+19}:\\
\;\;\;\;\frac{180}{\pi} \cdot \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 < -5e19Initial program 12.7%
associate--l-10.9%
Simplified10.9%
Taylor expanded in A around -inf 83.1%
associate-*r/83.1%
Simplified83.1%
Taylor expanded in B around 0 83.1%
associate-*r/83.1%
associate-/l*82.0%
associate-/r/83.3%
Simplified83.3%
if -5e19 < A Initial program 64.3%
Simplified85.0%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -5.5e-60)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -5.4e-285)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))
(* -180.0 (/ (atan (/ (+ A (hypot A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.5e-60) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -5.4e-285) {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / 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 <= -5.5e-60) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -5.4e-285) {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / 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 <= -5.5e-60: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -5.4e-285: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / 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 <= -5.5e-60) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -5.4e-285) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); else tmp = Float64(-180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.5e-60) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -5.4e-285) tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / 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, -5.5e-60], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.4e-285], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $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 -5.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -5.4 \cdot 10^{-285}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\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 < -5.4999999999999997e-60Initial program 21.8%
associate--l-20.2%
Simplified20.2%
Taylor expanded in A around -inf 73.2%
associate-*r/73.2%
Simplified73.2%
Taylor expanded in B around 0 73.2%
associate-*r/73.2%
associate-/l*72.4%
associate-/r/73.4%
Simplified73.4%
if -5.4999999999999997e-60 < A < -5.3999999999999997e-285Initial program 65.2%
associate--l-65.5%
Simplified65.5%
Taylor expanded in B around inf 62.8%
if -5.3999999999999997e-285 < A Initial program 66.4%
Simplified87.5%
Taylor expanded in C around -inf 82.7%
expm1-log1p-u33.8%
expm1-udef33.6%
Applied egg-rr38.8%
expm1-def38.8%
expm1-log1p87.5%
associate-*r/87.5%
distribute-rgt-neg-out87.5%
distribute-lft-neg-in87.5%
metadata-eval87.5%
+-commutative87.5%
sub-neg87.5%
neg-mul-187.5%
associate-+r+87.5%
+-commutative87.5%
neg-mul-187.5%
sub-neg87.5%
associate--l+82.6%
Simplified82.6%
Taylor expanded in C around 0 60.3%
unpow260.3%
unpow260.3%
hypot-def76.3%
Simplified76.3%
Taylor expanded in A around 0 76.3%
Final simplification73.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.7e+16)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 5.5e-19)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* -180.0 (/ (atan (/ (+ A (hypot A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e+16) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 5.5e-19) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / 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 <= -1.7e+16) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 5.5e-19) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / 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 <= -1.7e+16: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 5.5e-19: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / 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 <= -1.7e+16) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 5.5e-19) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(-180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.7e+16) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 5.5e-19) tmp = 180.0 * (atan(((C - hypot(B, C)) / 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, -1.7e+16], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.5e-19], 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[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.7 \cdot 10^{+16}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{-19}:\\
\;\;\;\;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{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.7e16Initial program 12.7%
associate--l-10.9%
Simplified10.9%
Taylor expanded in A around -inf 83.1%
associate-*r/83.1%
Simplified83.1%
Taylor expanded in B around 0 83.1%
associate-*r/83.1%
associate-/l*82.0%
associate-/r/83.3%
Simplified83.3%
if -1.7e16 < A < 5.4999999999999996e-19Initial program 57.4%
associate--l-57.3%
Simplified57.3%
Taylor expanded in A around 0 54.7%
unpow254.7%
unpow254.7%
hypot-def78.5%
Simplified78.5%
if 5.4999999999999996e-19 < A Initial program 76.3%
Simplified92.1%
Taylor expanded in C around -inf 89.7%
expm1-log1p-u38.2%
expm1-udef38.0%
Applied egg-rr40.7%
expm1-def40.7%
expm1-log1p92.1%
associate-*r/92.1%
distribute-rgt-neg-out92.1%
distribute-lft-neg-in92.1%
metadata-eval92.1%
+-commutative92.1%
sub-neg92.1%
neg-mul-192.1%
associate-+r+92.1%
+-commutative92.1%
neg-mul-192.1%
sub-neg92.1%
associate--l+89.7%
Simplified89.7%
Taylor expanded in C around 0 76.3%
unpow276.3%
unpow276.3%
hypot-def89.3%
Simplified89.3%
Taylor expanded in A around 0 89.3%
Final simplification82.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))
(if (<= B -1.35e+119)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.4e-125)
t_0
(if (<= B 1.2e-255)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4.2e-75) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
double tmp;
if (B <= -1.35e+119) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.4e-125) {
tmp = t_0;
} else if (B <= 1.2e-255) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4.2e-75) {
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(((A / B) * -2.0)) / Math.PI);
double tmp;
if (B <= -1.35e+119) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.4e-125) {
tmp = t_0;
} else if (B <= 1.2e-255) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4.2e-75) {
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(((A / B) * -2.0)) / math.pi) tmp = 0 if B <= -1.35e+119: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.4e-125: tmp = t_0 elif B <= 1.2e-255: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4.2e-75: 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(Float64(A / B) * -2.0)) / pi)) tmp = 0.0 if (B <= -1.35e+119) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.4e-125) tmp = t_0; elseif (B <= 1.2e-255) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4.2e-75) 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(((A / B) * -2.0)) / pi); tmp = 0.0; if (B <= -1.35e+119) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.4e-125) tmp = t_0; elseif (B <= 1.2e-255) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4.2e-75) 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[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.35e+119], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.4e-125], t$95$0, If[LessEqual[B, 1.2e-255], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-75], 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{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{if}\;B \leq -1.35 \cdot 10^{+119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.4 \cdot 10^{-125}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-255}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-75}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.3499999999999999e119Initial program 32.0%
associate--l-32.0%
Simplified32.0%
Taylor expanded in B around -inf 69.9%
if -1.3499999999999999e119 < B < -2.4000000000000001e-125 or 1.1999999999999999e-255 < B < 4.2000000000000002e-75Initial program 62.8%
associate--l-62.7%
Simplified62.7%
Taylor expanded in A around inf 41.5%
if -2.4000000000000001e-125 < B < 1.1999999999999999e-255Initial program 50.7%
associate--l-48.9%
Simplified48.9%
Taylor expanded in C around inf 39.4%
associate-*r/39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
metadata-eval39.4%
Simplified39.4%
if 4.2000000000000002e-75 < B Initial program 50.2%
associate--l-50.3%
Simplified50.3%
Taylor expanded in B around inf 56.2%
Final simplification48.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.35e+119)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1e-123)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 1.4e-283)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.9e-62)
(* 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.35e+119) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1e-123) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 1.4e-283) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.9e-62) {
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.35e+119) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1e-123) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 1.4e-283) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.9e-62) {
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.35e+119: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1e-123: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 1.4e-283: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.9e-62: 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.35e+119) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1e-123) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 1.4e-283) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.9e-62) 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.35e+119) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1e-123) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 1.4e-283) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.9e-62) 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.35e+119], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1e-123], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-283], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e-62], 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.35 \cdot 10^{+119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1 \cdot 10^{-123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-283}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{-62}:\\
\;\;\;\;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.3499999999999999e119Initial program 32.0%
associate--l-32.0%
Simplified32.0%
Taylor expanded in B around -inf 69.9%
if -1.3499999999999999e119 < B < -1.0000000000000001e-123Initial program 55.0%
associate--l-54.9%
Simplified54.9%
Taylor expanded in A around inf 34.9%
if -1.0000000000000001e-123 < B < 1.3999999999999999e-283Initial program 47.6%
associate--l-45.6%
Simplified45.6%
Taylor expanded in C around inf 40.1%
associate-*r/40.1%
distribute-rgt1-in40.1%
metadata-eval40.1%
mul0-lft40.1%
metadata-eval40.1%
Simplified40.1%
if 1.3999999999999999e-283 < B < 2.89999999999999986e-62Initial program 68.3%
associate--l-68.4%
Simplified68.4%
Taylor expanded in C around -inf 45.4%
if 2.89999999999999986e-62 < B Initial program 51.6%
associate--l-51.5%
Simplified51.5%
Taylor expanded in B around inf 57.7%
Final simplification48.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- A) B)) PI))))
(if (<= B -1.35e+119)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.2e-126)
t_0
(if (<= B 4e-256)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 6.8e-75) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-A / B)) / ((double) M_PI));
double tmp;
if (B <= -1.35e+119) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.2e-126) {
tmp = t_0;
} else if (B <= 4e-256) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 6.8e-75) {
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((-A / B)) / Math.PI);
double tmp;
if (B <= -1.35e+119) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.2e-126) {
tmp = t_0;
} else if (B <= 4e-256) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 6.8e-75) {
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((-A / B)) / math.pi) tmp = 0 if B <= -1.35e+119: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.2e-126: tmp = t_0 elif B <= 4e-256: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 6.8e-75: 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(Float64(-A) / B)) / pi)) tmp = 0.0 if (B <= -1.35e+119) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.2e-126) tmp = t_0; elseif (B <= 4e-256) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 6.8e-75) 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((-A / B)) / pi); tmp = 0.0; if (B <= -1.35e+119) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.2e-126) tmp = t_0; elseif (B <= 4e-256) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 6.8e-75) 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[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.35e+119], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.2e-126], t$95$0, If[LessEqual[B, 4e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e-75], 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{-A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.35 \cdot 10^{+119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-126}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-75}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.3499999999999999e119Initial program 32.0%
associate--l-32.0%
Simplified32.0%
Taylor expanded in B around -inf 69.9%
if -1.3499999999999999e119 < B < -6.2000000000000003e-126 or 3.99999999999999991e-256 < B < 6.8000000000000003e-75Initial program 62.8%
associate--l-62.7%
Simplified62.7%
Taylor expanded in C around 0 51.6%
associate-*r/51.6%
mul-1-neg51.6%
+-commutative51.6%
unpow251.6%
unpow251.6%
hypot-def57.1%
Simplified57.1%
Taylor expanded in A around 0 45.9%
Taylor expanded in A around inf 41.5%
associate-*r/41.5%
mul-1-neg41.5%
Simplified41.5%
if -6.2000000000000003e-126 < B < 3.99999999999999991e-256Initial program 50.7%
associate--l-48.9%
Simplified48.9%
Taylor expanded in C around inf 39.4%
associate-*r/39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
metadata-eval39.4%
Simplified39.4%
if 6.8000000000000003e-75 < B Initial program 50.2%
associate--l-50.3%
Simplified50.3%
Taylor expanded in B around inf 56.2%
Final simplification48.5%
(FPCore (A B C)
:precision binary64
(if (<= C -1.5e-98)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C 2.3e+71)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* 180.0 (/ (atan (/ 0.0 B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.5e-98) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= 2.3e+71) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.5e-98) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= 2.3e+71) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.5e-98: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= 2.3e+71: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.5e-98) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= 2.3e+71) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.5e-98) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= 2.3e+71) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.5e-98], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.3e+71], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.5 \cdot 10^{-98}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.3 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.5e-98Initial program 69.3%
associate--l-69.3%
Simplified69.3%
Taylor expanded in C around -inf 56.7%
if -1.5e-98 < C < 2.3000000000000002e71Initial program 51.9%
associate--l-51.8%
Simplified51.8%
Taylor expanded in C around 0 49.9%
associate-*r/49.9%
mul-1-neg49.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-def73.0%
Simplified73.0%
Taylor expanded in A around 0 54.1%
Taylor expanded in A around 0 54.1%
neg-mul-154.1%
distribute-neg-frac54.1%
distribute-neg-in54.1%
mul-1-neg54.1%
sub-neg54.1%
sub-neg54.1%
mul-1-neg54.1%
distribute-neg-in54.1%
+-commutative54.1%
distribute-neg-in54.1%
neg-mul-154.1%
sub-neg54.1%
Simplified54.1%
if 2.3000000000000002e71 < C Initial program 26.0%
associate--l-24.0%
Simplified24.0%
Taylor expanded in C around inf 44.3%
associate-*r/44.3%
distribute-rgt1-in44.3%
metadata-eval44.3%
mul0-lft44.3%
metadata-eval44.3%
Simplified44.3%
Final simplification53.2%
(FPCore (A B C)
:precision binary64
(if (<= B -3.3e-191)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 3.5e-267)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.3e-191) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 3.5e-267) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.3e-191) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 3.5e-267) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.3e-191: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 3.5e-267: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.3e-191) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 3.5e-267) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.3e-191) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 3.5e-267) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.3e-191], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-267], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.3 \cdot 10^{-191}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-267}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.29999999999999981e-191Initial program 46.0%
associate--l-46.0%
Simplified46.0%
Taylor expanded in C around 0 39.7%
associate-*r/39.7%
mul-1-neg39.7%
+-commutative39.7%
unpow239.7%
unpow239.7%
hypot-def56.4%
Simplified56.4%
Taylor expanded in B around -inf 52.5%
mul-1-neg52.5%
unsub-neg52.5%
Simplified52.5%
if -3.29999999999999981e-191 < B < 3.4999999999999999e-267Initial program 49.0%
associate--l-46.5%
Simplified46.5%
Taylor expanded in C around inf 44.7%
associate-*r/44.7%
distribute-rgt1-in44.7%
metadata-eval44.7%
mul0-lft44.7%
metadata-eval44.7%
Simplified44.7%
if 3.4999999999999999e-267 < B Initial program 59.4%
associate--l-59.4%
Simplified59.4%
Taylor expanded in C around 0 47.5%
associate-*r/47.5%
mul-1-neg47.5%
+-commutative47.5%
unpow247.5%
unpow247.5%
hypot-def68.2%
Simplified68.2%
Taylor expanded in A around 0 62.7%
Taylor expanded in A around 0 62.7%
neg-mul-162.7%
distribute-neg-frac62.7%
distribute-neg-in62.7%
mul-1-neg62.7%
sub-neg62.7%
sub-neg62.7%
mul-1-neg62.7%
distribute-neg-in62.7%
+-commutative62.7%
distribute-neg-in62.7%
neg-mul-162.7%
sub-neg62.7%
Simplified62.7%
Final simplification55.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.35e-98)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C 2.4e+20)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.35e-98) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= 2.4e+20) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((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.35e-98) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= 2.4e+20) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / 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.35e-98: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= 2.4e+20: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / 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.35e-98) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= 2.4e+20) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.35e-98) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= 2.4e+20) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.35e-98], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.4e+20], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.35 \cdot 10^{-98}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.4 \cdot 10^{+20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.3499999999999999e-98Initial program 69.3%
associate--l-69.3%
Simplified69.3%
Taylor expanded in C around -inf 56.7%
if -1.3499999999999999e-98 < C < 2.4e20Initial program 53.7%
associate--l-53.6%
Simplified53.6%
Taylor expanded in C around 0 51.5%
associate-*r/51.5%
mul-1-neg51.5%
+-commutative51.5%
unpow251.5%
unpow251.5%
hypot-def74.1%
Simplified74.1%
Taylor expanded in A around 0 55.6%
Taylor expanded in A around 0 55.6%
neg-mul-155.6%
distribute-neg-frac55.6%
distribute-neg-in55.6%
mul-1-neg55.6%
sub-neg55.6%
sub-neg55.6%
mul-1-neg55.6%
distribute-neg-in55.6%
+-commutative55.6%
distribute-neg-in55.6%
neg-mul-155.6%
sub-neg55.6%
Simplified55.6%
if 2.4e20 < C Initial program 26.5%
associate--l-24.7%
Simplified24.7%
sub-neg24.7%
+-commutative24.7%
unpow224.7%
unpow224.7%
hypot-udef54.9%
distribute-rgt-in21.5%
div-inv21.8%
Applied egg-rr21.8%
Taylor expanded in C around inf 37.8%
+-commutative37.8%
associate--l+37.8%
unpow237.8%
mul-1-neg37.8%
mul-1-neg37.8%
sqr-neg37.8%
unpow237.8%
distribute-lft1-in37.8%
metadata-eval37.8%
mul0-lft41.4%
metadata-eval41.4%
Simplified41.4%
Taylor expanded in A around 0 72.4%
metadata-eval72.4%
distribute-lft-neg-in72.4%
distribute-lft-neg-in72.4%
metadata-eval72.4%
associate-*r/72.4%
Simplified72.4%
Final simplification59.6%
(FPCore (A B C) :precision binary64 (if (<= A -3.8e-109) (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e-109) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e-109) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e-109: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e-109) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e-109) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e-109], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.80000000000000002e-109Initial program 24.1%
associate--l-22.8%
Simplified22.8%
Taylor expanded in A around -inf 71.4%
associate-*r/71.4%
Simplified71.4%
Taylor expanded in B around 0 71.4%
associate-*r/71.4%
associate-/l*70.6%
associate-/r/71.6%
Simplified71.6%
if -3.80000000000000002e-109 < A Initial program 66.8%
associate--l-66.8%
Simplified66.8%
Taylor expanded in B around -inf 61.8%
associate--l+61.8%
div-sub62.5%
Simplified62.5%
Final simplification65.4%
(FPCore (A B C) :precision binary64 (if (<= A -5.6e-60) (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))) (* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.6e-60) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.6e-60) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.6e-60: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.6e-60) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.6e-60) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.6e-60], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.6000000000000005e-60Initial program 21.8%
associate--l-20.2%
Simplified20.2%
Taylor expanded in A around -inf 73.2%
associate-*r/73.2%
Simplified73.2%
Taylor expanded in B around 0 73.2%
associate-*r/73.2%
associate-/l*72.4%
associate-/r/73.4%
Simplified73.4%
if -5.6000000000000005e-60 < A Initial program 66.1%
associate--l-66.2%
Simplified66.2%
sub-neg66.2%
+-commutative66.2%
unpow266.2%
unpow266.2%
hypot-udef88.2%
distribute-rgt-in80.5%
div-inv80.6%
Applied egg-rr80.6%
Taylor expanded in B around inf 66.9%
sub-neg66.9%
+-commutative66.9%
mul-1-neg66.9%
sub-neg66.9%
div-sub67.5%
metadata-eval67.5%
Simplified67.5%
Final simplification69.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.55e-100)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.2e-236)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.55e-100) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.2e-236) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.55e-100) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.2e-236) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.55e-100: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.2e-236: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.55e-100) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.2e-236) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.55e-100) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.2e-236) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.55e-100], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.2e-236], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.55 \cdot 10^{-100}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-236}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.5499999999999999e-100Initial program 45.8%
associate--l-45.7%
Simplified45.7%
Taylor expanded in B around -inf 40.9%
if -1.5499999999999999e-100 < B < 1.2000000000000001e-236Initial program 54.2%
associate--l-52.8%
Simplified52.8%
Taylor expanded in C around inf 36.9%
associate-*r/36.9%
distribute-rgt1-in36.9%
metadata-eval36.9%
mul0-lft36.9%
metadata-eval36.9%
Simplified36.9%
if 1.2000000000000001e-236 < B Initial program 56.6%
associate--l-56.6%
Simplified56.6%
Taylor expanded in B around inf 45.0%
Final simplification41.6%
(FPCore (A B C) :precision binary64 (if (<= A -2.7e-216) (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI)) (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e-216) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e-216) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.7e-216: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.7e-216) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.7e-216) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.7e-216], 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[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.7 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.6999999999999999e-216Initial program 31.5%
associate--l-30.4%
Simplified30.4%
Taylor expanded in A around -inf 66.2%
associate-*r/66.2%
Simplified66.2%
if -2.6999999999999999e-216 < A Initial program 66.9%
associate--l-66.9%
Simplified66.9%
Taylor expanded in C around 0 57.2%
associate-*r/57.2%
mul-1-neg57.2%
+-commutative57.2%
unpow257.2%
unpow257.2%
hypot-def73.7%
Simplified73.7%
Taylor expanded in A around 0 60.2%
Taylor expanded in A around 0 60.2%
neg-mul-160.2%
distribute-neg-frac60.2%
distribute-neg-in60.2%
mul-1-neg60.2%
sub-neg60.2%
sub-neg60.2%
mul-1-neg60.2%
distribute-neg-in60.2%
+-commutative60.2%
distribute-neg-in60.2%
neg-mul-160.2%
sub-neg60.2%
Simplified60.2%
Final simplification62.6%
(FPCore (A B C) :precision binary64 (if (<= A -1.02e-212) (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))) (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e-212) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e-212) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.02e-212: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.02e-212) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.02e-212) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.02e-212], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.02 \cdot 10^{-212}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.0199999999999999e-212Initial program 31.5%
associate--l-30.4%
Simplified30.4%
Taylor expanded in A around -inf 66.2%
associate-*r/66.2%
Simplified66.2%
Taylor expanded in B around 0 66.2%
associate-*r/66.2%
associate-/l*65.6%
associate-/r/66.3%
Simplified66.3%
if -1.0199999999999999e-212 < A Initial program 66.9%
associate--l-66.9%
Simplified66.9%
Taylor expanded in C around 0 57.2%
associate-*r/57.2%
mul-1-neg57.2%
+-commutative57.2%
unpow257.2%
unpow257.2%
hypot-def73.7%
Simplified73.7%
Taylor expanded in A around 0 60.2%
Taylor expanded in A around 0 60.2%
neg-mul-160.2%
distribute-neg-frac60.2%
distribute-neg-in60.2%
mul-1-neg60.2%
sub-neg60.2%
sub-neg60.2%
mul-1-neg60.2%
distribute-neg-in60.2%
+-commutative60.2%
distribute-neg-in60.2%
neg-mul-160.2%
sub-neg60.2%
Simplified60.2%
Final simplification62.7%
(FPCore (A B C) :precision binary64 (if (<= B -5.5e-305) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.5e-305) {
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 <= -5.5e-305) {
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 <= -5.5e-305: 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 <= -5.5e-305) 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 <= -5.5e-305) 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, -5.5e-305], 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.5 \cdot 10^{-305}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.5e-305Initial program 47.4%
associate--l-46.5%
Simplified46.5%
Taylor expanded in B around -inf 30.2%
if -5.5e-305 < B Initial program 57.4%
associate--l-57.3%
Simplified57.3%
Taylor expanded in B around inf 37.9%
Final simplification34.4%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 52.8%
associate--l-52.4%
Simplified52.4%
Taylor expanded in B around inf 21.4%
Final simplification21.4%
herbie shell --seed 2023333
(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)))