
(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}
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}
Herbie found 23 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}
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}
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556))
(t_1 (sin (+ (- t_0) (* PI 0.5))))
(t_2 (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
(t_3 (* 0.005555555555555556 (* angle PI)))
(t_4 (sin t_3))
(t_5 (cos t_3)))
(if (<= x-scale -9.6e-117)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
(sqrt (pow 1.0 4.0))
(- 0.5 (* 0.5 (cos (* 2.0 t_2))))))
x-scale))
(* 1.0 t_4))))
PI))
(if (<= x-scale 1.25e-11)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(* y-scale (+ (sqrt (pow t_5 4.0)) (pow t_5 2.0)))
x-scale))
(/
(-
(cos (- t_0 t_2))
(cos (fma (* 0.005555555555555556 angle) PI t_2)))
2.0))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
x-scale))
(* t_1 t_4))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = sin((-t_0 + (((double) M_PI) * 0.5)));
double t_2 = fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0));
double t_3 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_4 = sin(t_3);
double t_5 = cos(t_3);
double tmp;
if (x_45_scale <= -9.6e-117) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(1.0, 4.0)) + (0.5 - (0.5 * cos((2.0 * t_2)))))) / x_45_scale)) / (1.0 * t_4)))) / ((double) M_PI));
} else if (x_45_scale <= 1.25e-11) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_5, 4.0)) + pow(t_5, 2.0))) / x_45_scale)) / ((cos((t_0 - t_2)) - cos(fma((0.005555555555555556 * angle), ((double) M_PI), t_2))) / 2.0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / x_45_scale)) / (t_1 * t_4)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = sin(Float64(Float64(-t_0) + Float64(pi * 0.5))) t_2 = fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0)) t_3 = Float64(0.005555555555555556 * Float64(angle * pi)) t_4 = sin(t_3) t_5 = cos(t_3) tmp = 0.0 if (x_45_scale <= -9.6e-117) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((1.0 ^ 4.0)) + Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * t_2)))))) / x_45_scale)) / Float64(1.0 * t_4)))) / pi)); elseif (x_45_scale <= 1.25e-11) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_5 ^ 4.0)) + (t_5 ^ 2.0))) / x_45_scale)) / Float64(Float64(cos(Float64(t_0 - t_2)) - cos(fma(Float64(0.005555555555555556 * angle), pi, t_2))) / 2.0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / x_45_scale)) / Float64(t_1 * t_4)))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[((-t$95$0) + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Cos[t$95$3], $MachinePrecision]}, If[LessEqual[x$45$scale, -9.6e-117], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[1.0, 4.0], $MachinePrecision]], $MachinePrecision] + N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, 1.25e-11], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$5, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$5, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Cos[N[(t$95$0 - t$95$2), $MachinePrecision]], $MachinePrecision] - N[Cos[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * 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] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \sin \left(\left(-t\_0\right) + \pi \cdot 0.5\right)\\
t_2 := \mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\\
t_3 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_4 := \sin t\_3\\
t_5 := \cos t\_3\\
\mathbf{if}\;x-scale \leq -9.6 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{1}^{4}} + \left(0.5 - 0.5 \cdot \cos \left(2 \cdot t\_2\right)\right)\right)}{x-scale}}{1 \cdot t\_4}\right)}{\pi}\\
\mathbf{elif}\;x-scale \leq 1.25 \cdot 10^{-11}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_5}^{4}} + {t\_5}^{2}\right)}{x-scale}}{\frac{\cos \left(t\_0 - t\_2\right) - \cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_2\right)\right)}{2}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale}}{t\_1 \cdot t\_4}\right)}{\pi}\\
\end{array}
if x-scale < -9.6000000000000006e-117Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-pow.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
sin-+PI/2-revN/A
sqr-sin-aN/A
lower--.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
Applied rewrites44.9%
Taylor expanded in angle around 0
Applied rewrites45.0%
if -9.6000000000000006e-117 < x-scale < 1.25e-11Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
sin-multN/A
Applied rewrites33.6%
if 1.25e-11 < x-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-sin.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
metadata-evalN/A
mult-flipN/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-PI.f64N/A
sin-+PI/2-revN/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lower-+.f64N/A
Applied rewrites45.2%
lift-sin.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
metadata-evalN/A
mult-flipN/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-PI.f64N/A
sin-+PI/2-revN/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lower-+.f64N/A
Applied rewrites45.2%
lift-sin.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
metadata-evalN/A
mult-flipN/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-PI.f64N/A
sin-+PI/2-revN/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lower-+.f64N/A
Applied rewrites45.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* (cos t_0) t_1))
(t_3 (* (* PI angle) 0.005555555555555556)))
(if (<= y-scale 1e+46)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
1.0
(/
x-scale
(*
(+
(+ 0.5 (* 0.5 (cos (* 2.0 t_3))))
(sqrt (pow (cos t_3) 4.0)))
y-scale))))
(*
(sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
t_1))))
PI))
(if (<= y-scale 2e+123)
(*
180.0
(/ (atan (* 0.5 (/ (* -2.0 (/ y-scale x-scale)) t_2))) PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
2.0
(*
-6.17283950617284e-5
(* (pow angle 2.0) (pow PI 2.0)))))
x-scale))
t_2)))
PI))))))double code(double a, double b, 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) * t_1;
double t_3 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if (y_45_scale <= 1e+46) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * (1.0 / (x_45_scale / (((0.5 + (0.5 * cos((2.0 * t_3)))) + sqrt(pow(cos(t_3), 4.0))) * y_45_scale)))) / (sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0))) * t_1)))) / ((double) M_PI));
} else if (y_45_scale <= 2e+123) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / t_2))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / x_45_scale)) / t_2))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(cos(t_0) * t_1) t_3 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (y_45_scale <= 1e+46) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(1.0 / Float64(x_45_scale / Float64(Float64(Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_3)))) + sqrt((cos(t_3) ^ 4.0))) * y_45_scale)))) / Float64(sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) * t_1)))) / pi)); elseif (y_45_scale <= 2e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / t_2))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / x_45_scale)) / t_2))) / pi)); end return tmp end
code[a_, b_, 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[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[y$45$scale, 1e+46], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(1.0 / N[(x$45$scale / N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[N[Cos[t$95$3], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 2e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0 \cdot t\_1\\
t_3 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;y-scale \leq 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{1}{\frac{x-scale}{\left(\left(0.5 + 0.5 \cdot \cos \left(2 \cdot t\_3\right)\right) + \sqrt{{\cos t\_3}^{4}}\right) \cdot y-scale}}}{\sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right) \cdot t\_1}\right)}{\pi}\\
\mathbf{elif}\;y-scale \leq 2 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale}}{t\_2}\right)}{\pi}\\
\end{array}
if y-scale < 9.9999999999999999e45Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
Applied rewrites45.3%
if 9.9999999999999999e45 < y-scale < 2e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6444.8%
Applied rewrites44.8%
if 2e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6439.4%
Applied rewrites39.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* (cos t_0) t_1))
(t_3 (sin (* 0.5 PI))))
(if (<= y-scale 1e+46)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(* y-scale (+ (sqrt (pow t_3 4.0)) (pow t_3 2.0)))
x-scale))
(*
(sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
t_1))))
PI))
(if (<= y-scale 2e+123)
(*
180.0
(/ (atan (* 0.5 (/ (* -2.0 (/ y-scale x-scale)) t_2))) PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
2.0
(*
-6.17283950617284e-5
(* (pow angle 2.0) (pow PI 2.0)))))
x-scale))
t_2)))
PI))))))double code(double a, double b, 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) * t_1;
double t_3 = sin((0.5 * ((double) M_PI)));
double tmp;
if (y_45_scale <= 1e+46) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_3, 4.0)) + pow(t_3, 2.0))) / x_45_scale)) / (sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0))) * t_1)))) / ((double) M_PI));
} else if (y_45_scale <= 2e+123) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / t_2))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / x_45_scale)) / t_2))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(cos(t_0) * t_1) t_3 = sin(Float64(0.5 * pi)) tmp = 0.0 if (y_45_scale <= 1e+46) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 4.0)) + (t_3 ^ 2.0))) / x_45_scale)) / Float64(sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) * t_1)))) / pi)); elseif (y_45_scale <= 2e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / t_2))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / x_45_scale)) / t_2))) / pi)); end return tmp end
code[a_, b_, 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[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$45$scale, 1e+46], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * 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] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 2e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0 \cdot t\_1\\
t_3 := \sin \left(0.5 \cdot \pi\right)\\
\mathbf{if}\;y-scale \leq 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{4}} + {t\_3}^{2}\right)}{x-scale}}{\sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right) \cdot t\_1}\right)}{\pi}\\
\mathbf{elif}\;y-scale \leq 2 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale}}{t\_2}\right)}{\pi}\\
\end{array}
if y-scale < 9.9999999999999999e45Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-sqrt.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-PI.f6444.7%
Applied rewrites44.7%
if 9.9999999999999999e45 < y-scale < 2e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6444.8%
Applied rewrites44.8%
if 2e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6439.4%
Applied rewrites39.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* (cos t_0) t_1))
(t_3 (* (* PI angle) 0.005555555555555556)))
(if (<= y-scale 1e+46)
(*
180.0
(/
(atan
(*
0.5
(/
(-
(*
y-scale
(/
(+
(+ 0.5 (* 0.5 (cos (* 2.0 t_3))))
(sqrt (pow (cos t_3) 4.0)))
x-scale)))
(*
(sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
t_1))))
PI))
(if (<= y-scale 2e+123)
(*
180.0
(/ (atan (* 0.5 (/ (* -2.0 (/ y-scale x-scale)) t_2))) PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
2.0
(*
-6.17283950617284e-5
(* (pow angle 2.0) (pow PI 2.0)))))
x-scale))
t_2)))
PI))))))double code(double a, double b, 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) * t_1;
double t_3 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if (y_45_scale <= 1e+46) {
tmp = 180.0 * (atan((0.5 * (-(y_45_scale * (((0.5 + (0.5 * cos((2.0 * t_3)))) + sqrt(pow(cos(t_3), 4.0))) / x_45_scale)) / (sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0))) * t_1)))) / ((double) M_PI));
} else if (y_45_scale <= 2e+123) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / t_2))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / x_45_scale)) / t_2))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(cos(t_0) * t_1) t_3 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (y_45_scale <= 1e+46) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-Float64(y_45_scale * Float64(Float64(Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * t_3)))) + sqrt((cos(t_3) ^ 4.0))) / x_45_scale))) / Float64(sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) * t_1)))) / pi)); elseif (y_45_scale <= 2e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / t_2))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / x_45_scale)) / t_2))) / pi)); end return tmp end
code[a_, b_, 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[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[y$45$scale, 1e+46], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[((-N[(y$45$scale * N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[N[Cos[t$95$3], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]) / N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 2e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0 \cdot t\_1\\
t_3 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;y-scale \leq 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-y-scale \cdot \frac{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot t\_3\right)\right) + \sqrt{{\cos t\_3}^{4}}}{x-scale}}{\sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right) \cdot t\_1}\right)}{\pi}\\
\mathbf{elif}\;y-scale \leq 2 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale}}{t\_2}\right)}{\pi}\\
\end{array}
if y-scale < 9.9999999999999999e45Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
Applied rewrites44.9%
if 9.9999999999999999e45 < y-scale < 2e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6444.8%
Applied rewrites44.8%
if 2e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6439.4%
Applied rewrites39.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))))
(if (<= y-scale 9.6e+123)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
x-scale))
(* t_1 (sin (* (* angle 0.005555555555555556) PI))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
2.0
(*
-6.17283950617284e-5
(* (pow angle 2.0) (pow PI 2.0)))))
x-scale))
(* (cos t_0) (sin t_0)))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0)));
double tmp;
if (y_45_scale <= 9.6e+123) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / x_45_scale)) / (t_1 * sin(((angle * 0.005555555555555556) * ((double) M_PI))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / x_45_scale)) / (cos(t_0) * sin(t_0))))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) tmp = 0.0 if (y_45_scale <= 9.6e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / x_45_scale)) / Float64(t_1 * sin(Float64(Float64(angle * 0.005555555555555556) * pi)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / x_45_scale)) / Float64(cos(t_0) * sin(t_0))))) / pi)); end return tmp end
code[a_, b_, 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[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$45$scale, 9.6e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * 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] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right)\\
\mathbf{if}\;y-scale \leq 9.6 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale}}{t\_1 \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale}}{\cos t\_0 \cdot \sin t\_0}\right)}{\pi}\\
\end{array}
if y-scale < 9.5999999999999996e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
mult-flipN/A
*-commutativeN/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.1%
Applied rewrites45.1%
if 9.5999999999999996e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6439.4%
Applied rewrites39.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (sin (fma (* angle 0.005555555555555556) PI (* PI 0.5)))))
(if (<= y-scale 9.6e+123)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
x-scale))
(* t_2 t_1))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
2.0
(*
-6.17283950617284e-5
(* (pow angle 2.0) (pow PI 2.0)))))
x-scale))
(* (cos t_0) t_1))))
PI)))))double code(double a, double b, 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((angle * 0.005555555555555556), ((double) M_PI), (((double) M_PI) * 0.5)));
double tmp;
if (y_45_scale <= 9.6e+123) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / x_45_scale)) / (t_2 * t_1)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / x_45_scale)) / (cos(t_0) * t_1)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = sin(fma(Float64(angle * 0.005555555555555556), pi, Float64(pi * 0.5))) tmp = 0.0 if (y_45_scale <= 9.6e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / x_45_scale)) / Float64(t_2 * t_1)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / x_45_scale)) / Float64(cos(t_0) * t_1)))) / pi)); end return tmp end
code[a_, b_, 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[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$45$scale, 9.6e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * 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] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\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(angle \cdot 0.005555555555555556, \pi, \pi \cdot 0.5\right)\right)\\
\mathbf{if}\;y-scale \leq 9.6 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale}}{t\_2 \cdot t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale}}{\cos t\_0 \cdot t\_1}\right)}{\pi}\\
\end{array}
if y-scale < 9.5999999999999996e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
metadata-evalN/A
mult-flipN/A
*-commutativeN/A
lower-fma.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.2%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.2%
Applied rewrites45.2%
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
metadata-evalN/A
mult-flipN/A
*-commutativeN/A
lower-fma.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.1%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.1%
Applied rewrites45.1%
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
metadata-evalN/A
mult-flipN/A
*-commutativeN/A
lower-fma.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.1%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6445.1%
Applied rewrites45.1%
if 9.5999999999999996e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6439.4%
Applied rewrites39.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* (cos t_0) (sin t_0)))
(t_2 (* (* PI angle) 0.005555555555555556)))
(if (<= y-scale 2e+123)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
1.0
(/
x-scale
(*
(+
(fma (cos (* t_2 2.0)) 0.5 0.5)
(sqrt (pow (cos t_2) 4.0)))
y-scale))))
t_1)))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
2.0
(*
-6.17283950617284e-5
(* (pow angle 2.0) (pow PI 2.0)))))
x-scale))
t_1)))
PI)))))double code(double a, double b, 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) * sin(t_0);
double t_2 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if (y_45_scale <= 2e+123) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * (1.0 / (x_45_scale / ((fma(cos((t_2 * 2.0)), 0.5, 0.5) + sqrt(pow(cos(t_2), 4.0))) * y_45_scale)))) / t_1))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / x_45_scale)) / t_1))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(cos(t_0) * sin(t_0)) t_2 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (y_45_scale <= 2e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(1.0 / Float64(x_45_scale / Float64(Float64(fma(cos(Float64(t_2 * 2.0)), 0.5, 0.5) + sqrt((cos(t_2) ^ 4.0))) * y_45_scale)))) / t_1))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / x_45_scale)) / t_1))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[y$45$scale, 2e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(1.0 / N[(x$45$scale / N[(N[(N[(N[Cos[N[(t$95$2 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision] + N[Sqrt[N[Power[N[Cos[t$95$2], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0 \cdot \sin t\_0\\
t_2 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;y-scale \leq 2 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{1}{\frac{x-scale}{\left(\mathsf{fma}\left(\cos \left(t\_2 \cdot 2\right), 0.5, 0.5\right) + \sqrt{{\cos t\_2}^{4}}\right) \cdot y-scale}}}{t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale}}{t\_1}\right)}{\pi}\\
\end{array}
if y-scale < 2e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-/.f64N/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f6445.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6445.5%
Applied rewrites45.5%
if 2e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6439.4%
Applied rewrites39.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0)))
(if (<= (fabs a) 1.55e-132)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
(sqrt (pow t_1 4.0))
(-
0.5
(*
0.5
(cos
(*
angle
(fma 0.011111111111111112 PI (/ PI angle))))))))
x-scale))
(* t_1 t_2))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0))))))
(*
(sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
t_2))))
PI)))))double code(double a, double b, 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 tmp;
if (fabs(a) <= 1.55e-132) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + (0.5 - (0.5 * cos((angle * fma(0.011111111111111112, ((double) M_PI), (((double) M_PI) / angle)))))))) / x_45_scale)) / (t_1 * t_2)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * (x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0)))))) / (sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0))) * t_2)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, 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) tmp = 0.0 if (abs(a) <= 1.55e-132) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + Float64(0.5 - Float64(0.5 * cos(Float64(angle * fma(0.011111111111111112, pi, Float64(pi / angle)))))))) / x_45_scale)) / Float64(t_1 * t_2)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(1.0 / (x_45_scale ^ 4.0))) + Float64(1.0 / (x_45_scale ^ 2.0)))))) / Float64(sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) * t_2)))) / pi)); end return tmp end
code[a_, b_, 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]}, If[LessEqual[N[Abs[a], $MachinePrecision], 1.55e-132], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[(0.5 - N[(0.5 * N[Cos[N[(angle * N[(0.011111111111111112 * Pi + N[(Pi / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
\mathbf{if}\;\left|a\right| \leq 1.55 \cdot 10^{-132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + \left(0.5 - 0.5 \cdot \cos \left(angle \cdot \mathsf{fma}\left(0.011111111111111112, \pi, \frac{\pi}{angle}\right)\right)\right)\right)}{x-scale}}{t\_1 \cdot t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)\right)}{\sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right) \cdot t\_2}\right)}{\pi}\\
\end{array}
if a < 1.55e-132Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-pow.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
sin-+PI/2-revN/A
sqr-sin-aN/A
lower--.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-PI.f64N/A
lower-/.f64N/A
lower-PI.f6445.2%
Applied rewrites45.2%
if 1.55e-132 < a Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
Applied rewrites42.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556)) (t_1 (cos t_0)))
(if (<= (fabs a) 1.55e-132)
(/
(*
180.0
(atan
(*
(/
(-
(*
y-scale
(/
(+ (fma (cos (* t_0 2.0)) 0.5 0.5) (sqrt (pow t_1 4.0)))
x-scale)))
(* (sin t_0) t_1))
0.5)))
PI)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0))))))
(*
(sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
(sin (* 0.005555555555555556 (* angle PI)))))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = cos(t_0);
double tmp;
if (fabs(a) <= 1.55e-132) {
tmp = (180.0 * atan(((-(y_45_scale * ((fma(cos((t_0 * 2.0)), 0.5, 0.5) + sqrt(pow(t_1, 4.0))) / x_45_scale)) / (sin(t_0) * t_1)) * 0.5))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * (x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0)))))) / (sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0))) * sin((0.005555555555555556 * (angle * ((double) M_PI)))))))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = cos(t_0) tmp = 0.0 if (abs(a) <= 1.55e-132) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-Float64(y_45_scale * Float64(Float64(fma(cos(Float64(t_0 * 2.0)), 0.5, 0.5) + sqrt((t_1 ^ 4.0))) / x_45_scale))) / Float64(sin(t_0) * t_1)) * 0.5))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(1.0 / (x_45_scale ^ 4.0))) + Float64(1.0 / (x_45_scale ^ 2.0)))))) / Float64(sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) * sin(Float64(0.005555555555555556 * Float64(angle * pi))))))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 1.55e-132], N[(N[(180.0 * N[ArcTan[N[(N[((-N[(y$45$scale * N[(N[(N[(N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision] + N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]) / N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \cos t\_0\\
\mathbf{if}\;\left|a\right| \leq 1.55 \cdot 10^{-132}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-y-scale \cdot \frac{\mathsf{fma}\left(\cos \left(t\_0 \cdot 2\right), 0.5, 0.5\right) + \sqrt{{t\_1}^{4}}}{x-scale}}{\sin t\_0 \cdot t\_1} \cdot 0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)\right)}{\sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\
\end{array}
if a < 1.55e-132Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Applied rewrites45.2%
if 1.55e-132 < a Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
Applied rewrites42.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556)) (t_1 (cos t_0)))
(if (<= (fabs a) 1.55e-132)
(*
(/
(atan
(*
(/
(-
(*
y-scale
(/
(+ (fma (cos (* t_0 2.0)) 0.5 0.5) (sqrt (pow t_1 4.0)))
x-scale)))
(* (sin t_0) t_1))
0.5))
PI)
180.0)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0))))))
(*
(sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
(sin (* 0.005555555555555556 (* angle PI)))))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = cos(t_0);
double tmp;
if (fabs(a) <= 1.55e-132) {
tmp = (atan(((-(y_45_scale * ((fma(cos((t_0 * 2.0)), 0.5, 0.5) + sqrt(pow(t_1, 4.0))) / x_45_scale)) / (sin(t_0) * t_1)) * 0.5)) / ((double) M_PI)) * 180.0;
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * (x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0)))))) / (sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0))) * sin((0.005555555555555556 * (angle * ((double) M_PI)))))))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = cos(t_0) tmp = 0.0 if (abs(a) <= 1.55e-132) tmp = Float64(Float64(atan(Float64(Float64(Float64(-Float64(y_45_scale * Float64(Float64(fma(cos(Float64(t_0 * 2.0)), 0.5, 0.5) + sqrt((t_1 ^ 4.0))) / x_45_scale))) / Float64(sin(t_0) * t_1)) * 0.5)) / pi) * 180.0); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(1.0 / (x_45_scale ^ 4.0))) + Float64(1.0 / (x_45_scale ^ 2.0)))))) / Float64(sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) * sin(Float64(0.005555555555555556 * Float64(angle * pi))))))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 1.55e-132], N[(N[(N[ArcTan[N[(N[((-N[(y$45$scale * N[(N[(N[(N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5 + 0.5), $MachinePrecision] + N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]) / N[(N[Sin[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \cos t\_0\\
\mathbf{if}\;\left|a\right| \leq 1.55 \cdot 10^{-132}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-y-scale \cdot \frac{\mathsf{fma}\left(\cos \left(t\_0 \cdot 2\right), 0.5, 0.5\right) + \sqrt{{t\_1}^{4}}}{x-scale}}{\sin t\_0 \cdot t\_1} \cdot 0.5\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)\right)}{\sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\
\end{array}
if a < 1.55e-132Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Applied rewrites45.2%
if 1.55e-132 < a Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
Applied rewrites42.3%
(FPCore (a b 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 (<= (fabs a) 1.55e-132)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+ (sqrt (pow t_2 4.0)) (- 0.5 (* 0.5 (cos PI)))))
x-scale))
(* t_2 t_1))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0))))))
(*
(sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
t_1))))
PI)))))double code(double a, double b, 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 (fabs(a) <= 1.55e-132) {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + (0.5 - (0.5 * cos(((double) M_PI)))))) / x_45_scale)) / (t_2 * t_1)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * (x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0)))))) / (sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0))) * t_1)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, 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 (abs(a) <= 1.55e-132) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + Float64(0.5 - Float64(0.5 * cos(pi))))) / x_45_scale)) / Float64(t_2 * t_1)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(1.0 / (x_45_scale ^ 4.0))) + Float64(1.0 / (x_45_scale ^ 2.0)))))) / Float64(sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) * t_1)))) / pi)); end return tmp end
code[a_, b_, 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[N[Abs[a], $MachinePrecision], 1.55e-132], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[(0.5 - N[(0.5 * N[Cos[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\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}\;\left|a\right| \leq 1.55 \cdot 10^{-132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + \left(0.5 - 0.5 \cdot \cos \pi\right)\right)}{x-scale}}{t\_2 \cdot t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)\right)}{\sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right) \cdot t\_1}\right)}{\pi}\\
\end{array}
if a < 1.55e-132Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-pow.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
sin-+PI/2-revN/A
sqr-sin-aN/A
lower--.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-PI.f6444.9%
Applied rewrites44.9%
if 1.55e-132 < a Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
Applied rewrites42.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= (fabs a) 1.55e-132)
(*
180.0
(/
(atan
(* 0.5 (/ (* -2.0 (/ y-scale x-scale)) (* (cos t_0) t_1))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0))))))
(*
(sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0)))
t_1))))
PI)))))double code(double a, double b, 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 tmp;
if (fabs(a) <= 1.55e-132) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (cos(t_0) * t_1)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * (x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0)))))) / (sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0))) * t_1)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (abs(a) <= 1.55e-132) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(cos(t_0) * t_1)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(1.0 / (x_45_scale ^ 4.0))) + Float64(1.0 / (x_45_scale ^ 2.0)))))) / Float64(sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) * t_1)))) / pi)); end return tmp end
code[a_, b_, 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]}, If[LessEqual[N[Abs[a], $MachinePrecision], 1.55e-132], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;\left|a\right| \leq 1.55 \cdot 10^{-132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\cos t\_0 \cdot t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)\right)}{\sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right) \cdot t\_1}\right)}{\pi}\\
\end{array}
if a < 1.55e-132Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6444.8%
Applied rewrites44.8%
if 1.55e-132 < a Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
Applied rewrites42.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* (cos t_0) (sin t_0))))
(if (<= y-scale 2e+123)
(*
180.0
(/ (atan (* 0.5 (/ (* -2.0 (/ y-scale x-scale)) t_1))) PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
2.0
(*
-6.17283950617284e-5
(* (pow angle 2.0) (pow PI 2.0)))))
x-scale))
t_1)))
PI)))))double code(double a, double b, 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) * sin(t_0);
double tmp;
if (y_45_scale <= 2e+123) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / t_1))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / x_45_scale)) / t_1))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, 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) * Math.sin(t_0);
double tmp;
if (y_45_scale <= 2e+123) {
tmp = 180.0 * (Math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / t_1))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (Math.pow(angle, 2.0) * Math.pow(Math.PI, 2.0))))) / x_45_scale)) / t_1))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.cos(t_0) * math.sin(t_0) tmp = 0 if y_45_scale <= 2e+123: tmp = 180.0 * (math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / t_1))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (math.pow(angle, 2.0) * math.pow(math.pi, 2.0))))) / x_45_scale)) / t_1))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(cos(t_0) * sin(t_0)) tmp = 0.0 if (y_45_scale <= 2e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / t_1))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / x_45_scale)) / t_1))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = cos(t_0) * sin(t_0); tmp = 0.0; if (y_45_scale <= 2e+123) tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / t_1))) / pi); else tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle ^ 2.0) * (pi ^ 2.0))))) / x_45_scale)) / t_1))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, 2e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0 \cdot \sin t\_0\\
\mathbf{if}\;y-scale \leq 2 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale}}{t\_1}\right)}{\pi}\\
\end{array}
if y-scale < 2e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6444.8%
Applied rewrites44.8%
if 2e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6439.4%
Applied rewrites39.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= y-scale 4e+123)
(*
180.0
(/
(atan
(* 0.5 (/ (* -2.0 (/ y-scale x-scale)) (* (cos t_0) t_1))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
(sqrt (pow 1.0 4.0))
(-
0.5
(*
0.5
(cos
(*
2.0
(fma
(* PI angle)
0.005555555555555556
(/ PI 2.0))))))))
x-scale))
(* 1.0 t_1))))
PI)))))double code(double a, double b, 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 tmp;
if (y_45_scale <= 4e+123) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (cos(t_0) * t_1)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(1.0, 4.0)) + (0.5 - (0.5 * cos((2.0 * fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0)))))))) / x_45_scale)) / (1.0 * t_1)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (y_45_scale <= 4e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(cos(t_0) * t_1)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((1.0 ^ 4.0)) + Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0)))))))) / x_45_scale)) / Float64(1.0 * t_1)))) / pi)); end return tmp end
code[a_, b_, 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]}, If[LessEqual[y$45$scale, 4e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[1.0, 4.0], $MachinePrecision]], $MachinePrecision] + N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;y-scale \leq 4 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\cos t\_0 \cdot t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{1}^{4}} + \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right)\right)\right)}{x-scale}}{1 \cdot t\_1}\right)}{\pi}\\
\end{array}
if y-scale < 3.9999999999999999e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6444.8%
Applied rewrites44.8%
if 3.9999999999999999e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
lift-pow.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sin-+PI/2-revN/A
sin-+PI/2-revN/A
sqr-sin-aN/A
lower--.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
Applied rewrites44.9%
Taylor expanded in angle around 0
Applied rewrites45.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= y-scale 4e+123)
(*
180.0
(/
(atan
(* 0.5 (/ (* -2.0 (/ y-scale x-scale)) (* (cos t_0) t_1))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(* y-scale (+ (sqrt (pow 1.0 4.0)) (pow 1.0 2.0)))
x-scale))
(* 1.0 t_1))))
PI)))))double code(double a, double b, 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 tmp;
if (y_45_scale <= 4e+123) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (cos(t_0) * t_1)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(1.0, 4.0)) + pow(1.0, 2.0))) / x_45_scale)) / (1.0 * t_1)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double tmp;
if (y_45_scale <= 4e+123) {
tmp = 180.0 * (Math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (Math.cos(t_0) * t_1)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * ((-1.0 * ((y_45_scale * (Math.sqrt(Math.pow(1.0, 4.0)) + Math.pow(1.0, 2.0))) / x_45_scale)) / (1.0 * t_1)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) tmp = 0 if y_45_scale <= 4e+123: tmp = 180.0 * (math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (math.cos(t_0) * t_1)))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * ((-1.0 * ((y_45_scale * (math.sqrt(math.pow(1.0, 4.0)) + math.pow(1.0, 2.0))) / x_45_scale)) / (1.0 * t_1)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (y_45_scale <= 4e+123) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(cos(t_0) * t_1)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((1.0 ^ 4.0)) + (1.0 ^ 2.0))) / x_45_scale)) / Float64(1.0 * t_1)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); tmp = 0.0; if (y_45_scale <= 4e+123) tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (cos(t_0) * t_1)))) / pi); else tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt((1.0 ^ 4.0)) + (1.0 ^ 2.0))) / x_45_scale)) / (1.0 * t_1)))) / pi); end tmp_2 = tmp; end
code[a_, b_, 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]}, If[LessEqual[y$45$scale, 4e+123], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[1.0, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[1.0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;y-scale \leq 4 \cdot 10^{+123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\cos t\_0 \cdot t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{1}^{4}} + {1}^{2}\right)}{x-scale}}{1 \cdot t\_1}\right)}{\pi}\\
\end{array}
if y-scale < 3.9999999999999999e123Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6444.8%
Applied rewrites44.8%
if 3.9999999999999999e123 < y-scale Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
Applied rewrites44.9%
Taylor expanded in angle around 0
Applied rewrites44.8%
Taylor expanded in angle around 0
Applied rewrites44.9%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= angle 5.8e+70)
(*
180.0
(/
(atan
(*
0.5
(/ (* -2.0 (/ y-scale x-scale)) (* (cos t_0) (sin t_0)))))
PI))
(*
180.0
(/
(atan
(*
-90.0
(*
x-scale
(/
(*
(+ (/ 1.0 (* x-scale x-scale)) (sqrt (pow x-scale -4.0)))
y-scale)
(* PI angle)))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (angle <= 5.8e+70) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (cos(t_0) * sin(t_0))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * (x_45_scale * ((((1.0 / (x_45_scale * x_45_scale)) + sqrt(pow(x_45_scale, -4.0))) * y_45_scale) / (((double) M_PI) * angle))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (angle <= 5.8e+70) {
tmp = 180.0 * (Math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (Math.cos(t_0) * Math.sin(t_0))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.0 * (x_45_scale * ((((1.0 / (x_45_scale * x_45_scale)) + Math.sqrt(Math.pow(x_45_scale, -4.0))) * y_45_scale) / (Math.PI * angle))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if angle <= 5.8e+70: tmp = 180.0 * (math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (math.cos(t_0) * math.sin(t_0))))) / math.pi) else: tmp = 180.0 * (math.atan((-90.0 * (x_45_scale * ((((1.0 / (x_45_scale * x_45_scale)) + math.sqrt(math.pow(x_45_scale, -4.0))) * y_45_scale) / (math.pi * angle))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (angle <= 5.8e+70) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(cos(t_0) * sin(t_0))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(x_45_scale * Float64(Float64(Float64(Float64(1.0 / Float64(x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) / Float64(pi * angle))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (angle <= 5.8e+70) tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (cos(t_0) * sin(t_0))))) / pi); else tmp = 180.0 * (atan((-90.0 * (x_45_scale * ((((1.0 / (x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) / (pi * angle))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 5.8e+70], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(x$45$scale * N[(N[(N[(N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;angle \leq 5.8 \cdot 10^{+70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\cos t\_0 \cdot \sin t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \left(x-scale \cdot \frac{\left(\frac{1}{x-scale \cdot x-scale} + \sqrt{{x-scale}^{-4}}\right) \cdot y-scale}{\pi \cdot angle}\right)\right)}{\pi}\\
\end{array}
if angle < 5.7999999999999997e70Initial program 13.7%
Taylor expanded in b around inf
Applied rewrites23.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6444.8%
Applied rewrites44.8%
if 5.7999999999999997e70 < angle Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6440.3%
Applied rewrites40.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= angle -5.6e+32)
(*
180.0
(/
(atan
(* -180.0 (/ y-scale (* angle (log (pow (exp PI) x-scale))))))
PI))
(if (<= angle 9e+33)
(*
180.0
(/ (atan (* (/ -180.0 angle) (/ y-scale (* PI x-scale)))) PI))
(*
180.0
(/
(atan
(*
-90.0
(*
x-scale
(/
(*
(+ (/ 1.0 (* x-scale x-scale)) (sqrt (pow x-scale -4.0)))
y-scale)
(* PI angle)))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (angle <= -5.6e+32) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale)))))) / ((double) M_PI));
} else if (angle <= 9e+33) {
tmp = 180.0 * (atan(((-180.0 / angle) * (y_45_scale / (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * (x_45_scale * ((((1.0 / (x_45_scale * x_45_scale)) + sqrt(pow(x_45_scale, -4.0))) * y_45_scale) / (((double) M_PI) * angle))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (angle <= -5.6e+32) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * Math.log(Math.pow(Math.exp(Math.PI), x_45_scale)))))) / Math.PI);
} else if (angle <= 9e+33) {
tmp = 180.0 * (Math.atan(((-180.0 / angle) * (y_45_scale / (Math.PI * x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.0 * (x_45_scale * ((((1.0 / (x_45_scale * x_45_scale)) + Math.sqrt(Math.pow(x_45_scale, -4.0))) * y_45_scale) / (Math.PI * angle))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if angle <= -5.6e+32: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * math.log(math.pow(math.exp(math.pi), x_45_scale)))))) / math.pi) elif angle <= 9e+33: tmp = 180.0 * (math.atan(((-180.0 / angle) * (y_45_scale / (math.pi * x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan((-90.0 * (x_45_scale * ((((1.0 / (x_45_scale * x_45_scale)) + math.sqrt(math.pow(x_45_scale, -4.0))) * y_45_scale) / (math.pi * angle))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (angle <= -5.6e+32) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale)))))) / pi)); elseif (angle <= 9e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-180.0 / angle) * Float64(y_45_scale / Float64(pi * x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(x_45_scale * Float64(Float64(Float64(Float64(1.0 / Float64(x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) / Float64(pi * angle))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (angle <= -5.6e+32) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * log((exp(pi) ^ x_45_scale)))))) / pi); elseif (angle <= 9e+33) tmp = 180.0 * (atan(((-180.0 / angle) * (y_45_scale / (pi * x_45_scale)))) / pi); else tmp = 180.0 * (atan((-90.0 * (x_45_scale * ((((1.0 / (x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) / (pi * angle))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[angle, -5.6e+32], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 9e+33], N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 / angle), $MachinePrecision] * N[(y$45$scale / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(x$45$scale * N[(N[(N[(N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;angle \leq -5.6 \cdot 10^{+32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)}{\pi}\\
\mathbf{elif}\;angle \leq 9 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180}{angle} \cdot \frac{y-scale}{\pi \cdot x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \left(x-scale \cdot \frac{\left(\frac{1}{x-scale \cdot x-scale} + \sqrt{{x-scale}^{-4}}\right) \cdot y-scale}{\pi \cdot angle}\right)\right)}{\pi}\\
\end{array}
if angle < -5.6000000000000002e32Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.2%
Applied rewrites35.2%
if -5.6000000000000002e32 < angle < 9.0000000000000001e33Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.3%
Applied rewrites39.3%
if 9.0000000000000001e33 < angle Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6440.3%
Applied rewrites40.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= angle -5.6e+32)
(*
180.0
(/
(atan
(* -180.0 (/ y-scale (* angle (log (pow (exp PI) x-scale))))))
PI))
(if (<= angle 2.4e-17)
(*
180.0
(/ (atan (* (/ -180.0 angle) (/ y-scale (* PI x-scale)))) PI))
(*
180.0
(/
(atan
(*
-90.0
(/
(* x-scale (* y-scale (/ 2.0 (pow x-scale 2.0))))
(* angle PI))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (angle <= -5.6e+32) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * log(pow(exp(((double) M_PI)), x_45_scale)))))) / ((double) M_PI));
} else if (angle <= 2.4e-17) {
tmp = 180.0 * (atan(((-180.0 / angle) * (y_45_scale / (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (2.0 / pow(x_45_scale, 2.0)))) / (angle * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (angle <= -5.6e+32) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * Math.log(Math.pow(Math.exp(Math.PI), x_45_scale)))))) / Math.PI);
} else if (angle <= 2.4e-17) {
tmp = 180.0 * (Math.atan(((-180.0 / angle) * (y_45_scale / (Math.PI * x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (2.0 / Math.pow(x_45_scale, 2.0)))) / (angle * Math.PI)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if angle <= -5.6e+32: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * math.log(math.pow(math.exp(math.pi), x_45_scale)))))) / math.pi) elif angle <= 2.4e-17: tmp = 180.0 * (math.atan(((-180.0 / angle) * (y_45_scale / (math.pi * x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (2.0 / math.pow(x_45_scale, 2.0)))) / (angle * math.pi)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (angle <= -5.6e+32) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * log((exp(pi) ^ x_45_scale)))))) / pi)); elseif (angle <= 2.4e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-180.0 / angle) * Float64(y_45_scale / Float64(pi * x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(2.0 / (x_45_scale ^ 2.0)))) / Float64(angle * pi)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (angle <= -5.6e+32) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * log((exp(pi) ^ x_45_scale)))))) / pi); elseif (angle <= 2.4e-17) tmp = 180.0 * (atan(((-180.0 / angle) * (y_45_scale / (pi * x_45_scale)))) / pi); else tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (2.0 / (x_45_scale ^ 2.0)))) / (angle * pi)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[angle, -5.6e+32], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], x$45$scale], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 2.4e-17], N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 / angle), $MachinePrecision] * N[(y$45$scale / N[(Pi * x$45$scale), $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[(2.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;angle \leq -5.6 \cdot 10^{+32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \log \left({\left(e^{\pi}\right)}^{x-scale}\right)}\right)}{\pi}\\
\mathbf{elif}\;angle \leq 2.4 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180}{angle} \cdot \frac{y-scale}{\pi \cdot x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \frac{2}{{x-scale}^{2}}\right)}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
if angle < -5.6000000000000002e32Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
lift-*.f64N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6435.2%
Applied rewrites35.2%
if -5.6000000000000002e32 < angle < 2.3999999999999999e-17Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.3%
Applied rewrites39.3%
if 2.3999999999999999e-17 < angle Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-/.f64N/A
lower-pow.f6440.3%
Applied rewrites40.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 3.5e-132)
(/
(* 180.0 (atan (* (/ y-scale (* (* PI x-scale) angle)) -180.0)))
PI)
(*
180.0
(/
(atan
(*
-90.0
(/
(* x-scale (* 2.0 (/ y-scale (pow x-scale 2.0))))
(* angle PI))))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 3.5e-132) {
tmp = (180.0 * atan(((y_45_scale / ((((double) M_PI) * x_45_scale) * angle)) * -180.0))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (2.0 * (y_45_scale / pow(x_45_scale, 2.0)))) / (angle * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (Math.abs(a) <= 3.5e-132) {
tmp = (180.0 * Math.atan(((y_45_scale / ((Math.PI * x_45_scale) * angle)) * -180.0))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (2.0 * (y_45_scale / Math.pow(x_45_scale, 2.0)))) / (angle * Math.PI)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 3.5e-132: tmp = (180.0 * math.atan(((y_45_scale / ((math.pi * x_45_scale) * angle)) * -180.0))) / math.pi else: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (2.0 * (y_45_scale / math.pow(x_45_scale, 2.0)))) / (angle * math.pi)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 3.5e-132) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / Float64(Float64(pi * x_45_scale) * angle)) * -180.0))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(2.0 * Float64(y_45_scale / (x_45_scale ^ 2.0)))) / Float64(angle * pi)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 3.5e-132) tmp = (180.0 * atan(((y_45_scale / ((pi * x_45_scale) * angle)) * -180.0))) / pi; else tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (2.0 * (y_45_scale / (x_45_scale ^ 2.0)))) / (angle * pi)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 3.5e-132], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / N[(N[(Pi * x$45$scale), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision] * -180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(2.0 * N[(y$45$scale / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 3.5 \cdot 10^{-132}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\left(\pi \cdot x-scale\right) \cdot angle} \cdot -180\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(2 \cdot \frac{y-scale}{{x-scale}^{2}}\right)}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
if a < 3.5e-132Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
Applied rewrites37.7%
if 3.5e-132 < a Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6440.3%
Applied rewrites40.3%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* (/ -180.0 angle) (/ y-scale (* PI x-scale)))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan(((-180.0 / angle) * (y_45_scale / (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan(((-180.0 / angle) * (y_45_scale / (Math.PI * x_45_scale)))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan(((-180.0 / angle) * (y_45_scale / (math.pi * x_45_scale)))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(-180.0 / angle) * Float64(y_45_scale / Float64(pi * x_45_scale)))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan(((-180.0 / angle) * (y_45_scale / (pi * x_45_scale)))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 / angle), $MachinePrecision] * N[(y$45$scale / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(\frac{-180}{angle} \cdot \frac{y-scale}{\pi \cdot x-scale}\right)}{\pi}
Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6439.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.3%
Applied rewrites39.3%
(FPCore (a b angle x-scale y-scale) :precision binary64 (/ (* 180.0 (atan (* (/ y-scale (* (* PI x-scale) angle)) -180.0))) PI))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return (180.0 * atan(((y_45_scale / ((((double) M_PI) * x_45_scale) * angle)) * -180.0))) / ((double) M_PI);
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return (180.0 * Math.atan(((y_45_scale / ((Math.PI * x_45_scale) * angle)) * -180.0))) / Math.PI;
}
def code(a, b, angle, x_45_scale, y_45_scale): return (180.0 * math.atan(((y_45_scale / ((math.pi * x_45_scale) * angle)) * -180.0))) / math.pi
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / Float64(Float64(pi * x_45_scale) * angle)) * -180.0))) / pi) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = (180.0 * atan(((y_45_scale / ((pi * x_45_scale) * angle)) * -180.0))) / pi; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / N[(N[(Pi * x$45$scale), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision] * -180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]
\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\left(\pi \cdot x-scale\right) \cdot angle} \cdot -180\right)}{\pi}
Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
Applied rewrites37.7%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (/ (* -180.0 y-scale) (* (* PI x-scale) angle))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan(((-180.0 * y_45_scale) / ((((double) M_PI) * x_45_scale) * angle))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan(((-180.0 * y_45_scale) / ((Math.PI * x_45_scale) * angle))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan(((-180.0 * y_45_scale) / ((math.pi * x_45_scale) * angle))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(-180.0 * y_45_scale) / Float64(Float64(pi * x_45_scale) * angle))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan(((-180.0 * y_45_scale) / ((pi * x_45_scale) * angle))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 * y$45$scale), $MachinePrecision] / N[(N[(Pi * x$45$scale), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(\frac{-180 \cdot y-scale}{\left(\pi \cdot x-scale\right) \cdot angle}\right)}{\pi}
Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6437.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.7%
Applied rewrites37.7%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}
Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.3%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.7%
Applied rewrites37.7%
herbie shell --seed 2025210
(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)))