
(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 15 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
(*
180.0
(/
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
PI)))
(t_1 (+ (- A) C))
(t_2 (* 180.0 (/ (atan (/ (- t_1 (hypot t_1 B)) B)) PI))))
(if (<= t_0 -5e-75)
t_2
(if (<= t_0 0.0) (* 180.0 (/ (atan (* (/ B (- C A)) -0.5)) PI)) t_2))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
double t_1 = -A + C;
double t_2 = 180.0 * (atan(((t_1 - hypot(t_1, B)) / B)) / ((double) M_PI));
double tmp;
if (t_0 <= -5e-75) {
tmp = t_2;
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan(((B / (C - A)) * -0.5)) / ((double) M_PI));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
double t_1 = -A + C;
double t_2 = 180.0 * (Math.atan(((t_1 - Math.hypot(t_1, B)) / B)) / Math.PI);
double tmp;
if (t_0 <= -5e-75) {
tmp = t_2;
} else if (t_0 <= 0.0) {
tmp = 180.0 * (Math.atan(((B / (C - A)) * -0.5)) / Math.PI);
} else {
tmp = t_2;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi) t_1 = -A + C t_2 = 180.0 * (math.atan(((t_1 - math.hypot(t_1, B)) / B)) / math.pi) tmp = 0 if t_0 <= -5e-75: tmp = t_2 elif t_0 <= 0.0: tmp = 180.0 * (math.atan(((B / (C - A)) * -0.5)) / math.pi) else: tmp = t_2 return tmp
function code(A, B, C) t_0 = 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)) t_1 = Float64(Float64(-A) + C) t_2 = Float64(180.0 * Float64(atan(Float64(Float64(t_1 - hypot(t_1, B)) / B)) / pi)) tmp = 0.0 if (t_0 <= -5e-75) tmp = t_2; elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / Float64(C - A)) * -0.5)) / pi)); else tmp = t_2; end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); t_1 = -A + C; t_2 = 180.0 * (atan(((t_1 - hypot(t_1, B)) / B)) / pi); tmp = 0.0; if (t_0 <= -5e-75) tmp = t_2; elseif (t_0 <= 0.0) tmp = 180.0 * (atan(((B / (C - A)) * -0.5)) / pi); else tmp = t_2; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[((-A) + C), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(N[(t$95$1 - N[Sqrt[t$95$1 ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-75], t$95$2, If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\\
t_1 := \left(-A\right) + C\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{t\_1 - \mathsf{hypot}\left(t\_1, B\right)}{B}\right)}{\pi}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -4.99999999999999979e-75 or 0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) Initial program 58.2%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites86.9%
if -4.99999999999999979e-75 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < 0.0Initial program 16.8%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites16.8%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6499.5
Applied rewrites99.5%
(FPCore (A B C) :precision binary64 (if (<= A -4.6e-15) (* 180.0 (/ (atan (* (/ B (- C A)) -0.5)) PI)) (* 180.0 (/ (atan (/ (- (- C A) (hypot C B)) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e-15) {
tmp = 180.0 * (atan(((B / (C - A)) * -0.5)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(C, B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e-15) {
tmp = 180.0 * (Math.atan(((B / (C - A)) * -0.5)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(C, B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.6e-15: tmp = 180.0 * (math.atan(((B / (C - A)) * -0.5)) / math.pi) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(C, B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.6e-15) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / Float64(C - A)) * -0.5)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(C, B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.6e-15) tmp = 180.0 * (atan(((B / (C - A)) * -0.5)) / pi); else tmp = 180.0 * (atan((((C - A) - hypot(C, B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.6e-15], N[(180.0 * N[(N[ArcTan[N[(N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.6 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.59999999999999981e-15Initial program 16.1%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites46.4%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6478.9
Applied rewrites78.9%
if -4.59999999999999981e-15 < A Initial program 65.4%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites88.6%
Taylor expanded in A around 0
Applied rewrites86.9%
Taylor expanded in C around 0
lift--.f6486.9
Applied rewrites86.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(*
180.0
(/
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
PI))))
(if (<= t_0 -40.0)
(* 180.0 (/ (atan (/ (- (- C A) B) B)) PI))
(if (<= t_0 0.0)
(* 180.0 (/ (atan (* (/ B (- C A)) -0.5)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
double tmp;
if (t_0 <= -40.0) {
tmp = 180.0 * (atan((((C - A) - B) / B)) / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan(((B / (C - A)) * -0.5)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
double tmp;
if (t_0 <= -40.0) {
tmp = 180.0 * (Math.atan((((C - A) - B) / B)) / Math.PI);
} else if (t_0 <= 0.0) {
tmp = 180.0 * (Math.atan(((B / (C - A)) * -0.5)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi) tmp = 0 if t_0 <= -40.0: tmp = 180.0 * (math.atan((((C - A) - B) / B)) / math.pi) elif t_0 <= 0.0: tmp = 180.0 * (math.atan(((B / (C - A)) * -0.5)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) t_0 = 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)) tmp = 0.0 if (t_0 <= -40.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - B) / B)) / pi)); elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / Float64(C - A)) * -0.5)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); tmp = 0.0; if (t_0 <= -40.0) tmp = 180.0 * (atan((((C - A) - B) / B)) / pi); elseif (t_0 <= 0.0) tmp = 180.0 * (atan(((B / (C - A)) * -0.5)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, -40.0], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\\
\mathbf{if}\;t\_0 \leq -40:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C - A} \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -40Initial program 54.9%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites86.7%
Taylor expanded in A around 0
Applied rewrites83.8%
Taylor expanded in C around 0
lift--.f6483.8
Applied rewrites83.8%
Taylor expanded in B around inf
Applied rewrites74.3%
if -40 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < 0.0Initial program 18.7%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites21.6%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6495.0
Applied rewrites95.0%
if 0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) Initial program 62.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6479.5
Applied rewrites79.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(*
180.0
(/
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
PI))))
(if (<= t_0 -40.0)
(* 180.0 (/ (atan (/ (- (- C A) B) B)) PI))
(if (<= t_0 0.0)
(* (/ (atan (* (/ B A) 0.5)) PI) 180.0)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
double tmp;
if (t_0 <= -40.0) {
tmp = 180.0 * (atan((((C - A) - B) / B)) / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = (atan(((B / A) * 0.5)) / ((double) M_PI)) * 180.0;
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
double tmp;
if (t_0 <= -40.0) {
tmp = 180.0 * (Math.atan((((C - A) - B) / B)) / Math.PI);
} else if (t_0 <= 0.0) {
tmp = (Math.atan(((B / A) * 0.5)) / Math.PI) * 180.0;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi) tmp = 0 if t_0 <= -40.0: tmp = 180.0 * (math.atan((((C - A) - B) / B)) / math.pi) elif t_0 <= 0.0: tmp = (math.atan(((B / A) * 0.5)) / math.pi) * 180.0 else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) t_0 = 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)) tmp = 0.0 if (t_0 <= -40.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - B) / B)) / pi)); elseif (t_0 <= 0.0) tmp = Float64(Float64(atan(Float64(Float64(B / A) * 0.5)) / pi) * 180.0); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); tmp = 0.0; if (t_0 <= -40.0) tmp = 180.0 * (atan((((C - A) - B) / B)) / pi); elseif (t_0 <= 0.0) tmp = (atan(((B / A) * 0.5)) / pi) * 180.0; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, -40.0], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\\
\mathbf{if}\;t\_0 \leq -40:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -40Initial program 54.9%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites86.7%
Taylor expanded in A around 0
Applied rewrites83.8%
Taylor expanded in C around 0
lift--.f6483.8
Applied rewrites83.8%
Taylor expanded in B around inf
Applied rewrites74.3%
if -40 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < 0.0Initial program 18.7%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites50.3%
if 0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) Initial program 62.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6479.5
Applied rewrites79.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(*
180.0
(/
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
PI))))
(if (<= t_0 -40.0)
(* 180.0 (/ (atan (/ (- (- C A) B) B)) PI))
(if (<= t_0 0.0)
(* (/ (atan (* (/ B A) 0.5)) PI) 180.0)
(/ (* 180.0 (atan (+ (/ (- C A) B) 1.0))) PI)))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
double tmp;
if (t_0 <= -40.0) {
tmp = 180.0 * (atan((((C - A) - B) / B)) / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = (atan(((B / A) * 0.5)) / ((double) M_PI)) * 180.0;
} else {
tmp = (180.0 * atan((((C - A) / B) + 1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
double tmp;
if (t_0 <= -40.0) {
tmp = 180.0 * (Math.atan((((C - A) - B) / B)) / Math.PI);
} else if (t_0 <= 0.0) {
tmp = (Math.atan(((B / A) * 0.5)) / Math.PI) * 180.0;
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + 1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi) tmp = 0 if t_0 <= -40.0: tmp = 180.0 * (math.atan((((C - A) - B) / B)) / math.pi) elif t_0 <= 0.0: tmp = (math.atan(((B / A) * 0.5)) / math.pi) * 180.0 else: tmp = (180.0 * math.atan((((C - A) / B) + 1.0))) / math.pi return tmp
function code(A, B, C) t_0 = 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)) tmp = 0.0 if (t_0 <= -40.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - B) / B)) / pi)); elseif (t_0 <= 0.0) tmp = Float64(Float64(atan(Float64(Float64(B / A) * 0.5)) / pi) * 180.0); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + 1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); tmp = 0.0; if (t_0 <= -40.0) tmp = 180.0 * (atan((((C - A) - B) / B)) / pi); elseif (t_0 <= 0.0) tmp = (atan(((B / A) * 0.5)) / pi) * 180.0; else tmp = (180.0 * atan((((C - A) / B) + 1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, -40.0], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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}\\
\mathbf{if}\;t\_0 \leq -40:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < -40Initial program 54.9%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites86.7%
Taylor expanded in A around 0
Applied rewrites83.8%
Taylor expanded in C around 0
lift--.f6483.8
Applied rewrites83.8%
Taylor expanded in B around inf
Applied rewrites74.3%
if -40 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) < 0.0Initial program 18.7%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites50.3%
if 0.0 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (*.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))))))) (PI.f64))) Initial program 62.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6479.5
Applied rewrites79.5%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites79.5%
(FPCore (A B C) :precision binary64 (if (<= A -6.6e+24) (/ (* 180.0 (atan (* (/ B A) 0.5))) PI) (* 180.0 (/ (atan (/ (- (- C A) B) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.6e+24) {
tmp = (180.0 * atan(((B / A) * 0.5))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((((C - A) - B) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.6e+24) {
tmp = (180.0 * Math.atan(((B / A) * 0.5))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((((C - A) - B) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.6e+24: tmp = (180.0 * math.atan(((B / A) * 0.5))) / math.pi else: tmp = 180.0 * (math.atan((((C - A) - B) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.6e+24) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - B) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.6e+24) tmp = (180.0 * atan(((B / A) * 0.5))) / pi; else tmp = 180.0 * (atan((((C - A) - B) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.6e+24], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.6 \cdot 10^{+24}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.5999999999999998e24Initial program 13.9%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6474.1
Applied rewrites74.1%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6474.2
Applied rewrites74.2%
if -6.5999999999999998e24 < A Initial program 64.3%
Taylor expanded in A around -inf
lower-atan.f64N/A
lower-/.f64N/A
Applied rewrites87.6%
Taylor expanded in A around 0
Applied rewrites85.9%
Taylor expanded in C around 0
lift--.f6485.9
Applied rewrites85.9%
Taylor expanded in B around inf
Applied rewrites66.0%
(FPCore (A B C)
:precision binary64
(if (<= C -2.3e-18)
(* (/ (atan (+ (/ C B) 1.0)) PI) 180.0)
(if (<= C -1.6e-81)
(* (/ (atan (* (/ B A) 0.5)) PI) 180.0)
(if (<= C 3.5e-96)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* (/ B C) -0.5)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e-18) {
tmp = (atan(((C / B) + 1.0)) / ((double) M_PI)) * 180.0;
} else if (C <= -1.6e-81) {
tmp = (atan(((B / A) * 0.5)) / ((double) M_PI)) * 180.0;
} else if (C <= 3.5e-96) {
tmp = 180.0 * (atan((1.0 - (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 <= -2.3e-18) {
tmp = (Math.atan(((C / B) + 1.0)) / Math.PI) * 180.0;
} else if (C <= -1.6e-81) {
tmp = (Math.atan(((B / A) * 0.5)) / Math.PI) * 180.0;
} else if (C <= 3.5e-96) {
tmp = 180.0 * (Math.atan((1.0 - (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 <= -2.3e-18: tmp = (math.atan(((C / B) + 1.0)) / math.pi) * 180.0 elif C <= -1.6e-81: tmp = (math.atan(((B / A) * 0.5)) / math.pi) * 180.0 elif C <= 3.5e-96: tmp = 180.0 * (math.atan((1.0 - (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 <= -2.3e-18) tmp = Float64(Float64(atan(Float64(Float64(C / B) + 1.0)) / pi) * 180.0); elseif (C <= -1.6e-81) tmp = Float64(Float64(atan(Float64(Float64(B / A) * 0.5)) / pi) * 180.0); elseif (C <= 3.5e-96) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B / C) * -0.5)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.3e-18) tmp = (atan(((C / B) + 1.0)) / pi) * 180.0; elseif (C <= -1.6e-81) tmp = (atan(((B / A) * 0.5)) / pi) * 180.0; elseif (C <= 3.5e-96) tmp = 180.0 * (atan((1.0 - (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, -2.3e-18], N[(N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[C, -1.6e-81], N[(N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[C, 3.5e-96], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi} \cdot 180\\
\mathbf{elif}\;C \leq -1.6 \cdot 10^{-81}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{-96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.3000000000000001e-18Initial program 81.4%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6482.9
Applied rewrites82.9%
Taylor expanded in A around 0
Applied rewrites82.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6482.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6482.9
Applied rewrites82.9%
if -2.3000000000000001e-18 < C < -1.6e-81Initial program 49.1%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6472.1
Applied rewrites72.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6472.1
Applied rewrites72.1%
if -1.6e-81 < C < 3.4999999999999999e-96Initial program 61.3%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6451.5
Applied rewrites51.5%
Taylor expanded in C around 0
lower--.f64N/A
lift-/.f6450.3
Applied rewrites50.3%
if 3.4999999999999999e-96 < C Initial program 21.5%
Taylor expanded in C around inf
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt1-inN/A
metadata-evalN/A
lower-*.f6461.7
Applied rewrites61.7%
Taylor expanded in A around 0
*-commutativeN/A
lower-*.f64N/A
lift-/.f6461.7
Applied rewrites61.7%
(FPCore (A B C)
:precision binary64
(if (<= A -3.9e+15)
(/ (* 180.0 (atan (* (/ B A) 0.5))) PI)
(if (<= A 4.5e-125)
(* (/ (atan (+ (/ C B) 1.0)) PI) 180.0)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.9e+15) {
tmp = (180.0 * atan(((B / A) * 0.5))) / ((double) M_PI);
} else if (A <= 4.5e-125) {
tmp = (atan(((C / B) + 1.0)) / ((double) M_PI)) * 180.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 tmp;
if (A <= -3.9e+15) {
tmp = (180.0 * Math.atan(((B / A) * 0.5))) / Math.PI;
} else if (A <= 4.5e-125) {
tmp = (Math.atan(((C / B) + 1.0)) / Math.PI) * 180.0;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.9e+15: tmp = (180.0 * math.atan(((B / A) * 0.5))) / math.pi elif A <= 4.5e-125: tmp = (math.atan(((C / B) + 1.0)) / math.pi) * 180.0 else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.9e+15) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / A) * 0.5))) / pi); elseif (A <= 4.5e-125) tmp = Float64(Float64(atan(Float64(Float64(C / B) + 1.0)) / pi) * 180.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) tmp = 0.0; if (A <= -3.9e+15) tmp = (180.0 * atan(((B / A) * 0.5))) / pi; elseif (A <= 4.5e-125) tmp = (atan(((C / B) + 1.0)) / pi) * 180.0; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.9e+15], N[(N[(180.0 * N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4.5e-125], N[(N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $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 -3.9 \cdot 10^{+15}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.9e15Initial program 13.9%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6474.1
Applied rewrites74.1%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6474.2
Applied rewrites74.2%
if -3.9e15 < A < 4.50000000000000012e-125Initial program 54.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6445.1
Applied rewrites45.1%
Taylor expanded in A around 0
Applied rewrites45.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6445.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6445.1
Applied rewrites45.1%
if 4.50000000000000012e-125 < A Initial program 74.8%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6470.8
Applied rewrites70.8%
Taylor expanded in C around 0
lower--.f64N/A
lift-/.f6465.8
Applied rewrites65.8%
(FPCore (A B C)
:precision binary64
(if (<= A -3.9e+15)
(* (/ (atan (* (/ B A) 0.5)) PI) 180.0)
(if (<= A 4.5e-125)
(* (/ (atan (+ (/ C B) 1.0)) PI) 180.0)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.9e+15) {
tmp = (atan(((B / A) * 0.5)) / ((double) M_PI)) * 180.0;
} else if (A <= 4.5e-125) {
tmp = (atan(((C / B) + 1.0)) / ((double) M_PI)) * 180.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 tmp;
if (A <= -3.9e+15) {
tmp = (Math.atan(((B / A) * 0.5)) / Math.PI) * 180.0;
} else if (A <= 4.5e-125) {
tmp = (Math.atan(((C / B) + 1.0)) / Math.PI) * 180.0;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.9e+15: tmp = (math.atan(((B / A) * 0.5)) / math.pi) * 180.0 elif A <= 4.5e-125: tmp = (math.atan(((C / B) + 1.0)) / math.pi) * 180.0 else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.9e+15) tmp = Float64(Float64(atan(Float64(Float64(B / A) * 0.5)) / pi) * 180.0); elseif (A <= 4.5e-125) tmp = Float64(Float64(atan(Float64(Float64(C / B) + 1.0)) / pi) * 180.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) tmp = 0.0; if (A <= -3.9e+15) tmp = (atan(((B / A) * 0.5)) / pi) * 180.0; elseif (A <= 4.5e-125) tmp = (atan(((C / B) + 1.0)) / pi) * 180.0; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.9e+15], N[(N[(N[ArcTan[N[(N[(B / A), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[A, 4.5e-125], N[(N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $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 -3.9 \cdot 10^{+15}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{B}{A} \cdot 0.5\right)}{\pi} \cdot 180\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.9e15Initial program 13.9%
Taylor expanded in A around -inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f6474.1
Applied rewrites74.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.1
Applied rewrites74.1%
if -3.9e15 < A < 4.50000000000000012e-125Initial program 54.1%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6445.1
Applied rewrites45.1%
Taylor expanded in A around 0
Applied rewrites45.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6445.1
lift-+.f64N/A
+-commutativeN/A
lower-+.f6445.1
Applied rewrites45.1%
if 4.50000000000000012e-125 < A Initial program 74.8%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6470.8
Applied rewrites70.8%
Taylor expanded in C around 0
lower--.f64N/A
lift-/.f6465.8
Applied rewrites65.8%
(FPCore (A B C)
:precision binary64
(if (<= B 5.6e-228)
(* (/ (atan (+ (/ C B) 1.0)) PI) 180.0)
(if (<= B 4.3e-148)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.6e-228) {
tmp = (atan(((C / B) + 1.0)) / ((double) M_PI)) * 180.0;
} else if (B <= 4.3e-148) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 5.6e-228) {
tmp = (Math.atan(((C / B) + 1.0)) / Math.PI) * 180.0;
} else if (B <= 4.3e-148) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5.6e-228: tmp = (math.atan(((C / B) + 1.0)) / math.pi) * 180.0 elif B <= 4.3e-148: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5.6e-228) tmp = Float64(Float64(atan(Float64(Float64(C / B) + 1.0)) / pi) * 180.0); elseif (B <= 4.3e-148) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 5.6e-228) tmp = (atan(((C / B) + 1.0)) / pi) * 180.0; elseif (B <= 4.3e-148) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5.6e-228], N[(N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[B, 4.3e-148], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 5.6 \cdot 10^{-228}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi} \cdot 180\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 5.6000000000000005e-228Initial program 58.8%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6469.3
Applied rewrites69.3%
Taylor expanded in A around 0
Applied rewrites58.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6458.9
Applied rewrites58.9%
if 5.6000000000000005e-228 < B < 4.2999999999999998e-148Initial program 20.3%
Taylor expanded in B around inf
Applied rewrites5.9%
Taylor expanded in C around inf
associate-*r/N/A
*-commutativeN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-/.f64N/A
mul0-lft58.1
Applied rewrites58.1%
if 4.2999999999999998e-148 < B Initial program 50.9%
Taylor expanded in B around inf
Applied rewrites51.4%
(FPCore (A B C)
:precision binary64
(if (<= B 8.5e-228)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 4.3e-148)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 8.5e-228) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 4.3e-148) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 8.5e-228) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 4.3e-148) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 8.5e-228: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 4.3e-148: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 8.5e-228) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 4.3e-148) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 8.5e-228) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 4.3e-148) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 8.5e-228], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.3e-148], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 8.5 \cdot 10^{-228}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 8.49999999999999947e-228Initial program 58.8%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6469.3
Applied rewrites69.3%
Taylor expanded in C around 0
lower--.f64N/A
lift-/.f6455.6
Applied rewrites55.6%
if 8.49999999999999947e-228 < B < 4.2999999999999998e-148Initial program 20.3%
Taylor expanded in B around inf
Applied rewrites5.9%
Taylor expanded in C around inf
associate-*r/N/A
*-commutativeN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-/.f64N/A
mul0-lft58.1
Applied rewrites58.1%
if 4.2999999999999998e-148 < B Initial program 50.9%
Taylor expanded in B around inf
Applied rewrites51.4%
(FPCore (A B C)
:precision binary64
(if (<= B -0.41)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.6e-228)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 4.3e-148)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -0.41) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.6e-228) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 4.3e-148) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -0.41) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.6e-228) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 4.3e-148) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -0.41: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.6e-228: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 4.3e-148: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -0.41) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.6e-228) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 4.3e-148) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -0.41) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.6e-228) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 4.3e-148) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -0.41], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.6e-228], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.3e-148], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -0.41:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-228}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -0.409999999999999976Initial program 43.4%
Taylor expanded in B around -inf
Applied rewrites57.7%
if -0.409999999999999976 < B < 5.6000000000000005e-228Initial program 70.2%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6465.9
Applied rewrites65.9%
Taylor expanded in C around inf
lower-/.f6444.7
Applied rewrites44.7%
if 5.6000000000000005e-228 < B < 4.2999999999999998e-148Initial program 20.3%
Taylor expanded in B around inf
Applied rewrites5.9%
Taylor expanded in C around inf
associate-*r/N/A
*-commutativeN/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
lift-/.f64N/A
mul0-lft58.1
Applied rewrites58.1%
if 4.2999999999999998e-148 < B Initial program 50.9%
Taylor expanded in B around inf
Applied rewrites51.4%
(FPCore (A B C)
:precision binary64
(if (<= B -0.41)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 9e-97)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -0.41) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 9e-97) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -0.41) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 9e-97) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -0.41: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 9e-97: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -0.41) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 9e-97) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -0.41) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 9e-97) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -0.41], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-97], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -0.41:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-97}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -0.409999999999999976Initial program 43.4%
Taylor expanded in B around -inf
Applied rewrites57.7%
if -0.409999999999999976 < B < 9.0000000000000002e-97Initial program 63.2%
Taylor expanded in B around -inf
associate--l+N/A
div-subN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f6457.9
Applied rewrites57.9%
Taylor expanded in C around inf
lower-/.f6441.3
Applied rewrites41.3%
if 9.0000000000000002e-97 < B Initial program 47.3%
Taylor expanded in B around inf
Applied rewrites53.8%
(FPCore (A B C) :precision binary64 (if (<= B -1.45e-301) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.45e-301) {
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 <= -1.45e-301) {
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 <= -1.45e-301: 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 <= -1.45e-301) 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 <= -1.45e-301) 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, -1.45e-301], 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 -1.45 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.44999999999999992e-301Initial program 56.2%
Taylor expanded in B around -inf
Applied rewrites39.1%
if -1.44999999999999992e-301 < B Initial program 50.2%
Taylor expanded in B around inf
Applied rewrites40.3%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 52.9%
Taylor expanded in B around inf
Applied rewrites23.0%
herbie shell --seed 2025064
(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)))