
(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 -4.6e+79)
(* (/ 180.0 PI) (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))))
(if (<= A 1.65e-69)
(/ (* 180.0 (atan (/ (- B) (+ C (hypot B C))))) PI)
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+79) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) + ((B / A) * (C / A)))));
} else if (A <= 1.65e-69) {
tmp = (180.0 * atan((-B / (C + hypot(B, C))))) / ((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 <= -4.6e+79) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) + ((B / A) * (C / A)))));
} else if (A <= 1.65e-69) {
tmp = (180.0 * Math.atan((-B / (C + Math.hypot(B, C))))) / 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 <= -4.6e+79: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) elif A <= 1.65e-69: tmp = (180.0 * math.atan((-B / (C + math.hypot(B, C))))) / 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 <= -4.6e+79) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A)))))); elseif (A <= 1.65e-69) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-B) / Float64(C + hypot(B, C))))) / 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 <= -4.6e+79) tmp = (180.0 / pi) * atan((0.5 * ((B / A) + ((B / A) * (C / A))))); elseif (A <= 1.65e-69) tmp = (180.0 * atan((-B / (C + hypot(B, C))))) / 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, -4.6e+79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.65e-69], N[(N[(180.0 * N[ArcTan[N[((-B) / N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $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 -4.6 \cdot 10^{+79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)\\
\mathbf{elif}\;A \leq 1.65 \cdot 10^{-69}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-B}{C + \mathsf{hypot}\left(B, C\right)}\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 < -4.6000000000000001e79Initial program 16.7%
associate-*r/16.7%
associate-*l/16.7%
associate-*l/16.7%
*-lft-identity16.7%
sub-neg16.7%
associate-+l-12.4%
sub-neg12.4%
remove-double-neg12.4%
+-commutative12.4%
unpow212.4%
unpow212.4%
hypot-def22.8%
Simplified22.8%
add-sqr-sqrt22.7%
pow222.7%
Applied egg-rr22.7%
unpow222.7%
add-sqr-sqrt22.8%
add-log-exp30.2%
Applied egg-rr30.2%
Taylor expanded in A around -inf 81.4%
distribute-lft-out81.4%
*-commutative81.4%
unpow281.4%
times-frac85.0%
Simplified85.0%
if -4.6000000000000001e79 < A < 1.65e-69Initial program 56.0%
associate-*r/56.0%
unpow256.0%
Simplified56.0%
associate--l-55.9%
+-commutative55.9%
unpow255.9%
hypot-udef73.3%
flip--29.5%
frac-times26.0%
*-un-lft-identity26.0%
pow226.0%
Applied egg-rr26.0%
associate-+r+26.0%
Simplified26.0%
Taylor expanded in A around 0 52.6%
associate-*r/52.6%
mul-1-neg52.6%
unpow252.6%
unpow252.6%
hypot-def89.7%
Simplified89.7%
if 1.65e-69 < A Initial program 77.3%
associate-*l/77.3%
*-lft-identity77.3%
+-commutative77.3%
unpow277.3%
unpow277.3%
hypot-def95.2%
Simplified95.2%
Final simplification90.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2.8e+79)
(* (/ 180.0 PI) (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))))
(if (<= A 3.8e+93)
(/ (* 180.0 (atan (/ (- B) (+ C (hypot B C))))) PI)
(* (/ 180.0 PI) (atan (/ (- C (+ A B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+79) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) + ((B / A) * (C / A)))));
} else if (A <= 3.8e+93) {
tmp = (180.0 * atan((-B / (C + hypot(B, C))))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+79) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) + ((B / A) * (C / A)))));
} else if (A <= 3.8e+93) {
tmp = (180.0 * Math.atan((-B / (C + Math.hypot(B, C))))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.8e+79: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) elif A <= 3.8e+93: tmp = (180.0 * math.atan((-B / (C + math.hypot(B, C))))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.8e+79) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A)))))); elseif (A <= 3.8e+93) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-B) / Float64(C + hypot(B, C))))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.8e+79) tmp = (180.0 / pi) * atan((0.5 * ((B / A) + ((B / A) * (C / A))))); elseif (A <= 3.8e+93) tmp = (180.0 * atan((-B / (C + hypot(B, C))))) / pi; else tmp = (180.0 / pi) * atan(((C - (A + B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.8e+79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e+93], N[(N[(180.0 * N[ArcTan[N[((-B) / N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.8 \cdot 10^{+79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{+93}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-B}{C + \mathsf{hypot}\left(B, C\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -2.8000000000000001e79Initial program 16.7%
associate-*r/16.7%
associate-*l/16.7%
associate-*l/16.7%
*-lft-identity16.7%
sub-neg16.7%
associate-+l-12.4%
sub-neg12.4%
remove-double-neg12.4%
+-commutative12.4%
unpow212.4%
unpow212.4%
hypot-def22.8%
Simplified22.8%
add-sqr-sqrt22.7%
pow222.7%
Applied egg-rr22.7%
unpow222.7%
add-sqr-sqrt22.8%
add-log-exp30.2%
Applied egg-rr30.2%
Taylor expanded in A around -inf 81.4%
distribute-lft-out81.4%
*-commutative81.4%
unpow281.4%
times-frac85.0%
Simplified85.0%
if -2.8000000000000001e79 < A < 3.7999999999999998e93Initial program 57.5%
associate-*r/57.4%
unpow257.4%
Simplified57.4%
associate--l-57.4%
+-commutative57.4%
unpow257.4%
hypot-udef76.2%
flip--31.8%
frac-times28.2%
*-un-lft-identity28.2%
pow228.2%
Applied egg-rr28.2%
associate-+r+28.2%
Simplified28.2%
Taylor expanded in A around 0 49.4%
associate-*r/49.4%
mul-1-neg49.4%
unpow249.4%
unpow249.4%
hypot-def88.0%
Simplified88.0%
if 3.7999999999999998e93 < A Initial program 86.4%
associate-*r/86.5%
associate-*l/86.5%
associate-*l/86.5%
*-lft-identity86.5%
sub-neg86.5%
associate-+l-86.5%
sub-neg86.5%
remove-double-neg86.5%
+-commutative86.5%
unpow286.5%
unpow286.5%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around inf 89.3%
Final simplification87.7%
(FPCore (A B C)
:precision binary64
(if (<= A -1.25e+58)
(* (/ 180.0 PI) (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))))
(if (<= A 2.35e-101)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (/ (- C (+ A B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+58) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) + ((B / A) * (C / A)))));
} else if (A <= 2.35e-101) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+58) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) + ((B / A) * (C / A)))));
} else if (A <= 2.35e-101) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e+58: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) elif A <= 2.35e-101: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e+58) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A)))))); elseif (A <= 2.35e-101) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e+58) tmp = (180.0 / pi) * atan((0.5 * ((B / A) + ((B / A) * (C / A))))); elseif (A <= 2.35e-101) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan(((C - (A + B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e+58], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.35e-101], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{+58}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)\\
\mathbf{elif}\;A \leq 2.35 \cdot 10^{-101}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.24999999999999996e58Initial program 15.8%
associate-*r/15.8%
associate-*l/15.8%
associate-*l/15.8%
*-lft-identity15.8%
sub-neg15.8%
associate-+l-11.9%
sub-neg11.9%
remove-double-neg11.9%
+-commutative11.9%
unpow211.9%
unpow211.9%
hypot-def24.4%
Simplified24.4%
add-sqr-sqrt24.2%
pow224.2%
Applied egg-rr24.2%
unpow224.2%
add-sqr-sqrt24.4%
add-log-exp30.9%
Applied egg-rr30.9%
Taylor expanded in A around -inf 77.1%
distribute-lft-out77.1%
*-commutative77.1%
unpow277.1%
times-frac80.3%
Simplified80.3%
if -1.24999999999999996e58 < A < 2.35e-101Initial program 58.9%
associate-*r/58.9%
associate-*l/58.9%
associate-*l/58.9%
*-lft-identity58.9%
sub-neg58.9%
associate-+l-58.8%
sub-neg58.8%
remove-double-neg58.8%
+-commutative58.8%
unpow258.8%
unpow258.8%
hypot-def76.1%
Simplified76.1%
Taylor expanded in A around 0 58.0%
unpow258.0%
unpow258.0%
hypot-def75.4%
Simplified75.4%
if 2.35e-101 < A Initial program 76.0%
associate-*r/76.0%
associate-*l/76.0%
associate-*l/76.0%
*-lft-identity76.0%
sub-neg76.0%
associate-+l-76.0%
sub-neg76.0%
remove-double-neg76.0%
+-commutative76.0%
unpow276.0%
unpow276.0%
hypot-def93.1%
Simplified93.1%
Taylor expanded in B around inf 83.6%
Final simplification79.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
(t_1 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI)))
(t_2 (* 180.0 (/ (atan 1.0) PI))))
(if (<= A -1.65e+35)
t_1
(if (<= A -4.1e-23)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= A -4.1e-125)
t_1
(if (<= A -4.6e-205)
t_0
(if (<= A -3.7e-222)
t_1
(if (<= A -2.6e-226)
t_0
(if (<= A -3.3e-254)
t_2
(if (<= A 4.5e-247)
t_0
(if (<= A 9.8e-169)
t_2
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double t_2 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (A <= -1.65e+35) {
tmp = t_1;
} else if (A <= -4.1e-23) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (A <= -4.1e-125) {
tmp = t_1;
} else if (A <= -4.6e-205) {
tmp = t_0;
} else if (A <= -3.7e-222) {
tmp = t_1;
} else if (A <= -2.6e-226) {
tmp = t_0;
} else if (A <= -3.3e-254) {
tmp = t_2;
} else if (A <= 4.5e-247) {
tmp = t_0;
} else if (A <= 9.8e-169) {
tmp = t_2;
} 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 t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double t_2 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (A <= -1.65e+35) {
tmp = t_1;
} else if (A <= -4.1e-23) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (A <= -4.1e-125) {
tmp = t_1;
} else if (A <= -4.6e-205) {
tmp = t_0;
} else if (A <= -3.7e-222) {
tmp = t_1;
} else if (A <= -2.6e-226) {
tmp = t_0;
} else if (A <= -3.3e-254) {
tmp = t_2;
} else if (A <= 4.5e-247) {
tmp = t_0;
} else if (A <= 9.8e-169) {
tmp = t_2;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) t_1 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) t_2 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if A <= -1.65e+35: tmp = t_1 elif A <= -4.1e-23: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif A <= -4.1e-125: tmp = t_1 elif A <= -4.6e-205: tmp = t_0 elif A <= -3.7e-222: tmp = t_1 elif A <= -2.6e-226: tmp = t_0 elif A <= -3.3e-254: tmp = t_2 elif A <= 4.5e-247: tmp = t_0 elif A <= 9.8e-169: tmp = t_2 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) t_2 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (A <= -1.65e+35) tmp = t_1; elseif (A <= -4.1e-23) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (A <= -4.1e-125) tmp = t_1; elseif (A <= -4.6e-205) tmp = t_0; elseif (A <= -3.7e-222) tmp = t_1; elseif (A <= -2.6e-226) tmp = t_0; elseif (A <= -3.3e-254) tmp = t_2; elseif (A <= 4.5e-247) tmp = t_0; elseif (A <= 9.8e-169) tmp = t_2; 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) t_0 = 180.0 * (atan(-1.0) / pi); t_1 = 180.0 * (atan((0.5 * (B / A))) / pi); t_2 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (A <= -1.65e+35) tmp = t_1; elseif (A <= -4.1e-23) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (A <= -4.1e-125) tmp = t_1; elseif (A <= -4.6e-205) tmp = t_0; elseif (A <= -3.7e-222) tmp = t_1; elseif (A <= -2.6e-226) tmp = t_0; elseif (A <= -3.3e-254) tmp = t_2; elseif (A <= 4.5e-247) tmp = t_0; elseif (A <= 9.8e-169) tmp = t_2; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.65e+35], t$95$1, If[LessEqual[A, -4.1e-23], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.1e-125], t$95$1, If[LessEqual[A, -4.6e-205], t$95$0, If[LessEqual[A, -3.7e-222], t$95$1, If[LessEqual[A, -2.6e-226], t$95$0, If[LessEqual[A, -3.3e-254], t$95$2, If[LessEqual[A, 4.5e-247], t$95$0, If[LessEqual[A, 9.8e-169], t$95$2, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;A \leq -1.65 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -4.1 \cdot 10^{-23}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.1 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -4.6 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.7 \cdot 10^{-222}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -2.6 \cdot 10^{-226}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.3 \cdot 10^{-254}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{-247}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 9.8 \cdot 10^{-169}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.6500000000000001e35 or -4.10000000000000029e-23 < A < -4.0999999999999997e-125 or -4.5999999999999998e-205 < A < -3.6999999999999999e-222Initial program 25.5%
associate-*l/25.5%
*-lft-identity25.5%
+-commutative25.5%
unpow225.5%
unpow225.5%
hypot-def52.7%
Simplified52.7%
Taylor expanded in A around -inf 61.9%
if -1.6500000000000001e35 < A < -4.10000000000000029e-23Initial program 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
unpow270.1%
hypot-def81.1%
Simplified81.1%
Taylor expanded in C around -inf 54.6%
if -4.0999999999999997e-125 < A < -4.5999999999999998e-205 or -3.6999999999999999e-222 < A < -2.5999999999999998e-226 or -3.30000000000000016e-254 < A < 4.5000000000000002e-247Initial program 62.0%
associate-*l/62.0%
*-lft-identity62.0%
+-commutative62.0%
unpow262.0%
unpow262.0%
hypot-def76.8%
Simplified76.8%
Taylor expanded in B around inf 42.2%
if -2.5999999999999998e-226 < A < -3.30000000000000016e-254 or 4.5000000000000002e-247 < A < 9.7999999999999999e-169Initial program 60.2%
associate-*l/60.2%
*-lft-identity60.2%
+-commutative60.2%
unpow260.2%
unpow260.2%
hypot-def89.1%
Simplified89.1%
Taylor expanded in B around -inf 55.8%
if 9.7999999999999999e-169 < A Initial program 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
unpow275.3%
hypot-def93.0%
Simplified93.0%
Taylor expanded in A around inf 65.7%
*-commutative65.7%
Simplified65.7%
Final simplification59.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
(t_1 (atan (* 0.5 (/ B A))))
(t_2 (* 180.0 (/ t_1 PI)))
(t_3 (* 180.0 (/ (atan 1.0) PI))))
(if (<= A -2.7e+35)
(* (/ 180.0 PI) t_1)
(if (<= A -3.1e-24)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= A -1.8e-125)
t_2
(if (<= A -2.4e-205)
t_0
(if (<= A -2.2e-222)
t_2
(if (<= A -2.35e-226)
t_0
(if (<= A -8e-252)
t_3
(if (<= A 1.7e-251)
t_0
(if (<= A 3.45e-168)
t_3
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double t_1 = atan((0.5 * (B / A)));
double t_2 = 180.0 * (t_1 / ((double) M_PI));
double t_3 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (A <= -2.7e+35) {
tmp = (180.0 / ((double) M_PI)) * t_1;
} else if (A <= -3.1e-24) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (A <= -1.8e-125) {
tmp = t_2;
} else if (A <= -2.4e-205) {
tmp = t_0;
} else if (A <= -2.2e-222) {
tmp = t_2;
} else if (A <= -2.35e-226) {
tmp = t_0;
} else if (A <= -8e-252) {
tmp = t_3;
} else if (A <= 1.7e-251) {
tmp = t_0;
} else if (A <= 3.45e-168) {
tmp = t_3;
} 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 t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double t_1 = Math.atan((0.5 * (B / A)));
double t_2 = 180.0 * (t_1 / Math.PI);
double t_3 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (A <= -2.7e+35) {
tmp = (180.0 / Math.PI) * t_1;
} else if (A <= -3.1e-24) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (A <= -1.8e-125) {
tmp = t_2;
} else if (A <= -2.4e-205) {
tmp = t_0;
} else if (A <= -2.2e-222) {
tmp = t_2;
} else if (A <= -2.35e-226) {
tmp = t_0;
} else if (A <= -8e-252) {
tmp = t_3;
} else if (A <= 1.7e-251) {
tmp = t_0;
} else if (A <= 3.45e-168) {
tmp = t_3;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) t_1 = math.atan((0.5 * (B / A))) t_2 = 180.0 * (t_1 / math.pi) t_3 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if A <= -2.7e+35: tmp = (180.0 / math.pi) * t_1 elif A <= -3.1e-24: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif A <= -1.8e-125: tmp = t_2 elif A <= -2.4e-205: tmp = t_0 elif A <= -2.2e-222: tmp = t_2 elif A <= -2.35e-226: tmp = t_0 elif A <= -8e-252: tmp = t_3 elif A <= 1.7e-251: tmp = t_0 elif A <= 3.45e-168: tmp = t_3 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) t_1 = atan(Float64(0.5 * Float64(B / A))) t_2 = Float64(180.0 * Float64(t_1 / pi)) t_3 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (A <= -2.7e+35) tmp = Float64(Float64(180.0 / pi) * t_1); elseif (A <= -3.1e-24) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (A <= -1.8e-125) tmp = t_2; elseif (A <= -2.4e-205) tmp = t_0; elseif (A <= -2.2e-222) tmp = t_2; elseif (A <= -2.35e-226) tmp = t_0; elseif (A <= -8e-252) tmp = t_3; elseif (A <= 1.7e-251) tmp = t_0; elseif (A <= 3.45e-168) tmp = t_3; 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) t_0 = 180.0 * (atan(-1.0) / pi); t_1 = atan((0.5 * (B / A))); t_2 = 180.0 * (t_1 / pi); t_3 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (A <= -2.7e+35) tmp = (180.0 / pi) * t_1; elseif (A <= -3.1e-24) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (A <= -1.8e-125) tmp = t_2; elseif (A <= -2.4e-205) tmp = t_0; elseif (A <= -2.2e-222) tmp = t_2; elseif (A <= -2.35e-226) tmp = t_0; elseif (A <= -8e-252) tmp = t_3; elseif (A <= 1.7e-251) tmp = t_0; elseif (A <= 3.45e-168) tmp = t_3; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.7e+35], N[(N[(180.0 / Pi), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[A, -3.1e-24], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.8e-125], t$95$2, If[LessEqual[A, -2.4e-205], t$95$0, If[LessEqual[A, -2.2e-222], t$95$2, If[LessEqual[A, -2.35e-226], t$95$0, If[LessEqual[A, -8e-252], t$95$3, If[LessEqual[A, 1.7e-251], t$95$0, If[LessEqual[A, 3.45e-168], t$95$3, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
t_2 := 180 \cdot \frac{t_1}{\pi}\\
t_3 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;A \leq -2.7 \cdot 10^{+35}:\\
\;\;\;\;\frac{180}{\pi} \cdot t_1\\
\mathbf{elif}\;A \leq -3.1 \cdot 10^{-24}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.8 \cdot 10^{-125}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;A \leq -2.4 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.2 \cdot 10^{-222}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;A \leq -2.35 \cdot 10^{-226}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -8 \cdot 10^{-252}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;A \leq 1.7 \cdot 10^{-251}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.45 \cdot 10^{-168}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.70000000000000003e35Initial program 15.8%
associate-*r/15.8%
associate-*l/15.8%
associate-*l/15.8%
*-lft-identity15.8%
sub-neg15.8%
associate-+l-11.9%
sub-neg11.9%
remove-double-neg11.9%
+-commutative11.9%
unpow211.9%
unpow211.9%
hypot-def24.4%
Simplified24.4%
Taylor expanded in A around -inf 46.9%
unpow246.9%
Simplified46.9%
Taylor expanded in C around 0 77.2%
if -2.70000000000000003e35 < A < -3.1e-24Initial program 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
unpow270.1%
hypot-def81.1%
Simplified81.1%
Taylor expanded in C around -inf 54.6%
if -3.1e-24 < A < -1.8000000000000001e-125 or -2.4000000000000002e-205 < A < -2.2e-222Initial program 42.9%
associate-*l/42.9%
*-lft-identity42.9%
+-commutative42.9%
unpow242.9%
unpow242.9%
hypot-def57.3%
Simplified57.3%
Taylor expanded in A around -inf 35.1%
if -1.8000000000000001e-125 < A < -2.4000000000000002e-205 or -2.2e-222 < A < -2.34999999999999999e-226 or -7.99999999999999954e-252 < A < 1.70000000000000008e-251Initial program 62.0%
associate-*l/62.0%
*-lft-identity62.0%
+-commutative62.0%
unpow262.0%
unpow262.0%
hypot-def76.8%
Simplified76.8%
Taylor expanded in B around inf 42.2%
if -2.34999999999999999e-226 < A < -7.99999999999999954e-252 or 1.70000000000000008e-251 < A < 3.45e-168Initial program 60.2%
associate-*l/60.2%
*-lft-identity60.2%
+-commutative60.2%
unpow260.2%
unpow260.2%
hypot-def89.1%
Simplified89.1%
Taylor expanded in B around -inf 55.8%
if 3.45e-168 < A Initial program 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
unpow275.3%
hypot-def93.0%
Simplified93.0%
Taylor expanded in A around inf 65.7%
*-commutative65.7%
Simplified65.7%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI)))
(t_1 (* 180.0 (/ (atan -1.0) PI)))
(t_2 (atan (* 0.5 (/ B A)))))
(if (<= A -1e+36)
(* (/ 180.0 PI) t_2)
(if (<= A -1.05e-23)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= A -8.5e-124)
(* 180.0 (/ (atan (/ 0.5 (/ A B))) PI))
(if (<= A -2e-205)
t_1
(if (<= A -4.1e-221)
(* 180.0 (/ t_2 PI))
(if (<= A -2e-226)
t_1
(if (<= A -7.6e-256)
t_0
(if (<= A 1.35e-248)
t_1
(if (<= A 2.35e-163)
t_0
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double t_1 = 180.0 * (atan(-1.0) / ((double) M_PI));
double t_2 = atan((0.5 * (B / A)));
double tmp;
if (A <= -1e+36) {
tmp = (180.0 / ((double) M_PI)) * t_2;
} else if (A <= -1.05e-23) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (A <= -8.5e-124) {
tmp = 180.0 * (atan((0.5 / (A / B))) / ((double) M_PI));
} else if (A <= -2e-205) {
tmp = t_1;
} else if (A <= -4.1e-221) {
tmp = 180.0 * (t_2 / ((double) M_PI));
} else if (A <= -2e-226) {
tmp = t_1;
} else if (A <= -7.6e-256) {
tmp = t_0;
} else if (A <= 1.35e-248) {
tmp = t_1;
} else if (A <= 2.35e-163) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double t_1 = 180.0 * (Math.atan(-1.0) / Math.PI);
double t_2 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -1e+36) {
tmp = (180.0 / Math.PI) * t_2;
} else if (A <= -1.05e-23) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (A <= -8.5e-124) {
tmp = 180.0 * (Math.atan((0.5 / (A / B))) / Math.PI);
} else if (A <= -2e-205) {
tmp = t_1;
} else if (A <= -4.1e-221) {
tmp = 180.0 * (t_2 / Math.PI);
} else if (A <= -2e-226) {
tmp = t_1;
} else if (A <= -7.6e-256) {
tmp = t_0;
} else if (A <= 1.35e-248) {
tmp = t_1;
} else if (A <= 2.35e-163) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) t_1 = 180.0 * (math.atan(-1.0) / math.pi) t_2 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -1e+36: tmp = (180.0 / math.pi) * t_2 elif A <= -1.05e-23: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif A <= -8.5e-124: tmp = 180.0 * (math.atan((0.5 / (A / B))) / math.pi) elif A <= -2e-205: tmp = t_1 elif A <= -4.1e-221: tmp = 180.0 * (t_2 / math.pi) elif A <= -2e-226: tmp = t_1 elif A <= -7.6e-256: tmp = t_0 elif A <= 1.35e-248: tmp = t_1 elif A <= 2.35e-163: tmp = t_0 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) t_1 = Float64(180.0 * Float64(atan(-1.0) / pi)) t_2 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -1e+36) tmp = Float64(Float64(180.0 / pi) * t_2); elseif (A <= -1.05e-23) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (A <= -8.5e-124) tmp = Float64(180.0 * Float64(atan(Float64(0.5 / Float64(A / B))) / pi)); elseif (A <= -2e-205) tmp = t_1; elseif (A <= -4.1e-221) tmp = Float64(180.0 * Float64(t_2 / pi)); elseif (A <= -2e-226) tmp = t_1; elseif (A <= -7.6e-256) tmp = t_0; elseif (A <= 1.35e-248) tmp = t_1; elseif (A <= 2.35e-163) tmp = t_0; 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) t_0 = 180.0 * (atan(1.0) / pi); t_1 = 180.0 * (atan(-1.0) / pi); t_2 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -1e+36) tmp = (180.0 / pi) * t_2; elseif (A <= -1.05e-23) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (A <= -8.5e-124) tmp = 180.0 * (atan((0.5 / (A / B))) / pi); elseif (A <= -2e-205) tmp = t_1; elseif (A <= -4.1e-221) tmp = 180.0 * (t_2 / pi); elseif (A <= -2e-226) tmp = t_1; elseif (A <= -7.6e-256) tmp = t_0; elseif (A <= 1.35e-248) tmp = t_1; elseif (A <= 2.35e-163) tmp = t_0; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -1e+36], N[(N[(180.0 / Pi), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[A, -1.05e-23], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.5e-124], N[(180.0 * N[(N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2e-205], t$95$1, If[LessEqual[A, -4.1e-221], N[(180.0 * N[(t$95$2 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2e-226], t$95$1, If[LessEqual[A, -7.6e-256], t$95$0, If[LessEqual[A, 1.35e-248], t$95$1, If[LessEqual[A, 2.35e-163], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_2 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -1 \cdot 10^{+36}:\\
\;\;\;\;\frac{180}{\pi} \cdot t_2\\
\mathbf{elif}\;A \leq -1.05 \cdot 10^{-23}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.5 \cdot 10^{-124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2 \cdot 10^{-205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -4.1 \cdot 10^{-221}:\\
\;\;\;\;180 \cdot \frac{t_2}{\pi}\\
\mathbf{elif}\;A \leq -2 \cdot 10^{-226}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -7.6 \cdot 10^{-256}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.35 \cdot 10^{-248}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2.35 \cdot 10^{-163}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.00000000000000004e36Initial program 15.8%
associate-*r/15.8%
associate-*l/15.8%
associate-*l/15.8%
*-lft-identity15.8%
sub-neg15.8%
associate-+l-11.9%
sub-neg11.9%
remove-double-neg11.9%
+-commutative11.9%
unpow211.9%
unpow211.9%
hypot-def24.4%
Simplified24.4%
Taylor expanded in A around -inf 46.9%
unpow246.9%
Simplified46.9%
Taylor expanded in C around 0 77.2%
if -1.00000000000000004e36 < A < -1.05e-23Initial program 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
unpow270.1%
hypot-def81.1%
Simplified81.1%
Taylor expanded in C around -inf 54.6%
if -1.05e-23 < A < -8.5000000000000002e-124Initial program 40.7%
associate-*l/40.7%
*-lft-identity40.7%
+-commutative40.7%
unpow240.7%
unpow240.7%
hypot-def54.3%
Simplified54.3%
Taylor expanded in A around -inf 10.4%
distribute-lft-out10.4%
associate-/l*10.1%
unpow210.1%
unpow210.1%
unpow210.1%
Simplified10.1%
add-cube-cbrt10.1%
pow310.1%
times-frac14.1%
pow214.1%
associate-/l*18.0%
Applied egg-rr18.0%
Taylor expanded in C around 0 2.1%
unpow1/312.4%
unpow212.4%
Simplified12.4%
expm1-log1p-u8.8%
expm1-udef12.4%
rem-cube-cbrt12.4%
associate-/l*12.4%
associate-/l*12.4%
Applied egg-rr12.4%
expm1-def12.6%
expm1-log1p16.2%
associate-/r/31.6%
*-inverses31.6%
Simplified31.6%
if -8.5000000000000002e-124 < A < -2e-205 or -4.09999999999999981e-221 < A < -1.99999999999999984e-226 or -7.59999999999999953e-256 < A < 1.35e-248Initial program 62.0%
associate-*l/62.0%
*-lft-identity62.0%
+-commutative62.0%
unpow262.0%
unpow262.0%
hypot-def76.8%
Simplified76.8%
Taylor expanded in B around inf 42.2%
if -2e-205 < A < -4.09999999999999981e-221Initial program 57.0%
associate-*l/57.0%
*-lft-identity57.0%
+-commutative57.0%
unpow257.0%
unpow257.0%
hypot-def75.8%
Simplified75.8%
Taylor expanded in A around -inf 57.0%
if -1.99999999999999984e-226 < A < -7.59999999999999953e-256 or 1.35e-248 < A < 2.35e-163Initial program 60.2%
associate-*l/60.2%
*-lft-identity60.2%
+-commutative60.2%
unpow260.2%
unpow260.2%
hypot-def89.1%
Simplified89.1%
Taylor expanded in B around -inf 55.8%
if 2.35e-163 < A Initial program 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
unpow275.3%
hypot-def93.0%
Simplified93.0%
Taylor expanded in A around inf 65.7%
*-commutative65.7%
Simplified65.7%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (* A 2.0)) B)))))
(if (<= B -2e+101)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.5e-92)
t_0
(if (<= B 5.4e-9)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= B 6200000.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - (A * 2.0)) / B));
double tmp;
if (B <= -2e+101) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.5e-92) {
tmp = t_0;
} else if (B <= 5.4e-9) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (B <= 6200000.0) {
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.PI) * Math.atan(((C - (A * 2.0)) / B));
double tmp;
if (B <= -2e+101) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.5e-92) {
tmp = t_0;
} else if (B <= 5.4e-9) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (B <= 6200000.0) {
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.pi) * math.atan(((C - (A * 2.0)) / B)) tmp = 0 if B <= -2e+101: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.5e-92: tmp = t_0 elif B <= 5.4e-9: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif B <= 6200000.0: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A * 2.0)) / B))) tmp = 0.0 if (B <= -2e+101) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.5e-92) tmp = t_0; elseif (B <= 5.4e-9) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (B <= 6200000.0) 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 / pi) * atan(((C - (A * 2.0)) / B)); tmp = 0.0; if (B <= -2e+101) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.5e-92) tmp = t_0; elseif (B <= 5.4e-9) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (B <= 6200000.0) 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[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A * 2.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2e+101], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-92], t$95$0, If[LessEqual[B, 5.4e-9], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6200000.0], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - A \cdot 2}{B}\right)\\
\mathbf{if}\;B \leq -2 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-92}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;B \leq 6200000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2e101Initial program 42.8%
associate-*l/42.8%
*-lft-identity42.8%
+-commutative42.8%
unpow242.8%
unpow242.8%
hypot-def78.8%
Simplified78.8%
Taylor expanded in B around -inf 65.2%
if -2e101 < B < 4.5e-92 or 5.4000000000000004e-9 < B < 6.2e6Initial program 66.9%
associate-*r/66.9%
associate-*l/66.9%
associate-*l/66.9%
*-lft-identity66.9%
sub-neg66.9%
associate-+l-65.4%
sub-neg65.4%
remove-double-neg65.4%
+-commutative65.4%
unpow265.4%
unpow265.4%
hypot-def69.5%
Simplified69.5%
Taylor expanded in A around inf 58.9%
*-commutative58.9%
Simplified58.9%
if 4.5e-92 < B < 5.4000000000000004e-9Initial program 33.0%
associate-*r/33.0%
associate-*l/33.0%
associate-*l/33.0%
*-lft-identity33.0%
sub-neg33.0%
associate-+l-32.7%
sub-neg32.7%
remove-double-neg32.7%
+-commutative32.7%
unpow232.7%
unpow232.7%
hypot-def33.1%
Simplified33.1%
Taylor expanded in A around -inf 11.6%
unpow211.6%
Simplified11.6%
Taylor expanded in C around 0 40.4%
if 6.2e6 < B Initial program 47.4%
associate-*l/47.4%
*-lft-identity47.4%
+-commutative47.4%
unpow247.4%
unpow247.4%
hypot-def83.9%
Simplified83.9%
Taylor expanded in B around inf 68.7%
Final simplification60.7%
(FPCore (A B C)
:precision binary64
(if (<= A -5.1e+31)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))) PI))
(if (or (<= A -1e-226) (not (<= A -2.3e-250)))
(* (/ 180.0 PI) (atan (/ (- C (+ A B)) B)))
(* 180.0 (/ (atan 1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e+31) {
tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / ((double) M_PI));
} else if ((A <= -1e-226) || !(A <= -2.3e-250)) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + B)) / B));
} 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 (A <= -5.1e+31) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / Math.PI);
} else if ((A <= -1e-226) || !(A <= -2.3e-250)) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
} else {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.1e+31: tmp = 180.0 * (math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / math.pi) elif (A <= -1e-226) or not (A <= -2.3e-250): tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) else: tmp = 180.0 * (math.atan(1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.1e+31) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A))))) / pi)); elseif ((A <= -1e-226) || !(A <= -2.3e-250)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + B)) / B))); 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 (A <= -5.1e+31) tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / pi); elseif ((A <= -1e-226) || ~((A <= -2.3e-250))) tmp = (180.0 / pi) * atan(((C - (A + B)) / B)); else tmp = 180.0 * (atan(1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.1e+31], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -1e-226], N[Not[LessEqual[A, -2.3e-250]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.1 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)}{\pi}\\
\mathbf{elif}\;A \leq -1 \cdot 10^{-226} \lor \neg \left(A \leq -2.3 \cdot 10^{-250}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\end{array}
\end{array}
if A < -5.0999999999999997e31Initial program 17.2%
associate-*l/17.2%
*-lft-identity17.2%
+-commutative17.2%
unpow217.2%
unpow217.2%
hypot-def51.1%
Simplified51.1%
Taylor expanded in A around -inf 75.4%
distribute-lft-out75.4%
*-commutative75.4%
unpow275.4%
times-frac78.5%
Simplified78.5%
if -5.0999999999999997e31 < A < -9.99999999999999921e-227 or -2.2999999999999999e-250 < A Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-67.1%
sub-neg67.1%
remove-double-neg67.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def83.1%
Simplified83.1%
Taylor expanded in B around inf 68.8%
if -9.99999999999999921e-227 < A < -2.2999999999999999e-250Initial program 54.4%
associate-*l/54.4%
*-lft-identity54.4%
+-commutative54.4%
unpow254.4%
unpow254.4%
hypot-def97.0%
Simplified97.0%
Taylor expanded in B around -inf 64.8%
Final simplification70.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.06e+32)
(* (/ 180.0 PI) (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))))
(if (or (<= A -1.48e-226) (not (<= A -2.2e-250)))
(* (/ 180.0 PI) (atan (/ (- C (+ A B)) B)))
(* 180.0 (/ (atan 1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.06e+32) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) + ((B / A) * (C / A)))));
} else if ((A <= -1.48e-226) || !(A <= -2.2e-250)) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + B)) / B));
} 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 (A <= -1.06e+32) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) + ((B / A) * (C / A)))));
} else if ((A <= -1.48e-226) || !(A <= -2.2e-250)) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
} else {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.06e+32: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) elif (A <= -1.48e-226) or not (A <= -2.2e-250): tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) else: tmp = 180.0 * (math.atan(1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.06e+32) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A)))))); elseif ((A <= -1.48e-226) || !(A <= -2.2e-250)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + B)) / B))); 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 (A <= -1.06e+32) tmp = (180.0 / pi) * atan((0.5 * ((B / A) + ((B / A) * (C / A))))); elseif ((A <= -1.48e-226) || ~((A <= -2.2e-250))) tmp = (180.0 / pi) * atan(((C - (A + B)) / B)); else tmp = 180.0 * (atan(1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.06e+32], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -1.48e-226], N[Not[LessEqual[A, -2.2e-250]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.06 \cdot 10^{+32}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)\\
\mathbf{elif}\;A \leq -1.48 \cdot 10^{-226} \lor \neg \left(A \leq -2.2 \cdot 10^{-250}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\end{array}
\end{array}
if A < -1.0600000000000001e32Initial program 17.2%
associate-*r/17.2%
associate-*l/17.2%
associate-*l/17.2%
*-lft-identity17.2%
sub-neg17.2%
associate-+l-13.5%
sub-neg13.5%
remove-double-neg13.5%
+-commutative13.5%
unpow213.5%
unpow213.5%
hypot-def26.8%
Simplified26.8%
add-sqr-sqrt26.6%
pow226.6%
Applied egg-rr26.6%
unpow226.6%
add-sqr-sqrt26.8%
add-log-exp33.0%
Applied egg-rr33.0%
Taylor expanded in A around -inf 75.7%
distribute-lft-out75.7%
*-commutative75.7%
unpow275.7%
times-frac78.7%
Simplified78.7%
if -1.0600000000000001e32 < A < -1.47999999999999991e-226 or -2.2e-250 < A Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-67.1%
sub-neg67.1%
remove-double-neg67.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def83.1%
Simplified83.1%
Taylor expanded in B around inf 68.8%
if -1.47999999999999991e-226 < A < -2.2e-250Initial program 54.4%
associate-*l/54.4%
*-lft-identity54.4%
+-commutative54.4%
unpow254.4%
unpow254.4%
hypot-def97.0%
Simplified97.0%
Taylor expanded in B around -inf 64.8%
Final simplification70.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.65e+35)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (or (<= A -5.1e-226) (not (<= A -2.3e-250)))
(* (/ 180.0 PI) (atan (/ (- C (+ A B)) B)))
(* 180.0 (/ (atan 1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.65e+35) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if ((A <= -5.1e-226) || !(A <= -2.3e-250)) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + B)) / B));
} 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 (A <= -1.65e+35) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if ((A <= -5.1e-226) || !(A <= -2.3e-250)) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
} else {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.65e+35: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif (A <= -5.1e-226) or not (A <= -2.3e-250): tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) else: tmp = 180.0 * (math.atan(1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.65e+35) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif ((A <= -5.1e-226) || !(A <= -2.3e-250)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + B)) / B))); 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 (A <= -1.65e+35) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif ((A <= -5.1e-226) || ~((A <= -2.3e-250))) tmp = (180.0 / pi) * atan(((C - (A + B)) / B)); else tmp = 180.0 * (atan(1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.65e+35], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -5.1e-226], N[Not[LessEqual[A, -2.3e-250]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.65 \cdot 10^{+35}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -5.1 \cdot 10^{-226} \lor \neg \left(A \leq -2.3 \cdot 10^{-250}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\end{array}
\end{array}
if A < -1.6500000000000001e35Initial program 15.8%
associate-*r/15.8%
associate-*l/15.8%
associate-*l/15.8%
*-lft-identity15.8%
sub-neg15.8%
associate-+l-11.9%
sub-neg11.9%
remove-double-neg11.9%
+-commutative11.9%
unpow211.9%
unpow211.9%
hypot-def24.4%
Simplified24.4%
Taylor expanded in A around -inf 46.9%
unpow246.9%
Simplified46.9%
Taylor expanded in C around 0 77.2%
if -1.6500000000000001e35 < A < -5.09999999999999973e-226 or -2.2999999999999999e-250 < A Initial program 66.7%
associate-*r/66.7%
associate-*l/66.7%
associate-*l/66.7%
*-lft-identity66.7%
sub-neg66.7%
associate-+l-66.7%
sub-neg66.7%
remove-double-neg66.7%
+-commutative66.7%
unpow266.7%
unpow266.7%
hypot-def82.9%
Simplified82.9%
Taylor expanded in B around inf 68.3%
if -5.09999999999999973e-226 < A < -2.2999999999999999e-250Initial program 54.4%
associate-*l/54.4%
*-lft-identity54.4%
+-commutative54.4%
unpow254.4%
unpow254.4%
hypot-def97.0%
Simplified97.0%
Taylor expanded in B around -inf 64.8%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ C B)))))
(if (<= B -2.5e+57)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.02e-101)
t_0
(if (<= B 1.5e-8)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= B 3500.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((C / B));
double tmp;
if (B <= -2.5e+57) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.02e-101) {
tmp = t_0;
} else if (B <= 1.5e-8) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (B <= 3500.0) {
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.PI) * Math.atan((C / B));
double tmp;
if (B <= -2.5e+57) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.02e-101) {
tmp = t_0;
} else if (B <= 1.5e-8) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (B <= 3500.0) {
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.pi) * math.atan((C / B)) tmp = 0 if B <= -2.5e+57: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.02e-101: tmp = t_0 elif B <= 1.5e-8: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif B <= 3500.0: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(C / B))) tmp = 0.0 if (B <= -2.5e+57) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.02e-101) tmp = t_0; elseif (B <= 1.5e-8) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (B <= 3500.0) 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 / pi) * atan((C / B)); tmp = 0.0; if (B <= -2.5e+57) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.02e-101) tmp = t_0; elseif (B <= 1.5e-8) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (B <= 3500.0) 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[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.5e+57], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.02e-101], t$95$0, If[LessEqual[B, 1.5e-8], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3500.0], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;B \leq -2.5 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.02 \cdot 10^{-101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-8}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3500:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.49999999999999986e57Initial program 42.8%
associate-*l/42.8%
*-lft-identity42.8%
+-commutative42.8%
unpow242.8%
unpow242.8%
hypot-def74.8%
Simplified74.8%
Taylor expanded in B around -inf 59.2%
if -2.49999999999999986e57 < B < 1.02e-101 or 1.49999999999999987e-8 < B < 3500Initial program 68.6%
associate-*r/68.6%
associate-*l/68.6%
associate-*l/68.6%
*-lft-identity68.6%
sub-neg68.6%
associate-+l-67.0%
sub-neg67.0%
remove-double-neg67.0%
+-commutative67.0%
unpow267.0%
unpow267.0%
hypot-def70.6%
Simplified70.6%
Taylor expanded in A around inf 60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in C around inf 39.7%
if 1.02e-101 < B < 1.49999999999999987e-8Initial program 33.4%
associate-*l/33.4%
*-lft-identity33.4%
+-commutative33.4%
unpow233.4%
unpow233.4%
hypot-def41.9%
Simplified41.9%
Taylor expanded in A around -inf 36.1%
if 3500 < B Initial program 47.4%
associate-*l/47.4%
*-lft-identity47.4%
+-commutative47.4%
unpow247.4%
unpow247.4%
hypot-def83.9%
Simplified83.9%
Taylor expanded in B around inf 68.7%
Final simplification49.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.75e+58)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.35e-101)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= B 3e-10)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= B 3400.0)
(* (/ 180.0 PI) (atan (/ C B)))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.75e+58) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.35e-101) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (B <= 3e-10) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (B <= 3400.0) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} 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.75e+58) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.35e-101) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (B <= 3e-10) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (B <= 3400.0) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.75e+58: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.35e-101: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif B <= 3e-10: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif B <= 3400.0: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.75e+58) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.35e-101) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (B <= 3e-10) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (B <= 3400.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); 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.75e+58) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.35e-101) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (B <= 3e-10) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (B <= 3400.0) tmp = (180.0 / pi) * atan((C / B)); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.75e+58], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.35e-101], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3e-10], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3400.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $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.75 \cdot 10^{+58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.35 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3 \cdot 10^{-10}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3400:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.7499999999999999e58Initial program 42.8%
associate-*l/42.8%
*-lft-identity42.8%
+-commutative42.8%
unpow242.8%
unpow242.8%
hypot-def74.8%
Simplified74.8%
Taylor expanded in B around -inf 59.2%
if -1.7499999999999999e58 < B < 1.3500000000000001e-101Initial program 67.3%
associate-*l/67.3%
*-lft-identity67.3%
+-commutative67.3%
unpow267.3%
unpow267.3%
hypot-def79.8%
Simplified79.8%
Taylor expanded in C around -inf 38.3%
if 1.3500000000000001e-101 < B < 3e-10Initial program 33.4%
associate-*l/33.4%
*-lft-identity33.4%
+-commutative33.4%
unpow233.4%
unpow233.4%
hypot-def41.9%
Simplified41.9%
Taylor expanded in A around -inf 36.1%
if 3e-10 < B < 3400Initial program 88.0%
associate-*r/88.0%
associate-*l/88.0%
associate-*l/88.0%
*-lft-identity88.0%
sub-neg88.0%
associate-+l-88.0%
sub-neg88.0%
remove-double-neg88.0%
+-commutative88.0%
unpow288.0%
unpow288.0%
hypot-def88.2%
Simplified88.2%
Taylor expanded in A around inf 75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in C around inf 63.3%
if 3400 < B Initial program 47.4%
associate-*l/47.4%
*-lft-identity47.4%
+-commutative47.4%
unpow247.4%
unpow247.4%
hypot-def83.9%
Simplified83.9%
Taylor expanded in B around inf 68.7%
Final simplification49.6%
(FPCore (A B C)
:precision binary64
(if (<= B -9.6e-145)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7.2e-197)
(* 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 <= -9.6e-145) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7.2e-197) {
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 <= -9.6e-145) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7.2e-197) {
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 <= -9.6e-145: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7.2e-197: 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 <= -9.6e-145) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7.2e-197) 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 <= -9.6e-145) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7.2e-197) 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, -9.6e-145], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e-197], 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 -9.6 \cdot 10^{-145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-197}:\\
\;\;\;\;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 < -9.60000000000000061e-145Initial program 60.2%
associate-*l/60.2%
*-lft-identity60.2%
+-commutative60.2%
unpow260.2%
unpow260.2%
hypot-def79.9%
Simplified79.9%
Taylor expanded in B around -inf 42.8%
if -9.60000000000000061e-145 < B < 7.1999999999999997e-197Initial program 58.4%
associate-*l/58.4%
*-lft-identity58.4%
+-commutative58.4%
unpow258.4%
unpow258.4%
hypot-def77.9%
Simplified77.9%
Taylor expanded in C around inf 27.8%
distribute-rgt1-in27.8%
metadata-eval27.8%
mul0-lft27.8%
metadata-eval27.8%
Simplified27.8%
if 7.1999999999999997e-197 < B Initial program 51.4%
associate-*l/51.4%
*-lft-identity51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def73.5%
Simplified73.5%
Taylor expanded in B around inf 46.5%
Final simplification40.9%
(FPCore (A B C)
:precision binary64
(if (<= B -2.5e+57)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 8.5e-101)
(* (/ 180.0 PI) (atan (/ C B)))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.5e+57) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8.5e-101) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.5e+57) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8.5e-101) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.5e+57: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8.5e-101: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.5e+57) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8.5e-101) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.5e+57) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8.5e-101) tmp = (180.0 / pi) * atan((C / B)); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.5e+57], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-101], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.5 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.49999999999999986e57Initial program 42.8%
associate-*l/42.8%
*-lft-identity42.8%
+-commutative42.8%
unpow242.8%
unpow242.8%
hypot-def74.8%
Simplified74.8%
Taylor expanded in B around -inf 59.2%
if -2.49999999999999986e57 < B < 8.49999999999999941e-101Initial program 67.3%
associate-*r/67.3%
associate-*l/67.3%
associate-*l/67.3%
*-lft-identity67.3%
sub-neg67.3%
associate-+l-65.6%
sub-neg65.6%
remove-double-neg65.6%
+-commutative65.6%
unpow265.6%
unpow265.6%
hypot-def69.5%
Simplified69.5%
Taylor expanded in A around inf 59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in C around inf 38.2%
if 8.49999999999999941e-101 < B Initial program 47.4%
associate-*l/47.4%
*-lft-identity47.4%
+-commutative47.4%
unpow247.4%
unpow247.4%
hypot-def73.5%
Simplified73.5%
Taylor expanded in B around inf 53.3%
Final simplification47.2%
(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 59.0%
associate-*l/59.0%
*-lft-identity59.0%
+-commutative59.0%
unpow259.0%
unpow259.0%
hypot-def78.2%
Simplified78.2%
Taylor expanded in B around -inf 35.0%
if -4.999999999999985e-310 < B Initial program 53.5%
associate-*l/53.5%
*-lft-identity53.5%
+-commutative53.5%
unpow253.5%
unpow253.5%
hypot-def75.5%
Simplified75.5%
Taylor expanded in B around inf 38.7%
Final simplification37.1%
(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 56.0%
associate-*l/56.0%
*-lft-identity56.0%
+-commutative56.0%
unpow256.0%
unpow256.0%
hypot-def76.7%
Simplified76.7%
Taylor expanded in B around inf 22.1%
Final simplification22.1%
herbie shell --seed 2023194
(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)))