
(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 12 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 (sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0))))
(t_1 (sin (* 0.005555555555555556 (* angle PI))))
(t_2 (* (* PI angle) 0.005555555555555556))
(t_3 (* y-scale t_1)))
(if (<= b_m 1.95e-262)
(* (/ (atan (* (tan t_2) (/ y-scale x-scale))) PI) 180.0)
(if (<= b_m 3.1e-177)
(* 180.0 (/ (atan (/ t_3 (* x-scale (sin (+ (- t_2) (/ PI 2.0)))))) PI))
(if (<= b_m 1.25e+100)
(*
180.0
(/
(atan
(/
t_3
(*
x-scale
(sin
(fma (fabs (* 0.005555555555555556 angle)) PI (/ PI 2.0))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+
0.5
(fma
0.5
(cos (* 0.011111111111111112 (* angle PI)))
(pow t_0 2.0))))
(* x-scale (* t_0 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 = sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0)));
double t_1 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double t_2 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_3 = y_45_scale * t_1;
double tmp;
if (b_m <= 1.95e-262) {
tmp = (atan((tan(t_2) * (y_45_scale / x_45_scale))) / ((double) M_PI)) * 180.0;
} else if (b_m <= 3.1e-177) {
tmp = 180.0 * (atan((t_3 / (x_45_scale * sin((-t_2 + (((double) M_PI) / 2.0)))))) / ((double) M_PI));
} else if (b_m <= 1.25e+100) {
tmp = 180.0 * (atan((t_3 / (x_45_scale * sin(fma(fabs((0.005555555555555556 * angle)), ((double) M_PI), (((double) M_PI) / 2.0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (0.5 + fma(0.5, cos((0.011111111111111112 * (angle * ((double) M_PI)))), pow(t_0, 2.0)))) / (x_45_scale * (t_0 * 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 = sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) t_1 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) t_2 = Float64(Float64(pi * angle) * 0.005555555555555556) t_3 = Float64(y_45_scale * t_1) tmp = 0.0 if (b_m <= 1.95e-262) tmp = Float64(Float64(atan(Float64(tan(t_2) * Float64(y_45_scale / x_45_scale))) / pi) * 180.0); elseif (b_m <= 3.1e-177) tmp = Float64(180.0 * Float64(atan(Float64(t_3 / Float64(x_45_scale * sin(Float64(Float64(-t_2) + Float64(pi / 2.0)))))) / pi)); elseif (b_m <= 1.25e+100) tmp = Float64(180.0 * Float64(atan(Float64(t_3 / Float64(x_45_scale * sin(fma(abs(Float64(0.005555555555555556 * angle)), pi, Float64(pi / 2.0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(0.5 + fma(0.5, cos(Float64(0.011111111111111112 * Float64(angle * pi))), (t_0 ^ 2.0)))) / Float64(x_45_scale * Float64(t_0 * 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[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$3 = N[(y$45$scale * t$95$1), $MachinePrecision]}, If[LessEqual[b$95$m, 1.95e-262], N[(N[(N[ArcTan[N[(N[Tan[t$95$2], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[b$95$m, 3.1e-177], N[(180.0 * N[(N[ArcTan[N[(t$95$3 / N[(x$45$scale * N[Sin[N[((-t$95$2) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.25e+100], N[(180.0 * N[(N[ArcTan[N[(t$95$3 / N[(x$45$scale * N[Sin[N[(N[Abs[N[(0.005555555555555556 * angle), $MachinePrecision]], $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(0.5 + N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right)\\
t_1 := \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
t_2 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_3 := y-scale \cdot t\_1\\
\mathbf{if}\;b\_m \leq 1.95 \cdot 10^{-262}:\\
\;\;\;\;\frac{\tan^{-1} \left(\tan t\_2 \cdot \frac{y-scale}{x-scale}\right)}{\pi} \cdot 180\\
\mathbf{elif}\;b\_m \leq 3.1 \cdot 10^{-177}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_3}{x-scale \cdot \sin \left(\left(-t\_2\right) + \frac{\pi}{2}\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.25 \cdot 10^{+100}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_3}{x-scale \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\right|, \pi, \frac{\pi}{2}\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(0.5 + \mathsf{fma}\left(0.5, \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right), {t\_0}^{2}\right)\right)}{x-scale \cdot \left(t\_0 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.94999999999999992e-262Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Applied rewrites47.3%
if 1.94999999999999992e-262 < b < 3.10000000000000018e-177Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.9
Applied rewrites45.9%
if 3.10000000000000018e-177 < b < 1.25e100Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
lift-cos.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
fabs-mulN/A
lift-PI.f64N/A
add-exp-logN/A
exp-fabsN/A
add-exp-logN/A
lift-PI.f64N/A
lower-fma.f64N/A
lower-fabs.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.6
Applied rewrites45.6%
if 1.25e100 < b Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6443.6
Applied rewrites43.6%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6443.6
Applied rewrites43.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sin (* 0.005555555555555556 (* angle PI))))
(t_1 (* (* PI angle) 0.005555555555555556))
(t_2 (* y-scale t_0)))
(if (<= b_m 1.95e-262)
(* (/ (atan (* (tan t_1) (/ y-scale x-scale))) PI) 180.0)
(if (<= b_m 3.1e-177)
(* 180.0 (/ (atan (/ t_2 (* x-scale (sin (+ (- t_1) (/ PI 2.0)))))) PI))
(if (<= b_m 3.1e+99)
(*
180.0
(/
(atan
(/
t_2
(*
x-scale
(sin
(fma (fabs (* 0.005555555555555556 angle)) PI (/ PI 2.0))))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+
0.5
(fma
0.5
(cos (* 0.011111111111111112 (* angle PI)))
(pow 1.0 2.0))))
(* x-scale (* 1.0 t_0)))))
PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double t_1 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_2 = y_45_scale * t_0;
double tmp;
if (b_m <= 1.95e-262) {
tmp = (atan((tan(t_1) * (y_45_scale / x_45_scale))) / ((double) M_PI)) * 180.0;
} else if (b_m <= 3.1e-177) {
tmp = 180.0 * (atan((t_2 / (x_45_scale * sin((-t_1 + (((double) M_PI) / 2.0)))))) / ((double) M_PI));
} else if (b_m <= 3.1e+99) {
tmp = 180.0 * (atan((t_2 / (x_45_scale * sin(fma(fabs((0.005555555555555556 * angle)), ((double) M_PI), (((double) M_PI) / 2.0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (0.5 + fma(0.5, cos((0.011111111111111112 * (angle * ((double) M_PI)))), pow(1.0, 2.0)))) / (x_45_scale * (1.0 * t_0))))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) t_1 = Float64(Float64(pi * angle) * 0.005555555555555556) t_2 = Float64(y_45_scale * t_0) tmp = 0.0 if (b_m <= 1.95e-262) tmp = Float64(Float64(atan(Float64(tan(t_1) * Float64(y_45_scale / x_45_scale))) / pi) * 180.0); elseif (b_m <= 3.1e-177) tmp = Float64(180.0 * Float64(atan(Float64(t_2 / Float64(x_45_scale * sin(Float64(Float64(-t_1) + Float64(pi / 2.0)))))) / pi)); elseif (b_m <= 3.1e+99) tmp = Float64(180.0 * Float64(atan(Float64(t_2 / Float64(x_45_scale * sin(fma(abs(Float64(0.005555555555555556 * angle)), pi, Float64(pi / 2.0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(0.5 + fma(0.5, cos(Float64(0.011111111111111112 * Float64(angle * pi))), (1.0 ^ 2.0)))) / Float64(x_45_scale * Float64(1.0 * t_0))))) / 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[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[(y$45$scale * t$95$0), $MachinePrecision]}, If[LessEqual[b$95$m, 1.95e-262], N[(N[(N[ArcTan[N[(N[Tan[t$95$1], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision], If[LessEqual[b$95$m, 3.1e-177], N[(180.0 * N[(N[ArcTan[N[(t$95$2 / N[(x$45$scale * N[Sin[N[((-t$95$1) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 3.1e+99], N[(180.0 * N[(N[ArcTan[N[(t$95$2 / N[(x$45$scale * N[Sin[N[(N[Abs[N[(0.005555555555555556 * angle), $MachinePrecision]], $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(0.5 + N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[Power[1.0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(1.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
t_1 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_2 := y-scale \cdot t\_0\\
\mathbf{if}\;b\_m \leq 1.95 \cdot 10^{-262}:\\
\;\;\;\;\frac{\tan^{-1} \left(\tan t\_1 \cdot \frac{y-scale}{x-scale}\right)}{\pi} \cdot 180\\
\mathbf{elif}\;b\_m \leq 3.1 \cdot 10^{-177}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_2}{x-scale \cdot \sin \left(\left(-t\_1\right) + \frac{\pi}{2}\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 3.1 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_2}{x-scale \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\right|, \pi, \frac{\pi}{2}\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(0.5 + \mathsf{fma}\left(0.5, \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right), {1}^{2}\right)\right)}{x-scale \cdot \left(1 \cdot t\_0\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.94999999999999992e-262Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Applied rewrites47.3%
if 1.94999999999999992e-262 < b < 3.10000000000000018e-177Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.9
Applied rewrites45.9%
if 3.10000000000000018e-177 < b < 3.1000000000000001e99Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
lift-cos.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
fabs-mulN/A
lift-PI.f64N/A
add-exp-logN/A
exp-fabsN/A
add-exp-logN/A
lift-PI.f64N/A
lower-fma.f64N/A
lower-fabs.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6445.6
Applied rewrites45.6%
if 3.1000000000000001e99 < b Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.5%
Taylor expanded in angle around 0
Applied rewrites43.2%
Taylor expanded in angle around 0
Applied rewrites43.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (cos (* 0.011111111111111112 (* angle PI))))
(t_1 (* (* PI angle) 0.005555555555555556))
(t_2 (sin (fma (* PI angle) 0.005555555555555556 (/ PI 2.0))))
(t_3 (- t_1))
(t_4 (* 0.005555555555555556 (* angle PI))))
(if (<= a 8e-215)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ 0.5 (fma 0.5 t_0 (pow (cos t_4) 2.0))))
(*
x-scale
(/
(+
(sin (- t_1 t_3))
(sin (fma (* PI angle) 0.005555555555555556 t_3)))
2.0)))))
PI))
(if (<= a 1.12e-169)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ 0.5 (fma 0.5 t_0 (pow t_2 2.0))))
(* x-scale (* t_2 (sin t_4))))))
PI))
(/ (* 180.0 (atan (* (tan t_1) (/ y-scale x-scale)))) 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((0.011111111111111112 * (angle * ((double) M_PI))));
double t_1 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_2 = sin(fma((((double) M_PI) * angle), 0.005555555555555556, (((double) M_PI) / 2.0)));
double t_3 = -t_1;
double t_4 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (a <= 8e-215) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (0.5 + fma(0.5, t_0, pow(cos(t_4), 2.0)))) / (x_45_scale * ((sin((t_1 - t_3)) + sin(fma((((double) M_PI) * angle), 0.005555555555555556, t_3))) / 2.0))))) / ((double) M_PI));
} else if (a <= 1.12e-169) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (0.5 + fma(0.5, t_0, pow(t_2, 2.0)))) / (x_45_scale * (t_2 * sin(t_4)))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((tan(t_1) * (y_45_scale / x_45_scale)))) / ((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(0.011111111111111112 * Float64(angle * pi))) t_1 = Float64(Float64(pi * angle) * 0.005555555555555556) t_2 = sin(fma(Float64(pi * angle), 0.005555555555555556, Float64(pi / 2.0))) t_3 = Float64(-t_1) t_4 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (a <= 8e-215) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(0.5 + fma(0.5, t_0, (cos(t_4) ^ 2.0)))) / Float64(x_45_scale * Float64(Float64(sin(Float64(t_1 - t_3)) + sin(fma(Float64(pi * angle), 0.005555555555555556, t_3))) / 2.0))))) / pi)); elseif (a <= 1.12e-169) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(0.5 + fma(0.5, t_0, (t_2 ^ 2.0)))) / Float64(x_45_scale * Float64(t_2 * sin(t_4)))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(tan(t_1) * Float64(y_45_scale / x_45_scale)))) / 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[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = (-t$95$1)}, Block[{t$95$4 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 8e-215], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(0.5 + N[(0.5 * t$95$0 + N[Power[N[Cos[t$95$4], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[(N[Sin[N[(t$95$1 - t$95$3), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556 + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.12e-169], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(0.5 + N[(0.5 * t$95$0 + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[Tan[t$95$1], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\
t_1 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_2 := \sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, \frac{\pi}{2}\right)\right)\\
t_3 := -t\_1\\
t_4 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;a \leq 8 \cdot 10^{-215}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(0.5 + \mathsf{fma}\left(0.5, t\_0, {\cos t\_4}^{2}\right)\right)}{x-scale \cdot \frac{\sin \left(t\_1 - t\_3\right) + \sin \left(\mathsf{fma}\left(\pi \cdot angle, 0.005555555555555556, t\_3\right)\right)}{2}}\right)}{\pi}\\
\mathbf{elif}\;a \leq 1.12 \cdot 10^{-169}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(0.5 + \mathsf{fma}\left(0.5, t\_0, {t\_2}^{2}\right)\right)}{x-scale \cdot \left(t\_2 \cdot \sin t\_4\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan t\_1 \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 8.00000000000000033e-215Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.5%
lift-*.f64N/A
*-commutativeN/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites43.3%
if 8.00000000000000033e-215 < a < 1.11999999999999998e-169Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.5%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6443.6
Applied rewrites43.6%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f6443.6
Applied rewrites43.6%
if 1.11999999999999998e-169 < a Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Applied rewrites47.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556))
(t_1 (- t_0))
(t_2 (* 0.005555555555555556 (* angle PI))))
(if (<= a 1.12e-169)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+
0.5
(fma
0.5
(cos (* 0.011111111111111112 (* angle PI)))
(/
(+
(cos (fma (fabs (* 0.005555555555555556 angle)) PI t_1))
(cos (- (fabs t_0) t_1)))
2.0))))
(* x-scale (* (cos t_2) (sin t_2))))))
PI))
(/ (* 180.0 (atan (* (tan t_0) (/ y-scale x-scale)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = -t_0;
double t_2 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (a <= 1.12e-169) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (0.5 + fma(0.5, cos((0.011111111111111112 * (angle * ((double) M_PI)))), ((cos(fma(fabs((0.005555555555555556 * angle)), ((double) M_PI), t_1)) + cos((fabs(t_0) - t_1))) / 2.0)))) / (x_45_scale * (cos(t_2) * sin(t_2)))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((tan(t_0) * (y_45_scale / x_45_scale)))) / ((double) M_PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = Float64(-t_0) t_2 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (a <= 1.12e-169) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(0.5 + fma(0.5, cos(Float64(0.011111111111111112 * Float64(angle * pi))), Float64(Float64(cos(fma(abs(Float64(0.005555555555555556 * angle)), pi, t_1)) + cos(Float64(abs(t_0) - t_1))) / 2.0)))) / Float64(x_45_scale * Float64(cos(t_2) * sin(t_2)))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(tan(t_0) * Float64(y_45_scale / x_45_scale)))) / pi); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = (-t$95$0)}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.12e-169], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(0.5 + N[(0.5 * N[Cos[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Cos[N[(N[Abs[N[(0.005555555555555556 * angle), $MachinePrecision]], $MachinePrecision] * Pi + t$95$1), $MachinePrecision]], $MachinePrecision] + N[Cos[N[(N[Abs[t$95$0], $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$2], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[Tan[t$95$0], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := -t\_0\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;a \leq 1.12 \cdot 10^{-169}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(0.5 + \mathsf{fma}\left(0.5, \cos \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right), \frac{\cos \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\right|, \pi, t\_1\right)\right) + \cos \left(\left|t\_0\right| - t\_1\right)}{2}\right)\right)}{x-scale \cdot \left(\cos t\_2 \cdot \sin t\_2\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan t\_0 \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 1.11999999999999998e-169Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.5%
lift-pow.f64N/A
unpow2N/A
lift-cos.f64N/A
cos-fabs-revN/A
lift-cos.f64N/A
cos-neg-revN/A
cos-multN/A
lower-/.f64N/A
Applied rewrites43.6%
if 1.11999999999999998e-169 < a Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Applied rewrites47.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= a 1.12e-169)
(*
180.0
(/
(atan (* -0.5 (/ (* y-scale 2.0) (* x-scale (* (cos t_0) (sin t_0))))))
PI))
(/
(*
180.0
(atan
(* (tan (* (* PI angle) 0.005555555555555556)) (/ y-scale x-scale))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (a <= 1.12e-169) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((tan(((((double) M_PI) * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale)))) / ((double) M_PI);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (a <= 1.12e-169) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (Math.cos(t_0) * Math.sin(t_0)))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((Math.tan(((Math.PI * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale)))) / Math.PI;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if a <= 1.12e-169: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (math.cos(t_0) * math.sin(t_0)))))) / math.pi) else: tmp = (180.0 * math.atan((math.tan(((math.pi * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale)))) / math.pi return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (a <= 1.12e-169) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / Float64(x_45_scale * Float64(cos(t_0) * sin(t_0)))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(tan(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(y_45_scale / x_45_scale)))) / pi); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (a <= 1.12e-169) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / pi); else tmp = (180.0 * atan((tan(((pi * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale)))) / pi; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.12e-169], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[Tan[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;a \leq 1.12 \cdot 10^{-169}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 1.11999999999999998e-169Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites43.5%
Taylor expanded in angle around 0
Applied rewrites43.1%
if 1.11999999999999998e-169 < a Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Applied rewrites47.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 2.6e-224)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))
(/
(*
180.0
(atan
(* (tan (* (* PI angle) 0.005555555555555556)) (/ y-scale x-scale))))
PI)))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 2.6e-224) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((tan(((((double) M_PI) * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale)))) / ((double) M_PI);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 2.6e-224) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((Math.tan(((Math.PI * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale)))) / Math.PI;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 2.6e-224: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) else: tmp = (180.0 * math.atan((math.tan(((math.pi * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale)))) / math.pi return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 2.6e-224) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(tan(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(y_45_scale / x_45_scale)))) / pi); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 2.6e-224) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); else tmp = (180.0 * atan((tan(((pi * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale)))) / pi; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 2.6e-224], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[Tan[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.6 \cdot 10^{-224}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 2.6000000000000002e-224Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites12.2%
lift-sqrt.f64N/A
sqrt-fabs-revN/A
lift-sqrt.f64N/A
lower-fabs.f6412.2
lift-sqrt.f64N/A
pow1/2N/A
lift-pow.f64N/A
unpow2N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
Applied rewrites12.7%
Applied rewrites15.5%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.1
Applied rewrites37.1%
if 2.6000000000000002e-224 < a Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Applied rewrites47.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 2.6e-224)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))
(*
(/
(atan (* (tan (* (* PI angle) 0.005555555555555556)) (/ y-scale x-scale)))
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 tmp;
if (a <= 2.6e-224) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = (atan((tan(((((double) M_PI) * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale))) / ((double) M_PI)) * 180.0;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 2.6e-224) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
} else {
tmp = (Math.atan((Math.tan(((Math.PI * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale))) / Math.PI) * 180.0;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 2.6e-224: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) else: tmp = (math.atan((math.tan(((math.pi * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale))) / math.pi) * 180.0 return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 2.6e-224) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); else tmp = Float64(Float64(atan(Float64(tan(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(y_45_scale / x_45_scale))) / pi) * 180.0); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 2.6e-224) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); else tmp = (atan((tan(((pi * angle) * 0.005555555555555556)) * (y_45_scale / x_45_scale))) / pi) * 180.0; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 2.6e-224], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[ArcTan[N[(N[Tan[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] * 180.0), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.6 \cdot 10^{-224}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\tan \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi} \cdot 180\\
\end{array}
\end{array}
if a < 2.6000000000000002e-224Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites12.2%
lift-sqrt.f64N/A
sqrt-fabs-revN/A
lift-sqrt.f64N/A
lower-fabs.f6412.2
lift-sqrt.f64N/A
pow1/2N/A
lift-pow.f64N/A
unpow2N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
Applied rewrites12.7%
Applied rewrites15.5%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.1
Applied rewrites37.1%
if 2.6000000000000002e-224 < a Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Applied rewrites47.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.8e+100)
(*
180.0
(/
(atan (/ (* y-scale (sin (* 0.005555555555555556 (* angle PI)))) x-scale))
PI))
(* 180.0 (/ (atan (* -180.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.8e+100) {
tmp = 180.0 * (atan(((y_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / x_45_scale)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.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.8e+100) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / x_45_scale)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.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.8e+100: tmp = 180.0 * (math.atan(((y_45_scale * math.sin((0.005555555555555556 * (angle * math.pi)))) / x_45_scale)) / math.pi) else: tmp = 180.0 * (math.atan((-180.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.8e+100) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / x_45_scale)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.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.8e+100) tmp = 180.0 * (atan(((y_45_scale * sin((0.005555555555555556 * (angle * pi)))) / x_45_scale)) / pi); else tmp = 180.0 * (atan((-180.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.8e+100], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.8 \cdot 10^{+100}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.8e100Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Taylor expanded in angle around 0
Applied rewrites45.2%
if 1.8e100 < b Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites12.2%
lift-sqrt.f64N/A
sqrt-fabs-revN/A
lift-sqrt.f64N/A
lower-fabs.f6412.2
lift-sqrt.f64N/A
pow1/2N/A
lift-pow.f64N/A
unpow2N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
Applied rewrites12.7%
Applied rewrites15.5%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.1
Applied rewrites37.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 480000000.0)
(*
180.0
(/
(atan (* 0.005555555555555556 (/ (* angle (* y-scale PI)) x-scale)))
PI))
(* 180.0 (/ (atan (* -180.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 <= 480000000.0) {
tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * ((double) M_PI))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.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 <= 480000000.0) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * ((angle * (y_45_scale * Math.PI)) / x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.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 <= 480000000.0: tmp = 180.0 * (math.atan((0.005555555555555556 * ((angle * (y_45_scale * math.pi)) / x_45_scale))) / math.pi) else: tmp = 180.0 * (math.atan((-180.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 <= 480000000.0) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(Float64(angle * Float64(y_45_scale * pi)) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.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 <= 480000000.0) tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * pi)) / x_45_scale))) / pi); else tmp = 180.0 * (atan((-180.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, 480000000.0], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 480000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.8e8Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6440.7
Applied rewrites40.7%
if 4.8e8 < b Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites12.2%
lift-sqrt.f64N/A
sqrt-fabs-revN/A
lift-sqrt.f64N/A
lower-fabs.f6412.2
lift-sqrt.f64N/A
pow1/2N/A
lift-pow.f64N/A
unpow2N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
Applied rewrites12.7%
Applied rewrites15.5%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.1
Applied rewrites37.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 3.2e+99)
(*
180.0
(/
(atan (* 0.005555555555555556 (/ (* angle (* y-scale PI)) x-scale)))
PI))
(* 180.0 (/ (atan (* -90.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 <= 3.2e+99) {
tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * ((double) M_PI))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.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 <= 3.2e+99) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * ((angle * (y_45_scale * Math.PI)) / x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.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 <= 3.2e+99: tmp = 180.0 * (math.atan((0.005555555555555556 * ((angle * (y_45_scale * math.pi)) / x_45_scale))) / math.pi) else: tmp = 180.0 * (math.atan((-90.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 <= 3.2e+99) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(Float64(angle * Float64(y_45_scale * pi)) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.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 <= 3.2e+99) tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * pi)) / x_45_scale))) / pi); else tmp = 180.0 * (atan((-90.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, 3.2e+99], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 3.2 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.19999999999999999e99Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6440.7
Applied rewrites40.7%
if 3.19999999999999999e99 < b Initial program 13.4%
Taylor expanded in angle around 0
Applied rewrites12.2%
lift-sqrt.f64N/A
sqrt-fabs-revN/A
lift-sqrt.f64N/A
lower-fabs.f6412.2
lift-sqrt.f64N/A
pow1/2N/A
lift-pow.f64N/A
unpow2N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
Applied rewrites12.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6433.9
Applied rewrites33.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* 0.005555555555555556 (/ (* angle (* y-scale PI)) x-scale))) 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.005555555555555556 * ((angle * (y_45_scale * ((double) M_PI))) / x_45_scale))) / ((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.005555555555555556 * ((angle * (y_45_scale * Math.PI)) / x_45_scale))) / 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.005555555555555556 * ((angle * (y_45_scale * math.pi)) / x_45_scale))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(Float64(angle * Float64(y_45_scale * pi)) / x_45_scale))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * pi)) / x_45_scale))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}
\end{array}
Initial program 13.4%
Taylor expanded in x-scale around 0
Applied rewrites23.4%
Applied rewrites26.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites45.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6440.7
Applied rewrites40.7%
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.4%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites6.9%
Taylor expanded in y-scale around 0
Applied rewrites19.1%
herbie shell --seed 2025149
(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)))