
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(t_1 (/ (- (- C A) (hypot (- A C) B)) B)))
(if (<= t_0 -0.005)
(* 180.0 (/ (atan (log (exp t_1))) PI))
(if (<= t_0 0.0)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (+ 1.0 (+ t_1 -1.0))) 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 t_1 = ((C - A) - hypot((A - C), B)) / B;
double tmp;
if (t_0 <= -0.005) {
tmp = 180.0 * (atan(log(exp(t_1))) / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + (t_1 + -1.0))) / ((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 t_1 = ((C - A) - Math.hypot((A - C), B)) / B;
double tmp;
if (t_0 <= -0.005) {
tmp = 180.0 * (Math.atan(Math.log(Math.exp(t_1))) / Math.PI);
} else if (t_0 <= 0.0) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + (t_1 + -1.0))) / 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)))) t_1 = ((C - A) - math.hypot((A - C), B)) / B tmp = 0 if t_0 <= -0.005: tmp = 180.0 * (math.atan(math.log(math.exp(t_1))) / math.pi) elif t_0 <= 0.0: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + (t_1 + -1.0))) / 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))))) t_1 = Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B) tmp = 0.0 if (t_0 <= -0.005) tmp = Float64(180.0 * Float64(atan(log(exp(t_1))) / pi)); elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(t_1 + -1.0))) / 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)))); t_1 = ((C - A) - hypot((A - C), B)) / B; tmp = 0.0; if (t_0 <= -0.005) tmp = 180.0 * (atan(log(exp(t_1))) / pi); elseif (t_0 <= 0.0) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((1.0 + (t_1 + -1.0))) / 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]}, Block[{t$95$1 = N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[t$95$0, -0.005], N[(180.0 * N[(N[ArcTan[N[Log[N[Exp[t$95$1], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(t$95$1 + -1.0), $MachinePrecision]), $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)\\
t_1 := \frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\\
\mathbf{if}\;t_0 \leq -0.005:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \log \left(e^{t_1}\right)}{\pi}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \left(t_1 + -1\right)\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0050000000000000001Initial program 60.9%
add-log-exp60.8%
associate-*l/60.9%
*-un-lft-identity60.9%
unpow260.9%
unpow260.9%
hypot-def91.5%
Applied egg-rr91.5%
if -0.0050000000000000001 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 7.2%
Taylor expanded in A around -inf 78.5%
if 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 58.9%
add-log-exp58.9%
associate-*l/58.9%
*-un-lft-identity58.9%
unpow258.9%
unpow258.9%
hypot-def87.7%
Applied egg-rr87.7%
rem-log-exp87.7%
expm1-log1p-u87.7%
expm1-def87.7%
log1p-udef87.7%
rem-exp-log87.7%
Applied egg-rr87.7%
associate--l+87.7%
Applied egg-rr87.7%
Final simplification88.7%
(FPCore (A B C)
:precision binary64
(if (<= A -7.5e+167)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -2.7e+80)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -2.9e+14)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (/ B (/ (pow A 2.0) 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 <= -7.5e+167) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -2.7e+80) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -2.9e+14) {
tmp = 180.0 * (atan((0.5 * ((B / A) + (B / (pow(A, 2.0) / 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 <= -7.5e+167) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -2.7e+80) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -2.9e+14) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + (B / (Math.pow(A, 2.0) / 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 <= -7.5e+167: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -2.7e+80: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -2.9e+14: tmp = 180.0 * (math.atan((0.5 * ((B / A) + (B / (math.pow(A, 2.0) / 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 <= -7.5e+167) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -2.7e+80) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -2.9e+14) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(B / Float64((A ^ 2.0) / C))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.5e+167) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -2.7e+80) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -2.9e+14) tmp = 180.0 * (atan((0.5 * ((B / A) + (B / ((A ^ 2.0) / 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, -7.5e+167], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.7e+80], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.9e+14], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(B / N[(N[Power[A, 2.0], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $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 -7.5 \cdot 10^{+167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.9 \cdot 10^{+14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{{A}^{2}}{C}}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.4999999999999995e167Initial program 13.9%
Taylor expanded in A around -inf 77.6%
if -7.4999999999999995e167 < A < -2.69999999999999983e80Initial program 40.1%
Taylor expanded in A around 0 40.0%
unpow240.0%
unpow240.0%
hypot-def75.3%
Simplified75.3%
if -2.69999999999999983e80 < A < -2.9e14Initial program 32.2%
Taylor expanded in A around -inf 67.5%
distribute-lft-out67.5%
associate-/l*67.5%
Simplified67.5%
if -2.9e14 < A Initial program 64.2%
Simplified89.7%
Final simplification85.8%
(FPCore (A B C)
:precision binary64
(if (<= A -4.8e+167)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.25e+80)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -2.8e+14)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (/ B (/ (pow A 2.0) C))))) PI))
(/ 1.0 (/ (/ PI 180.0) (atan (/ (- C (+ A (hypot (- A C) B))) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e+167) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.25e+80) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -2.8e+14) {
tmp = 180.0 * (atan((0.5 * ((B / A) + (B / (pow(A, 2.0) / C))))) / ((double) M_PI));
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan(((C - (A + hypot((A - C), B))) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e+167) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.25e+80) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -2.8e+14) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + (B / (Math.pow(A, 2.0) / C))))) / Math.PI);
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan(((C - (A + Math.hypot((A - C), B))) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.8e+167: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.25e+80: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -2.8e+14: tmp = 180.0 * (math.atan((0.5 * ((B / A) + (B / (math.pow(A, 2.0) / C))))) / math.pi) else: tmp = 1.0 / ((math.pi / 180.0) / math.atan(((C - (A + math.hypot((A - C), B))) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.8e+167) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.25e+80) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -2.8e+14) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(B / Float64((A ^ 2.0) / C))))) / pi)); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(C - Float64(A + hypot(Float64(A - C), B))) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.8e+167) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.25e+80) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -2.8e+14) tmp = 180.0 * (atan((0.5 * ((B / A) + (B / ((A ^ 2.0) / C))))) / pi); else tmp = 1.0 / ((pi / 180.0) / atan(((C - (A + hypot((A - C), B))) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.8e+167], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.25e+80], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.8e+14], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(B / N[(N[Power[A, 2.0], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(C - N[(A + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.8 \cdot 10^{+167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.25 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.8 \cdot 10^{+14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{{A}^{2}}{C}}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -4.79999999999999998e167Initial program 13.9%
Taylor expanded in A around -inf 77.6%
if -4.79999999999999998e167 < A < -1.2499999999999999e80Initial program 40.1%
Taylor expanded in A around 0 40.0%
unpow240.0%
unpow240.0%
hypot-def75.3%
Simplified75.3%
if -1.2499999999999999e80 < A < -2.8e14Initial program 32.2%
Taylor expanded in A around -inf 67.5%
distribute-lft-out67.5%
associate-/l*67.5%
Simplified67.5%
if -2.8e14 < A Initial program 64.2%
Applied egg-rr89.7%
associate-/r*89.7%
associate--l-89.7%
Simplified89.7%
Final simplification85.8%
(FPCore (A B C) :precision binary64 (if (or (<= A -7.5e+167) (and (not (<= A -6.4e+44)) (<= A -2.9e+14))) (* 180.0 (/ (atan (* 0.5 (/ B A))) PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if ((A <= -7.5e+167) || (!(A <= -6.4e+44) && (A <= -2.9e+14))) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if ((A <= -7.5e+167) || (!(A <= -6.4e+44) && (A <= -2.9e+14))) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if (A <= -7.5e+167) or (not (A <= -6.4e+44) and (A <= -2.9e+14)): tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if ((A <= -7.5e+167) || (!(A <= -6.4e+44) && (A <= -2.9e+14))) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if ((A <= -7.5e+167) || (~((A <= -6.4e+44)) && (A <= -2.9e+14))) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[Or[LessEqual[A, -7.5e+167], And[N[Not[LessEqual[A, -6.4e+44]], $MachinePrecision], LessEqual[A, -2.9e+14]]], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $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 -7.5 \cdot 10^{+167} \lor \neg \left(A \leq -6.4 \cdot 10^{+44}\right) \land A \leq -2.9 \cdot 10^{+14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.4999999999999995e167 or -6.40000000000000009e44 < A < -2.9e14Initial program 15.6%
Taylor expanded in A around -inf 76.9%
if -7.4999999999999995e167 < A < -6.40000000000000009e44 or -2.9e14 < A Initial program 61.3%
Simplified86.9%
Final simplification85.6%
(FPCore (A B C) :precision binary64 (if (<= C 2.2e+149) (* 180.0 (/ (atan (+ 1.0 (+ (/ (- (- C A) (hypot (- A C) B)) B) -1.0))) PI)) (* 180.0 (/ (atan (/ B (/ C -0.5))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.2e+149) {
tmp = 180.0 * (atan((1.0 + ((((C - A) - hypot((A - C), B)) / B) + -1.0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2.2e+149) {
tmp = 180.0 * (Math.atan((1.0 + ((((C - A) - Math.hypot((A - C), B)) / B) + -1.0))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.2e+149: tmp = 180.0 * (math.atan((1.0 + ((((C - A) - math.hypot((A - C), B)) / B) + -1.0))) / math.pi) else: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.2e+149) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B) + -1.0))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.2e+149) tmp = 180.0 * (atan((1.0 + ((((C - A) - hypot((A - C), B)) / B) + -1.0))) / pi); else tmp = 180.0 * (atan((B / (C / -0.5))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.2e+149], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2.2 \cdot 10^{+149}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B} + -1\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\end{array}
\end{array}
if C < 2.2e149Initial program 62.2%
add-log-exp62.2%
associate-*l/62.2%
*-un-lft-identity62.2%
unpow262.2%
unpow262.2%
hypot-def87.1%
Applied egg-rr87.1%
rem-log-exp87.1%
expm1-log1p-u64.4%
expm1-def64.4%
log1p-udef64.4%
rem-exp-log87.1%
Applied egg-rr87.1%
associate--l+87.1%
Applied egg-rr87.1%
if 2.2e149 < C Initial program 12.5%
add-log-exp12.5%
associate-*l/12.5%
*-un-lft-identity12.5%
unpow212.5%
unpow212.5%
hypot-def55.5%
Applied egg-rr55.5%
Taylor expanded in C around inf 32.8%
+-commutative32.8%
associate--l+32.8%
neg-mul-132.8%
unpow232.8%
sqr-neg32.8%
unpow232.8%
distribute-rgt1-in32.8%
metadata-eval32.8%
mul0-lft32.8%
metadata-eval32.8%
Simplified32.8%
Taylor expanded in A around 0 75.8%
associate-*r/75.8%
*-commutative75.8%
associate-/l*75.8%
Simplified75.8%
Final simplification85.5%
(FPCore (A B C) :precision binary64 (if (<= C 1.12e+153) (* 180.0 (/ (atan (+ (+ 1.0 (/ (- (- C A) (hypot (- A C) B)) B)) -1.0)) PI)) (* 180.0 (/ (atan (/ B (/ C -0.5))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.12e+153) {
tmp = 180.0 * (atan(((1.0 + (((C - A) - hypot((A - C), B)) / B)) + -1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.12e+153) {
tmp = 180.0 * (Math.atan(((1.0 + (((C - A) - Math.hypot((A - C), B)) / B)) + -1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.12e+153: tmp = 180.0 * (math.atan(((1.0 + (((C - A) - math.hypot((A - C), B)) / B)) + -1.0)) / math.pi) else: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.12e+153) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 + Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) + -1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.12e+153) tmp = 180.0 * (atan(((1.0 + (((C - A) - hypot((A - C), B)) / B)) + -1.0)) / pi); else tmp = 180.0 * (atan((B / (C / -0.5))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.12e+153], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 + N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.12 \cdot 10^{+153}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right) + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\end{array}
\end{array}
if C < 1.1200000000000001e153Initial program 62.2%
add-log-exp62.2%
associate-*l/62.2%
*-un-lft-identity62.2%
unpow262.2%
unpow262.2%
hypot-def87.1%
Applied egg-rr87.1%
rem-log-exp87.1%
expm1-log1p-u64.4%
expm1-def64.4%
log1p-udef64.4%
rem-exp-log87.1%
Applied egg-rr87.1%
if 1.1200000000000001e153 < C Initial program 12.5%
add-log-exp12.5%
associate-*l/12.5%
*-un-lft-identity12.5%
unpow212.5%
unpow212.5%
hypot-def55.5%
Applied egg-rr55.5%
Taylor expanded in C around inf 32.8%
+-commutative32.8%
associate--l+32.8%
neg-mul-132.8%
unpow232.8%
sqr-neg32.8%
unpow232.8%
distribute-rgt1-in32.8%
metadata-eval32.8%
mul0-lft32.8%
metadata-eval32.8%
Simplified32.8%
Taylor expanded in A around 0 75.8%
associate-*r/75.8%
*-commutative75.8%
associate-/l*75.8%
Simplified75.8%
Final simplification85.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
(t_1 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
(if (<= A -5e+167)
t_1
(if (<= A -2.46e+45)
t_0
(if (<= A -2.7e+14)
t_1
(if (<= A 8e+70) 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 - hypot(B, C)) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double tmp;
if (A <= -5e+167) {
tmp = t_1;
} else if (A <= -2.46e+45) {
tmp = t_0;
} else if (A <= -2.7e+14) {
tmp = t_1;
} else if (A <= 8e+70) {
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 - Math.hypot(B, C)) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double tmp;
if (A <= -5e+167) {
tmp = t_1;
} else if (A <= -2.46e+45) {
tmp = t_0;
} else if (A <= -2.7e+14) {
tmp = t_1;
} else if (A <= 8e+70) {
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 - math.hypot(B, C)) / B)) / math.pi) t_1 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) tmp = 0 if A <= -5e+167: tmp = t_1 elif A <= -2.46e+45: tmp = t_0 elif A <= -2.7e+14: tmp = t_1 elif A <= 8e+70: 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(Float64(C - hypot(B, C)) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) tmp = 0.0 if (A <= -5e+167) tmp = t_1; elseif (A <= -2.46e+45) tmp = t_0; elseif (A <= -2.7e+14) tmp = t_1; elseif (A <= 8e+70) 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 - hypot(B, C)) / B)) / pi); t_1 = 180.0 * (atan((0.5 * (B / A))) / pi); tmp = 0.0; if (A <= -5e+167) tmp = t_1; elseif (A <= -2.46e+45) tmp = t_0; elseif (A <= -2.7e+14) tmp = t_1; elseif (A <= 8e+70) 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[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $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]}, If[LessEqual[A, -5e+167], t$95$1, If[LessEqual[A, -2.46e+45], t$95$0, If[LessEqual[A, -2.7e+14], t$95$1, If[LessEqual[A, 8e+70], 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 - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -5 \cdot 10^{+167}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -2.46 \cdot 10^{+45}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 8 \cdot 10^{+70}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.9999999999999997e167 or -2.4599999999999999e45 < A < -2.7e14Initial program 15.6%
Taylor expanded in A around -inf 76.9%
if -4.9999999999999997e167 < A < -2.4599999999999999e45 or -2.7e14 < A < 8.00000000000000058e70Initial program 51.8%
Taylor expanded in A around 0 51.1%
unpow251.1%
unpow251.1%
hypot-def83.0%
Simplified83.0%
if 8.00000000000000058e70 < A Initial program 86.2%
Taylor expanded in C around 0 86.0%
associate-*r/86.0%
mul-1-neg86.0%
+-commutative86.0%
unpow286.0%
unpow286.0%
hypot-def94.0%
Simplified94.0%
Taylor expanded in B around -inf 90.6%
mul-1-neg90.6%
unsub-neg90.6%
Simplified90.6%
Final simplification84.0%
(FPCore (A B C)
:precision binary64
(if (<= C -8.2e-100)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 1.96e+149)
(/ 1.0 (/ (/ PI 180.0) (atan (/ (- (- A) (hypot B A)) B))))
(* 180.0 (/ (atan (/ B (/ C -0.5))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8.2e-100) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 1.96e+149) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan(((-A - hypot(B, A)) / B)));
} else {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8.2e-100) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 1.96e+149) {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan(((-A - Math.hypot(B, A)) / B)));
} else {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8.2e-100: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 1.96e+149: tmp = 1.0 / ((math.pi / 180.0) / math.atan(((-A - math.hypot(B, A)) / B))) else: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8.2e-100) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 1.96e+149) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8.2e-100) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 1.96e+149) tmp = 1.0 / ((pi / 180.0) / atan(((-A - hypot(B, A)) / B))); else tmp = 180.0 * (atan((B / (C / -0.5))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8.2e-100], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.96e+149], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8.2 \cdot 10^{-100}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.96 \cdot 10^{+149}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.1999999999999998e-100Initial program 78.6%
Taylor expanded in A around 0 77.6%
unpow277.6%
unpow277.6%
hypot-def87.9%
Simplified87.9%
if -8.1999999999999998e-100 < C < 1.96e149Initial program 50.1%
Applied egg-rr81.6%
associate-/r*81.6%
associate--l-78.3%
Simplified78.3%
Taylor expanded in C around 0 48.9%
mul-1-neg48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def80.3%
Simplified80.3%
if 1.96e149 < C Initial program 12.5%
add-log-exp12.5%
associate-*l/12.5%
*-un-lft-identity12.5%
unpow212.5%
unpow212.5%
hypot-def55.5%
Applied egg-rr55.5%
Taylor expanded in C around inf 32.8%
+-commutative32.8%
associate--l+32.8%
neg-mul-132.8%
unpow232.8%
sqr-neg32.8%
unpow232.8%
distribute-rgt1-in32.8%
metadata-eval32.8%
mul0-lft32.8%
metadata-eval32.8%
Simplified32.8%
Taylor expanded in A around 0 75.8%
associate-*r/75.8%
*-commutative75.8%
associate-/l*75.8%
Simplified75.8%
Final simplification82.4%
(FPCore (A B C)
:precision binary64
(if (<= C -1.85e-100)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 3.2e+156)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(* 180.0 (/ (atan (/ B (/ C -0.5))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.85e-100) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 3.2e+156) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.85e-100) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 3.2e+156) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.85e-100: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 3.2e+156: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.85e-100) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 3.2e+156) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.85e-100) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 3.2e+156) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = 180.0 * (atan((B / (C / -0.5))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.85e-100], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.2e+156], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.85 \cdot 10^{-100}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{+156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.85000000000000009e-100Initial program 78.6%
Taylor expanded in A around 0 77.6%
unpow277.6%
unpow277.6%
hypot-def87.9%
Simplified87.9%
if -1.85000000000000009e-100 < C < 3.20000000000000002e156Initial program 50.1%
Taylor expanded in C around 0 48.9%
associate-*r/48.9%
mul-1-neg48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def80.3%
Simplified80.3%
if 3.20000000000000002e156 < C Initial program 12.5%
add-log-exp12.5%
associate-*l/12.5%
*-un-lft-identity12.5%
unpow212.5%
unpow212.5%
hypot-def55.5%
Applied egg-rr55.5%
Taylor expanded in C around inf 32.8%
+-commutative32.8%
associate--l+32.8%
neg-mul-132.8%
unpow232.8%
sqr-neg32.8%
unpow232.8%
distribute-rgt1-in32.8%
metadata-eval32.8%
mul0-lft32.8%
metadata-eval32.8%
Simplified32.8%
Taylor expanded in A around 0 75.8%
associate-*r/75.8%
*-commutative75.8%
associate-/l*75.8%
Simplified75.8%
Final simplification82.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))
(if (<= B -3.8e-15)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.46e-204)
t_0
(if (<= B 4.8e-165)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= B 5e+43) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
double tmp;
if (B <= -3.8e-15) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.46e-204) {
tmp = t_0;
} else if (B <= 4.8e-165) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (B <= 5e+43) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
double tmp;
if (B <= -3.8e-15) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.46e-204) {
tmp = t_0;
} else if (B <= 4.8e-165) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (B <= 5e+43) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) tmp = 0 if B <= -3.8e-15: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.46e-204: tmp = t_0 elif B <= 4.8e-165: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif B <= 5e+43: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)) tmp = 0.0 if (B <= -3.8e-15) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.46e-204) tmp = t_0; elseif (B <= 4.8e-165) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (B <= 5e+43) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((A / B) * -2.0)) / pi); tmp = 0.0; if (B <= -3.8e-15) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.46e-204) tmp = t_0; elseif (B <= 4.8e-165) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (B <= 5e+43) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.8e-15], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.46e-204], t$95$0, If[LessEqual[B, 4.8e-165], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e+43], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{if}\;B \leq -3.8 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.46 \cdot 10^{-204}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5 \cdot 10^{+43}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.8000000000000002e-15Initial program 49.1%
Taylor expanded in B around -inf 61.7%
if -3.8000000000000002e-15 < B < 1.45999999999999998e-204 or 4.8000000000000004e-165 < B < 5.0000000000000004e43Initial program 66.9%
Taylor expanded in A around inf 41.6%
if 1.45999999999999998e-204 < B < 4.8000000000000004e-165Initial program 43.6%
Taylor expanded in A around -inf 72.4%
if 5.0000000000000004e43 < B Initial program 44.3%
Taylor expanded in B around inf 70.7%
Final simplification55.9%
(FPCore (A B C)
:precision binary64
(if (<= B -4.5e-106)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.6e-203)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 2.2e-164)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= B 1.2e+37)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.5e-106) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.6e-203) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 2.2e-164) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (B <= 1.2e+37) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.5e-106) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.6e-203) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 2.2e-164) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (B <= 1.2e+37) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.5e-106: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.6e-203: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 2.2e-164: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif B <= 1.2e+37: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.5e-106) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.6e-203) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 2.2e-164) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (B <= 1.2e+37) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.5e-106) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.6e-203) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 2.2e-164) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (B <= 1.2e+37) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.5e-106], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-203], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.2e-164], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.2e+37], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.5 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-164}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.49999999999999955e-106Initial program 51.3%
Taylor expanded in B around -inf 55.0%
if -4.49999999999999955e-106 < B < 3.59999999999999979e-203Initial program 63.8%
Taylor expanded in C around -inf 51.4%
if 3.59999999999999979e-203 < B < 2.19999999999999988e-164Initial program 43.6%
Taylor expanded in A around -inf 72.4%
if 2.19999999999999988e-164 < B < 1.2e37Initial program 72.2%
Taylor expanded in A around inf 40.4%
if 1.2e37 < B Initial program 44.3%
Taylor expanded in B around inf 70.7%
Final simplification56.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.36e-221)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 5.2e-205)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 6.8e-165)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= B 1.1e+37)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.36e-221) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 5.2e-205) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 6.8e-165) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (B <= 1.1e+37) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.36e-221) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 5.2e-205) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 6.8e-165) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (B <= 1.1e+37) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.36e-221: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 5.2e-205: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 6.8e-165: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif B <= 1.1e+37: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.36e-221) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 5.2e-205) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 6.8e-165) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (B <= 1.1e+37) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.36e-221) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 5.2e-205) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 6.8e-165) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (B <= 1.1e+37) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.36e-221], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-205], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e-165], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e+37], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.36 \cdot 10^{-221}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-205}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.3600000000000001e-221Initial program 54.5%
Taylor expanded in C around 0 46.7%
associate-*r/46.7%
mul-1-neg46.7%
+-commutative46.7%
unpow246.7%
unpow246.7%
hypot-def68.7%
Simplified68.7%
Taylor expanded in B around -inf 65.1%
mul-1-neg65.1%
unsub-neg65.1%
Simplified65.1%
if -1.3600000000000001e-221 < B < 5.1999999999999997e-205Initial program 61.9%
Taylor expanded in C around -inf 61.2%
if 5.1999999999999997e-205 < B < 6.8e-165Initial program 43.6%
Taylor expanded in A around -inf 72.4%
if 6.8e-165 < B < 1.1e37Initial program 72.2%
Taylor expanded in A around inf 40.4%
if 1.1e37 < B Initial program 44.3%
Taylor expanded in B around inf 70.7%
Final simplification62.3%
(FPCore (A B C) :precision binary64 (if (<= B 2e-273) (* 180.0 (/ (atan (+ (+ 1.0 (/ (- (+ B C) A) B)) -1.0)) PI)) (* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2e-273) {
tmp = 180.0 * (atan(((1.0 + (((B + C) - A) / B)) + -1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2e-273) {
tmp = 180.0 * (Math.atan(((1.0 + (((B + C) - A) / B)) + -1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2e-273: tmp = 180.0 * (math.atan(((1.0 + (((B + C) - A) / B)) + -1.0)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2e-273) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 + Float64(Float64(Float64(B + C) - A) / B)) + -1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2e-273) tmp = 180.0 * (atan(((1.0 + (((B + C) - A) / B)) + -1.0)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2e-273], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 + N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2 \cdot 10^{-273}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(1 + \frac{\left(B + C\right) - A}{B}\right) + -1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 2e-273Initial program 55.1%
add-log-exp55.1%
associate-*l/55.1%
*-un-lft-identity55.1%
unpow255.1%
unpow255.1%
hypot-def82.2%
Applied egg-rr82.2%
rem-log-exp82.2%
expm1-log1p-u79.8%
expm1-def79.8%
log1p-udef79.8%
rem-exp-log82.2%
Applied egg-rr82.2%
Taylor expanded in B around -inf 73.6%
if 2e-273 < B Initial program 55.3%
Simplified80.1%
Taylor expanded in B around inf 73.1%
+-commutative73.1%
Simplified73.1%
Final simplification73.3%
(FPCore (A B C)
:precision binary64
(if (<= B -5e-221)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 3.2e-207)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 8.1e-165)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-221) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 3.2e-207) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 8.1e-165) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-221) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 3.2e-207) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 8.1e-165) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-221: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 3.2e-207: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 8.1e-165: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-221) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 3.2e-207) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 8.1e-165) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-221) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 3.2e-207) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 8.1e-165) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-221], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.2e-207], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.1e-165], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-221}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.1 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.99999999999999996e-221Initial program 54.5%
Taylor expanded in C around 0 46.7%
associate-*r/46.7%
mul-1-neg46.7%
+-commutative46.7%
unpow246.7%
unpow246.7%
hypot-def68.7%
Simplified68.7%
Taylor expanded in B around -inf 65.1%
mul-1-neg65.1%
unsub-neg65.1%
Simplified65.1%
if -4.99999999999999996e-221 < B < 3.2000000000000003e-207Initial program 61.9%
Taylor expanded in C around -inf 61.2%
if 3.2000000000000003e-207 < B < 8.10000000000000025e-165Initial program 43.6%
Taylor expanded in A around -inf 72.4%
if 8.10000000000000025e-165 < B Initial program 55.6%
add-log-exp55.5%
associate-*l/55.6%
*-un-lft-identity55.6%
unpow255.6%
unpow255.6%
hypot-def82.1%
Applied egg-rr82.1%
rem-log-exp82.1%
expm1-log1p-u49.1%
expm1-def49.1%
log1p-udef49.1%
rem-exp-log82.1%
Applied egg-rr82.1%
Taylor expanded in B around -inf 32.4%
Taylor expanded in C around inf 66.6%
Final simplification65.7%
(FPCore (A B C)
:precision binary64
(if (<= B -2.7e-17)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.25e+50)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-17) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.25e+50) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-17) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.25e+50) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.7e-17: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.25e+50: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.7e-17) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.25e+50) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.7e-17) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.25e+50) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.7e-17], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e+50], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.7 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{+50}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.7000000000000001e-17Initial program 49.1%
Taylor expanded in B around -inf 61.7%
if -2.7000000000000001e-17 < B < 1.25e50Initial program 64.6%
Taylor expanded in A around inf 39.3%
if 1.25e50 < B Initial program 44.3%
Taylor expanded in B around inf 70.7%
Final simplification53.4%
(FPCore (A B C) :precision binary64 (if (<= B -3.8e-78) (* 180.0 (/ (atan (- 1.0 (/ A B))) PI)) (* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-78) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-78) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.8e-78: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.8e-78) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.8e-78) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.8e-78], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.8 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.7999999999999999e-78Initial program 50.6%
Taylor expanded in C around 0 42.3%
associate-*r/42.3%
mul-1-neg42.3%
+-commutative42.3%
unpow242.3%
unpow242.3%
hypot-def70.6%
Simplified70.6%
Taylor expanded in B around -inf 68.4%
mul-1-neg68.4%
unsub-neg68.4%
Simplified68.4%
if -3.7999999999999999e-78 < B Initial program 57.3%
Simplified79.4%
Taylor expanded in B around inf 70.0%
+-commutative70.0%
Simplified70.0%
Final simplification69.5%
(FPCore (A B C) :precision binary64 (if (<= B -4e-223) (* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI)) (* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4e-223) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4e-223) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4e-223: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4e-223) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4e-223) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4e-223], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4 \cdot 10^{-223}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.9999999999999999e-223Initial program 54.6%
Simplified78.8%
Taylor expanded in B around -inf 75.1%
neg-mul-175.1%
unsub-neg75.1%
Simplified75.1%
if -3.9999999999999999e-223 < B Initial program 55.7%
Simplified79.8%
Taylor expanded in B around inf 71.9%
+-commutative71.9%
Simplified71.9%
Final simplification73.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.05e-167)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.4e-142)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-167) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.4e-142) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-167) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.4e-142) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.05e-167: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.4e-142: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.05e-167) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.4e-142) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.05e-167) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.4e-142) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.05e-167], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e-142], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.05 \cdot 10^{-167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-142}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.05000000000000009e-167Initial program 56.0%
Taylor expanded in B around -inf 49.8%
if -1.05000000000000009e-167 < B < 5.3999999999999996e-142Initial program 55.0%
add-log-exp55.0%
associate-*l/55.0%
*-un-lft-identity55.0%
unpow255.0%
unpow255.0%
hypot-def87.1%
Applied egg-rr87.1%
rem-log-exp87.1%
expm1-log1p-u47.9%
expm1-def47.9%
log1p-udef47.9%
rem-exp-log87.1%
Applied egg-rr87.1%
Taylor expanded in C around inf 17.7%
distribute-lft1-in17.7%
metadata-eval17.7%
mul0-lft33.9%
metadata-eval33.9%
Simplified33.9%
if 5.3999999999999996e-142 < B Initial program 54.4%
Taylor expanded in B around inf 55.1%
Final simplification48.8%
(FPCore (A B C) :precision binary64 (if (<= B 8.5e-143) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 8.5e-143) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 8.5e-143) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 8.5e-143: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 8.5e-143) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 8.5e-143) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 8.5e-143], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 8.5 \cdot 10^{-143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 8.50000000000000072e-143Initial program 55.7%
add-log-exp55.7%
associate-*l/55.7%
*-un-lft-identity55.7%
unpow255.7%
unpow255.7%
hypot-def83.8%
Applied egg-rr83.8%
rem-log-exp83.8%
expm1-log1p-u70.9%
expm1-def70.8%
log1p-udef70.8%
rem-exp-log83.8%
Applied egg-rr83.8%
Taylor expanded in C around inf 8.6%
distribute-lft1-in8.6%
metadata-eval8.6%
mul0-lft15.1%
metadata-eval15.1%
Simplified15.1%
if 8.50000000000000072e-143 < B Initial program 54.4%
Taylor expanded in B around inf 55.1%
Final simplification31.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 55.2%
Taylor expanded in B around inf 24.5%
Final simplification24.5%
herbie shell --seed 2024010
(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)))