
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sqrt (pow t_1 4.0)))
(t_3 (+ t_2 (pow t_1 2.0)))
(t_4 (sin t_0))
(t_5 (* t_1 t_4)))
(if (<= b_m 1.35e-152)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_4 4.0)) (pow t_4 2.0)))
(*
x-scale
(* t_4 (sin (fma 0.005555555555555556 (* angle PI) (* 0.5 PI))))))))
PI))
(if (<= b_m 7.2e+16)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
(* b_m b_m)
(fma
y-scale
t_3
(/
(*
y-scale
(+ (pow (* a t_4) 2.0) (/ (* (* a a) (pow t_5 2.0)) t_2)))
(* b_m b_m))))
(* x-scale (* t_1 (* t_4 (- (* b_m b_m) (* a a))))))))
PI))
(* 180.0 (/ (atan (* -0.5 (/ (* y-scale t_3) (* x-scale t_5)))) PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double t_2 = sqrt(pow(t_1, 4.0));
double t_3 = t_2 + pow(t_1, 2.0);
double t_4 = sin(t_0);
double t_5 = t_1 * t_4;
double tmp;
if (b_m <= 1.35e-152) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_4, 4.0)) + pow(t_4, 2.0))) / (x_45_scale * (t_4 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((double) M_PI))))))))) / ((double) M_PI));
} else if (b_m <= 7.2e+16) {
tmp = 180.0 * (atan((-0.5 * (((b_m * b_m) * fma(y_45_scale, t_3, ((y_45_scale * (pow((a * t_4), 2.0) + (((a * a) * pow(t_5, 2.0)) / t_2))) / (b_m * b_m)))) / (x_45_scale * (t_1 * (t_4 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * t_3) / (x_45_scale * t_5)))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = sqrt((t_1 ^ 4.0)) t_3 = Float64(t_2 + (t_1 ^ 2.0)) t_4 = sin(t_0) t_5 = Float64(t_1 * t_4) tmp = 0.0 if (b_m <= 1.35e-152) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_4 ^ 4.0)) + (t_4 ^ 2.0))) / Float64(x_45_scale * Float64(t_4 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * pi)))))))) / pi)); elseif (b_m <= 7.2e+16) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(b_m * b_m) * fma(y_45_scale, t_3, Float64(Float64(y_45_scale * Float64((Float64(a * t_4) ^ 2.0) + Float64(Float64(Float64(a * a) * (t_5 ^ 2.0)) / t_2))) / Float64(b_m * b_m)))) / Float64(x_45_scale * Float64(t_1 * Float64(t_4 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * t_3) / Float64(x_45_scale * t_5)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$1 * t$95$4), $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e-152], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$4, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$4 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.2e+16], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * N[(y$45$scale * t$95$3 + N[(N[(y$45$scale * N[(N[Power[N[(a * t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[(N[(N[(a * a), $MachinePrecision] * N[Power[t$95$5, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[(t$95$4 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * t$95$3), $MachinePrecision] / N[(x$45$scale * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sqrt{{t\_1}^{4}}\\
t_3 := t\_2 + {t\_1}^{2}\\
t_4 := \sin t\_0\\
t_5 := t\_1 \cdot t\_4\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_4}^{4}} + {t\_4}^{2}\right)}{x-scale \cdot \left(t\_4 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.2 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\left(b\_m \cdot b\_m\right) \cdot \mathsf{fma}\left(y-scale, t\_3, \frac{y-scale \cdot \left({\left(a \cdot t\_4\right)}^{2} + \frac{\left(a \cdot a\right) \cdot {t\_5}^{2}}{t\_2}\right)}{b\_m \cdot b\_m}\right)}{x-scale \cdot \left(t\_1 \cdot \left(t\_4 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot t\_3}{x-scale \cdot t\_5}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999999e-152Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in a around inf
Applied rewrites37.8%
if 1.34999999999999999e-152 < b < 7.2e16Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
Applied rewrites21.3%
if 7.2e16 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2
(sin (* angle (fma 0.005555555555555556 PI (* 0.5 (/ PI angle))))))
(t_3 (+ (pow (* a t_1) 2.0) (pow (* b_m t_2) 2.0)))
(t_4 (cos t_0)))
(if (<= b_m 1.35e-152)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(*
x-scale
(* t_1 (sin (fma 0.005555555555555556 (* angle PI) (* 0.5 PI))))))))
PI))
(if (<= b_m 7.2e+16)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_3 2.0)) t_3))
(* x-scale (* t_2 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_4 4.0)) (pow t_4 2.0)))
(* x-scale (* t_4 t_1)))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = sin((angle * fma(0.005555555555555556, ((double) M_PI), (0.5 * (((double) M_PI) / angle)))));
double t_3 = pow((a * t_1), 2.0) + pow((b_m * t_2), 2.0);
double t_4 = cos(t_0);
double tmp;
if (b_m <= 1.35e-152) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (t_1 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((double) M_PI))))))))) / ((double) M_PI));
} else if (b_m <= 7.2e+16) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_3, 2.0)) + t_3)) / (x_45_scale * (t_2 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_4, 4.0)) + pow(t_4, 2.0))) / (x_45_scale * (t_4 * t_1))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = sin(Float64(angle * fma(0.005555555555555556, pi, Float64(0.5 * Float64(pi / angle))))) t_3 = Float64((Float64(a * t_1) ^ 2.0) + (Float64(b_m * t_2) ^ 2.0)) t_4 = cos(t_0) tmp = 0.0 if (b_m <= 1.35e-152) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(t_1 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * pi)))))))) / pi)); elseif (b_m <= 7.2e+16) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 2.0)) + t_3)) / Float64(x_45_scale * Float64(t_2 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_4 ^ 4.0)) + (t_4 ^ 2.0))) / Float64(x_45_scale * Float64(t_4 * t_1))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(angle * N[(0.005555555555555556 * Pi + N[(0.5 * N[(Pi / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b$95$m * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e-152], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.2e+16], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 2.0], $MachinePrecision]], $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$4, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$4 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \sin \left(angle \cdot \mathsf{fma}\left(0.005555555555555556, \pi, 0.5 \cdot \frac{\pi}{angle}\right)\right)\\
t_3 := {\left(a \cdot t\_1\right)}^{2} + {\left(b\_m \cdot t\_2\right)}^{2}\\
t_4 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.2 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{2}} + t\_3\right)}{x-scale \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_4}^{4}} + {t\_4}^{2}\right)}{x-scale \cdot \left(t\_4 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999999e-152Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in a around inf
Applied rewrites37.8%
if 1.34999999999999999e-152 < b < 7.2e16Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in angle around inf
lower-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in angle around inf
lower-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in angle around inf
lower-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
if 7.2e16 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (sin (fma 0.005555555555555556 (* angle PI) (/ PI 2.0))))
(t_3 (+ (pow (* a t_1) 2.0) (pow (* b_m t_2) 2.0)))
(t_4 (cos t_0)))
(if (<= b_m 1.35e-152)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(*
x-scale
(* t_1 (sin (fma 0.005555555555555556 (* angle PI) (* 0.5 PI))))))))
PI))
(if (<= b_m 7.5e+16)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_3 2.0)) t_3))
(* x-scale (* t_2 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_4 4.0)) (pow t_4 2.0)))
(* x-scale (* t_4 t_1)))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (((double) M_PI) / 2.0)));
double t_3 = pow((a * t_1), 2.0) + pow((b_m * t_2), 2.0);
double t_4 = cos(t_0);
double tmp;
if (b_m <= 1.35e-152) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (t_1 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((double) M_PI))))))))) / ((double) M_PI));
} else if (b_m <= 7.5e+16) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_3, 2.0)) + t_3)) / (x_45_scale * (t_2 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_4, 4.0)) + pow(t_4, 2.0))) / (x_45_scale * (t_4 * t_1))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = sin(fma(0.005555555555555556, Float64(angle * pi), Float64(pi / 2.0))) t_3 = Float64((Float64(a * t_1) ^ 2.0) + (Float64(b_m * t_2) ^ 2.0)) t_4 = cos(t_0) tmp = 0.0 if (b_m <= 1.35e-152) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(t_1 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * pi)))))))) / pi)); elseif (b_m <= 7.5e+16) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 2.0)) + t_3)) / Float64(x_45_scale * Float64(t_2 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_4 ^ 4.0)) + (t_4 ^ 2.0))) / Float64(x_45_scale * Float64(t_4 * t_1))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b$95$m * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e-152], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.5e+16], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 2.0], $MachinePrecision]], $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$4, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$4 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, \frac{\pi}{2}\right)\right)\\
t_3 := {\left(a \cdot t\_1\right)}^{2} + {\left(b\_m \cdot t\_2\right)}^{2}\\
t_4 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.5 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{2}} + t\_3\right)}{x-scale \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_4}^{4}} + {t\_4}^{2}\right)}{x-scale \cdot \left(t\_4 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999999e-152Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in a around inf
Applied rewrites37.8%
if 1.34999999999999999e-152 < b < 7.5e16Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
if 7.5e16 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2
(+
(pow (* a t_1) 2.0)
(pow
(* b_m (sin (fma 0.005555555555555556 (* angle PI) (/ PI 2.0))))
2.0)))
(t_3 (cos t_0)))
(if (<= b_m 1.35e-152)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(*
x-scale
(* t_1 (sin (fma 0.005555555555555556 (* angle PI) (* 0.5 PI))))))))
PI))
(if (<= b_m 7.2e+16)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_2 2.0)) t_2))
(* x-scale (* t_3 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_3 4.0)) (pow t_3 2.0)))
(* x-scale (* t_3 t_1)))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = pow((a * t_1), 2.0) + pow((b_m * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (((double) M_PI) / 2.0)))), 2.0);
double t_3 = cos(t_0);
double tmp;
if (b_m <= 1.35e-152) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (t_1 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((double) M_PI))))))))) / ((double) M_PI));
} else if (b_m <= 7.2e+16) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_2, 2.0)) + t_2)) / (x_45_scale * (t_3 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_3, 4.0)) + pow(t_3, 2.0))) / (x_45_scale * (t_3 * t_1))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64((Float64(a * t_1) ^ 2.0) + (Float64(b_m * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(pi / 2.0)))) ^ 2.0)) t_3 = cos(t_0) tmp = 0.0 if (b_m <= 1.35e-152) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(t_1 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * pi)))))))) / pi)); elseif (b_m <= 7.2e+16) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 2.0)) + t_2)) / Float64(x_45_scale * Float64(t_3 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 4.0)) + (t_3 ^ 2.0))) / Float64(x_45_scale * Float64(t_3 * t_1))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b$95$m * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e-152], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.2e+16], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 2.0], $MachinePrecision]], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := {\left(a \cdot t\_1\right)}^{2} + {\left(b\_m \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, \frac{\pi}{2}\right)\right)\right)}^{2}\\
t_3 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.2 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{2}} + t\_2\right)}{x-scale \cdot \left(t\_3 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{4}} + {t\_3}^{2}\right)}{x-scale \cdot \left(t\_3 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999999e-152Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in a around inf
Applied rewrites37.8%
if 1.34999999999999999e-152 < b < 7.2e16Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
lift-sin.f64N/A
lift-fma.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
sin-+PI/2-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-cos.f6425.7
Applied rewrites25.7%
if 7.2e16 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (sin (fma 0.005555555555555556 (* angle PI) (/ PI 2.0))))
(t_3 (cos t_0)))
(if (<= b_m 1.35e-152)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(*
x-scale
(* t_1 (sin (fma 0.005555555555555556 (* angle PI) (* 0.5 PI))))))))
PI))
(if (<= b_m 7.5e+16)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+
(sqrt (pow (* b_m (sin (* 0.5 PI))) 4.0))
(+ (pow (* a t_1) 2.0) (pow (* b_m t_2) 2.0))))
(* x-scale (* t_2 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_3 4.0)) (pow t_3 2.0)))
(* x-scale (* t_3 t_1)))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (((double) M_PI) / 2.0)));
double t_3 = cos(t_0);
double tmp;
if (b_m <= 1.35e-152) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (t_1 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((double) M_PI))))))))) / ((double) M_PI));
} else if (b_m <= 7.5e+16) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow((b_m * sin((0.5 * ((double) M_PI)))), 4.0)) + (pow((a * t_1), 2.0) + pow((b_m * t_2), 2.0)))) / (x_45_scale * (t_2 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_3, 4.0)) + pow(t_3, 2.0))) / (x_45_scale * (t_3 * t_1))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = sin(fma(0.005555555555555556, Float64(angle * pi), Float64(pi / 2.0))) t_3 = cos(t_0) tmp = 0.0 if (b_m <= 1.35e-152) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(t_1 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * pi)))))))) / pi)); elseif (b_m <= 7.5e+16) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((Float64(b_m * sin(Float64(0.5 * pi))) ^ 4.0)) + Float64((Float64(a * t_1) ^ 2.0) + (Float64(b_m * t_2) ^ 2.0)))) / Float64(x_45_scale * Float64(t_2 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 4.0)) + (t_3 ^ 2.0))) / Float64(x_45_scale * Float64(t_3 * t_1))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e-152], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.5e+16], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[(b$95$m * N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b$95$m * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, \frac{\pi}{2}\right)\right)\\
t_3 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.5 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(b\_m \cdot \sin \left(0.5 \cdot \pi\right)\right)}^{4}} + \left({\left(a \cdot t\_1\right)}^{2} + {\left(b\_m \cdot t\_2\right)}^{2}\right)\right)}{x-scale \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{4}} + {t\_3}^{2}\right)}{x-scale \cdot \left(t\_3 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999999e-152Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in a around inf
Applied rewrites37.8%
if 1.34999999999999999e-152 < b < 7.5e16Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in angle around 0
pow-prod-downN/A
lower-pow.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lift-PI.f6425.2
Applied rewrites25.2%
if 7.5e16 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (cos t_0)))
(if (<= b_m 1.35e-152)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(*
x-scale
(* t_1 (sin (fma 0.005555555555555556 (* angle PI) (* 0.5 PI))))))))
PI))
(if (<= b_m 7.2e+16)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+
(sqrt (pow b_m 4.0))
(+ (pow (* a t_1) 2.0) (pow (* b_m t_2) 2.0))))
(* x-scale (* t_2 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_2 t_1)))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = cos(t_0);
double tmp;
if (b_m <= 1.35e-152) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (t_1 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((double) M_PI))))))))) / ((double) M_PI));
} else if (b_m <= 7.2e+16) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(b_m, 4.0)) + (pow((a * t_1), 2.0) + pow((b_m * t_2), 2.0)))) / (x_45_scale * (t_2 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_2 * t_1))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 1.35e-152) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(t_1 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * pi)))))))) / pi)); elseif (b_m <= 7.2e+16) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((b_m ^ 4.0)) + Float64((Float64(a * t_1) ^ 2.0) + (Float64(b_m * t_2) ^ 2.0)))) / Float64(x_45_scale * Float64(t_2 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(t_2 * t_1))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e-152], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.2e+16], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[b$95$m, 4.0], $MachinePrecision]], $MachinePrecision] + N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b$95$m * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.2 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{b\_m}^{4}} + \left({\left(a \cdot t\_1\right)}^{2} + {\left(b\_m \cdot t\_2\right)}^{2}\right)\right)}{x-scale \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_2 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999999e-152Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in a around inf
Applied rewrites37.8%
if 1.34999999999999999e-152 < b < 7.2e16Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in angle around 0
lower-sqrt.f64N/A
lift-pow.f6425.7
Applied rewrites25.7%
if 7.2e16 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* b_m (sin (* 0.5 PI))))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (sin t_1))
(t_3 (cos t_1)))
(if (<= b_m 1.35e-152)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(*
x-scale
(* t_2 (sin (fma 0.005555555555555556 (* angle PI) (* 0.5 PI))))))))
PI))
(if (<= b_m 7.5e+16)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_0 4.0)) (pow t_0 2.0)))
(*
x-scale
(*
(sin (fma 0.005555555555555556 (* angle PI) (/ PI 2.0)))
(* t_2 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_3 4.0)) (pow t_3 2.0)))
(* x-scale (* t_3 t_2)))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = b_m * sin((0.5 * ((double) M_PI)));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = cos(t_1);
double tmp;
if (b_m <= 1.35e-152) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_2 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((double) M_PI))))))))) / ((double) M_PI));
} else if (b_m <= 7.5e+16) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_0, 4.0)) + pow(t_0, 2.0))) / (x_45_scale * (sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (((double) M_PI) / 2.0))) * (t_2 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_3, 4.0)) + pow(t_3, 2.0))) / (x_45_scale * (t_3 * t_2))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(b_m * sin(Float64(0.5 * pi))) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = cos(t_1) tmp = 0.0 if (b_m <= 1.35e-152) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(t_2 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * pi)))))))) / pi)); elseif (b_m <= 7.5e+16) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_0 ^ 4.0)) + (t_0 ^ 2.0))) / Float64(x_45_scale * Float64(sin(fma(0.005555555555555556, Float64(angle * pi), Float64(pi / 2.0))) * Float64(t_2 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 4.0)) + (t_3 ^ 2.0))) / Float64(x_45_scale * Float64(t_3 * t_2))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(b$95$m * N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$1], $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e-152], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.5e+16], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$0, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$2 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := b\_m \cdot \sin \left(0.5 \cdot \pi\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \cos t\_1\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.5 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_0}^{4}} + {t\_0}^{2}\right)}{x-scale \cdot \left(\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, \frac{\pi}{2}\right)\right) \cdot \left(t\_2 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{4}} + {t\_3}^{2}\right)}{x-scale \cdot \left(t\_3 \cdot t\_2\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999999e-152Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in a around inf
Applied rewrites37.8%
if 1.34999999999999999e-152 < b < 7.5e16Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in angle around 0
lower-+.f64N/A
Applied rewrites23.2%
if 7.5e16 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3 (* x-scale (* t_1 t_2))))
(if (<= b_m 1.85e+18)
(*
180.0
(/
(atan
(* 0.5 (/ (* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0))) t_3)))
PI))
(*
180.0
(/
(atan
(* -0.5 (/ (* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0))) t_3)))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = x_45_scale * (t_1 * t_2);
double tmp;
if (b_m <= 1.85e+18) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / t_3))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / t_3))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = x_45_scale * (t_1 * t_2);
double tmp;
if (b_m <= 1.85e+18) {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_2, 4.0)) + Math.pow(t_2, 2.0))) / t_3))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_1, 4.0)) + Math.pow(t_1, 2.0))) / t_3))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = x_45_scale * (t_1 * t_2) tmp = 0 if b_m <= 1.85e+18: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_2, 4.0)) + math.pow(t_2, 2.0))) / t_3))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_1, 4.0)) + math.pow(t_1, 2.0))) / t_3))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(x_45_scale * Float64(t_1 * t_2)) tmp = 0.0 if (b_m <= 1.85e+18) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / t_3))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / t_3))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = cos(t_0); t_2 = sin(t_0); t_3 = x_45_scale * (t_1 * t_2); tmp = 0.0; if (b_m <= 1.85e+18) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / t_3))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / t_3))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.85e+18], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := x-scale \cdot \left(t\_1 \cdot t\_2\right)\\
\mathbf{if}\;b\_m \leq 1.85 \cdot 10^{+18}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{t\_3}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{t\_3}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.85e18Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.8%
if 1.85e18 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3 (* x-scale (* t_1 t_2))))
(if (<= b_m 1.85e+18)
(*
180.0
(/
(atan
(* 0.5 (/ (* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0))) t_3)))
PI))
(*
180.0
(/ (atan (* -0.5 (/ (* y-scale (+ 1.0 (pow t_1 2.0))) t_3))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = x_45_scale * (t_1 * t_2);
double tmp;
if (b_m <= 1.85e+18) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / t_3))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (1.0 + pow(t_1, 2.0))) / t_3))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = x_45_scale * (t_1 * t_2);
double tmp;
if (b_m <= 1.85e+18) {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_2, 4.0)) + Math.pow(t_2, 2.0))) / t_3))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (1.0 + Math.pow(t_1, 2.0))) / t_3))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = x_45_scale * (t_1 * t_2) tmp = 0 if b_m <= 1.85e+18: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_2, 4.0)) + math.pow(t_2, 2.0))) / t_3))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (1.0 + math.pow(t_1, 2.0))) / t_3))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(x_45_scale * Float64(t_1 * t_2)) tmp = 0.0 if (b_m <= 1.85e+18) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / t_3))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(1.0 + (t_1 ^ 2.0))) / t_3))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = cos(t_0); t_2 = sin(t_0); t_3 = x_45_scale * (t_1 * t_2); tmp = 0.0; if (b_m <= 1.85e+18) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / t_3))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (1.0 + (t_1 ^ 2.0))) / t_3))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.85e+18], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := x-scale \cdot \left(t\_1 \cdot t\_2\right)\\
\mathbf{if}\;b\_m \leq 1.85 \cdot 10^{+18}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{t\_3}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(1 + {t\_1}^{2}\right)}{t\_3}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.85e18Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.8%
if 1.85e18 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin (* 0.5 PI)))
(t_3 (sin (fma 0.005555555555555556 (* angle PI) (/ PI 2.0))))
(t_4 (sin t_0)))
(if (<= y-scale -2.35e-264)
(*
180.0
(/
(atan
(* -0.5 (* (/ y-scale x-scale) (/ (+ 1.0 (pow t_1 2.0)) (* t_1 t_4)))))
PI))
(if (<= y-scale 1.5e+85)
(*
180.0
(/
(atan
(*
-0.5
(/ (* y-scale (+ 1.0 (pow t_3 2.0))) (* x-scale (* t_3 t_4)))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_4 t_2)))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double t_2 = sin((0.5 * ((double) M_PI)));
double t_3 = sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (((double) M_PI) / 2.0)));
double t_4 = sin(t_0);
double tmp;
if (y_45_scale <= -2.35e-264) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / x_45_scale) * ((1.0 + pow(t_1, 2.0)) / (t_1 * t_4))))) / ((double) M_PI));
} else if (y_45_scale <= 1.5e+85) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (1.0 + pow(t_3, 2.0))) / (x_45_scale * (t_3 * t_4))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_4 * t_2))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = sin(Float64(0.5 * pi)) t_3 = sin(fma(0.005555555555555556, Float64(angle * pi), Float64(pi / 2.0))) t_4 = sin(t_0) tmp = 0.0 if (y_45_scale <= -2.35e-264) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(1.0 + (t_1 ^ 2.0)) / Float64(t_1 * t_4))))) / pi)); elseif (y_45_scale <= 1.5e+85) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(1.0 + (t_3 ^ 2.0))) / Float64(x_45_scale * Float64(t_3 * t_4))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(t_4 * t_2))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$45$scale, -2.35e-264], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 1.5e+85], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(1.0 + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$4 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin \left(0.5 \cdot \pi\right)\\
t_3 := \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, \frac{\pi}{2}\right)\right)\\
t_4 := \sin t\_0\\
\mathbf{if}\;y-scale \leq -2.35 \cdot 10^{-264}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{1 + {t\_1}^{2}}{t\_1 \cdot t\_4}\right)\right)}{\pi}\\
\mathbf{elif}\;y-scale \leq 1.5 \cdot 10^{+85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(1 + {t\_3}^{2}\right)}{x-scale \cdot \left(t\_3 \cdot t\_4\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_4 \cdot t\_2\right)}\right)}{\pi}\\
\end{array}
\end{array}
if y-scale < -2.3500000000000002e-264Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites44.1%
if -2.3500000000000002e-264 < y-scale < 1.5e85Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6442.5
Applied rewrites42.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6442.6
Applied rewrites42.6%
if 1.5e85 < y-scale Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.7
Applied rewrites25.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in b around inf
Applied rewrites43.0%
Taylor expanded in angle around 0
lift-*.f64N/A
lift-PI.f6442.6
Applied rewrites42.6%
Taylor expanded in angle around 0
lift-*.f64N/A
lift-PI.f6442.5
Applied rewrites42.5%
Taylor expanded in angle around 0
lift-*.f64N/A
lift-PI.f6443.2
Applied rewrites43.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (* t_1 (sin t_0))))
(if (<= y-scale 0.044)
(*
180.0
(/
(atan (* -0.5 (* (/ y-scale x-scale) (/ (+ 1.0 (pow t_1 2.0)) t_2))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+ 2.0 (* -6.17283950617284e-5 (* (* angle angle) (* PI PI)))))
(* x-scale t_2))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double t_2 = t_1 * sin(t_0);
double tmp;
if (y_45_scale <= 0.044) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / x_45_scale) * ((1.0 + pow(t_1, 2.0)) / t_2)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (((double) M_PI) * ((double) M_PI)))))) / (x_45_scale * t_2)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double t_2 = t_1 * Math.sin(t_0);
double tmp;
if (y_45_scale <= 0.044) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale / x_45_scale) * ((1.0 + Math.pow(t_1, 2.0)) / t_2)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (Math.PI * Math.PI))))) / (x_45_scale * t_2)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.cos(t_0) t_2 = t_1 * math.sin(t_0) tmp = 0 if y_45_scale <= 0.044: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale / x_45_scale) * ((1.0 + math.pow(t_1, 2.0)) / t_2)))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (math.pi * math.pi))))) / (x_45_scale * t_2)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = Float64(t_1 * sin(t_0)) tmp = 0.0 if (y_45_scale <= 0.044) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(1.0 + (t_1 ^ 2.0)) / t_2)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64(Float64(angle * angle) * Float64(pi * pi))))) / Float64(x_45_scale * t_2)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = cos(t_0); t_2 = t_1 * sin(t_0); tmp = 0.0; if (y_45_scale <= 0.044) tmp = 180.0 * (atan((-0.5 * ((y_45_scale / x_45_scale) * ((1.0 + (t_1 ^ 2.0)) / t_2)))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (pi * pi))))) / (x_45_scale * t_2)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, 0.044], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := t\_1 \cdot \sin t\_0\\
\mathbf{if}\;y-scale \leq 0.044:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{1 + {t\_1}^{2}}{t\_2}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \pi\right)\right)\right)}{x-scale \cdot t\_2}\right)}{\pi}\\
\end{array}
\end{array}
if y-scale < 0.043999999999999997Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites44.1%
if 0.043999999999999997 < y-scale Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6437.7
Applied rewrites37.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (* x-scale (* t_1 (sin t_0)))))
(if (<= y-scale 0.044)
(* 180.0 (/ (atan (* -0.5 (/ (* y-scale (+ 1.0 (pow t_1 2.0))) t_2))) PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+ 2.0 (* -6.17283950617284e-5 (* (* angle angle) (* PI PI)))))
t_2)))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double t_2 = x_45_scale * (t_1 * sin(t_0));
double tmp;
if (y_45_scale <= 0.044) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (1.0 + pow(t_1, 2.0))) / t_2))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (((double) M_PI) * ((double) M_PI)))))) / t_2))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double t_2 = x_45_scale * (t_1 * Math.sin(t_0));
double tmp;
if (y_45_scale <= 0.044) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (1.0 + Math.pow(t_1, 2.0))) / t_2))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (Math.PI * Math.PI))))) / t_2))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.cos(t_0) t_2 = x_45_scale * (t_1 * math.sin(t_0)) tmp = 0 if y_45_scale <= 0.044: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (1.0 + math.pow(t_1, 2.0))) / t_2))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (math.pi * math.pi))))) / t_2))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = Float64(x_45_scale * Float64(t_1 * sin(t_0))) tmp = 0.0 if (y_45_scale <= 0.044) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(1.0 + (t_1 ^ 2.0))) / t_2))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64(Float64(angle * angle) * Float64(pi * pi))))) / t_2))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = cos(t_0); t_2 = x_45_scale * (t_1 * sin(t_0)); tmp = 0.0; if (y_45_scale <= 0.044) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (1.0 + (t_1 ^ 2.0))) / t_2))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (pi * pi))))) / t_2))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(x$45$scale * N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, 0.044], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := x-scale \cdot \left(t\_1 \cdot \sin t\_0\right)\\
\mathbf{if}\;y-scale \leq 0.044:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(1 + {t\_1}^{2}\right)}{t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \pi\right)\right)\right)}{t\_2}\right)}{\pi}\\
\end{array}
\end{array}
if y-scale < 0.043999999999999997Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
if 0.043999999999999997 < y-scale Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6437.7
Applied rewrites37.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* x-scale (* (cos t_0) (sin t_0)))))
(if (<= y-scale 0.044)
(* 180.0 (/ (atan (* -0.5 (/ (* y-scale 2.0) t_1))) PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+ 2.0 (* -6.17283950617284e-5 (* (* angle angle) (* PI PI)))))
t_1)))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = x_45_scale * (cos(t_0) * sin(t_0));
double tmp;
if (y_45_scale <= 0.044) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (((double) M_PI) * ((double) M_PI)))))) / t_1))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = x_45_scale * (Math.cos(t_0) * Math.sin(t_0));
double tmp;
if (y_45_scale <= 0.044) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (Math.PI * Math.PI))))) / t_1))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = x_45_scale * (math.cos(t_0) * math.sin(t_0)) tmp = 0 if y_45_scale <= 0.044: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (math.pi * math.pi))))) / t_1))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(x_45_scale * Float64(cos(t_0) * sin(t_0))) tmp = 0.0 if (y_45_scale <= 0.044) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / t_1))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64(Float64(angle * angle) * Float64(pi * pi))))) / t_1))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = x_45_scale * (cos(t_0) * sin(t_0)); tmp = 0.0; if (y_45_scale <= 0.044) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle * angle) * (pi * pi))))) / t_1))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, 0.044], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)\\
\mathbf{if}\;y-scale \leq 0.044:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \pi\right)\right)\right)}{t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if y-scale < 0.043999999999999997Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
if 0.043999999999999997 < y-scale Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6437.7
Applied rewrites37.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 2.2e-166)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (pow x-scale -4.0)) (/ 1.0 (* x-scale x-scale)))))
(* angle PI))))
PI))
(if (<= b_m 280.0)
(*
180.0
(/
(atan
(*
90.0
(/
(*
-1.0
(/ (* y-scale (+ (sqrt (pow b_m 4.0)) (* b_m b_m))) x-scale))
(* angle (* PI (- (* b_m b_m) (* a a)))))))
PI))
(*
180.0
(/
(atan
(* -0.5 (/ (* y-scale 2.0) (* x-scale (* (cos t_0) (sin t_0))))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 2.2e-166) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt(pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (b_m <= 280.0) {
tmp = 180.0 * (atan((90.0 * ((-1.0 * ((y_45_scale * (sqrt(pow(b_m, 4.0)) + (b_m * b_m))) / x_45_scale)) / (angle * (((double) M_PI) * ((b_m * b_m) - (a * a))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 2.2e-166) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt(Math.pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * Math.PI)))) / Math.PI);
} else if (b_m <= 280.0) {
tmp = 180.0 * (Math.atan((90.0 * ((-1.0 * ((y_45_scale * (Math.sqrt(Math.pow(b_m, 4.0)) + (b_m * b_m))) / x_45_scale)) / (angle * (Math.PI * ((b_m * b_m) - (a * a))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (Math.cos(t_0) * Math.sin(t_0)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 2.2e-166: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt(math.pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * math.pi)))) / math.pi) elif b_m <= 280.0: tmp = 180.0 * (math.atan((90.0 * ((-1.0 * ((y_45_scale * (math.sqrt(math.pow(b_m, 4.0)) + (b_m * b_m))) / x_45_scale)) / (angle * (math.pi * ((b_m * b_m) - (a * a))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (math.cos(t_0) * math.sin(t_0)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 2.2e-166) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt((x_45_scale ^ -4.0)) + Float64(1.0 / Float64(x_45_scale * x_45_scale))))) / Float64(angle * pi)))) / pi)); elseif (b_m <= 280.0) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((b_m ^ 4.0)) + Float64(b_m * b_m))) / x_45_scale)) / Float64(angle * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / Float64(x_45_scale * Float64(cos(t_0) * sin(t_0)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 2.2e-166) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((x_45_scale ^ -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * pi)))) / pi); elseif (b_m <= 280.0) tmp = 180.0 * (atan((90.0 * ((-1.0 * ((y_45_scale * (sqrt((b_m ^ 4.0)) + (b_m * b_m))) / x_45_scale)) / (angle * (pi * ((b_m * b_m) - (a * a))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 2.2e-166], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 280.0], N[(180.0 * N[(N[ArcTan[N[(90.0 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[b$95$m, 4.0], $MachinePrecision]], $MachinePrecision] + N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{{x-scale}^{-4}} + \frac{1}{x-scale \cdot x-scale}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 280:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{b\_m}^{4}} + b\_m \cdot b\_m\right)}{x-scale}}{angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.2000000000000001e-166Initial program 13.3%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.9%
if 2.2000000000000001e-166 < b < 280Initial program 13.3%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-sqrt.f64N/A
lift-pow.f64N/A
pow2N/A
lift-*.f6421.9
Applied rewrites21.9%
if 280 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-166)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(* y-scale (+ (sqrt (pow x-scale -4.0)) (/ 1.0 (* x-scale x-scale)))))
(* angle PI))))
PI))
(if (<= b_m 7000.0)
(*
180.0
(/
(atan
(*
90.0
(/
(* -1.0 (/ (* y-scale (+ (sqrt (pow b_m 4.0)) (* b_m b_m))) x-scale))
(* angle (* PI (- (* b_m b_m) (* a a)))))))
PI))
(*
180.0
(/ (atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI)))))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.2e-166) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt(pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (b_m <= 7000.0) {
tmp = 180.0 * (atan((90.0 * ((-1.0 * ((y_45_scale * (sqrt(pow(b_m, 4.0)) + (b_m * b_m))) / x_45_scale)) / (angle * (((double) M_PI) * ((b_m * b_m) - (a * a))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.2e-166) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt(Math.pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * Math.PI)))) / Math.PI);
} else if (b_m <= 7000.0) {
tmp = 180.0 * (Math.atan((90.0 * ((-1.0 * ((y_45_scale * (Math.sqrt(Math.pow(b_m, 4.0)) + (b_m * b_m))) / x_45_scale)) / (angle * (Math.PI * ((b_m * b_m) - (a * a))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 2.2e-166: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt(math.pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * math.pi)))) / math.pi) elif b_m <= 7000.0: tmp = 180.0 * (math.atan((90.0 * ((-1.0 * ((y_45_scale * (math.sqrt(math.pow(b_m, 4.0)) + (b_m * b_m))) / x_45_scale)) / (angle * (math.pi * ((b_m * b_m) - (a * a))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.2e-166) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt((x_45_scale ^ -4.0)) + Float64(1.0 / Float64(x_45_scale * x_45_scale))))) / Float64(angle * pi)))) / pi)); elseif (b_m <= 7000.0) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((b_m ^ 4.0)) + Float64(b_m * b_m))) / x_45_scale)) / Float64(angle * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.2e-166) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((x_45_scale ^ -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * pi)))) / pi); elseif (b_m <= 7000.0) tmp = 180.0 * (atan((90.0 * ((-1.0 * ((y_45_scale * (sqrt((b_m ^ 4.0)) + (b_m * b_m))) / x_45_scale)) / (angle * (pi * ((b_m * b_m) - (a * a))))))) / pi); else tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.2e-166], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7000.0], N[(180.0 * N[(N[ArcTan[N[(90.0 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[b$95$m, 4.0], $MachinePrecision]], $MachinePrecision] + N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{{x-scale}^{-4}} + \frac{1}{x-scale \cdot x-scale}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{b\_m}^{4}} + b\_m \cdot b\_m\right)}{x-scale}}{angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.2000000000000001e-166Initial program 13.3%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.9%
if 2.2000000000000001e-166 < b < 7e3Initial program 13.3%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-sqrt.f64N/A
lift-pow.f64N/A
pow2N/A
lift-*.f6421.9
Applied rewrites21.9%
if 7e3 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6437.5
Applied rewrites37.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-166)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(* y-scale (+ (sqrt (pow x-scale -4.0)) (/ 1.0 (* x-scale x-scale)))))
(* angle PI))))
PI))
(if (<= b_m 7800.0)
(*
180.0
(/
(atan
(*
-90.0
(/
(* y-scale (+ (sqrt (pow b_m 4.0)) (* b_m b_m)))
(* angle (* x-scale (* PI (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/ (atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI)))))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.2e-166) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt(pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (b_m <= 7800.0) {
tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt(pow(b_m, 4.0)) + (b_m * b_m))) / (angle * (x_45_scale * (((double) M_PI) * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.2e-166) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt(Math.pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * Math.PI)))) / Math.PI);
} else if (b_m <= 7800.0) {
tmp = 180.0 * (Math.atan((-90.0 * ((y_45_scale * (Math.sqrt(Math.pow(b_m, 4.0)) + (b_m * b_m))) / (angle * (x_45_scale * (Math.PI * ((b_m * b_m) - (a * a)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 2.2e-166: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt(math.pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * math.pi)))) / math.pi) elif b_m <= 7800.0: tmp = 180.0 * (math.atan((-90.0 * ((y_45_scale * (math.sqrt(math.pow(b_m, 4.0)) + (b_m * b_m))) / (angle * (x_45_scale * (math.pi * ((b_m * b_m) - (a * a)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.2e-166) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt((x_45_scale ^ -4.0)) + Float64(1.0 / Float64(x_45_scale * x_45_scale))))) / Float64(angle * pi)))) / pi)); elseif (b_m <= 7800.0) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(y_45_scale * Float64(sqrt((b_m ^ 4.0)) + Float64(b_m * b_m))) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.2e-166) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((x_45_scale ^ -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * pi)))) / pi); elseif (b_m <= 7800.0) tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt((b_m ^ 4.0)) + (b_m * b_m))) / (angle * (x_45_scale * (pi * ((b_m * b_m) - (a * a)))))))) / pi); else tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.2e-166], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7800.0], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[b$95$m, 4.0], $MachinePrecision]], $MachinePrecision] + N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{{x-scale}^{-4}} + \frac{1}{x-scale \cdot x-scale}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7800:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale \cdot \left(\sqrt{{b\_m}^{4}} + b\_m \cdot b\_m\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.2000000000000001e-166Initial program 13.3%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.9%
if 2.2000000000000001e-166 < b < 7800Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites21.8%
if 7800 < b Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6437.5
Applied rewrites37.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI PI) PI)))
(if (<= a 3.3e-38)
(*
180.0
(/
(atan
(*
-0.5
(/
(fma
360.0
(/ y-scale (* x-scale PI))
(*
(* angle angle)
(-
(* -0.011111111111111112 (/ (* y-scale PI) x-scale))
(*
64800.0
(/
(*
y-scale
(fma -8.573388203017833e-8 t_0 (* -2.8577960676726107e-8 t_0)))
(* x-scale (* PI PI)))))))
angle)))
PI))
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (pow x-scale -4.0)) (/ 1.0 (* x-scale x-scale)))))
(* angle PI))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * ((double) M_PI)) * ((double) M_PI);
double tmp;
if (a <= 3.3e-38) {
tmp = 180.0 * (atan((-0.5 * (fma(360.0, (y_45_scale / (x_45_scale * ((double) M_PI))), ((angle * angle) * ((-0.011111111111111112 * ((y_45_scale * ((double) M_PI)) / x_45_scale)) - (64800.0 * ((y_45_scale * fma(-8.573388203017833e-8, t_0, (-2.8577960676726107e-8 * t_0))) / (x_45_scale * (((double) M_PI) * ((double) M_PI)))))))) / angle))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt(pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * pi) * pi) tmp = 0.0 if (a <= 3.3e-38) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(fma(360.0, Float64(y_45_scale / Float64(x_45_scale * pi)), Float64(Float64(angle * angle) * Float64(Float64(-0.011111111111111112 * Float64(Float64(y_45_scale * pi) / x_45_scale)) - Float64(64800.0 * Float64(Float64(y_45_scale * fma(-8.573388203017833e-8, t_0, Float64(-2.8577960676726107e-8 * t_0))) / Float64(x_45_scale * Float64(pi * pi))))))) / angle))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt((x_45_scale ^ -4.0)) + Float64(1.0 / Float64(x_45_scale * x_45_scale))))) / Float64(angle * pi)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[a, 3.3e-38], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(360.0 * N[(y$45$scale / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[(N[(-0.011111111111111112 * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] - N[(64800.0 * N[(N[(y$45$scale * N[(-8.573388203017833e-8 * t$95$0 + N[(-2.8577960676726107e-8 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot \pi\right) \cdot \pi\\
\mathbf{if}\;a \leq 3.3 \cdot 10^{-38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\mathsf{fma}\left(360, \frac{y-scale}{x-scale \cdot \pi}, \left(angle \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \frac{y-scale \cdot \pi}{x-scale} - 64800 \cdot \frac{y-scale \cdot \mathsf{fma}\left(-8.573388203017833 \cdot 10^{-8}, t\_0, -2.8577960676726107 \cdot 10^{-8} \cdot t\_0\right)}{x-scale \cdot \left(\pi \cdot \pi\right)}\right)\right)}{angle}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{{x-scale}^{-4}} + \frac{1}{x-scale \cdot x-scale}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if a < 3.3000000000000002e-38Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites34.2%
if 3.3000000000000002e-38 < a Initial program 13.3%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 2.5e-184)
(*
180.0
(/ (atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI)))))) PI))
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(* y-scale (+ (sqrt (pow x-scale -4.0)) (/ 1.0 (* x-scale x-scale)))))
(* angle PI))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 2.5e-184) {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt(pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 2.5e-184) {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt(Math.pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 2.5e-184: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) else: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt(math.pow(x_45_scale, -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 2.5e-184) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt((x_45_scale ^ -4.0)) + Float64(1.0 / Float64(x_45_scale * x_45_scale))))) / Float64(angle * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 2.5e-184) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); else tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((x_45_scale ^ -4.0)) + (1.0 / (x_45_scale * x_45_scale))))) / (angle * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 2.5e-184], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.5 \cdot 10^{-184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{{x-scale}^{-4}} + \frac{1}{x-scale \cdot x-scale}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if a < 2.50000000000000001e-184Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6437.5
Applied rewrites37.5%
if 2.50000000000000001e-184 < a Initial program 13.3%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI)))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}
\end{array}
Initial program 13.3%
Taylor expanded in x-scale around 0
Applied rewrites25.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6437.5
Applied rewrites37.5%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan 0.0) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan(0.0) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan(0.0) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan(0.0) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(0.0) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan(0.0) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} 0}{\pi}
\end{array}
Initial program 13.3%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.1%
Taylor expanded in y-scale around 0
Applied rewrites18.3%
herbie shell --seed 2025139
(FPCore (a b angle x-scale y-scale)
:name "raw-angle from scale-rotated-ellipse"
:precision binary64
(* 180.0 (/ (atan (/ (- (- (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) PI))) 2.0) (pow (* b (sin (* (/ angle 180.0) PI))) 2.0)) y-scale) y-scale) (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)) x-scale) x-scale)) (sqrt (+ (pow (- (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)) x-scale) x-scale) (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) PI))) 2.0) (pow (* b (sin (* (/ angle 180.0) PI))) 2.0)) y-scale) y-scale)) 2.0) (pow (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI))) (cos (* (/ angle 180.0) PI))) x-scale) y-scale) 2.0)))) (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI))) (cos (* (/ angle 180.0) PI))) x-scale) y-scale))) PI)))