
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -0.5) or not (t_0 <= 0.0): tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -0.5) || !(t_0 <= 0.0)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -0.5) || ~((t_0 <= 0.0))) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $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], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_0 \leq -0.5 \lor \neg \left(t\_0 \leq 0\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5 or 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 64.2%
associate-*l/64.2%
*-lft-identity64.2%
+-commutative64.2%
unpow264.2%
unpow264.2%
hypot-define93.5%
Simplified93.5%
if -0.5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.0Initial program 14.3%
Taylor expanded in A around -inf 61.3%
associate-*r/61.3%
Simplified61.3%
Final simplification89.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e+64)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 7.2e-121)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (- C (+ A (hypot B A))) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+64) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 7.2e-121) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, A))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+64) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 7.2e-121) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, A))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.8e+64: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 7.2e-121: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, A))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.8e+64) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 7.2e-121) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, A))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e+64) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 7.2e-121) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, A))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e+64], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.2e-121], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.8 \cdot 10^{+64}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{-121}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.80000000000000007e64Initial program 16.8%
clear-num16.8%
un-div-inv16.8%
associate-*l/16.8%
*-un-lft-identity16.8%
associate--l-14.3%
unpow214.3%
unpow214.3%
hypot-define35.1%
Applied egg-rr35.1%
Taylor expanded in A around -inf 79.1%
if -1.80000000000000007e64 < A < 7.19999999999999967e-121Initial program 57.2%
Taylor expanded in A around 0 57.2%
unpow257.2%
unpow257.2%
hypot-define77.1%
Simplified77.1%
if 7.19999999999999967e-121 < A Initial program 76.9%
Simplified97.0%
Taylor expanded in C around 0 75.6%
+-commutative75.6%
unpow275.6%
unpow275.6%
hypot-define91.6%
Simplified91.6%
(FPCore (A B C)
:precision binary64
(if (<= A -5.2e+63)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 2.8e-81)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* (/ 180.0 PI) (atan (/ (+ A (hypot B A)) (- B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+63) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 2.8e-81) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A + hypot(B, A)) / -B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+63) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 2.8e-81) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A + Math.hypot(B, A)) / -B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.2e+63: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 2.8e-81: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((A + math.hypot(B, A)) / -B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.2e+63) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 2.8e-81) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A + hypot(B, A)) / Float64(-B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.2e+63) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 2.8e-81) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 / pi) * atan(((A + hypot(B, A)) / -B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.2e+63], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e-81], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.2 \cdot 10^{+63}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)\\
\end{array}
\end{array}
if A < -5.2000000000000002e63Initial program 16.8%
clear-num16.8%
un-div-inv16.8%
associate-*l/16.8%
*-un-lft-identity16.8%
associate--l-14.3%
unpow214.3%
unpow214.3%
hypot-define35.1%
Applied egg-rr35.1%
Taylor expanded in A around -inf 79.1%
if -5.2000000000000002e63 < A < 2.7999999999999999e-81Initial program 58.2%
Taylor expanded in A around 0 57.5%
unpow257.5%
unpow257.5%
hypot-define76.9%
Simplified76.9%
if 2.7999999999999999e-81 < A Initial program 77.1%
Taylor expanded in B around 0 77.1%
Simplified97.9%
Taylor expanded in C around 0 74.8%
mul-1-neg74.8%
+-commutative74.8%
unpow274.8%
unpow274.8%
hypot-undefine91.4%
Simplified91.4%
Final simplification82.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.3e+64)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 1.42e-81)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+64) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 1.42e-81) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+64) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 1.42e-81) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.3e+64: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 1.42e-81: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.3e+64) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 1.42e-81) 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(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.3e+64) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 1.42e-81) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.3e+64], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.42e-81], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.3 \cdot 10^{+64}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 1.42 \cdot 10^{-81}:\\
\;\;\;\;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(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.29999999999999998e64Initial program 16.8%
clear-num16.8%
un-div-inv16.8%
associate-*l/16.8%
*-un-lft-identity16.8%
associate--l-14.3%
unpow214.3%
unpow214.3%
hypot-define35.1%
Applied egg-rr35.1%
Taylor expanded in A around -inf 79.1%
if -1.29999999999999998e64 < A < 1.42000000000000009e-81Initial program 58.2%
Taylor expanded in A around 0 57.5%
unpow257.5%
unpow257.5%
hypot-define76.9%
Simplified76.9%
if 1.42000000000000009e-81 < A Initial program 77.1%
Taylor expanded in C around 0 74.8%
mul-1-neg74.8%
distribute-neg-frac274.8%
+-commutative74.8%
unpow274.8%
unpow274.8%
hypot-define91.3%
Simplified91.3%
(FPCore (A B C)
:precision binary64
(if (<= A -8.8e+63)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 1.02e+107)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (* (/ 1.0 PI) (atan (- -1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+63) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 1.02e+107) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan((-1.0 - (A / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.8e+63) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 1.02e+107) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan((-1.0 - (A / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.8e+63: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 1.02e+107: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * ((1.0 / math.pi) * math.atan((-1.0 - (A / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.8e+63) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 1.02e+107) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(-1.0 - Float64(A / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.8e+63) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 1.02e+107) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * ((1.0 / pi) * atan((-1.0 - (A / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.8e+63], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.02e+107], 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[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.8 \cdot 10^{+63}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 1.02 \cdot 10^{+107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\right)\\
\end{array}
\end{array}
if A < -8.7999999999999995e63Initial program 16.8%
clear-num16.8%
un-div-inv16.8%
associate-*l/16.8%
*-un-lft-identity16.8%
associate--l-14.3%
unpow214.3%
unpow214.3%
hypot-define35.1%
Applied egg-rr35.1%
Taylor expanded in A around -inf 79.1%
if -8.7999999999999995e63 < A < 1.01999999999999994e107Initial program 62.1%
Taylor expanded in A around 0 56.5%
unpow256.5%
unpow256.5%
hypot-define77.0%
Simplified77.0%
if 1.01999999999999994e107 < A Initial program 79.4%
Taylor expanded in B around inf 86.4%
clear-num86.4%
associate-/r/86.4%
associate-*r*86.4%
lft-mult-inverse86.4%
*-un-lft-identity86.4%
Applied egg-rr86.4%
Taylor expanded in C around 0 92.4%
distribute-lft-in92.4%
metadata-eval92.4%
mul-1-neg92.4%
unsub-neg92.4%
Simplified92.4%
(FPCore (A B C) :precision binary64 (if (<= A -1.16e+64) (/ 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 <= -1.16e+64) {
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 <= -1.16e+64) {
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 <= -1.16e+64: 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 <= -1.16e+64) tmp = Float64(180.0 / Float64(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 <= -1.16e+64) 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, -1.16e+64], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.16 \cdot 10^{+64}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\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 < -1.16e64Initial program 16.8%
clear-num16.8%
un-div-inv16.8%
associate-*l/16.8%
*-un-lft-identity16.8%
associate--l-14.3%
unpow214.3%
unpow214.3%
hypot-define35.1%
Applied egg-rr35.1%
Taylor expanded in A around -inf 79.1%
if -1.16e64 < A Initial program 66.2%
Simplified86.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI)))
(t_1 (/ 180.0 (/ PI (atan 0.0)))))
(if (<= B -5e-66)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.6e-177)
t_0
(if (<= B 4.5e-246)
t_1
(if (<= B 1.2e-195)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= B 4.5e-153)
t_1
(if (<= B 0.0052)
t_0
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double t_1 = 180.0 / (((double) M_PI) / atan(0.0));
double tmp;
if (B <= -5e-66) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.6e-177) {
tmp = t_0;
} else if (B <= 4.5e-246) {
tmp = t_1;
} else if (B <= 1.2e-195) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (B <= 4.5e-153) {
tmp = t_1;
} else if (B <= 0.0052) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double t_1 = 180.0 / (Math.PI / Math.atan(0.0));
double tmp;
if (B <= -5e-66) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.6e-177) {
tmp = t_0;
} else if (B <= 4.5e-246) {
tmp = t_1;
} else if (B <= 1.2e-195) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (B <= 4.5e-153) {
tmp = t_1;
} else if (B <= 0.0052) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) t_1 = 180.0 / (math.pi / math.atan(0.0)) tmp = 0 if B <= -5e-66: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.6e-177: tmp = t_0 elif B <= 4.5e-246: tmp = t_1 elif B <= 1.2e-195: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif B <= 4.5e-153: tmp = t_1 elif B <= 0.0052: tmp = t_0 else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) t_1 = Float64(180.0 / Float64(pi / atan(0.0))) tmp = 0.0 if (B <= -5e-66) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.6e-177) tmp = t_0; elseif (B <= 4.5e-246) tmp = t_1; elseif (B <= 1.2e-195) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (B <= 4.5e-153) tmp = t_1; elseif (B <= 0.0052) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); t_1 = 180.0 / (pi / atan(0.0)); tmp = 0.0; if (B <= -5e-66) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.6e-177) tmp = t_0; elseif (B <= 4.5e-246) tmp = t_1; elseif (B <= 1.2e-195) tmp = 180.0 * (atan((A / -B)) / pi); elseif (B <= 4.5e-153) tmp = t_1; elseif (B <= 0.0052) tmp = t_0; else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5e-66], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.6e-177], t$95$0, If[LessEqual[B, 4.5e-246], t$95$1, If[LessEqual[B, 1.2e-195], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-153], t$95$1, If[LessEqual[B, 0.0052], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
t_1 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{if}\;B \leq -5 \cdot 10^{-66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.6 \cdot 10^{-177}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 0.0052:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.99999999999999962e-66Initial program 63.7%
Taylor expanded in B around -inf 62.6%
if -4.99999999999999962e-66 < B < -3.59999999999999983e-177 or 4.5e-153 < B < 0.0051999999999999998Initial program 72.6%
Taylor expanded in B around inf 68.0%
Taylor expanded in C around inf 49.5%
if -3.59999999999999983e-177 < B < 4.49999999999999999e-246 or 1.2e-195 < B < 4.5e-153Initial program 38.0%
clear-num38.0%
un-div-inv38.0%
associate-*l/38.0%
*-un-lft-identity38.0%
associate--l-35.9%
unpow235.9%
unpow235.9%
hypot-define57.3%
Applied egg-rr57.3%
Taylor expanded in C around inf 48.0%
Taylor expanded in B around 0 50.5%
associate-*r/50.5%
distribute-rgt1-in50.5%
metadata-eval50.5%
mul0-lft50.5%
metadata-eval50.5%
div050.5%
Simplified50.5%
if 4.49999999999999999e-246 < B < 1.2e-195Initial program 86.9%
Taylor expanded in B around inf 71.8%
Taylor expanded in A around inf 72.1%
neg-mul-172.1%
distribute-neg-frac272.1%
Simplified72.1%
if 0.0051999999999999998 < B Initial program 51.0%
Taylor expanded in B around inf 86.5%
Taylor expanded in C around 0 84.2%
distribute-lft-in84.2%
metadata-eval84.2%
neg-mul-184.2%
unsub-neg84.2%
Simplified84.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI)))
(t_1 (/ 180.0 (/ PI (atan 0.0)))))
(if (<= B -4e-67)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1e-175)
t_0
(if (<= B 4.4e-245)
t_1
(if (<= B 1.2e-195)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= B 8.2e-153)
t_1
(if (<= B 0.0055) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double t_1 = 180.0 / (((double) M_PI) / atan(0.0));
double tmp;
if (B <= -4e-67) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1e-175) {
tmp = t_0;
} else if (B <= 4.4e-245) {
tmp = t_1;
} else if (B <= 1.2e-195) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (B <= 8.2e-153) {
tmp = t_1;
} else if (B <= 0.0055) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double t_1 = 180.0 / (Math.PI / Math.atan(0.0));
double tmp;
if (B <= -4e-67) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1e-175) {
tmp = t_0;
} else if (B <= 4.4e-245) {
tmp = t_1;
} else if (B <= 1.2e-195) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (B <= 8.2e-153) {
tmp = t_1;
} else if (B <= 0.0055) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) t_1 = 180.0 / (math.pi / math.atan(0.0)) tmp = 0 if B <= -4e-67: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1e-175: tmp = t_0 elif B <= 4.4e-245: tmp = t_1 elif B <= 1.2e-195: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif B <= 8.2e-153: tmp = t_1 elif B <= 0.0055: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) t_1 = Float64(180.0 / Float64(pi / atan(0.0))) tmp = 0.0 if (B <= -4e-67) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1e-175) tmp = t_0; elseif (B <= 4.4e-245) tmp = t_1; elseif (B <= 1.2e-195) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (B <= 8.2e-153) tmp = t_1; elseif (B <= 0.0055) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); t_1 = 180.0 / (pi / atan(0.0)); tmp = 0.0; if (B <= -4e-67) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1e-175) tmp = t_0; elseif (B <= 4.4e-245) tmp = t_1; elseif (B <= 1.2e-195) tmp = 180.0 * (atan((A / -B)) / pi); elseif (B <= 8.2e-153) tmp = t_1; elseif (B <= 0.0055) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4e-67], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1e-175], t$95$0, If[LessEqual[B, 4.4e-245], t$95$1, If[LessEqual[B, 1.2e-195], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.2e-153], t$95$1, If[LessEqual[B, 0.0055], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
t_1 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{if}\;B \leq -4 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1 \cdot 10^{-175}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.2 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 0.0055:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.99999999999999977e-67Initial program 63.7%
Taylor expanded in B around -inf 62.6%
if -3.99999999999999977e-67 < B < -1e-175 or 8.2e-153 < B < 0.0054999999999999997Initial program 72.6%
Taylor expanded in B around inf 68.0%
Taylor expanded in C around inf 49.5%
if -1e-175 < B < 4.39999999999999986e-245 or 1.2e-195 < B < 8.2e-153Initial program 38.0%
clear-num38.0%
un-div-inv38.0%
associate-*l/38.0%
*-un-lft-identity38.0%
associate--l-35.9%
unpow235.9%
unpow235.9%
hypot-define57.3%
Applied egg-rr57.3%
Taylor expanded in C around inf 48.0%
Taylor expanded in B around 0 50.5%
associate-*r/50.5%
distribute-rgt1-in50.5%
metadata-eval50.5%
mul0-lft50.5%
metadata-eval50.5%
div050.5%
Simplified50.5%
if 4.39999999999999986e-245 < B < 1.2e-195Initial program 86.9%
Taylor expanded in B around inf 71.8%
Taylor expanded in A around inf 72.1%
neg-mul-172.1%
distribute-neg-frac272.1%
Simplified72.1%
if 0.0054999999999999997 < B Initial program 51.0%
Taylor expanded in B around inf 69.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan 0.0)))))
(if (<= B -2.75e-170)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 4.5e-246)
t_0
(if (<= B 2.6e-196)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= B 9e-179)
t_0
(if (<= B 8200000.0)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan(0.0));
double tmp;
if (B <= -2.75e-170) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 4.5e-246) {
tmp = t_0;
} else if (B <= 2.6e-196) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (B <= 9e-179) {
tmp = t_0;
} else if (B <= 8200000.0) {
tmp = 180.0 * (atan((-1.0 + (C / 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 t_0 = 180.0 / (Math.PI / Math.atan(0.0));
double tmp;
if (B <= -2.75e-170) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 4.5e-246) {
tmp = t_0;
} else if (B <= 2.6e-196) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (B <= 9e-179) {
tmp = t_0;
} else if (B <= 8200000.0) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan(0.0)) tmp = 0 if B <= -2.75e-170: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 4.5e-246: tmp = t_0 elif B <= 2.6e-196: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif B <= 9e-179: tmp = t_0 elif B <= 8200000.0: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 / Float64(pi / atan(0.0))) tmp = 0.0 if (B <= -2.75e-170) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 4.5e-246) tmp = t_0; elseif (B <= 2.6e-196) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (B <= 9e-179) tmp = t_0; elseif (B <= 8200000.0) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / 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) t_0 = 180.0 / (pi / atan(0.0)); tmp = 0.0; if (B <= -2.75e-170) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 4.5e-246) tmp = t_0; elseif (B <= 2.6e-196) tmp = 180.0 * (atan((A / -B)) / pi); elseif (B <= 9e-179) tmp = t_0; elseif (B <= 8200000.0) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.75e-170], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-246], t$95$0, If[LessEqual[B, 2.6e-196], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-179], t$95$0, If[LessEqual[B, 8200000.0], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{if}\;B \leq -2.75 \cdot 10^{-170}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-246}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{-196}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-179}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 8200000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.75000000000000009e-170Initial program 63.8%
Taylor expanded in B around -inf 75.2%
Taylor expanded in C around 0 66.3%
sub-neg66.3%
metadata-eval66.3%
distribute-lft-in66.3%
metadata-eval66.3%
+-commutative66.3%
mul-1-neg66.3%
unsub-neg66.3%
Simplified66.3%
if -2.75000000000000009e-170 < B < 4.49999999999999999e-246 or 2.5999999999999998e-196 < B < 8.99999999999999984e-179Initial program 36.9%
clear-num36.9%
un-div-inv36.9%
associate-*l/36.9%
*-un-lft-identity36.9%
associate--l-34.6%
unpow234.6%
unpow234.6%
hypot-define57.8%
Applied egg-rr57.8%
Taylor expanded in C around inf 49.7%
Taylor expanded in B around 0 50.4%
associate-*r/50.4%
distribute-rgt1-in50.4%
metadata-eval50.4%
mul0-lft50.4%
metadata-eval50.4%
div050.4%
Simplified50.4%
if 4.49999999999999999e-246 < B < 2.5999999999999998e-196Initial program 86.9%
Taylor expanded in B around inf 71.8%
Taylor expanded in A around inf 72.1%
neg-mul-172.1%
distribute-neg-frac272.1%
Simplified72.1%
if 8.99999999999999984e-179 < B < 8.2e6Initial program 77.1%
Taylor expanded in B around inf 75.3%
Taylor expanded in A around 0 60.7%
if 8.2e6 < B Initial program 48.6%
Taylor expanded in B around inf 85.8%
Taylor expanded in C around 0 85.0%
distribute-lft-in85.0%
metadata-eval85.0%
neg-mul-185.0%
unsub-neg85.0%
Simplified85.0%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan 0.0)))))
(if (<= B -2.7e-170)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 4.4e-245)
t_0
(if (<= B 1.2e-195)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= B 4.5e-153)
t_0
(if (<= B 0.0052)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan(0.0));
double tmp;
if (B <= -2.7e-170) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 4.4e-245) {
tmp = t_0;
} else if (B <= 1.2e-195) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (B <= 4.5e-153) {
tmp = t_0;
} else if (B <= 0.0052) {
tmp = 180.0 * (atan((C / 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 t_0 = 180.0 / (Math.PI / Math.atan(0.0));
double tmp;
if (B <= -2.7e-170) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 4.4e-245) {
tmp = t_0;
} else if (B <= 1.2e-195) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (B <= 4.5e-153) {
tmp = t_0;
} else if (B <= 0.0052) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan(0.0)) tmp = 0 if B <= -2.7e-170: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 4.4e-245: tmp = t_0 elif B <= 1.2e-195: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif B <= 4.5e-153: tmp = t_0 elif B <= 0.0052: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 / Float64(pi / atan(0.0))) tmp = 0.0 if (B <= -2.7e-170) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 4.4e-245) tmp = t_0; elseif (B <= 1.2e-195) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (B <= 4.5e-153) tmp = t_0; elseif (B <= 0.0052) tmp = Float64(180.0 * Float64(atan(Float64(C / 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) t_0 = 180.0 / (pi / atan(0.0)); tmp = 0.0; if (B <= -2.7e-170) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 4.4e-245) tmp = t_0; elseif (B <= 1.2e-195) tmp = 180.0 * (atan((A / -B)) / pi); elseif (B <= 4.5e-153) tmp = t_0; elseif (B <= 0.0052) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.7e-170], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.4e-245], t$95$0, If[LessEqual[B, 1.2e-195], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-153], t$95$0, If[LessEqual[B, 0.0052], N[(180.0 * N[(N[ArcTan[N[(C / 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}
t_0 := \frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{if}\;B \leq -2.7 \cdot 10^{-170}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{-245}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 0.0052:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.6999999999999999e-170Initial program 63.8%
Taylor expanded in B around -inf 75.2%
Taylor expanded in C around 0 66.3%
sub-neg66.3%
metadata-eval66.3%
distribute-lft-in66.3%
metadata-eval66.3%
+-commutative66.3%
mul-1-neg66.3%
unsub-neg66.3%
Simplified66.3%
if -2.6999999999999999e-170 < B < 4.39999999999999986e-245 or 1.2e-195 < B < 4.5e-153Initial program 39.1%
clear-num39.1%
un-div-inv39.1%
associate-*l/39.1%
*-un-lft-identity39.1%
associate--l-37.0%
unpow237.0%
unpow237.0%
hypot-define58.1%
Applied egg-rr58.1%
Taylor expanded in C around inf 47.2%
Taylor expanded in B around 0 49.6%
associate-*r/49.6%
distribute-rgt1-in49.6%
metadata-eval49.6%
mul0-lft49.6%
metadata-eval49.6%
div049.6%
Simplified49.6%
if 4.39999999999999986e-245 < B < 1.2e-195Initial program 86.9%
Taylor expanded in B around inf 71.8%
Taylor expanded in A around inf 72.1%
neg-mul-172.1%
distribute-neg-frac272.1%
Simplified72.1%
if 4.5e-153 < B < 0.0051999999999999998Initial program 77.4%
Taylor expanded in B around inf 75.2%
Taylor expanded in C around inf 54.3%
if 0.0051999999999999998 < B Initial program 51.0%
Taylor expanded in B around inf 86.5%
Taylor expanded in C around 0 84.2%
distribute-lft-in84.2%
metadata-eval84.2%
neg-mul-184.2%
unsub-neg84.2%
Simplified84.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1.5e-178)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 1.1e-290)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(if (<= B 9e-244)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.5e-178) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 1.1e-290) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else if (B <= 9e-244) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.5e-178) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 1.1e-290) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else if (B <= 9e-244) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.5e-178: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 1.1e-290: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) elif B <= 9e-244: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.5e-178) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 1.1e-290) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); elseif (B <= 9e-244) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.5e-178) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 1.1e-290) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); elseif (B <= 9e-244) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.5e-178], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e-290], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-244], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.5 \cdot 10^{-178}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-290}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-244}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.4999999999999999e-178Initial program 64.2%
Taylor expanded in B around -inf 74.4%
associate--l+74.4%
div-sub75.5%
Simplified75.5%
if -1.4999999999999999e-178 < B < 1.1e-290Initial program 31.9%
clear-num31.9%
un-div-inv31.9%
associate-*l/31.9%
*-un-lft-identity31.9%
associate--l-31.5%
unpow231.5%
unpow231.5%
hypot-define56.3%
Applied egg-rr56.3%
Taylor expanded in C around inf 55.7%
Taylor expanded in A around 0 55.8%
associate-*r/55.8%
associate-*r/55.8%
distribute-rgt1-in55.8%
metadata-eval55.8%
mul0-lft55.8%
metadata-eval55.8%
div055.8%
+-lft-identity55.8%
associate-*r/55.8%
Simplified55.8%
if 1.1e-290 < B < 9.0000000000000003e-244Initial program 59.9%
Taylor expanded in A around -inf 67.7%
associate-*r/67.7%
Simplified67.7%
if 9.0000000000000003e-244 < B Initial program 60.6%
Taylor expanded in B around inf 79.4%
Final simplification74.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -4e-65)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.1e-175)
t_0
(if (<= B 4.2e-153)
(/ 180.0 (/ PI (atan 0.0)))
(if (<= B 0.017) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -4e-65) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.1e-175) {
tmp = t_0;
} else if (B <= 4.2e-153) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else if (B <= 0.017) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -4e-65) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.1e-175) {
tmp = t_0;
} else if (B <= 4.2e-153) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else if (B <= 0.017) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -4e-65: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.1e-175: tmp = t_0 elif B <= 4.2e-153: tmp = 180.0 / (math.pi / math.atan(0.0)) elif B <= 0.017: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -4e-65) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.1e-175) tmp = t_0; elseif (B <= 4.2e-153) tmp = Float64(180.0 / Float64(pi / atan(0.0))); elseif (B <= 0.017) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -4e-65) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.1e-175) tmp = t_0; elseif (B <= 4.2e-153) tmp = 180.0 / (pi / atan(0.0)); elseif (B <= 0.017) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4e-65], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.1e-175], t$95$0, If[LessEqual[B, 4.2e-153], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 0.017], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -4 \cdot 10^{-65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.1 \cdot 10^{-175}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{elif}\;B \leq 0.017:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.99999999999999969e-65Initial program 63.7%
Taylor expanded in B around -inf 62.6%
if -3.99999999999999969e-65 < B < -2.1e-175 or 4.20000000000000008e-153 < B < 0.017000000000000001Initial program 72.6%
Taylor expanded in B around inf 68.0%
Taylor expanded in C around inf 49.5%
if -2.1e-175 < B < 4.20000000000000008e-153Initial program 43.6%
clear-num43.6%
un-div-inv43.6%
associate-*l/43.6%
*-un-lft-identity43.6%
associate--l-41.6%
unpow241.6%
unpow241.6%
hypot-define60.6%
Applied egg-rr60.6%
Taylor expanded in C around inf 43.0%
Taylor expanded in B around 0 45.1%
associate-*r/45.1%
distribute-rgt1-in45.1%
metadata-eval45.1%
mul0-lft45.1%
metadata-eval45.1%
div045.1%
Simplified45.1%
if 0.017000000000000001 < B Initial program 51.0%
Taylor expanded in B around inf 69.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -1.5e-178)
t_0
(if (<= B 3.2e-292)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(if (<= B 0.21)
t_0
(* 180.0 (* (/ 1.0 PI) (atan (- -1.0 (/ A B))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -1.5e-178) {
tmp = t_0;
} else if (B <= 3.2e-292) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else if (B <= 0.21) {
tmp = t_0;
} else {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan((-1.0 - (A / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -1.5e-178) {
tmp = t_0;
} else if (B <= 3.2e-292) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else if (B <= 0.21) {
tmp = t_0;
} else {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan((-1.0 - (A / B))));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -1.5e-178: tmp = t_0 elif B <= 3.2e-292: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) elif B <= 0.21: tmp = t_0 else: tmp = 180.0 * ((1.0 / math.pi) * math.atan((-1.0 - (A / B)))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -1.5e-178) tmp = t_0; elseif (B <= 3.2e-292) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); elseif (B <= 0.21) tmp = t_0; else tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(-1.0 - Float64(A / B))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -1.5e-178) tmp = t_0; elseif (B <= 3.2e-292) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); elseif (B <= 0.21) tmp = t_0; else tmp = 180.0 * ((1.0 / pi) * atan((-1.0 - (A / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.5e-178], t$95$0, If[LessEqual[B, 3.2e-292], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 0.21], t$95$0, N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.5 \cdot 10^{-178}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-292}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{elif}\;B \leq 0.21:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\right)\\
\end{array}
\end{array}
if B < -1.4999999999999999e-178 or 3.2000000000000002e-292 < B < 0.209999999999999992Initial program 66.6%
Taylor expanded in B around -inf 68.6%
associate--l+68.6%
div-sub70.6%
Simplified70.6%
if -1.4999999999999999e-178 < B < 3.2000000000000002e-292Initial program 31.9%
clear-num31.9%
un-div-inv31.9%
associate-*l/31.9%
*-un-lft-identity31.9%
associate--l-31.5%
unpow231.5%
unpow231.5%
hypot-define56.3%
Applied egg-rr56.3%
Taylor expanded in C around inf 55.7%
Taylor expanded in A around 0 55.8%
associate-*r/55.8%
associate-*r/55.8%
distribute-rgt1-in55.8%
metadata-eval55.8%
mul0-lft55.8%
metadata-eval55.8%
div055.8%
+-lft-identity55.8%
associate-*r/55.8%
Simplified55.8%
if 0.209999999999999992 < B Initial program 51.0%
Taylor expanded in B around inf 86.5%
clear-num86.5%
associate-/r/86.5%
associate-*r*86.5%
lft-mult-inverse86.5%
*-un-lft-identity86.5%
Applied egg-rr86.5%
Taylor expanded in C around 0 84.2%
distribute-lft-in84.2%
metadata-eval84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -6.8e-181)
(* 180.0 (/ (atan (* (/ 1.0 B) (* B (+ 1.0 t_0)))) PI))
(if (<= B 1.45e-292)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(* (/ 180.0 PI) (atan (+ -1.0 t_0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.8e-181) {
tmp = 180.0 * (atan(((1.0 / B) * (B * (1.0 + t_0)))) / ((double) M_PI));
} else if (B <= 1.45e-292) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 + t_0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -6.8e-181) {
tmp = 180.0 * (Math.atan(((1.0 / B) * (B * (1.0 + t_0)))) / Math.PI);
} else if (B <= 1.45e-292) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 + t_0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -6.8e-181: tmp = 180.0 * (math.atan(((1.0 / B) * (B * (1.0 + t_0)))) / math.pi) elif B <= 1.45e-292: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 + t_0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -6.8e-181) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(B * Float64(1.0 + t_0)))) / pi)); elseif (B <= 1.45e-292) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 + t_0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -6.8e-181) tmp = 180.0 * (atan(((1.0 / B) * (B * (1.0 + t_0)))) / pi); elseif (B <= 1.45e-292) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = (180.0 / pi) * atan((-1.0 + t_0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -6.8e-181], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(B * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.45e-292], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -6.8 \cdot 10^{-181}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(B \cdot \left(1 + t\_0\right)\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-292}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + t\_0\right)\\
\end{array}
\end{array}
if B < -6.8000000000000001e-181Initial program 64.2%
Taylor expanded in B around -inf 75.5%
if -6.8000000000000001e-181 < B < 1.44999999999999996e-292Initial program 31.9%
clear-num31.9%
un-div-inv31.9%
associate-*l/31.9%
*-un-lft-identity31.9%
associate--l-31.5%
unpow231.5%
unpow231.5%
hypot-define56.3%
Applied egg-rr56.3%
Taylor expanded in C around inf 55.7%
Taylor expanded in A around 0 55.8%
associate-*r/55.8%
associate-*r/55.8%
distribute-rgt1-in55.8%
metadata-eval55.8%
mul0-lft55.8%
metadata-eval55.8%
div055.8%
+-lft-identity55.8%
associate-*r/55.8%
Simplified55.8%
if 1.44999999999999996e-292 < B Initial program 60.5%
Taylor expanded in B around -inf 41.6%
clear-num41.6%
un-div-inv41.6%
associate-*l/41.6%
*-un-lft-identity41.6%
Applied egg-rr76.1%
associate-/r/76.0%
*-rgt-identity76.0%
times-frac76.0%
*-inverses76.0%
/-rgt-identity76.0%
Simplified76.0%
Final simplification73.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -2.8e-181)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1.45e-292)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(* (/ 180.0 PI) (atan (+ -1.0 t_0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -2.8e-181) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1.45e-292) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 + t_0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -2.8e-181) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1.45e-292) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 + t_0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -2.8e-181: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1.45e-292: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 + t_0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -2.8e-181) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1.45e-292) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 + t_0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -2.8e-181) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1.45e-292) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = (180.0 / pi) * atan((-1.0 + t_0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -2.8e-181], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.45e-292], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -2.8 \cdot 10^{-181}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-292}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + t\_0\right)\\
\end{array}
\end{array}
if B < -2.79999999999999986e-181Initial program 64.2%
Taylor expanded in B around -inf 74.4%
associate--l+74.4%
div-sub75.5%
Simplified75.5%
if -2.79999999999999986e-181 < B < 1.44999999999999996e-292Initial program 31.9%
clear-num31.9%
un-div-inv31.9%
associate-*l/31.9%
*-un-lft-identity31.9%
associate--l-31.5%
unpow231.5%
unpow231.5%
hypot-define56.3%
Applied egg-rr56.3%
Taylor expanded in C around inf 55.7%
Taylor expanded in A around 0 55.8%
associate-*r/55.8%
associate-*r/55.8%
distribute-rgt1-in55.8%
metadata-eval55.8%
mul0-lft55.8%
metadata-eval55.8%
div055.8%
+-lft-identity55.8%
associate-*r/55.8%
Simplified55.8%
if 1.44999999999999996e-292 < B Initial program 60.5%
Taylor expanded in B around -inf 41.6%
clear-num41.6%
un-div-inv41.6%
associate-*l/41.6%
*-un-lft-identity41.6%
Applied egg-rr76.1%
associate-/r/76.0%
*-rgt-identity76.0%
times-frac76.0%
*-inverses76.0%
/-rgt-identity76.0%
Simplified76.0%
Final simplification73.1%
(FPCore (A B C)
:precision binary64
(if (<= A -6e-84)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 2.05e-94)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (* (/ 1.0 PI) (atan (- -1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6e-84) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 2.05e-94) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan((-1.0 - (A / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6e-84) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 2.05e-94) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan((-1.0 - (A / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6e-84: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 2.05e-94: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) else: tmp = 180.0 * ((1.0 / math.pi) * math.atan((-1.0 - (A / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6e-84) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 2.05e-94) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(-1.0 - Float64(A / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6e-84) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 2.05e-94) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * ((1.0 / pi) * atan((-1.0 - (A / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6e-84], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.05e-94], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6 \cdot 10^{-84}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 2.05 \cdot 10^{-94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\right)\\
\end{array}
\end{array}
if A < -6.0000000000000002e-84Initial program 22.1%
clear-num22.1%
un-div-inv22.1%
associate-*l/22.1%
*-un-lft-identity22.1%
associate--l-20.3%
unpow220.3%
unpow220.3%
hypot-define45.1%
Applied egg-rr45.1%
Taylor expanded in A around -inf 65.9%
if -6.0000000000000002e-84 < A < 2.05e-94Initial program 66.3%
Taylor expanded in B around inf 51.8%
Taylor expanded in A around 0 50.9%
if 2.05e-94 < A Initial program 76.5%
Taylor expanded in B around inf 76.1%
clear-num76.1%
associate-/r/76.1%
associate-*r*76.1%
lft-mult-inverse76.1%
*-un-lft-identity76.1%
Applied egg-rr76.1%
Taylor expanded in C around 0 78.4%
distribute-lft-in78.4%
metadata-eval78.4%
mul-1-neg78.4%
unsub-neg78.4%
Simplified78.4%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(if (<= A -6e-84)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 7.5e-93)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6e-84) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 7.5e-93) {
tmp = 180.0 * (atan((-1.0 + (C / 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 (A <= -6e-84) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 7.5e-93) {
tmp = 180.0 * (Math.atan((-1.0 + (C / 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 A <= -6e-84: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 7.5e-93: tmp = 180.0 * (math.atan((-1.0 + (C / 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 (A <= -6e-84) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 7.5e-93) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / 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 (A <= -6e-84) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 7.5e-93) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6e-84], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.5e-93], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6 \cdot 10^{-84}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 7.5 \cdot 10^{-93}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.0000000000000002e-84Initial program 22.1%
clear-num22.1%
un-div-inv22.1%
associate-*l/22.1%
*-un-lft-identity22.1%
associate--l-20.3%
unpow220.3%
unpow220.3%
hypot-define45.1%
Applied egg-rr45.1%
Taylor expanded in A around -inf 65.9%
if -6.0000000000000002e-84 < A < 7.50000000000000034e-93Initial program 66.3%
Taylor expanded in B around inf 51.8%
Taylor expanded in A around 0 50.9%
if 7.50000000000000034e-93 < A Initial program 76.5%
Taylor expanded in B around inf 76.1%
Taylor expanded in C around 0 78.4%
distribute-lft-in78.4%
metadata-eval78.4%
neg-mul-178.4%
unsub-neg78.4%
Simplified78.4%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.02e-84)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 3.2e-92)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e-84) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 3.2e-92) {
tmp = 180.0 * (atan((-1.0 + (C / 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 (A <= -1.02e-84) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 3.2e-92) {
tmp = 180.0 * (Math.atan((-1.0 + (C / 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 A <= -1.02e-84: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 3.2e-92: tmp = 180.0 * (math.atan((-1.0 + (C / 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 (A <= -1.02e-84) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 3.2e-92) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / 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 (A <= -1.02e-84) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 3.2e-92) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.02e-84], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.2e-92], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-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^{-84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.02000000000000004e-84Initial program 22.1%
Taylor expanded in A around -inf 65.7%
associate-*r/65.7%
Simplified65.7%
if -1.02000000000000004e-84 < A < 3.1999999999999997e-92Initial program 66.3%
Taylor expanded in B around inf 51.8%
Taylor expanded in A around 0 50.9%
if 3.1999999999999997e-92 < A Initial program 76.5%
Taylor expanded in B around inf 76.1%
Taylor expanded in C around 0 78.4%
distribute-lft-in78.4%
metadata-eval78.4%
neg-mul-178.4%
unsub-neg78.4%
Simplified78.4%
Final simplification64.9%
(FPCore (A B C)
:precision binary64
(if (<= B -1.55e-184)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.4e-90)
(/ 180.0 (/ PI (atan 0.0)))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.55e-184) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.4e-90) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} 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-184) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.4e-90) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.55e-184: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.4e-90: tmp = 180.0 / (math.pi / math.atan(0.0)) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.55e-184) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.4e-90) tmp = Float64(180.0 / Float64(pi / atan(0.0))); 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-184) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.4e-90) tmp = 180.0 / (pi / atan(0.0)); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.55e-184], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e-90], N[(180.0 / N[(Pi / N[ArcTan[0.0], $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.55 \cdot 10^{-184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-90}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.5500000000000001e-184Initial program 62.9%
Taylor expanded in B around -inf 49.4%
if -1.5500000000000001e-184 < B < 5.39999999999999993e-90Initial program 49.2%
clear-num49.2%
un-div-inv49.2%
associate-*l/49.2%
*-un-lft-identity49.2%
associate--l-47.6%
unpow247.6%
unpow247.6%
hypot-define63.5%
Applied egg-rr63.5%
Taylor expanded in C around inf 37.3%
Taylor expanded in B around 0 38.2%
associate-*r/38.2%
distribute-rgt1-in38.2%
metadata-eval38.2%
mul0-lft38.2%
metadata-eval38.2%
div038.2%
Simplified38.2%
if 5.39999999999999993e-90 < B Initial program 60.6%
Taylor expanded in B around inf 59.5%
(FPCore (A B C) :precision binary64 (if (<= B -8.6e-307) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.6e-307) {
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 <= -8.6e-307) {
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 <= -8.6e-307: 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 <= -8.6e-307) 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 <= -8.6e-307) 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, -8.6e-307], 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 -8.6 \cdot 10^{-307}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.60000000000000021e-307Initial program 57.5%
Taylor expanded in B around -inf 40.7%
if -8.60000000000000021e-307 < B Initial program 58.4%
Taylor expanded in B around inf 40.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 57.9%
Taylor expanded in B around inf 22.2%
herbie shell --seed 2024111
(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)))