
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (cos (* (* angle 0.005555555555555556) PI)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (sin t_1))
(t_3 (sin (fma -0.005555555555555556 (* PI angle) (* PI 0.5)))))
(if (<= b_m 3.9e-78)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* (cos t_1) t_2)))))
PI))
(if (<= b_m 5.9e+52)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
(-
(-
(sqrt (pow t_0 4.0))
(fma (cos (* 0.011111111111111112 (* PI angle))) -0.5 -0.5)))
(/ y-scale x-scale))
(* (sin (* (* -0.005555555555555556 PI) angle)) t_0))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_3 4.0)) (pow t_3 2.0)))
(* x-scale (* t_3 t_2)))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = cos(((angle * 0.005555555555555556) * ((double) M_PI)));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = sin(fma(-0.005555555555555556, (((double) M_PI) * angle), (((double) M_PI) * 0.5)));
double tmp;
if (b_m <= 3.9e-78) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (cos(t_1) * t_2))))) / ((double) M_PI));
} else if (b_m <= 5.9e+52) {
tmp = 180.0 * (atan((-0.5 * ((-(sqrt(pow(t_0, 4.0)) - fma(cos((0.011111111111111112 * (((double) M_PI) * angle))), -0.5, -0.5)) * (y_45_scale / x_45_scale)) / (sin(((-0.005555555555555556 * ((double) M_PI)) * angle)) * t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_3, 4.0)) + pow(t_3, 2.0))) / (x_45_scale * (t_3 * t_2))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = cos(Float64(Float64(angle * 0.005555555555555556) * pi)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = sin(fma(-0.005555555555555556, Float64(pi * angle), Float64(pi * 0.5))) tmp = 0.0 if (b_m <= 3.9e-78) 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(cos(t_1) * t_2))))) / pi)); elseif (b_m <= 5.9e+52) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(-Float64(sqrt((t_0 ^ 4.0)) - fma(cos(Float64(0.011111111111111112 * Float64(pi * angle))), -0.5, -0.5))) * Float64(y_45_scale / x_45_scale)) / Float64(sin(Float64(Float64(-0.005555555555555556 * pi) * angle)) * t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 4.0)) + (t_3 ^ 2.0))) / Float64(x_45_scale * Float64(t_3 * t_2))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Cos[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision] + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 3.9e-78], 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[(N[Cos[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.9e+52], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[((-N[(N[Sqrt[N[Power[t$95$0, 4.0], $MachinePrecision]], $MachinePrecision] - N[(N[Cos[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + -0.5), $MachinePrecision]), $MachinePrecision]) * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(-0.005555555555555556 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \sin \left(\mathsf{fma}\left(-0.005555555555555556, \pi \cdot angle, \pi \cdot 0.5\right)\right)\\
\mathbf{if}\;b\_m \leq 3.9 \cdot 10^{-78}:\\
\;\;\;\;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(\cos t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.9 \cdot 10^{+52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\left(-\left(\sqrt{{t\_0}^{4}} - \mathsf{fma}\left(\cos \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right), -0.5, -0.5\right)\right)\right) \cdot \frac{y-scale}{x-scale}}{\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot angle\right) \cdot t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{4}} + {t\_3}^{2}\right)}{x-scale \cdot \left(t\_3 \cdot t\_2\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.9000000000000002e-78Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.2%
if 3.9000000000000002e-78 < b < 5.89999999999999996e52Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Applied rewrites44.1%
if 5.89999999999999996e52 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6443.3
Applied rewrites43.3%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6443.3
Applied rewrites43.3%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6443.1
Applied rewrites43.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (cos (* (* angle 0.005555555555555556) PI)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (sin t_1))
(t_3 (sin (fma (* PI angle) -0.005555555555555556 (* PI 0.5)))))
(if (<= b_m 3.9e-78)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* (cos t_1) t_2)))))
PI))
(if (<= b_m 5e+38)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
(-
(-
(sqrt (pow t_0 4.0))
(fma (cos (* 0.011111111111111112 (* PI angle))) -0.5 -0.5)))
(/ y-scale x-scale))
(* (sin (* (* -0.005555555555555556 PI) angle)) t_0))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(/
(*
(+
(+
0.5
(* 0.5 (cos (* 2.0 (* -0.005555555555555556 (* PI angle))))))
(sqrt (pow t_3 4.0)))
(/ y-scale x-scale))
(sin (* (* PI angle) 0.005555555555555556)))
t_3)))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = cos(((angle * 0.005555555555555556) * ((double) M_PI)));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = sin(fma((((double) M_PI) * angle), -0.005555555555555556, (((double) M_PI) * 0.5)));
double tmp;
if (b_m <= 3.9e-78) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (cos(t_1) * t_2))))) / ((double) M_PI));
} else if (b_m <= 5e+38) {
tmp = 180.0 * (atan((-0.5 * ((-(sqrt(pow(t_0, 4.0)) - fma(cos((0.011111111111111112 * (((double) M_PI) * angle))), -0.5, -0.5)) * (y_45_scale / x_45_scale)) / (sin(((-0.005555555555555556 * ((double) M_PI)) * angle)) * t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (((((0.5 + (0.5 * cos((2.0 * (-0.005555555555555556 * (((double) M_PI) * angle)))))) + sqrt(pow(t_3, 4.0))) * (y_45_scale / x_45_scale)) / sin(((((double) M_PI) * angle) * 0.005555555555555556))) / t_3))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = cos(Float64(Float64(angle * 0.005555555555555556) * pi)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = sin(fma(Float64(pi * angle), -0.005555555555555556, Float64(pi * 0.5))) tmp = 0.0 if (b_m <= 3.9e-78) 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(cos(t_1) * t_2))))) / pi)); elseif (b_m <= 5e+38) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(-Float64(sqrt((t_0 ^ 4.0)) - fma(cos(Float64(0.011111111111111112 * Float64(pi * angle))), -0.5, -0.5))) * Float64(y_45_scale / x_45_scale)) / Float64(sin(Float64(Float64(-0.005555555555555556 * pi) * angle)) * t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(Float64(Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(-0.005555555555555556 * Float64(pi * angle)))))) + sqrt((t_3 ^ 4.0))) * Float64(y_45_scale / x_45_scale)) / sin(Float64(Float64(pi * angle) * 0.005555555555555556))) / t_3))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Cos[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556 + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 3.9e-78], 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[(N[Cos[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5e+38], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[((-N[(N[Sqrt[N[Power[t$95$0, 4.0], $MachinePrecision]], $MachinePrecision] - N[(N[Cos[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + -0.5), $MachinePrecision]), $MachinePrecision]) * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(-0.005555555555555556 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(N[(N[(N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$3, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \sin \left(\mathsf{fma}\left(\pi \cdot angle, -0.005555555555555556, \pi \cdot 0.5\right)\right)\\
\mathbf{if}\;b\_m \leq 3.9 \cdot 10^{-78}:\\
\;\;\;\;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(\cos t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5 \cdot 10^{+38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\left(-\left(\sqrt{{t\_0}^{4}} - \mathsf{fma}\left(\cos \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right), -0.5, -0.5\right)\right)\right) \cdot \frac{y-scale}{x-scale}}{\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot angle\right) \cdot t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\frac{\left(\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right) + \sqrt{{t\_3}^{4}}\right) \cdot \frac{y-scale}{x-scale}}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}}{t\_3}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.9000000000000002e-78Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.2%
if 3.9000000000000002e-78 < b < 4.9999999999999997e38Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Applied rewrites44.1%
if 4.9999999999999997e38 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.7
Applied rewrites44.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6444.4
Applied rewrites44.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (cos (* (* angle 0.005555555555555556) PI))))
(if (<= b_m 3.9e-78)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(* x-scale (* (cos t_0) t_1)))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
(-
(-
(sqrt (pow t_2 4.0))
(fma (cos (* 0.011111111111111112 (* PI angle))) -0.5 -0.5)))
(/ y-scale x-scale))
(* (sin (* (* -0.005555555555555556 PI) angle)) t_2))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = cos(((angle * 0.005555555555555556) * ((double) M_PI)));
double tmp;
if (b_m <= 3.9e-78) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (cos(t_0) * t_1))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-(sqrt(pow(t_2, 4.0)) - fma(cos((0.011111111111111112 * (((double) M_PI) * angle))), -0.5, -0.5)) * (y_45_scale / x_45_scale)) / (sin(((-0.005555555555555556 * ((double) M_PI)) * angle)) * t_2)))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = cos(Float64(Float64(angle * 0.005555555555555556) * pi)) tmp = 0.0 if (b_m <= 3.9e-78) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_0) * t_1))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(-Float64(sqrt((t_2 ^ 4.0)) - fma(cos(Float64(0.011111111111111112 * Float64(pi * angle))), -0.5, -0.5))) * Float64(y_45_scale / x_45_scale)) / Float64(sin(Float64(Float64(-0.005555555555555556 * pi) * angle)) * t_2)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 3.9e-78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[((-N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] - N[(N[Cos[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + -0.5), $MachinePrecision]), $MachinePrecision]) * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(-0.005555555555555556 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 3.9 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(\cos t\_0 \cdot t\_1\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\left(-\left(\sqrt{{t\_2}^{4}} - \mathsf{fma}\left(\cos \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right), -0.5, -0.5\right)\right)\right) \cdot \frac{y-scale}{x-scale}}{\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot angle\right) \cdot t\_2}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.9000000000000002e-78Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.2%
if 3.9000000000000002e-78 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Applied rewrites44.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* angle PI)))
(t_1 (cos (* (* angle 0.005555555555555556) PI))))
(if (<= b_m 2.7e-78)
(*
180.0
(/
(atan
(*
-0.5
(/
(* -2.0 (/ (* y-scale (- 0.5 (* 0.5 (cos t_0)))) (sin t_0)))
x-scale)))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
(-
(-
(sqrt (pow t_1 4.0))
(fma (cos (* 0.011111111111111112 (* PI angle))) -0.5 -0.5)))
(/ y-scale x-scale))
(* (sin (* (* -0.005555555555555556 PI) angle)) t_1))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * ((double) M_PI));
double t_1 = cos(((angle * 0.005555555555555556) * ((double) M_PI)));
double tmp;
if (b_m <= 2.7e-78) {
tmp = 180.0 * (atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-(sqrt(pow(t_1, 4.0)) - fma(cos((0.011111111111111112 * (((double) M_PI) * angle))), -0.5, -0.5)) * (y_45_scale / x_45_scale)) / (sin(((-0.005555555555555556 * ((double) M_PI)) * angle)) * t_1)))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.011111111111111112 * Float64(angle * pi)) t_1 = cos(Float64(Float64(angle * 0.005555555555555556) * pi)) tmp = 0.0 if (b_m <= 2.7e-78) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-2.0 * Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(-Float64(sqrt((t_1 ^ 4.0)) - fma(cos(Float64(0.011111111111111112 * Float64(pi * angle))), -0.5, -0.5))) * Float64(y_45_scale / x_45_scale)) / Float64(sin(Float64(Float64(-0.005555555555555556 * pi) * angle)) * t_1)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 2.7e-78], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-2.0 * N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[((-N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] - N[(N[Cos[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + -0.5), $MachinePrecision]), $MachinePrecision]) * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(-0.005555555555555556 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 2.7 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-2 \cdot \frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos t\_0\right)}{\sin t\_0}}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\left(-\left(\sqrt{{t\_1}^{4}} - \mathsf{fma}\left(\cos \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right), -0.5, -0.5\right)\right)\right) \cdot \frac{y-scale}{x-scale}}{\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot angle\right) \cdot t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.69999999999999994e-78Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites26.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites30.8%
if 2.69999999999999994e-78 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Applied rewrites44.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* angle PI)))
(t_1 (* (* angle 0.005555555555555556) PI))
(t_2 (cos t_1)))
(if (<= b_m 3.2e-75)
(*
180.0
(/
(atan
(*
-0.5
(/
(* -2.0 (/ (* y-scale (- 0.5 (* 0.5 (cos t_0)))) (sin t_0)))
x-scale)))
PI))
(*
180.0
(/
(atan
(*
-0.5
(*
(/ y-scale x-scale)
(/
(-
(sqrt (pow t_2 4.0))
(fma (cos (* 0.011111111111111112 (* PI angle))) -0.5 -0.5))
(* (sin t_1) t_2)))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * ((double) M_PI));
double t_1 = (angle * 0.005555555555555556) * ((double) M_PI);
double t_2 = cos(t_1);
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / x_45_scale) * ((sqrt(pow(t_2, 4.0)) - fma(cos((0.011111111111111112 * (((double) M_PI) * angle))), -0.5, -0.5)) / (sin(t_1) * t_2))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.011111111111111112 * Float64(angle * pi)) t_1 = Float64(Float64(angle * 0.005555555555555556) * pi) t_2 = cos(t_1) tmp = 0.0 if (b_m <= 3.2e-75) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-2.0 * Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(sqrt((t_2 ^ 4.0)) - fma(cos(Float64(0.011111111111111112 * Float64(pi * angle))), -0.5, -0.5)) / Float64(sin(t_1) * t_2))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, If[LessEqual[b$95$m, 3.2e-75], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-2.0 * N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] - N[(N[Cos[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + -0.5), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\
t_1 := \left(angle \cdot 0.005555555555555556\right) \cdot \pi\\
t_2 := \cos t\_1\\
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-2 \cdot \frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos t\_0\right)}{\sin t\_0}}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\sqrt{{t\_2}^{4}} - \mathsf{fma}\left(\cos \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right), -0.5, -0.5\right)}{\sin t\_1 \cdot t\_2}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.19999999999999977e-75Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites26.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites30.8%
if 3.19999999999999977e-75 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Applied rewrites44.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* angle 0.005555555555555556) PI))
(t_1 (* 0.011111111111111112 (* angle PI)))
(t_2 (cos t_0)))
(if (<= b_m 3.2e-75)
(*
180.0
(/
(atan
(*
-0.5
(/
(* -2.0 (/ (* y-scale (- 0.5 (* 0.5 (cos t_1)))) (sin t_1)))
x-scale)))
PI))
(*
(/
(atan
(*
(/
(*
(-
(sqrt (pow t_2 4.0))
(fma (cos (* 0.011111111111111112 (* PI angle))) -0.5 -0.5))
y-scale)
(* x-scale (* (sin t_0) t_2)))
-0.5))
PI)
180.0))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle * 0.005555555555555556) * ((double) M_PI);
double t_1 = 0.011111111111111112 * (angle * ((double) M_PI));
double t_2 = cos(t_0);
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * cos(t_1)))) / sin(t_1))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = (atan(((((sqrt(pow(t_2, 4.0)) - fma(cos((0.011111111111111112 * (((double) M_PI) * angle))), -0.5, -0.5)) * y_45_scale) / (x_45_scale * (sin(t_0) * t_2))) * -0.5)) / ((double) M_PI)) * 180.0;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle * 0.005555555555555556) * pi) t_1 = Float64(0.011111111111111112 * Float64(angle * pi)) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 3.2e-75) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-2.0 * Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(t_1)))) / sin(t_1))) / x_45_scale))) / pi)); else tmp = Float64(Float64(atan(Float64(Float64(Float64(Float64(sqrt((t_2 ^ 4.0)) - fma(cos(Float64(0.011111111111111112 * Float64(pi * angle))), -0.5, -0.5)) * y_45_scale) / Float64(x_45_scale * Float64(sin(t_0) * t_2))) * -0.5)) / pi) * 180.0); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 3.2e-75], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-2.0 * N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(N[(N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] - N[(N[Cos[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + -0.5), $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(x$45$scale * N[(N[Sin[t$95$0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(angle \cdot 0.005555555555555556\right) \cdot \pi\\
t_1 := 0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-2 \cdot \frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos t\_1\right)}{\sin t\_1}}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(\sqrt{{t\_2}^{4}} - \mathsf{fma}\left(\cos \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right), -0.5, -0.5\right)\right) \cdot y-scale}{x-scale \cdot \left(\sin t\_0 \cdot t\_2\right)} \cdot -0.5\right)}{\pi} \cdot 180\\
\end{array}
\end{array}
if b < 3.19999999999999977e-75Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites26.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites30.8%
if 3.19999999999999977e-75 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Applied rewrites43.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* angle PI)))
(t_1 (cos (* -0.005555555555555556 (* PI angle)))))
(if (<= b_m 3.2e-75)
(*
180.0
(/
(atan
(*
-0.5
(/
(* -2.0 (/ (* y-scale (- 0.5 (* 0.5 (cos t_0)))) (sin t_0)))
x-scale)))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(/
(* (+ 1.0 (sqrt (pow t_1 4.0))) (/ y-scale x-scale))
(sin (* (* PI angle) 0.005555555555555556)))
t_1)))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * ((double) M_PI));
double t_1 = cos((-0.005555555555555556 * (((double) M_PI) * angle)));
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((((1.0 + sqrt(pow(t_1, 4.0))) * (y_45_scale / x_45_scale)) / sin(((((double) M_PI) * angle) * 0.005555555555555556))) / t_1))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * Math.PI);
double t_1 = Math.cos((-0.005555555555555556 * (Math.PI * angle)));
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (Math.atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * Math.cos(t_0)))) / Math.sin(t_0))) / x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((((1.0 + Math.sqrt(Math.pow(t_1, 4.0))) * (y_45_scale / x_45_scale)) / Math.sin(((Math.PI * angle) * 0.005555555555555556))) / t_1))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.011111111111111112 * (angle * math.pi) t_1 = math.cos((-0.005555555555555556 * (math.pi * angle))) tmp = 0 if b_m <= 3.2e-75: tmp = 180.0 * (math.atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * math.cos(t_0)))) / math.sin(t_0))) / x_45_scale))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((((1.0 + math.sqrt(math.pow(t_1, 4.0))) * (y_45_scale / x_45_scale)) / math.sin(((math.pi * angle) * 0.005555555555555556))) / t_1))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.011111111111111112 * Float64(angle * pi)) t_1 = cos(Float64(-0.005555555555555556 * Float64(pi * angle))) tmp = 0.0 if (b_m <= 3.2e-75) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-2.0 * Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(Float64(1.0 + sqrt((t_1 ^ 4.0))) * Float64(y_45_scale / x_45_scale)) / sin(Float64(Float64(pi * angle) * 0.005555555555555556))) / t_1))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.011111111111111112 * (angle * pi); t_1 = cos((-0.005555555555555556 * (pi * angle))); tmp = 0.0; if (b_m <= 3.2e-75) tmp = 180.0 * (atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / pi); else tmp = 180.0 * (atan((-0.5 * ((((1.0 + sqrt((t_1 ^ 4.0))) * (y_45_scale / x_45_scale)) / sin(((pi * angle) * 0.005555555555555556))) / t_1))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 3.2e-75], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-2.0 * N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(N[(N[(1.0 + N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\\
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-2 \cdot \frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos t\_0\right)}{\sin t\_0}}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\frac{\left(1 + \sqrt{{t\_1}^{4}}\right) \cdot \frac{y-scale}{x-scale}}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}}{t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.19999999999999977e-75Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites26.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites30.8%
if 3.19999999999999977e-75 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Taylor expanded in angle around 0
Applied rewrites44.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* angle PI))))
(if (<= b_m 3.2e-75)
(*
180.0
(/
(atan
(*
-0.5
(/
(* -2.0 (/ (* y-scale (- 0.5 (* 0.5 (cos t_0)))) (sin t_0)))
x-scale)))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(/
(* 2.0 (/ y-scale x-scale))
(sin (* (* PI angle) 0.005555555555555556)))
(cos (* -0.005555555555555556 (* PI angle))))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (((2.0 * (y_45_scale / x_45_scale)) / sin(((((double) M_PI) * angle) * 0.005555555555555556))) / cos((-0.005555555555555556 * (((double) M_PI) * angle)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * Math.PI);
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (Math.atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * Math.cos(t_0)))) / Math.sin(t_0))) / x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (((2.0 * (y_45_scale / x_45_scale)) / Math.sin(((Math.PI * angle) * 0.005555555555555556))) / Math.cos((-0.005555555555555556 * (Math.PI * angle)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.011111111111111112 * (angle * math.pi) tmp = 0 if b_m <= 3.2e-75: tmp = 180.0 * (math.atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * math.cos(t_0)))) / math.sin(t_0))) / x_45_scale))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (((2.0 * (y_45_scale / x_45_scale)) / math.sin(((math.pi * angle) * 0.005555555555555556))) / math.cos((-0.005555555555555556 * (math.pi * angle)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.011111111111111112 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 3.2e-75) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-2.0 * Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / sin(Float64(Float64(pi * angle) * 0.005555555555555556))) / cos(Float64(-0.005555555555555556 * Float64(pi * angle)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.011111111111111112 * (angle * pi); tmp = 0.0; if (b_m <= 3.2e-75) tmp = 180.0 * (atan((-0.5 * ((-2.0 * ((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / sin(t_0))) / x_45_scale))) / pi); else tmp = 180.0 * (atan((-0.5 * (((2.0 * (y_45_scale / x_45_scale)) / sin(((pi * angle) * 0.005555555555555556))) / cos((-0.005555555555555556 * (pi * angle)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.2e-75], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-2.0 * N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Cos[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-2 \cdot \frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos t\_0\right)}{\sin t\_0}}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\frac{2 \cdot \frac{y-scale}{x-scale}}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}}{\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.19999999999999977e-75Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites26.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites30.8%
if 3.19999999999999977e-75 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Taylor expanded in angle around 0
Applied rewrites44.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* angle PI))))
(if (<= b_m 3.2e-75)
(*
180.0
(/
(atan (/ (* y-scale (- 0.5 (* 0.5 (cos t_0)))) (* x-scale (sin t_0))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(/
(* 2.0 (/ y-scale x-scale))
(sin (* (* PI angle) 0.005555555555555556)))
(cos (* -0.005555555555555556 (* PI angle))))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (atan(((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / (x_45_scale * sin(t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (((2.0 * (y_45_scale / x_45_scale)) / sin(((((double) M_PI) * angle) * 0.005555555555555556))) / cos((-0.005555555555555556 * (((double) M_PI) * angle)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * Math.PI);
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (Math.atan(((y_45_scale * (0.5 - (0.5 * Math.cos(t_0)))) / (x_45_scale * Math.sin(t_0)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (((2.0 * (y_45_scale / x_45_scale)) / Math.sin(((Math.PI * angle) * 0.005555555555555556))) / Math.cos((-0.005555555555555556 * (Math.PI * angle)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.011111111111111112 * (angle * math.pi) tmp = 0 if b_m <= 3.2e-75: tmp = 180.0 * (math.atan(((y_45_scale * (0.5 - (0.5 * math.cos(t_0)))) / (x_45_scale * math.sin(t_0)))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (((2.0 * (y_45_scale / x_45_scale)) / math.sin(((math.pi * angle) * 0.005555555555555556))) / math.cos((-0.005555555555555556 * (math.pi * angle)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.011111111111111112 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 3.2e-75) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(t_0)))) / Float64(x_45_scale * sin(t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / sin(Float64(Float64(pi * angle) * 0.005555555555555556))) / cos(Float64(-0.005555555555555556 * Float64(pi * angle)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.011111111111111112 * (angle * pi); tmp = 0.0; if (b_m <= 3.2e-75) tmp = 180.0 * (atan(((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / (x_45_scale * sin(t_0)))) / pi); else tmp = 180.0 * (atan((-0.5 * (((2.0 * (y_45_scale / x_45_scale)) / sin(((pi * angle) * 0.005555555555555556))) / cos((-0.005555555555555556 * (pi * angle)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.2e-75], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Cos[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos t\_0\right)}{x-scale \cdot \sin t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{\frac{2 \cdot \frac{y-scale}{x-scale}}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}}{\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.19999999999999977e-75Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites26.1%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites30.0%
if 3.19999999999999977e-75 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Applied rewrites44.7%
Taylor expanded in angle around 0
Applied rewrites44.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* angle PI)))
(t_1 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 3.2e-75)
(*
180.0
(/
(atan (/ (* y-scale (- 0.5 (* 0.5 (cos t_0)))) (* x-scale (sin t_0))))
PI))
(*
180.0
(/
(atan (* -0.5 (/ (* y-scale 2.0) (* x-scale (* (cos t_1) (sin t_1))))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * ((double) M_PI));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (atan(((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / (x_45_scale * sin(t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_1) * sin(t_1)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * Math.PI);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 3.2e-75) {
tmp = 180.0 * (Math.atan(((y_45_scale * (0.5 - (0.5 * Math.cos(t_0)))) / (x_45_scale * Math.sin(t_0)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (Math.cos(t_1) * Math.sin(t_1)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.011111111111111112 * (angle * math.pi) t_1 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 3.2e-75: tmp = 180.0 * (math.atan(((y_45_scale * (0.5 - (0.5 * math.cos(t_0)))) / (x_45_scale * math.sin(t_0)))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (math.cos(t_1) * math.sin(t_1)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.011111111111111112 * Float64(angle * pi)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 3.2e-75) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(t_0)))) / Float64(x_45_scale * sin(t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / Float64(x_45_scale * Float64(cos(t_1) * sin(t_1)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.011111111111111112 * (angle * pi); t_1 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 3.2e-75) tmp = 180.0 * (atan(((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / (x_45_scale * sin(t_0)))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_1) * sin(t_1)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.2e-75], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$1], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos t\_0\right)}{x-scale \cdot \sin t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{x-scale \cdot \left(\cos t\_1 \cdot \sin t\_1\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.19999999999999977e-75Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites26.1%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites30.0%
if 3.19999999999999977e-75 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Taylor expanded in angle around 0
Applied rewrites43.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* angle PI))))
(if (<= b_m 1.75e-71)
(*
180.0
(/
(atan (/ (* y-scale (- 0.5 (* 0.5 (cos t_0)))) (* x-scale (sin t_0))))
PI))
(if (<= b_m 4.7e+54)
(*
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))
(*
180.0
(/
(atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI))))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.75e-71) {
tmp = 180.0 * (atan(((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / (x_45_scale * sin(t_0)))) / ((double) M_PI));
} else if (b_m <= 4.7e+54) {
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 {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.011111111111111112 * (angle * Math.PI);
double tmp;
if (b_m <= 1.75e-71) {
tmp = 180.0 * (Math.atan(((y_45_scale * (0.5 - (0.5 * Math.cos(t_0)))) / (x_45_scale * Math.sin(t_0)))) / Math.PI);
} else if (b_m <= 4.7e+54) {
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 {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.011111111111111112 * (angle * math.pi) tmp = 0 if b_m <= 1.75e-71: tmp = 180.0 * (math.atan(((y_45_scale * (0.5 - (0.5 * math.cos(t_0)))) / (x_45_scale * math.sin(t_0)))) / math.pi) elif b_m <= 4.7e+54: 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: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.011111111111111112 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 1.75e-71) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(t_0)))) / Float64(x_45_scale * sin(t_0)))) / pi)); elseif (b_m <= 4.7e+54) 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)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.011111111111111112 * (angle * pi); tmp = 0.0; if (b_m <= 1.75e-71) tmp = 180.0 * (atan(((y_45_scale * (0.5 - (0.5 * cos(t_0)))) / (x_45_scale * sin(t_0)))) / pi); elseif (b_m <= 4.7e+54) 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); else tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.75e-71], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(0.5 - N[(0.5 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.7e+54], 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], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 1.75 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \left(0.5 - 0.5 \cdot \cos t\_0\right)}{x-scale \cdot \sin t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.7 \cdot 10^{+54}:\\
\;\;\;\;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{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.75e-71Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites26.1%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites30.0%
if 1.75e-71 < b < 4.69999999999999993e54Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
if 4.69999999999999993e54 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9
Applied rewrites36.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1e-156)
(* 180.0 (/ (atan 0.0) PI))
(if (<= b_m 4.7e+54)
(*
180.0
(/
(atan
(*
-90.0
(/
(* y-scale (+ (sqrt (pow b_m 4.0)) (pow b_m 2.0)))
(* angle (* x-scale (* PI (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(*
180.0
(/ (atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI)))))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1e-156) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (b_m <= 4.7e+54) {
tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt(pow(b_m, 4.0)) + pow(b_m, 2.0))) / (angle * (x_45_scale * (((double) M_PI) * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1e-156) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (b_m <= 4.7e+54) {
tmp = 180.0 * (Math.atan((-90.0 * ((y_45_scale * (Math.sqrt(Math.pow(b_m, 4.0)) + Math.pow(b_m, 2.0))) / (angle * (x_45_scale * (Math.PI * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1e-156: tmp = 180.0 * (math.atan(0.0) / math.pi) elif b_m <= 4.7e+54: tmp = 180.0 * (math.atan((-90.0 * ((y_45_scale * (math.sqrt(math.pow(b_m, 4.0)) + math.pow(b_m, 2.0))) / (angle * (x_45_scale * (math.pi * (math.pow(b_m, 2.0) - math.pow(a, 2.0)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1e-156) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (b_m <= 4.7e+54) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(y_45_scale * Float64(sqrt((b_m ^ 4.0)) + (b_m ^ 2.0))) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1e-156) tmp = 180.0 * (atan(0.0) / pi); elseif (b_m <= 4.7e+54) tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt((b_m ^ 4.0)) + (b_m ^ 2.0))) / (angle * (x_45_scale * (pi * ((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi); else tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1e-156], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.7e+54], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[b$95$m, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[b$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - 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[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 10^{-156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.7 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale \cdot \left(\sqrt{{b\_m}^{4}} + {b\_m}^{2}\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.00000000000000004e-156Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.4%
Taylor expanded in y-scale around 0
Applied rewrites18.5%
if 1.00000000000000004e-156 < b < 4.69999999999999993e54Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites22.7%
if 4.69999999999999993e54 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9
Applied rewrites36.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (/ b_m (* x-scale x-scale)))
(t_1 (* (/ angle 180.0) PI))
(t_2 (cos t_1))
(t_3 (sin t_1))
(t_4
(/
(/ (* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) t_3) t_2) x-scale)
y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b_m t_3) 2.0)) y-scale) y-scale))
(t_6
(/ (/ (+ (pow (* a t_3) 2.0) (pow (* b_m t_2) 2.0)) x-scale) x-scale))
(t_7 (* a (/ a (* y-scale y-scale)))))
(if (<=
(*
180.0
(/
(atan
(/
(- (- t_5 t_6) (sqrt (+ (pow (- t_6 t_5) 2.0) (pow t_4 2.0))))
t_4))
PI))
100.0)
(*
180.0
(/
(atan
(/
(/
(*
90.0
(*
(* (- t_7 (fma b_m t_0 (fabs (- (* b_m t_0) t_7)))) y-scale)
x-scale))
(* (- b_m a) (* (+ b_m a) PI)))
angle))
PI))
(*
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)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = b_m / (x_45_scale * x_45_scale);
double t_1 = (angle / 180.0) * ((double) M_PI);
double t_2 = cos(t_1);
double t_3 = sin(t_1);
double t_4 = ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * t_3) * t_2) / x_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b_m * t_3), 2.0)) / y_45_scale) / y_45_scale;
double t_6 = ((pow((a * t_3), 2.0) + pow((b_m * t_2), 2.0)) / x_45_scale) / x_45_scale;
double t_7 = a * (a / (y_45_scale * y_45_scale));
double tmp;
if ((180.0 * (atan((((t_5 - t_6) - sqrt((pow((t_6 - t_5), 2.0) + pow(t_4, 2.0)))) / t_4)) / ((double) M_PI))) <= 100.0) {
tmp = 180.0 * (atan((((90.0 * (((t_7 - fma(b_m, t_0, fabs(((b_m * t_0) - t_7)))) * y_45_scale) * x_45_scale)) / ((b_m - a) * ((b_m + a) * ((double) M_PI)))) / angle)) / ((double) M_PI));
} else {
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));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(b_m / Float64(x_45_scale * x_45_scale)) t_1 = Float64(Float64(angle / 180.0) * pi) t_2 = cos(t_1) t_3 = sin(t_1) t_4 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * t_3) * t_2) / x_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b_m * t_3) ^ 2.0)) / y_45_scale) / y_45_scale) t_6 = Float64(Float64(Float64((Float64(a * t_3) ^ 2.0) + (Float64(b_m * t_2) ^ 2.0)) / x_45_scale) / x_45_scale) t_7 = Float64(a * Float64(a / Float64(y_45_scale * y_45_scale))) tmp = 0.0 if (Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_5 - t_6) - sqrt(Float64((Float64(t_6 - t_5) ^ 2.0) + (t_4 ^ 2.0)))) / t_4)) / pi)) <= 100.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(90.0 * Float64(Float64(Float64(t_7 - fma(b_m, t_0, abs(Float64(Float64(b_m * t_0) - t_7)))) * y_45_scale) * x_45_scale)) / Float64(Float64(b_m - a) * Float64(Float64(b_m + a) * pi))) / angle)) / pi)); else 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)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(b$95$m / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $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[(N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$2), $MachinePrecision] / x$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$95$m * t$95$3), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(N[Power[N[(a * t$95$3), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b$95$m * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, Block[{t$95$7 = N[(a * N[(a / N[(y$45$scale * y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$5 - t$95$6), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$6 - t$95$5), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 100.0], N[(180.0 * N[(N[ArcTan[N[(N[(N[(90.0 * N[(N[(N[(t$95$7 - N[(b$95$m * t$95$0 + N[Abs[N[(N[(b$95$m * t$95$0), $MachinePrecision] - t$95$7), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(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]]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \frac{b\_m}{x-scale \cdot x-scale}\\
t_1 := \frac{angle}{180} \cdot \pi\\
t_2 := \cos t\_1\\
t_3 := \sin t\_1\\
t_4 := \frac{\frac{\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot t\_3\right) \cdot t\_2}{x-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b\_m \cdot t\_3\right)}^{2}}{y-scale}}{y-scale}\\
t_6 := \frac{\frac{{\left(a \cdot t\_3\right)}^{2} + {\left(b\_m \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\\
t_7 := a \cdot \frac{a}{y-scale \cdot y-scale}\\
\mathbf{if}\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_5 - t\_6\right) - \sqrt{{\left(t\_6 - t\_5\right)}^{2} + {t\_4}^{2}}}{t\_4}\right)}{\pi} \leq 100:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{90 \cdot \left(\left(\left(t\_7 - \mathsf{fma}\left(b\_m, t\_0, \left|b\_m \cdot t\_0 - t\_7\right|\right)\right) \cdot y-scale\right) \cdot x-scale\right)}{\left(b\_m - a\right) \cdot \left(\left(b\_m + a\right) \cdot \pi\right)}}{angle}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;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}\\
\end{array}
\end{array}
if (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) y-scale) y-scale) (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) x-scale) x-scale)) (sqrt.f64 (+.f64 (pow.f64 (-.f64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) x-scale) x-scale) (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) y-scale) y-scale)) #s(literal 2 binary64)) (pow.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) x-scale) y-scale) #s(literal 2 binary64))))) (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) x-scale) y-scale))) (PI.f64))) < 100Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites12.1%
Applied rewrites18.1%
if 100 < (*.f64 #s(literal 180 binary64) (/.f64 (atan.f64 (/.f64 (-.f64 (-.f64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) y-scale) y-scale) (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) x-scale) x-scale)) (sqrt.f64 (+.f64 (pow.f64 (-.f64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) x-scale) x-scale) (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64)) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) #s(literal 2 binary64))) y-scale) y-scale)) #s(literal 2 binary64)) (pow.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) x-scale) y-scale) #s(literal 2 binary64))))) (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle #s(literal 180 binary64)) (PI.f64)))) x-scale) y-scale))) (PI.f64))) Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.7e+54)
(*
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))
(*
180.0
(/ (atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI)))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.7e+54) {
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 {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.7e+54) {
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 {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 4.7e+54: 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: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.7e+54) 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)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 4.7e+54) 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); else tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.7e+54], 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], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.7 \cdot 10^{+54}:\\
\;\;\;\;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{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.69999999999999993e54Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.0%
if 4.69999999999999993e54 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9
Applied rewrites36.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.05e-71)
(* 180.0 (/ (atan 0.0) PI))
(*
180.0
(/ (atan (* -0.5 (* 360.0 (/ y-scale (* angle (* x-scale PI)))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.05e-71) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.05e-71) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.05e-71: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.05e-71) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.05e-71) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.05e-71], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(360.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.05 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.0500000000000001e-71Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.4%
Taylor expanded in y-scale around 0
Applied rewrites18.5%
if 1.0500000000000001e-71 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.3%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9
Applied rewrites36.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan 0.0) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan(0.0) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan(0.0) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan(0.0) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(0.0) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan(0.0) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} 0}{\pi}
\end{array}
Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites12.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.4%
Taylor expanded in y-scale around 0
Applied rewrites18.5%
herbie shell --seed 2025156
(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)))