
(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 18 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 (* (* 0.005555555555555556 angle) PI))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (sin t_1))
(t_3 (* (* PI angle) 0.005555555555555556))
(t_4 (- t_3))
(t_5 (cos t_1))
(t_6 (cos (* t_0 2.0)))
(t_7
(fma
(* (- 0.5 (* t_6 0.5)) a)
a
(* (* (fma t_6 0.5 0.5) (fabs b)) (fabs b)))))
(if (<= (fabs b) 2.3e-151)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_5 t_2)))))
PI))
(if (<= (fabs b) 9000000000.0)
(*
(/
(atan
(*
(*
y-scale
(/
(+ (fabs t_7) t_7)
(*
(* x-scale (cos t_0))
(* (* (- (fabs b) a) (+ (fabs b) a)) (sin t_0)))))
-0.5))
PI)
180.0)
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
(sqrt (pow t_5 4.0))
(-
0.5
(*
0.5
(cos
(*
2.0
(fma (* 0.005555555555555556 angle) PI (/ PI 2.0))))))))
x-scale))
(/
(+
(sin (- t_3 t_4))
(sin (fma (* 0.005555555555555556 angle) PI t_4)))
2.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 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_4 = -t_3;
double t_5 = cos(t_1);
double t_6 = cos((t_0 * 2.0));
double t_7 = fma(((0.5 - (t_6 * 0.5)) * a), a, ((fma(t_6, 0.5, 0.5) * fabs(b)) * fabs(b)));
double tmp;
if (fabs(b) <= 2.3e-151) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_5 * t_2))))) / ((double) M_PI));
} else if (fabs(b) <= 9000000000.0) {
tmp = (atan(((y_45_scale * ((fabs(t_7) + t_7) / ((x_45_scale * cos(t_0)) * (((fabs(b) - a) * (fabs(b) + a)) * sin(t_0))))) * -0.5)) / ((double) M_PI)) * 180.0;
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_5, 4.0)) + (0.5 - (0.5 * cos((2.0 * fma((0.005555555555555556 * angle), ((double) M_PI), (((double) M_PI) / 2.0)))))))) / x_45_scale)) / ((sin((t_3 - t_4)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_4))) / 2.0)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = Float64(Float64(pi * angle) * 0.005555555555555556) t_4 = Float64(-t_3) t_5 = cos(t_1) t_6 = cos(Float64(t_0 * 2.0)) t_7 = fma(Float64(Float64(0.5 - Float64(t_6 * 0.5)) * a), a, Float64(Float64(fma(t_6, 0.5, 0.5) * abs(b)) * abs(b))) tmp = 0.0 if (abs(b) <= 2.3e-151) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(t_5 * t_2))))) / pi)); elseif (abs(b) <= 9000000000.0) tmp = Float64(Float64(atan(Float64(Float64(y_45_scale * Float64(Float64(abs(t_7) + t_7) / Float64(Float64(x_45_scale * cos(t_0)) * Float64(Float64(Float64(abs(b) - a) * Float64(abs(b) + a)) * sin(t_0))))) * -0.5)) / pi) * 180.0); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_5 ^ 4.0)) + Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * fma(Float64(0.005555555555555556 * angle), pi, Float64(pi / 2.0)))))))) / x_45_scale)) / Float64(Float64(sin(Float64(t_3 - t_4)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_4))) / 2.0)))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$4 = (-t$95$3)}, Block[{t$95$5 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$6 = N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[(0.5 - N[(t$95$6 * 0.5), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] * a + N[(N[(N[(t$95$6 * 0.5 + 0.5), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 2.3e-151], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$5 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 9000000000.0], N[(N[(N[ArcTan[N[(N[(y$45$scale * N[(N[(N[Abs[t$95$7], $MachinePrecision] + t$95$7), $MachinePrecision] / N[(N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$5, 4.0], $MachinePrecision]], $MachinePrecision] + N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[N[(t$95$3 - t$95$4), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$4), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_4 := -t\_3\\
t_5 := \cos t\_1\\
t_6 := \cos \left(t\_0 \cdot 2\right)\\
t_7 := \mathsf{fma}\left(\left(0.5 - t\_6 \cdot 0.5\right) \cdot a, a, \left(\mathsf{fma}\left(t\_6, 0.5, 0.5\right) \cdot \left|b\right|\right) \cdot \left|b\right|\right)\\
\mathbf{if}\;\left|b\right| \leq 2.3 \cdot 10^{-151}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_5 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 9000000000:\\
\;\;\;\;\frac{\tan^{-1} \left(\left(y-scale \cdot \frac{\left|t\_7\right| + t\_7}{\left(x-scale \cdot \cos t\_0\right) \cdot \left(\left(\left(\left|b\right| - a\right) \cdot \left(\left|b\right| + a\right)\right) \cdot \sin t\_0\right)}\right) \cdot -0.5\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_5}^{4}} + \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right)\right)}{x-scale}}{\frac{\sin \left(t\_3 - t\_4\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_4\right)\right)}{2}}\right)}{\pi}\\
\end{array}
if b < 2.3e-151Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.3%
if 2.3e-151 < b < 9e9Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Applied rewrites28.4%
if 9e9 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6445.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6445.5%
lower-pow.f64N/A
pow2N/A
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-cos.f64N/A
sin-+PI/2-revN/A
sqr-sin-aN/A
lower--.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
Applied rewrites45.5%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (pow (fabs b) 2.0))
(t_1 (* (* PI angle) 0.005555555555555556))
(t_2 (- t_1))
(t_3 (* 0.005555555555555556 (* angle PI)))
(t_4 (sin t_3))
(t_5 (cos t_3))
(t_6 (fma (* 0.005555555555555556 angle) PI (/ PI 2.0))))
(if (<= (fabs b) 4.8e-119)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_4 4.0)) (pow t_4 2.0)))
(* x-scale (* t_5 t_4)))))
PI))
(if (<= (fabs b) 1.05e+84)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_0))
(* x-scale (* t_5 (* t_4 (- t_0 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
(sqrt (pow t_5 4.0))
(/ (+ (sin (- t_6 t_1)) (sin (+ t_6 t_1))) 2.0)))
x-scale))
(/
(+
(sin (- t_1 t_2))
(sin (fma (* 0.005555555555555556 angle) PI t_2)))
2.0))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = pow(fabs(b), 2.0);
double t_1 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_2 = -t_1;
double t_3 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_4 = sin(t_3);
double t_5 = cos(t_3);
double t_6 = fma((0.005555555555555556 * angle), ((double) M_PI), (((double) M_PI) / 2.0));
double tmp;
if (fabs(b) <= 4.8e-119) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_4, 4.0)) + pow(t_4, 2.0))) / (x_45_scale * (t_5 * t_4))))) / ((double) M_PI));
} else if (fabs(b) <= 1.05e+84) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_0)) / (x_45_scale * (t_5 * (t_4 * (t_0 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_5, 4.0)) + ((sin((t_6 - t_1)) + sin((t_6 + t_1))) / 2.0))) / x_45_scale)) / ((sin((t_1 - t_2)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_2))) / 2.0)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = abs(b) ^ 2.0 t_1 = Float64(Float64(pi * angle) * 0.005555555555555556) t_2 = Float64(-t_1) t_3 = Float64(0.005555555555555556 * Float64(angle * pi)) t_4 = sin(t_3) t_5 = cos(t_3) t_6 = fma(Float64(0.005555555555555556 * angle), pi, Float64(pi / 2.0)) tmp = 0.0 if (abs(b) <= 4.8e-119) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_4 ^ 4.0)) + (t_4 ^ 2.0))) / Float64(x_45_scale * Float64(t_5 * t_4))))) / pi)); elseif (abs(b) <= 1.05e+84) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_0)) / Float64(x_45_scale * Float64(t_5 * Float64(t_4 * Float64(t_0 - (a ^ 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_5 ^ 4.0)) + Float64(Float64(sin(Float64(t_6 - t_1)) + sin(Float64(t_6 + t_1))) / 2.0))) / x_45_scale)) / Float64(Float64(sin(Float64(t_1 - t_2)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_2))) / 2.0)))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = (-t$95$1)}, 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]}, Block[{t$95$6 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 4.8e-119], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$4, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$5 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.05e+84], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$5 * N[(t$95$4 * N[(t$95$0 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $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[(N[Sqrt[N[Power[t$95$5, 4.0], $MachinePrecision]], $MachinePrecision] + N[(N[(N[Sin[N[(t$95$6 - t$95$1), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(t$95$6 + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[N[(t$95$1 - t$95$2), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
t_0 := {\left(\left|b\right|\right)}^{2}\\
t_1 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_2 := -t\_1\\
t_3 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_4 := \sin t\_3\\
t_5 := \cos t\_3\\
t_6 := \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\\
\mathbf{if}\;\left|b\right| \leq 4.8 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_4}^{4}} + {t\_4}^{2}\right)}{x-scale \cdot \left(t\_5 \cdot t\_4\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.05 \cdot 10^{+84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_0\right)}{x-scale \cdot \left(t\_5 \cdot \left(t\_4 \cdot \left(t\_0 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_5}^{4}} + \frac{\sin \left(t\_6 - t\_1\right) + \sin \left(t\_6 + t\_1\right)}{2}\right)}{x-scale}}{\frac{\sin \left(t\_1 - t\_2\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_2\right)\right)}{2}}\right)}{\pi}\\
\end{array}
if b < 4.8000000000000002e-119Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.3%
if 4.8000000000000002e-119 < b < 1.0500000000000001e84Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-sqrt.f64N/A
lower-pow.f64N/A
lower-pow.f6424.8%
Applied rewrites24.8%
if 1.0500000000000001e84 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6445.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6445.5%
lower-pow.f64N/A
pow2N/A
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-cos.f64N/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (pow (fabs b) 2.0))
(t_1 (sin (fma (* 0.005555555555555556 angle) PI (/ PI 2.0))))
(t_2 (* 0.005555555555555556 (* angle PI)))
(t_3 (cos t_2))
(t_4 (sin t_2))
(t_5 (* (* PI angle) 0.005555555555555556))
(t_6 (- t_5)))
(if (<= (fabs b) 4.8e-119)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_4 4.0)) (pow t_4 2.0)))
(* x-scale (* t_3 t_4)))))
PI))
(if (<= (fabs b) 1.75e+99)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_0))
(* x-scale (* t_3 (* t_4 (- t_0 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
(sqrt (pow t_1 4.0))
(/
(+
(cos (fma (* 0.005555555555555556 angle) PI t_6))
(cos (- t_5 t_6)))
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 = pow(fabs(b), 2.0);
double t_1 = sin(fma((0.005555555555555556 * angle), ((double) M_PI), (((double) M_PI) / 2.0)));
double t_2 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_3 = cos(t_2);
double t_4 = sin(t_2);
double t_5 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_6 = -t_5;
double tmp;
if (fabs(b) <= 4.8e-119) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_4, 4.0)) + pow(t_4, 2.0))) / (x_45_scale * (t_3 * t_4))))) / ((double) M_PI));
} else if (fabs(b) <= 1.75e+99) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_0)) / (x_45_scale * (t_3 * (t_4 * (t_0 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + ((cos(fma((0.005555555555555556 * angle), ((double) M_PI), t_6)) + cos((t_5 - t_6))) / 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 = abs(b) ^ 2.0 t_1 = sin(fma(Float64(0.005555555555555556 * angle), pi, Float64(pi / 2.0))) t_2 = Float64(0.005555555555555556 * Float64(angle * pi)) t_3 = cos(t_2) t_4 = sin(t_2) t_5 = Float64(Float64(pi * angle) * 0.005555555555555556) t_6 = Float64(-t_5) tmp = 0.0 if (abs(b) <= 4.8e-119) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_4 ^ 4.0)) + (t_4 ^ 2.0))) / Float64(x_45_scale * Float64(t_3 * t_4))))) / pi)); elseif (abs(b) <= 1.75e+99) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_0)) / Float64(x_45_scale * Float64(t_3 * Float64(t_4 * Float64(t_0 - (a ^ 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)) + Float64(Float64(cos(fma(Float64(0.005555555555555556 * angle), pi, t_6)) + cos(Float64(t_5 - t_6))) / 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[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$6 = (-t$95$5)}, If[LessEqual[N[Abs[b], $MachinePrecision], 4.8e-119], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$4, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.75e+99], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * N[(t$95$4 * N[(t$95$0 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $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[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[(N[(N[Cos[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$6), $MachinePrecision]], $MachinePrecision] + N[Cos[N[(t$95$5 - t$95$6), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 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(\left|b\right|\right)}^{2}\\
t_1 := \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_3 := \cos t\_2\\
t_4 := \sin t\_2\\
t_5 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_6 := -t\_5\\
\mathbf{if}\;\left|b\right| \leq 4.8 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_4}^{4}} + {t\_4}^{2}\right)}{x-scale \cdot \left(t\_3 \cdot t\_4\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.75 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_0\right)}{x-scale \cdot \left(t\_3 \cdot \left(t\_4 \cdot \left(t\_0 - {a}^{2}\right)\right)\right)}\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}} + \frac{\cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_6\right)\right) + \cos \left(t\_5 - t\_6\right)}{2}\right)}{x-scale}}{t\_1 \cdot t\_4}\right)}{\pi}\\
\end{array}
if b < 4.8000000000000002e-119Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.3%
if 4.8000000000000002e-119 < b < 1.7499999999999999e99Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-sqrt.f64N/A
lower-pow.f64N/A
lower-pow.f6424.8%
Applied rewrites24.8%
if 1.7499999999999999e99 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-pow.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
cos-multN/A
lower-/.f64N/A
Applied rewrites46.0%
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f6445.8%
Applied rewrites45.8%
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
(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))
(t_3 (* (* PI angle) 0.005555555555555556))
(t_4 (pow (fabs b) 2.0))
(t_5 (- t_3)))
(if (<= (fabs b) 4.8e-119)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_1 t_2)))))
PI))
(if (<= (fabs b) 1.85e+67)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_4))
(* x-scale (* t_1 (* t_2 (- t_4 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(*
-1.0
(/
(*
y-scale
(+
(sqrt (pow t_1 4.0))
(-
0.5
(*
0.5
(cos
(*
2.0
(fma (* 0.005555555555555556 angle) PI (/ PI 2.0))))))))
x-scale))
(/
(+
(sin (- t_3 t_5))
(sin (fma (* 0.005555555555555556 angle) PI t_5)))
2.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 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_4 = pow(fabs(b), 2.0);
double t_5 = -t_3;
double tmp;
if (fabs(b) <= 4.8e-119) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_1 * t_2))))) / ((double) M_PI));
} else if (fabs(b) <= 1.85e+67) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_4)) / (x_45_scale * (t_1 * (t_2 * (t_4 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + (0.5 - (0.5 * cos((2.0 * fma((0.005555555555555556 * angle), ((double) M_PI), (((double) M_PI) / 2.0)))))))) / x_45_scale)) / ((sin((t_3 - t_5)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_5))) / 2.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 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(pi * angle) * 0.005555555555555556) t_4 = abs(b) ^ 2.0 t_5 = Float64(-t_3) tmp = 0.0 if (abs(b) <= 4.8e-119) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(t_1 * t_2))))) / pi)); elseif (abs(b) <= 1.85e+67) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_4)) / Float64(x_45_scale * Float64(t_1 * Float64(t_2 * Float64(t_4 - (a ^ 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)) + Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * fma(Float64(0.005555555555555556 * angle), pi, Float64(pi / 2.0)))))))) / x_45_scale)) / Float64(Float64(sin(Float64(t_3 - t_5)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_5))) / 2.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[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$5 = (-t$95$3)}, If[LessEqual[N[Abs[b], $MachinePrecision], 4.8e-119], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.85e+67], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[(t$95$2 * N[(t$95$4 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $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[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[N[(t$95$3 - t$95$5), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $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\\
t_3 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_4 := {\left(\left|b\right|\right)}^{2}\\
t_5 := -t\_3\\
\mathbf{if}\;\left|b\right| \leq 4.8 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.85 \cdot 10^{+67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_4\right)}{x-scale \cdot \left(t\_1 \cdot \left(t\_2 \cdot \left(t\_4 - {a}^{2}\right)\right)\right)}\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}} + \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right)\right)}{x-scale}}{\frac{\sin \left(t\_3 - t\_5\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_5\right)\right)}{2}}\right)}{\pi}\\
\end{array}
if b < 4.8000000000000002e-119Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.3%
if 4.8000000000000002e-119 < b < 1.8499999999999999e67Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-sqrt.f64N/A
lower-pow.f64N/A
lower-pow.f6424.8%
Applied rewrites24.8%
if 1.8499999999999999e67 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6445.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6445.5%
lower-pow.f64N/A
pow2N/A
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-cos.f64N/A
sin-+PI/2-revN/A
sqr-sin-aN/A
lower--.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
Applied rewrites45.5%
(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))
(t_3 (* (* PI angle) 0.005555555555555556))
(t_4 (pow (fabs b) 2.0))
(t_5 (- t_3)))
(if (<= (fabs b) 4.8e-119)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_1 t_2)))))
PI))
(if (<= (fabs b) 1.85e+67)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_4))
(* x-scale (* t_1 (* t_2 (- t_4 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(-
(*
y-scale
(/
(+
(+ 0.5 (* 0.5 (cos (* (* PI angle) 0.011111111111111112))))
(sqrt (pow (cos (* (* PI angle) -0.005555555555555556)) 4.0)))
x-scale)))
(/
(+
(sin (- t_3 t_5))
(sin (fma (* 0.005555555555555556 angle) PI t_5)))
2.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 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_4 = pow(fabs(b), 2.0);
double t_5 = -t_3;
double tmp;
if (fabs(b) <= 4.8e-119) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_1 * t_2))))) / ((double) M_PI));
} else if (fabs(b) <= 1.85e+67) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_4)) / (x_45_scale * (t_1 * (t_2 * (t_4 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * (-(y_45_scale * (((0.5 + (0.5 * cos(((((double) M_PI) * angle) * 0.011111111111111112)))) + sqrt(pow(cos(((((double) M_PI) * angle) * -0.005555555555555556)), 4.0))) / x_45_scale)) / ((sin((t_3 - t_5)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_5))) / 2.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 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(pi * angle) * 0.005555555555555556) t_4 = abs(b) ^ 2.0 t_5 = Float64(-t_3) tmp = 0.0 if (abs(b) <= 4.8e-119) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(t_1 * t_2))))) / pi)); elseif (abs(b) <= 1.85e+67) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_4)) / Float64(x_45_scale * Float64(t_1 * Float64(t_2 * Float64(t_4 - (a ^ 2.0)))))))) / pi)); else 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(Float64(pi * angle) * 0.011111111111111112)))) + sqrt((cos(Float64(Float64(pi * angle) * -0.005555555555555556)) ^ 4.0))) / x_45_scale))) / Float64(Float64(sin(Float64(t_3 - t_5)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_5))) / 2.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[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$5 = (-t$95$3)}, If[LessEqual[N[Abs[b], $MachinePrecision], 4.8e-119], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.85e+67], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[(t$95$2 * N[(t$95$4 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[((-N[(y$45$scale * N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[N[Cos[N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]) / N[(N[(N[Sin[N[(t$95$3 - t$95$5), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $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\\
t_3 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_4 := {\left(\left|b\right|\right)}^{2}\\
t_5 := -t\_3\\
\mathbf{if}\;\left|b\right| \leq 4.8 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.85 \cdot 10^{+67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_4\right)}{x-scale \cdot \left(t\_1 \cdot \left(t\_2 \cdot \left(t\_4 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-y-scale \cdot \frac{\left(0.5 + 0.5 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) + \sqrt{{\cos \left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)}^{4}}}{x-scale}}{\frac{\sin \left(t\_3 - t\_5\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_5\right)\right)}{2}}\right)}{\pi}\\
\end{array}
if b < 4.8000000000000002e-119Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.3%
if 4.8000000000000002e-119 < b < 1.8499999999999999e67Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-sqrt.f64N/A
lower-pow.f64N/A
lower-pow.f6424.8%
Applied rewrites24.8%
if 1.8499999999999999e67 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
Applied rewrites45.5%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (pow (fabs b) 2.0))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (cos t_1))
(t_3 (sin t_1))
(t_4 (* (* PI angle) 0.005555555555555556))
(t_5 (- t_4)))
(if (<= (fabs b) 4.8e-119)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_3 4.0)) (pow t_3 2.0)))
(* x-scale (* t_2 t_3)))))
PI))
(if (<= (fabs b) 1.85e+67)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_0))
(* x-scale (* t_2 (* t_3 (- t_0 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(* -1.0 (/ (* y-scale (+ 1.0 (pow t_2 2.0))) x-scale))
(/
(+
(sin (- t_4 t_5))
(sin (fma (* 0.005555555555555556 angle) PI t_5)))
2.0))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = pow(fabs(b), 2.0);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = cos(t_1);
double t_3 = sin(t_1);
double t_4 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_5 = -t_4;
double tmp;
if (fabs(b) <= 4.8e-119) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_3, 4.0)) + pow(t_3, 2.0))) / (x_45_scale * (t_2 * t_3))))) / ((double) M_PI));
} else if (fabs(b) <= 1.85e+67) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_0)) / (x_45_scale * (t_2 * (t_3 * (t_0 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (1.0 + pow(t_2, 2.0))) / x_45_scale)) / ((sin((t_4 - t_5)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_5))) / 2.0)))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = abs(b) ^ 2.0 t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = cos(t_1) t_3 = sin(t_1) t_4 = Float64(Float64(pi * angle) * 0.005555555555555556) t_5 = Float64(-t_4) tmp = 0.0 if (abs(b) <= 4.8e-119) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 4.0)) + (t_3 ^ 2.0))) / Float64(x_45_scale * Float64(t_2 * t_3))))) / pi)); elseif (abs(b) <= 1.85e+67) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_0)) / Float64(x_45_scale * Float64(t_2 * Float64(t_3 * Float64(t_0 - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(1.0 + (t_2 ^ 2.0))) / x_45_scale)) / Float64(Float64(sin(Float64(t_4 - t_5)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_5))) / 2.0)))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$5 = (-t$95$4)}, If[LessEqual[N[Abs[b], $MachinePrecision], 4.8e-119], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.85e+67], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[(t$95$3 * N[(t$95$0 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $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[(1.0 + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[N[(t$95$4 - t$95$5), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_0 := {\left(\left|b\right|\right)}^{2}\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \cos t\_1\\
t_3 := \sin t\_1\\
t_4 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_5 := -t\_4\\
\mathbf{if}\;\left|b\right| \leq 4.8 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{4}} + {t\_3}^{2}\right)}{x-scale \cdot \left(t\_2 \cdot t\_3\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.85 \cdot 10^{+67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_0\right)}{x-scale \cdot \left(t\_2 \cdot \left(t\_3 \cdot \left(t\_0 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(1 + {t\_2}^{2}\right)}{x-scale}}{\frac{\sin \left(t\_4 - t\_5\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_5\right)\right)}{2}}\right)}{\pi}\\
\end{array}
if b < 4.8000000000000002e-119Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites38.3%
if 4.8000000000000002e-119 < b < 1.8499999999999999e67Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-sqrt.f64N/A
lower-pow.f64N/A
lower-pow.f6424.8%
Applied rewrites24.8%
if 1.8499999999999999e67 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
Taylor expanded in angle around 0
Applied rewrites45.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (* (* PI angle) 0.005555555555555556))
(t_3 (- t_2))
(t_4 (pow (fabs b) 2.0)))
(if (<= (fabs b) 2.8e-144)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(if (<= (fabs b) 1.85e+67)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_4))
(* x-scale (* t_1 (* (sin t_0) (- t_4 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(* -1.0 (/ (* y-scale (+ 1.0 (pow t_1 2.0))) x-scale))
(/
(+
(sin (- t_2 t_3))
(sin (fma (* 0.005555555555555556 angle) PI t_3)))
2.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 = cos(t_0);
double t_2 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_3 = -t_2;
double t_4 = pow(fabs(b), 2.0);
double tmp;
if (fabs(b) <= 2.8e-144) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (fabs(b) <= 1.85e+67) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_4)) / (x_45_scale * (t_1 * (sin(t_0) * (t_4 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-1.0 * ((y_45_scale * (1.0 + pow(t_1, 2.0))) / x_45_scale)) / ((sin((t_2 - t_3)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_3))) / 2.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 = cos(t_0) t_2 = Float64(Float64(pi * angle) * 0.005555555555555556) t_3 = Float64(-t_2) t_4 = abs(b) ^ 2.0 tmp = 0.0 if (abs(b) <= 2.8e-144) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(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(angle * pi)))) / pi)); elseif (abs(b) <= 1.85e+67) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_4)) / Float64(x_45_scale * Float64(t_1 * Float64(sin(t_0) * Float64(t_4 - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(1.0 + (t_1 ^ 2.0))) / x_45_scale)) / Float64(Float64(sin(Float64(t_2 - t_3)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_3))) / 2.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[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$3 = (-t$95$2)}, Block[{t$95$4 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 2.8e-144], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(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] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.85e+67], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[(N[Sin[t$95$0], $MachinePrecision] * N[(t$95$4 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $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[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[N[(t$95$2 - t$95$3), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $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 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_3 := -t\_2\\
t_4 := {\left(\left|b\right|\right)}^{2}\\
\mathbf{if}\;\left|b\right| \leq 2.8 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.85 \cdot 10^{+67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_4\right)}{x-scale \cdot \left(t\_1 \cdot \left(\sin t\_0 \cdot \left(t\_4 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(1 + {t\_1}^{2}\right)}{x-scale}}{\frac{\sin \left(t\_2 - t\_3\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_3\right)\right)}{2}}\right)}{\pi}\\
\end{array}
if b < 2.8e-144Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.0%
if 2.8e-144 < b < 1.8499999999999999e67Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-sqrt.f64N/A
lower-pow.f64N/A
lower-pow.f6424.8%
Applied rewrites24.8%
if 1.8499999999999999e67 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
Taylor expanded in angle around 0
Applied rewrites45.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* (* PI angle) 0.005555555555555556))
(t_2 (- t_1))
(t_3 (pow (fabs b) 2.0)))
(if (<= (fabs b) 2.8e-144)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(if (<= (fabs b) 1.85e+67)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_3))
(* x-scale (* (cos t_0) (* (sin t_0) (- t_3 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(* -2.0 (/ y-scale x-scale))
(/
(+
(sin (- t_1 t_2))
(sin (fma (* 0.005555555555555556 angle) PI t_2)))
2.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 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_2 = -t_1;
double t_3 = pow(fabs(b), 2.0);
double tmp;
if (fabs(b) <= 2.8e-144) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (fabs(b) <= 1.85e+67) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_3)) / (x_45_scale * (cos(t_0) * (sin(t_0) * (t_3 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / ((sin((t_1 - t_2)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_2))) / 2.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 = Float64(Float64(pi * angle) * 0.005555555555555556) t_2 = Float64(-t_1) t_3 = abs(b) ^ 2.0 tmp = 0.0 if (abs(b) <= 2.8e-144) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(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(angle * pi)))) / pi)); elseif (abs(b) <= 1.85e+67) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_3)) / Float64(x_45_scale * Float64(cos(t_0) * Float64(sin(t_0) * Float64(t_3 - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(Float64(sin(Float64(t_1 - t_2)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_2))) / 2.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[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = (-t$95$1)}, Block[{t$95$3 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 2.8e-144], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(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] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.85e+67], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(t$95$3 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[N[(t$95$1 - t$95$2), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_2 := -t\_1\\
t_3 := {\left(\left|b\right|\right)}^{2}\\
\mathbf{if}\;\left|b\right| \leq 2.8 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.85 \cdot 10^{+67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_3\right)}{x-scale \cdot \left(\cos t\_0 \cdot \left(\sin t\_0 \cdot \left(t\_3 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\frac{\sin \left(t\_1 - t\_2\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_2\right)\right)}{2}}\right)}{\pi}\\
\end{array}
if b < 2.8e-144Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.0%
if 2.8e-144 < b < 1.8499999999999999e67Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-sqrt.f64N/A
lower-pow.f64N/A
lower-pow.f6424.8%
Applied rewrites24.8%
if 1.8499999999999999e67 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556)) (t_1 (- t_0)))
(if (<= (fabs b) 2.8e-144)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(if (<= (fabs b) 6.4e-37)
(*
(/
(atan
(/
(* -90.0 (/ (* (pow (fabs b) 2.0) y-scale) x-scale))
(* (* PI angle) (* (- (fabs b) a) (+ (fabs b) a)))))
PI)
180.0)
(*
180.0
(/
(atan
(*
0.5
(/
(* -2.0 (/ y-scale x-scale))
(/
(+
(sin (- t_0 t_1))
(sin (fma (* 0.005555555555555556 angle) PI t_1)))
2.0))))
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 = -t_0;
double tmp;
if (fabs(b) <= 2.8e-144) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (fabs(b) <= 6.4e-37) {
tmp = (atan(((-90.0 * ((pow(fabs(b), 2.0) * y_45_scale) / x_45_scale)) / ((((double) M_PI) * angle) * ((fabs(b) - a) * (fabs(b) + a))))) / ((double) M_PI)) * 180.0;
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / ((sin((t_0 - t_1)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_1))) / 2.0)))) / ((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 = Float64(-t_0) tmp = 0.0 if (abs(b) <= 2.8e-144) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(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(angle * pi)))) / pi)); elseif (abs(b) <= 6.4e-37) tmp = Float64(Float64(atan(Float64(Float64(-90.0 * Float64(Float64((abs(b) ^ 2.0) * y_45_scale) / x_45_scale)) / Float64(Float64(pi * angle) * Float64(Float64(abs(b) - a) * Float64(abs(b) + a))))) / pi) * 180.0); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(Float64(sin(Float64(t_0 - t_1)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_1))) / 2.0)))) / 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 = (-t$95$0)}, If[LessEqual[N[Abs[b], $MachinePrecision], 2.8e-144], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(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] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 6.4e-37], N[(N[(N[ArcTan[N[(N[(-90.0 * N[(N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] * y$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(Pi * angle), $MachinePrecision] * N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[N[(t$95$0 - t$95$1), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := -t\_0\\
\mathbf{if}\;\left|b\right| \leq 2.8 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 6.4 \cdot 10^{-37}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-90 \cdot \frac{{\left(\left|b\right|\right)}^{2} \cdot y-scale}{x-scale}}{\left(\pi \cdot angle\right) \cdot \left(\left(\left|b\right| - a\right) \cdot \left(\left|b\right| + a\right)\right)}\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\frac{\sin \left(t\_0 - t\_1\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_1\right)\right)}{2}}\right)}{\pi}\\
\end{array}
if b < 2.8e-144Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.0%
if 2.8e-144 < b < 6.3999999999999998e-37Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Applied rewrites14.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f6424.1%
Applied rewrites24.1%
if 6.3999999999999998e-37 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites45.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6445.2%
Applied rewrites45.2%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (pow (fabs b) 2.0)) (t_1 (* (* PI angle) 0.005555555555555556)))
(if (<= (fabs b) 2.8e-144)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(if (<= (fabs b) 5.8e-24)
(*
180.0
(/
(atan
(*
-90.0
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_0))
(* angle (* x-scale (* PI (- t_0 (pow a 2.0))))))))
PI))
(*
(/
(atan
(/ (* 0.5 (- (* y-scale (/ 2.0 x-scale)))) (* (sin t_1) (cos t_1))))
PI)
180.0)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = pow(fabs(b), 2.0);
double t_1 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if (fabs(b) <= 2.8e-144) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (fabs(b) <= 5.8e-24) {
tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_0)) / (angle * (x_45_scale * (((double) M_PI) * (t_0 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = (atan(((0.5 * -(y_45_scale * (2.0 / x_45_scale))) / (sin(t_1) * cos(t_1)))) / ((double) M_PI)) * 180.0;
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.pow(Math.abs(b), 2.0);
double t_1 = (Math.PI * angle) * 0.005555555555555556;
double tmp;
if (Math.abs(b) <= 2.8e-144) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt((1.0 / Math.pow(x_45_scale, 4.0))) + (1.0 / Math.pow(x_45_scale, 2.0))))) / (angle * Math.PI)))) / Math.PI);
} else if (Math.abs(b) <= 5.8e-24) {
tmp = 180.0 * (Math.atan((-90.0 * ((y_45_scale * (Math.sqrt(Math.pow(Math.abs(b), 4.0)) + t_0)) / (angle * (x_45_scale * (Math.PI * (t_0 - Math.pow(a, 2.0)))))))) / Math.PI);
} else {
tmp = (Math.atan(((0.5 * -(y_45_scale * (2.0 / x_45_scale))) / (Math.sin(t_1) * Math.cos(t_1)))) / Math.PI) * 180.0;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = math.pow(math.fabs(b), 2.0) t_1 = (math.pi * angle) * 0.005555555555555556 tmp = 0 if math.fabs(b) <= 2.8e-144: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt((1.0 / math.pow(x_45_scale, 4.0))) + (1.0 / math.pow(x_45_scale, 2.0))))) / (angle * math.pi)))) / math.pi) elif math.fabs(b) <= 5.8e-24: tmp = 180.0 * (math.atan((-90.0 * ((y_45_scale * (math.sqrt(math.pow(math.fabs(b), 4.0)) + t_0)) / (angle * (x_45_scale * (math.pi * (t_0 - math.pow(a, 2.0)))))))) / math.pi) else: tmp = (math.atan(((0.5 * -(y_45_scale * (2.0 / x_45_scale))) / (math.sin(t_1) * math.cos(t_1)))) / math.pi) * 180.0 return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = abs(b) ^ 2.0 t_1 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (abs(b) <= 2.8e-144) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(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(angle * pi)))) / pi)); elseif (abs(b) <= 5.8e-24) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_0)) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(t_0 - (a ^ 2.0)))))))) / pi)); else tmp = Float64(Float64(atan(Float64(Float64(0.5 * Float64(-Float64(y_45_scale * Float64(2.0 / x_45_scale)))) / Float64(sin(t_1) * cos(t_1)))) / pi) * 180.0); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = abs(b) ^ 2.0; t_1 = (pi * angle) * 0.005555555555555556; tmp = 0.0; if (abs(b) <= 2.8e-144) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / (x_45_scale ^ 4.0))) + (1.0 / (x_45_scale ^ 2.0))))) / (angle * pi)))) / pi); elseif (abs(b) <= 5.8e-24) tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt((abs(b) ^ 4.0)) + t_0)) / (angle * (x_45_scale * (pi * (t_0 - (a ^ 2.0)))))))) / pi); else tmp = (atan(((0.5 * -(y_45_scale * (2.0 / x_45_scale))) / (sin(t_1) * cos(t_1)))) / pi) * 180.0; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 2.8e-144], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(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] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 5.8e-24], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(t$95$0 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(0.5 * (-N[(y$45$scale * N[(2.0 / x$45$scale), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] / N[(N[Sin[t$95$1], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := {\left(\left|b\right|\right)}^{2}\\
t_1 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;\left|b\right| \leq 2.8 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 5.8 \cdot 10^{-24}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_0\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(t\_0 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{0.5 \cdot \left(-y-scale \cdot \frac{2}{x-scale}\right)}{\sin t\_1 \cdot \cos t\_1}\right)}{\pi} \cdot 180\\
\end{array}
if b < 2.8e-144Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.0%
if 2.8e-144 < b < 5.7999999999999997e-24Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites23.0%
if 5.7999999999999997e-24 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
Applied rewrites45.6%
Taylor expanded in angle around 0
lower-/.f6445.3%
Applied rewrites45.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (pow (fabs b) 2.0)) (t_1 (* 0.005555555555555556 (* angle PI))))
(if (<= (fabs b) 2.8e-144)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(if (<= (fabs b) 5.8e-24)
(*
180.0
(/
(atan
(*
-90.0
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_0))
(* angle (* x-scale (* PI (- t_0 (pow a 2.0))))))))
PI))
(*
180.0
(/
(atan
(* 0.5 (/ (* -2.0 (/ y-scale x-scale)) (* (cos t_1) (sin t_1)))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = pow(fabs(b), 2.0);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (fabs(b) <= 2.8e-144) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (fabs(b) <= 5.8e-24) {
tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_0)) / (angle * (x_45_scale * (((double) M_PI) * (t_0 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (cos(t_1) * sin(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 = Math.pow(Math.abs(b), 2.0);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (Math.abs(b) <= 2.8e-144) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt((1.0 / Math.pow(x_45_scale, 4.0))) + (1.0 / Math.pow(x_45_scale, 2.0))))) / (angle * Math.PI)))) / Math.PI);
} else if (Math.abs(b) <= 5.8e-24) {
tmp = 180.0 * (Math.atan((-90.0 * ((y_45_scale * (Math.sqrt(Math.pow(Math.abs(b), 4.0)) + t_0)) / (angle * (x_45_scale * (Math.PI * (t_0 - Math.pow(a, 2.0)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (Math.cos(t_1) * Math.sin(t_1))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = math.pow(math.fabs(b), 2.0) t_1 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if math.fabs(b) <= 2.8e-144: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt((1.0 / math.pow(x_45_scale, 4.0))) + (1.0 / math.pow(x_45_scale, 2.0))))) / (angle * math.pi)))) / math.pi) elif math.fabs(b) <= 5.8e-24: tmp = 180.0 * (math.atan((-90.0 * ((y_45_scale * (math.sqrt(math.pow(math.fabs(b), 4.0)) + t_0)) / (angle * (x_45_scale * (math.pi * (t_0 - math.pow(a, 2.0)))))))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (math.cos(t_1) * math.sin(t_1))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = abs(b) ^ 2.0 t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (abs(b) <= 2.8e-144) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(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(angle * pi)))) / pi)); elseif (abs(b) <= 5.8e-24) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_0)) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(t_0 - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(cos(t_1) * sin(t_1))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = abs(b) ^ 2.0; t_1 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (abs(b) <= 2.8e-144) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / (x_45_scale ^ 4.0))) + (1.0 / (x_45_scale ^ 2.0))))) / (angle * pi)))) / pi); elseif (abs(b) <= 5.8e-24) tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt((abs(b) ^ 4.0)) + t_0)) / (angle * (x_45_scale * (pi * (t_0 - (a ^ 2.0)))))))) / pi); else tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (cos(t_1) * sin(t_1))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 2.8e-144], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(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] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 5.8e-24], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(t$95$0 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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$1], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := {\left(\left|b\right|\right)}^{2}\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|b\right| \leq 2.8 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 5.8 \cdot 10^{-24}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_0\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(t\_0 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\cos t\_1 \cdot \sin t\_1}\right)}{\pi}\\
\end{array}
if b < 2.8e-144Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.0%
if 2.8e-144 < b < 5.7999999999999997e-24Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites23.0%
if 5.7999999999999997e-24 < b Initial program 14.0%
Taylor expanded in b around inf
Applied rewrites24.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites45.6%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6445.3%
Applied rewrites45.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI)))
(t_1 (pow (fabs b) 2.0)))
(if (<= (fabs b) 2.8e-144)
t_0
(if (<= (fabs b) 1.35e+25)
(*
180.0
(/
(atan
(*
-90.0
(/
(* y-scale (+ (sqrt (pow (fabs b) 4.0)) t_1))
(* angle (* x-scale (* PI (- t_1 (pow a 2.0))))))))
PI))
t_0))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
double t_1 = pow(fabs(b), 2.0);
double tmp;
if (fabs(b) <= 2.8e-144) {
tmp = t_0;
} else if (fabs(b) <= 1.35e+25) {
tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt(pow(fabs(b), 4.0)) + t_1)) / (angle * (x_45_scale * (((double) M_PI) * (t_1 - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt((1.0 / Math.pow(x_45_scale, 4.0))) + (1.0 / Math.pow(x_45_scale, 2.0))))) / (angle * Math.PI)))) / Math.PI);
double t_1 = Math.pow(Math.abs(b), 2.0);
double tmp;
if (Math.abs(b) <= 2.8e-144) {
tmp = t_0;
} else if (Math.abs(b) <= 1.35e+25) {
tmp = 180.0 * (Math.atan((-90.0 * ((y_45_scale * (Math.sqrt(Math.pow(Math.abs(b), 4.0)) + t_1)) / (angle * (x_45_scale * (Math.PI * (t_1 - Math.pow(a, 2.0)))))))) / Math.PI);
} else {
tmp = t_0;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt((1.0 / math.pow(x_45_scale, 4.0))) + (1.0 / math.pow(x_45_scale, 2.0))))) / (angle * math.pi)))) / math.pi) t_1 = math.pow(math.fabs(b), 2.0) tmp = 0 if math.fabs(b) <= 2.8e-144: tmp = t_0 elif math.fabs(b) <= 1.35e+25: tmp = 180.0 * (math.atan((-90.0 * ((y_45_scale * (math.sqrt(math.pow(math.fabs(b), 4.0)) + t_1)) / (angle * (x_45_scale * (math.pi * (t_1 - math.pow(a, 2.0)))))))) / math.pi) else: tmp = t_0 return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(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(angle * pi)))) / pi)) t_1 = abs(b) ^ 2.0 tmp = 0.0 if (abs(b) <= 2.8e-144) tmp = t_0; elseif (abs(b) <= 1.35e+25) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(y_45_scale * Float64(sqrt((abs(b) ^ 4.0)) + t_1)) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(t_1 - (a ^ 2.0)))))))) / pi)); else tmp = t_0; end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / (x_45_scale ^ 4.0))) + (1.0 / (x_45_scale ^ 2.0))))) / (angle * pi)))) / pi); t_1 = abs(b) ^ 2.0; tmp = 0.0; if (abs(b) <= 2.8e-144) tmp = t_0; elseif (abs(b) <= 1.35e+25) tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt((abs(b) ^ 4.0)) + t_1)) / (angle * (x_45_scale * (pi * (t_1 - (a ^ 2.0)))))))) / pi); else tmp = t_0; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(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] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 2.8e-144], t$95$0, If[LessEqual[N[Abs[b], $MachinePrecision], 1.35e+25], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(t$95$1 - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
t_1 := {\left(\left|b\right|\right)}^{2}\\
\mathbf{if}\;\left|b\right| \leq 2.8 \cdot 10^{-144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\left|b\right| \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4}} + t\_1\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(t\_1 - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if b < 2.8e-144 or 1.35e25 < b Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.0%
if 2.8e-144 < b < 1.35e25Initial program 14.0%
Taylor expanded in x-scale around 0
Applied rewrites25.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites23.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+
(sqrt (/ 1.0 (pow x-scale 4.0)))
(/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))))
(if (<= (fabs b) 2.8e-144)
t_0
(if (<= (fabs b) 2.85e+141)
(*
(/
(atan
(/
(* -90.0 (/ (* (pow (fabs b) 2.0) y-scale) x-scale))
(* (* PI angle) (* (- (fabs b) a) (+ (fabs b) a)))))
PI)
180.0)
t_0))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
double tmp;
if (fabs(b) <= 2.8e-144) {
tmp = t_0;
} else if (fabs(b) <= 2.85e+141) {
tmp = (atan(((-90.0 * ((pow(fabs(b), 2.0) * y_45_scale) / x_45_scale)) / ((((double) M_PI) * angle) * ((fabs(b) - a) * (fabs(b) + a))))) / ((double) M_PI)) * 180.0;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt((1.0 / Math.pow(x_45_scale, 4.0))) + (1.0 / Math.pow(x_45_scale, 2.0))))) / (angle * Math.PI)))) / Math.PI);
double tmp;
if (Math.abs(b) <= 2.8e-144) {
tmp = t_0;
} else if (Math.abs(b) <= 2.85e+141) {
tmp = (Math.atan(((-90.0 * ((Math.pow(Math.abs(b), 2.0) * y_45_scale) / x_45_scale)) / ((Math.PI * angle) * ((Math.abs(b) - a) * (Math.abs(b) + a))))) / Math.PI) * 180.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt((1.0 / math.pow(x_45_scale, 4.0))) + (1.0 / math.pow(x_45_scale, 2.0))))) / (angle * math.pi)))) / math.pi) tmp = 0 if math.fabs(b) <= 2.8e-144: tmp = t_0 elif math.fabs(b) <= 2.85e+141: tmp = (math.atan(((-90.0 * ((math.pow(math.fabs(b), 2.0) * y_45_scale) / x_45_scale)) / ((math.pi * angle) * ((math.fabs(b) - a) * (math.fabs(b) + a))))) / math.pi) * 180.0 else: tmp = t_0 return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(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(angle * pi)))) / pi)) tmp = 0.0 if (abs(b) <= 2.8e-144) tmp = t_0; elseif (abs(b) <= 2.85e+141) tmp = Float64(Float64(atan(Float64(Float64(-90.0 * Float64(Float64((abs(b) ^ 2.0) * y_45_scale) / x_45_scale)) / Float64(Float64(pi * angle) * Float64(Float64(abs(b) - a) * Float64(abs(b) + a))))) / pi) * 180.0); else tmp = t_0; end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / (x_45_scale ^ 4.0))) + (1.0 / (x_45_scale ^ 2.0))))) / (angle * pi)))) / pi); tmp = 0.0; if (abs(b) <= 2.8e-144) tmp = t_0; elseif (abs(b) <= 2.85e+141) tmp = (atan(((-90.0 * (((abs(b) ^ 2.0) * y_45_scale) / x_45_scale)) / ((pi * angle) * ((abs(b) - a) * (abs(b) + a))))) / pi) * 180.0; else tmp = t_0; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(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] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 2.8e-144], t$95$0, If[LessEqual[N[Abs[b], $MachinePrecision], 2.85e+141], N[(N[(N[ArcTan[N[(N[(-90.0 * N[(N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] * y$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(Pi * angle), $MachinePrecision] * N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{if}\;\left|b\right| \leq 2.8 \cdot 10^{-144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\left|b\right| \leq 2.85 \cdot 10^{+141}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-90 \cdot \frac{{\left(\left|b\right|\right)}^{2} \cdot y-scale}{x-scale}}{\left(\pi \cdot angle\right) \cdot \left(\left(\left|b\right| - a\right) \cdot \left(\left|b\right| + a\right)\right)}\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if b < 2.8e-144 or 2.85e141 < b Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.0%
if 2.8e-144 < b < 2.85e141Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Applied rewrites14.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f6424.1%
Applied rewrites24.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs b) 6e-146)
(* 180.0 (/ (atan 0.0) PI))
(if (<= (fabs b) 1.22e+57)
(*
(/
(atan
(/
(* -90.0 (/ (* (pow (fabs b) 2.0) y-scale) x-scale))
(* (* PI angle) (* (- (fabs b) a) (+ (fabs b) a)))))
PI)
180.0)
(* (/ (atan (* -90.0 (/ y-scale (* angle (* x-scale PI))))) PI) 180.0))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(b) <= 6e-146) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (fabs(b) <= 1.22e+57) {
tmp = (atan(((-90.0 * ((pow(fabs(b), 2.0) * y_45_scale) / x_45_scale)) / ((((double) M_PI) * angle) * ((fabs(b) - a) * (fabs(b) + a))))) / ((double) M_PI)) * 180.0;
} else {
tmp = (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI)) * 180.0;
}
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(b) <= 6e-146) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (Math.abs(b) <= 1.22e+57) {
tmp = (Math.atan(((-90.0 * ((Math.pow(Math.abs(b), 2.0) * y_45_scale) / x_45_scale)) / ((Math.PI * angle) * ((Math.abs(b) - a) * (Math.abs(b) + a))))) / Math.PI) * 180.0;
} else {
tmp = (Math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI) * 180.0;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(b) <= 6e-146: tmp = 180.0 * (math.atan(0.0) / math.pi) elif math.fabs(b) <= 1.22e+57: tmp = (math.atan(((-90.0 * ((math.pow(math.fabs(b), 2.0) * y_45_scale) / x_45_scale)) / ((math.pi * angle) * ((math.fabs(b) - a) * (math.fabs(b) + a))))) / math.pi) * 180.0 else: tmp = (math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) * 180.0 return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(b) <= 6e-146) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (abs(b) <= 1.22e+57) tmp = Float64(Float64(atan(Float64(Float64(-90.0 * Float64(Float64((abs(b) ^ 2.0) * y_45_scale) / x_45_scale)) / Float64(Float64(pi * angle) * Float64(Float64(abs(b) - a) * Float64(abs(b) + a))))) / pi) * 180.0); else tmp = Float64(Float64(atan(Float64(-90.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi) * 180.0); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(b) <= 6e-146) tmp = 180.0 * (atan(0.0) / pi); elseif (abs(b) <= 1.22e+57) tmp = (atan(((-90.0 * (((abs(b) ^ 2.0) * y_45_scale) / x_45_scale)) / ((pi * angle) * ((abs(b) - a) * (abs(b) + a))))) / pi) * 180.0; else tmp = (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi) * 180.0; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[b], $MachinePrecision], 6e-146], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.22e+57], N[(N[(N[ArcTan[N[(N[(-90.0 * N[(N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] * y$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(Pi * angle), $MachinePrecision] * N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(N[(N[ArcTan[N[(-90.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 6 \cdot 10^{-146}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.22 \cdot 10^{+57}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-90 \cdot \frac{{\left(\left|b\right|\right)}^{2} \cdot y-scale}{x-scale}}{\left(\pi \cdot angle\right) \cdot \left(\left(\left|b\right| - a\right) \cdot \left(\left|b\right| + a\right)\right)}\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(-90 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi} \cdot 180\\
\end{array}
if b < 6.0000000000000004e-146Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites6.9%
Taylor expanded in y-scale around 0
Applied rewrites18.6%
if 6.0000000000000004e-146 < b < 1.22e57Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Applied rewrites14.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f6424.1%
Applied rewrites24.1%
if 1.22e57 < b Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Applied rewrites14.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6435.3%
Applied rewrites35.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs b) 4.6e-146)
(* 180.0 (/ (atan 0.0) PI))
(if (<= (fabs b) 1.05e+61)
(*
(/
(atan
(*
-90.0
(/
(* (pow (fabs b) 2.0) y-scale)
(* angle (* x-scale (* PI (* (+ a (fabs b)) (- (fabs b) a))))))))
PI)
180.0)
(* (/ (atan (* -90.0 (/ y-scale (* angle (* x-scale PI))))) PI) 180.0))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(b) <= 4.6e-146) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (fabs(b) <= 1.05e+61) {
tmp = (atan((-90.0 * ((pow(fabs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (((double) M_PI) * ((a + fabs(b)) * (fabs(b) - a)))))))) / ((double) M_PI)) * 180.0;
} else {
tmp = (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI)) * 180.0;
}
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(b) <= 4.6e-146) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (Math.abs(b) <= 1.05e+61) {
tmp = (Math.atan((-90.0 * ((Math.pow(Math.abs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (Math.PI * ((a + Math.abs(b)) * (Math.abs(b) - a)))))))) / Math.PI) * 180.0;
} else {
tmp = (Math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI) * 180.0;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(b) <= 4.6e-146: tmp = 180.0 * (math.atan(0.0) / math.pi) elif math.fabs(b) <= 1.05e+61: tmp = (math.atan((-90.0 * ((math.pow(math.fabs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (math.pi * ((a + math.fabs(b)) * (math.fabs(b) - a)))))))) / math.pi) * 180.0 else: tmp = (math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) * 180.0 return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(b) <= 4.6e-146) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (abs(b) <= 1.05e+61) tmp = Float64(Float64(atan(Float64(-90.0 * Float64(Float64((abs(b) ^ 2.0) * y_45_scale) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(Float64(a + abs(b)) * Float64(abs(b) - a)))))))) / pi) * 180.0); else tmp = Float64(Float64(atan(Float64(-90.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi) * 180.0); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(b) <= 4.6e-146) tmp = 180.0 * (atan(0.0) / pi); elseif (abs(b) <= 1.05e+61) tmp = (atan((-90.0 * (((abs(b) ^ 2.0) * y_45_scale) / (angle * (x_45_scale * (pi * ((a + abs(b)) * (abs(b) - a)))))))) / pi) * 180.0; else tmp = (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi) * 180.0; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[b], $MachinePrecision], 4.6e-146], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.05e+61], N[(N[(N[ArcTan[N[(-90.0 * N[(N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(N[(N[ArcTan[N[(-90.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 4.6 \cdot 10^{-146}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.05 \cdot 10^{+61}:\\
\;\;\;\;\frac{\tan^{-1} \left(-90 \cdot \frac{{\left(\left|b\right|\right)}^{2} \cdot y-scale}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(\left(a + \left|b\right|\right) \cdot \left(\left|b\right| - a\right)\right)\right)\right)}\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(-90 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi} \cdot 180\\
\end{array}
if b < 4.6000000000000001e-146Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites6.9%
Taylor expanded in y-scale around 0
Applied rewrites18.6%
if 4.6000000000000001e-146 < b < 1.0500000000000001e61Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Applied rewrites14.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6424.2%
Applied rewrites24.2%
if 1.0500000000000001e61 < b Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Applied rewrites14.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6435.3%
Applied rewrites35.3%
(FPCore (a b angle x-scale y-scale) :precision binary64 (if (<= x-scale 1.8e+60) (* (/ (atan (* -90.0 (/ y-scale (* angle (* x-scale PI))))) PI) 180.0) (* 180.0 (/ (atan 0.0) PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (x_45_scale <= 1.8e+60) {
tmp = (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI)) * 180.0;
} else {
tmp = 180.0 * (atan(0.0) / ((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 (x_45_scale <= 1.8e+60) {
tmp = (Math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI) * 180.0;
} else {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if x_45_scale <= 1.8e+60: tmp = (math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) * 180.0 else: tmp = 180.0 * (math.atan(0.0) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (x_45_scale <= 1.8e+60) tmp = Float64(Float64(atan(Float64(-90.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi) * 180.0); else tmp = Float64(180.0 * Float64(atan(0.0) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (x_45_scale <= 1.8e+60) tmp = (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi) * 180.0; else tmp = 180.0 * (atan(0.0) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[x$45$scale, 1.8e+60], N[(N[(N[ArcTan[N[(-90.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x-scale \leq 1.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{\tan^{-1} \left(-90 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\end{array}
if x-scale < 1.7999999999999998e60Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Applied rewrites14.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6435.3%
Applied rewrites35.3%
if 1.7999999999999998e60 < x-scale Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites6.9%
Taylor expanded in y-scale around 0
Applied rewrites18.6%
(FPCore (a b angle x-scale y-scale) :precision binary64 (if (<= (fabs a) 4.5e-63) (* (/ (atan (* -90.0 (/ x-scale (* angle (* y-scale PI))))) PI) 180.0) (* 180.0 (/ (atan 0.0) PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 4.5e-63) {
tmp = (atan((-90.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI)))))) / ((double) M_PI)) * 180.0;
} else {
tmp = 180.0 * (atan(0.0) / ((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) <= 4.5e-63) {
tmp = (Math.atan((-90.0 * (x_45_scale / (angle * (y_45_scale * Math.PI))))) / Math.PI) * 180.0;
} else {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 4.5e-63: tmp = (math.atan((-90.0 * (x_45_scale / (angle * (y_45_scale * math.pi))))) / math.pi) * 180.0 else: tmp = 180.0 * (math.atan(0.0) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 4.5e-63) tmp = Float64(Float64(atan(Float64(-90.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi))))) / pi) * 180.0); else tmp = Float64(180.0 * Float64(atan(0.0) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 4.5e-63) tmp = (atan((-90.0 * (x_45_scale / (angle * (y_45_scale * pi))))) / pi) * 180.0; else tmp = 180.0 * (atan(0.0) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 4.5e-63], N[(N[(N[ArcTan[N[(-90.0 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 4.5 \cdot 10^{-63}:\\
\;\;\;\;\frac{\tan^{-1} \left(-90 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi} \cdot 180\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\end{array}
if a < 4.5e-63Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Applied rewrites14.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6412.1%
Applied rewrites12.1%
if 4.5e-63 < a Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites6.9%
Taylor expanded in y-scale around 0
Applied rewrites18.6%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan 0.0) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan(0.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(0.0) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan(0.0) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(0.0) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan(0.0) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} 0}{\pi}
Initial program 14.0%
Taylor expanded in angle around 0
Applied rewrites12.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites6.9%
Taylor expanded in y-scale around 0
Applied rewrites18.6%
herbie shell --seed 2025187
(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)))