
(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 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (cos t_0)))
(if (<= b_m 7e+33)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 t_2))) PI))
(if (<= b_m 1e+117)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(fma 2.0 (pow (* a t_1) 2.0) (* 2.0 (pow (* b_m t_2) 2.0))))
(* x-scale (* t_2 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
-1.0
(/
(* y-scale (pow t_2 2.0))
(*
x-scale
(*
t_1
(sin (fma 0.005555555555555556 (* angle PI) (* 0.5 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.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = cos(t_0);
double tmp;
if (b_m <= 7e+33) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / t_2))) / ((double) M_PI));
} else if (b_m <= 1e+117) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * fma(2.0, pow((a * t_1), 2.0), (2.0 * pow((b_m * t_2), 2.0)))) / (x_45_scale * (t_2 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 * ((y_45_scale * pow(t_2, 2.0)) / (x_45_scale * (t_1 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((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(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 7e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / t_2))) / pi)); elseif (b_m <= 1e+117) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * fma(2.0, (Float64(a * t_1) ^ 2.0), Float64(2.0 * (Float64(b_m * t_2) ^ 2.0)))) / Float64(x_45_scale * Float64(t_2 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 * Float64(Float64(y_45_scale * (t_2 ^ 2.0)) / Float64(x_45_scale * Float64(t_1 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * 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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 7e+33], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1e+117], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 * N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[(2.0 * N[Power[N[(b$95$m * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 * N[(N[(y$45$scale * N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 7 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 10^{+117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \mathsf{fma}\left(2, {\left(a \cdot t\_1\right)}^{2}, 2 \cdot {\left(b\_m \cdot t\_2\right)}^{2}\right)}{x-scale \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{y-scale \cdot {t\_2}^{2}}{x-scale \cdot \left(t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.0000000000000002e33Initial program 17.3%
Taylor expanded in x-scale around 0
Applied rewrites36.9%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites55.1%
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites57.1%
if 7.0000000000000002e33 < b < 1.00000000000000005e117Initial program 22.7%
Taylor expanded in x-scale around 0
Applied rewrites46.7%
if 1.00000000000000005e117 < b Initial program 3.8%
Taylor expanded in b around inf
Applied rewrites28.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites58.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6458.9
Applied rewrites58.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6459.0
Applied rewrites59.0%
Taylor expanded in x-scale around 0
Applied rewrites58.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (cos t_0)))
(if (<= b_m 7e+33)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 t_2))) PI))
(if (<= b_m 9.5e+116)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(fma 2.0 (pow (* a t_1) 2.0) (* 2.0 (pow (* b_m 1.0) 2.0))))
(* x-scale (* 1.0 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
-1.0
(/
(* y-scale (pow t_2 2.0))
(*
x-scale
(*
t_1
(sin (fma 0.005555555555555556 (* angle PI) (* 0.5 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.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = cos(t_0);
double tmp;
if (b_m <= 7e+33) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / t_2))) / ((double) M_PI));
} else if (b_m <= 9.5e+116) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * fma(2.0, pow((a * t_1), 2.0), (2.0 * pow((b_m * 1.0), 2.0)))) / (x_45_scale * (1.0 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 * ((y_45_scale * pow(t_2, 2.0)) / (x_45_scale * (t_1 * sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((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(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 7e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / t_2))) / pi)); elseif (b_m <= 9.5e+116) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * fma(2.0, (Float64(a * t_1) ^ 2.0), Float64(2.0 * (Float64(b_m * 1.0) ^ 2.0)))) / Float64(x_45_scale * Float64(1.0 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 * Float64(Float64(y_45_scale * (t_2 ^ 2.0)) / Float64(x_45_scale * Float64(t_1 * sin(fma(0.005555555555555556, Float64(angle * pi), Float64(0.5 * 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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 7e+33], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9.5e+116], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 * N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[(2.0 * N[Power[N[(b$95$m * 1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(1.0 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 * N[(N[(y$45$scale * N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 7 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 9.5 \cdot 10^{+116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \mathsf{fma}\left(2, {\left(a \cdot t\_1\right)}^{2}, 2 \cdot {\left(b\_m \cdot 1\right)}^{2}\right)}{x-scale \cdot \left(1 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{y-scale \cdot {t\_2}^{2}}{x-scale \cdot \left(t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.0000000000000002e33Initial program 17.3%
Taylor expanded in x-scale around 0
Applied rewrites36.9%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites55.1%
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites57.1%
if 7.0000000000000002e33 < b < 9.5000000000000004e116Initial program 22.7%
Taylor expanded in x-scale around 0
Applied rewrites46.7%
Taylor expanded in angle around 0
Applied rewrites46.5%
Taylor expanded in angle around 0
Applied rewrites47.5%
if 9.5000000000000004e116 < b Initial program 3.8%
Taylor expanded in b around inf
Applied rewrites28.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites58.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6458.9
Applied rewrites58.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6459.0
Applied rewrites59.0%
Taylor expanded in x-scale around 0
Applied rewrites58.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= b_m 7e+33)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 (cos t_0)))) PI))
(if (<= b_m 9.5e+116)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(fma 2.0 (pow (* a t_1) 2.0) (* 2.0 (pow (* b_m 1.0) 2.0))))
(* x-scale (* 1.0 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(* -2.0 (/ y-scale x-scale))
(* (sin (fma 0.005555555555555556 (* angle PI) (/ PI 2.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 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (b_m <= 7e+33) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_0)))) / ((double) M_PI));
} else if (b_m <= 9.5e+116) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * fma(2.0, pow((a * t_1), 2.0), (2.0 * pow((b_m * 1.0), 2.0)))) / (x_45_scale * (1.0 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (((double) M_PI) / 2.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 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 7e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / cos(t_0)))) / pi)); elseif (b_m <= 9.5e+116) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * fma(2.0, (Float64(a * t_1) ^ 2.0), Float64(2.0 * (Float64(b_m * 1.0) ^ 2.0)))) / Float64(x_45_scale * Float64(1.0 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(sin(fma(0.005555555555555556, Float64(angle * pi), Float64(pi / 2.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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 7e+33], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9.5e+116], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 * N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[(2.0 * N[Power[N[(b$95$m * 1.0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(1.0 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $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.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 7 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{\cos t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 9.5 \cdot 10^{+116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \mathsf{fma}\left(2, {\left(a \cdot t\_1\right)}^{2}, 2 \cdot {\left(b\_m \cdot 1\right)}^{2}\right)}{x-scale \cdot \left(1 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, \frac{\pi}{2}\right)\right) \cdot t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.0000000000000002e33Initial program 17.3%
Taylor expanded in x-scale around 0
Applied rewrites36.9%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites55.1%
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites57.1%
if 7.0000000000000002e33 < b < 9.5000000000000004e116Initial program 22.7%
Taylor expanded in x-scale around 0
Applied rewrites46.7%
Taylor expanded in angle around 0
Applied rewrites46.5%
Taylor expanded in angle around 0
Applied rewrites47.5%
if 9.5000000000000004e116 < b Initial program 3.8%
Taylor expanded in b around inf
Applied rewrites28.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites58.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6458.9
Applied rewrites58.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6459.0
Applied rewrites59.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6458.3
Applied rewrites58.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (cos t_0)))
(if (<= b_m 3.35e-28)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 t_2))) PI))
(if (<= b_m 1e+117)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (* 2.0 (* b_m b_m)))
(* x-scale (* t_2 (* t_1 (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(* -2.0 (/ y-scale x-scale))
(* (sin (fma 0.005555555555555556 (* angle PI) (/ PI 2.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 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = cos(t_0);
double tmp;
if (b_m <= 3.35e-28) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / t_2))) / ((double) M_PI));
} else if (b_m <= 1e+117) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 * (b_m * b_m))) / (x_45_scale * (t_2 * (t_1 * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (((double) M_PI) / 2.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 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 3.35e-28) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / t_2))) / pi)); elseif (b_m <= 1e+117) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(2.0 * Float64(b_m * b_m))) / Float64(x_45_scale * Float64(t_2 * Float64(t_1 * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(sin(fma(0.005555555555555556, Float64(angle * pi), Float64(pi / 2.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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 3.35e-28], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1e+117], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * N[(t$95$1 * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $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.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 3.35 \cdot 10^{-28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 10^{+117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(2 \cdot \left(b\_m \cdot b\_m\right)\right)}{x-scale \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, \frac{\pi}{2}\right)\right) \cdot t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.35000000000000011e-28Initial program 15.3%
Taylor expanded in x-scale around 0
Applied rewrites34.3%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites57.0%
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites59.1%
if 3.35000000000000011e-28 < b < 1.00000000000000005e117Initial program 24.1%
Taylor expanded in x-scale around 0
Applied rewrites47.4%
Taylor expanded in angle around 0
lower-*.f64N/A
pow2N/A
lift-*.f6448.9
Applied rewrites48.9%
if 1.00000000000000005e117 < b Initial program 3.8%
Taylor expanded in b around inf
Applied rewrites28.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites58.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6458.9
Applied rewrites58.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6459.0
Applied rewrites59.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6458.3
Applied rewrites58.3%
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)))
(if (<= b_m 1.35e+33)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 (cos t_0)))) PI))
(*
180.0
(/
(atan
(*
0.5
(/
(* -2.0 (/ y-scale x-scale))
(* (sin (fma 0.005555555555555556 (* angle PI) (/ PI 2.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 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (b_m <= 1.35e+33) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (sin(fma(0.005555555555555556, (angle * ((double) M_PI)), (((double) M_PI) / 2.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 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 1.35e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / cos(t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(sin(fma(0.005555555555555556, Float64(angle * pi), Float64(pi / 2.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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e+33], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $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.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{\cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \pi, \frac{\pi}{2}\right)\right) \cdot t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999996e33Initial program 17.2%
Taylor expanded in x-scale around 0
Applied rewrites36.8%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites55.1%
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites57.2%
if 1.34999999999999996e33 < b Initial program 9.4%
Taylor expanded in b around inf
Applied rewrites27.8%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites56.6%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6456.6
Applied rewrites56.6%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6456.8
Applied rewrites56.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f6456.2
Applied rewrites56.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sin (* 0.005555555555555556 (* angle PI)))))
(if (<= b_m 1.35e-23)
(* 180.0 (/ (atan (/ (* y-scale t_0) x-scale)) PI))
(if (<= b_m 5.5e+74)
(*
180.0
(/
(atan
(*
-180.0
(/
(* (* b_m b_m) y-scale)
(* angle (* x-scale (* PI (- (* b_m b_m) (* a a))))))))
PI))
(*
180.0
(/ (atan (* 0.5 (/ (* -2.0 (/ y-scale 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 tmp;
if (b_m <= 1.35e-23) {
tmp = 180.0 * (atan(((y_45_scale * t_0) / x_45_scale)) / ((double) M_PI));
} else if (b_m <= 5.5e+74) {
tmp = 180.0 * (atan((-180.0 * (((b_m * b_m) * y_45_scale) / (angle * (x_45_scale * (((double) M_PI) * ((b_m * b_m) - (a * a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_0)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.sin((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (b_m <= 1.35e-23) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_0) / x_45_scale)) / Math.PI);
} else if (b_m <= 5.5e+74) {
tmp = 180.0 * (Math.atan((-180.0 * (((b_m * b_m) * y_45_scale) / (angle * (x_45_scale * (Math.PI * ((b_m * b_m) - (a * a)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_0)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.sin((0.005555555555555556 * (angle * math.pi))) tmp = 0 if b_m <= 1.35e-23: tmp = 180.0 * (math.atan(((y_45_scale * t_0) / x_45_scale)) / math.pi) elif b_m <= 5.5e+74: tmp = 180.0 * (math.atan((-180.0 * (((b_m * b_m) * y_45_scale) / (angle * (x_45_scale * (math.pi * ((b_m * b_m) - (a * a)))))))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_0)))) / math.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))) tmp = 0.0 if (b_m <= 1.35e-23) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_0) / x_45_scale)) / pi)); elseif (b_m <= 5.5e+74) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(Float64(b_m * b_m) * y_45_scale) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(1.0 * t_0)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = sin((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (b_m <= 1.35e-23) tmp = 180.0 * (atan(((y_45_scale * t_0) / x_45_scale)) / pi); elseif (b_m <= 5.5e+74) tmp = 180.0 * (atan((-180.0 * (((b_m * b_m) * y_45_scale) / (angle * (x_45_scale * (pi * ((b_m * b_m) - (a * a)))))))) / pi); else tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_0)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 1.35e-23], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$0), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.5e+74], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$0), $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)\\
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-23}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_0}{x-scale}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+74}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\left(b\_m \cdot b\_m\right) \cdot y-scale}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{1 \cdot t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999992e-23Initial program 15.4%
Taylor expanded in x-scale around 0
Applied rewrites34.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites57.0%
Taylor expanded in angle around 0
Applied rewrites56.8%
if 1.34999999999999992e-23 < b < 5.5000000000000003e74Initial program 26.0%
Taylor expanded in angle around 0
Applied rewrites25.8%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
pow2N/A
lift-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6445.2
Applied rewrites45.2%
if 5.5000000000000003e74 < b Initial program 6.7%
Taylor expanded in b around inf
Applied rewrites27.8%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites57.5%
Taylor expanded in angle around 0
Applied rewrites56.9%
Taylor expanded in angle around 0
Applied rewrites56.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= b_m 7e+33)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 (cos t_0)))) PI))
(*
180.0
(/ (atan (* 0.5 (/ (* -2.0 (/ y-scale x-scale)) (* 1.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 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (b_m <= 7e+33) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_1)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double tmp;
if (b_m <= 7e+33) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_1 / Math.cos(t_0)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_1)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) tmp = 0 if b_m <= 7e+33: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (t_1 / math.cos(t_0)))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_1)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 7e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / cos(t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(1.0 * t_1)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); tmp = 0.0; if (b_m <= 7e+33) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_0)))) / pi); else tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_1)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 7e+33], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$1), $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\\
\mathbf{if}\;b\_m \leq 7 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{\cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{1 \cdot t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.0000000000000002e33Initial program 17.3%
Taylor expanded in x-scale around 0
Applied rewrites36.9%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites55.1%
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites57.1%
if 7.0000000000000002e33 < b Initial program 9.3%
Taylor expanded in b around inf
Applied rewrites27.8%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites56.5%
Taylor expanded in angle around 0
Applied rewrites56.1%
Taylor expanded in angle around 0
Applied rewrites55.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= b_m 7e+33)
(* 180.0 (/ (atan (/ (* y-scale t_1) (* x-scale (cos t_0)))) PI))
(*
180.0
(/ (atan (* 0.5 (/ (* -2.0 (/ y-scale x-scale)) (* 1.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 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (b_m <= 7e+33) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * cos(t_0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_1)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double tmp;
if (b_m <= 7e+33) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * Math.cos(t_0)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_1)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) tmp = 0 if b_m <= 7e+33: tmp = 180.0 * (math.atan(((y_45_scale * t_1) / (x_45_scale * math.cos(t_0)))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_1)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 7e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * cos(t_0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(1.0 * t_1)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); tmp = 0.0; if (b_m <= 7e+33) tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * cos(t_0)))) / pi); else tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (1.0 * t_1)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 7e+33], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(1.0 * t$95$1), $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\\
\mathbf{if}\;b\_m \leq 7 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{1 \cdot t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.0000000000000002e33Initial program 17.3%
Taylor expanded in x-scale around 0
Applied rewrites36.9%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites55.1%
if 7.0000000000000002e33 < b Initial program 9.3%
Taylor expanded in b around inf
Applied rewrites27.8%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites56.5%
Taylor expanded in angle around 0
Applied rewrites56.1%
Taylor expanded in angle around 0
Applied rewrites55.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.35e-23)
(*
180.0
(/
(atan (/ (* y-scale (sin (* 0.005555555555555556 (* angle PI)))) x-scale))
PI))
(if (<= b_m 2.6e+109)
(*
180.0
(/
(atan
(*
-180.0
(/
(* (* b_m b_m) y-scale)
(* angle (* x-scale (* PI (- (* b_m b_m) (* a a))))))))
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.35e-23) {
tmp = 180.0 * (atan(((y_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / x_45_scale)) / ((double) M_PI));
} else if (b_m <= 2.6e+109) {
tmp = 180.0 * (atan((-180.0 * (((b_m * b_m) * y_45_scale) / (angle * (x_45_scale * (((double) M_PI) * ((b_m * b_m) - (a * a)))))))) / ((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.35e-23) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / x_45_scale)) / Math.PI);
} else if (b_m <= 2.6e+109) {
tmp = 180.0 * (Math.atan((-180.0 * (((b_m * b_m) * y_45_scale) / (angle * (x_45_scale * (Math.PI * ((b_m * b_m) - (a * a)))))))) / 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.35e-23: tmp = 180.0 * (math.atan(((y_45_scale * math.sin((0.005555555555555556 * (angle * math.pi)))) / x_45_scale)) / math.pi) elif b_m <= 2.6e+109: tmp = 180.0 * (math.atan((-180.0 * (((b_m * b_m) * y_45_scale) / (angle * (x_45_scale * (math.pi * ((b_m * b_m) - (a * a)))))))) / 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.35e-23) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / x_45_scale)) / pi)); elseif (b_m <= 2.6e+109) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(Float64(b_m * b_m) * y_45_scale) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-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.35e-23) tmp = 180.0 * (atan(((y_45_scale * sin((0.005555555555555556 * (angle * pi)))) / x_45_scale)) / pi); elseif (b_m <= 2.6e+109) tmp = 180.0 * (atan((-180.0 * (((b_m * b_m) * y_45_scale) / (angle * (x_45_scale * (pi * ((b_m * b_m) - (a * a)))))))) / 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.35e-23], 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], If[LessEqual[b$95$m, 2.6e+109], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-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.35 \cdot 10^{-23}:\\
\;\;\;\;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{elif}\;b\_m \leq 2.6 \cdot 10^{+109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\left(b\_m \cdot b\_m\right) \cdot y-scale}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.34999999999999992e-23Initial program 15.4%
Taylor expanded in x-scale around 0
Applied rewrites34.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites57.0%
Taylor expanded in angle around 0
Applied rewrites56.8%
if 1.34999999999999992e-23 < b < 2.5999999999999998e109Initial program 24.8%
Taylor expanded in angle around 0
Applied rewrites25.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
pow2N/A
lift-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6444.8
Applied rewrites44.8%
if 2.5999999999999998e109 < b Initial program 4.2%
Taylor expanded in angle around 0
Applied rewrites5.1%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6452.1
Applied rewrites52.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 1.05e-30)
(*
180.0
(/
(atan
(*
0.5
(/ (* -2.0 (/ y-scale x-scale)) (* 0.005555555555555556 (* angle PI)))))
PI))
(*
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) {
double tmp;
if (a <= 1.05e-30) {
tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * ((double) M_PI))) / 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 <= 1.05e-30) {
tmp = 180.0 * (Math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (0.005555555555555556 * (angle * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.005555555555555556 * ((angle * (y_45_scale * Math.PI)) / 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 <= 1.05e-30: tmp = 180.0 * (math.atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (0.005555555555555556 * (angle * math.pi))))) / math.pi) else: tmp = 180.0 * (math.atan((0.005555555555555556 * ((angle * (y_45_scale * math.pi)) / 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 <= 1.05e-30) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(-2.0 * Float64(y_45_scale / x_45_scale)) / Float64(0.005555555555555556 * Float64(angle * pi))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(Float64(angle * Float64(y_45_scale * pi)) / 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 <= 1.05e-30) tmp = 180.0 * (atan((0.5 * ((-2.0 * (y_45_scale / x_45_scale)) / (0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * pi)) / 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, 1.05e-30], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.05 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{-2 \cdot \frac{y-scale}{x-scale}}{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 1.0500000000000001e-30Initial program 15.6%
Taylor expanded in b around inf
Applied rewrites24.7%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites48.4%
Taylor expanded in angle around 0
Applied rewrites48.2%
Taylor expanded in angle around 0
sin-+PI/2-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6442.2
Applied rewrites42.2%
if 1.0500000000000001e-30 < a Initial program 9.0%
Taylor expanded in x-scale around 0
Applied rewrites27.1%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites55.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6450.0
Applied rewrites50.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 6.8e-31)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))
(*
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) {
double tmp;
if (a <= 6.8e-31) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * ((double) M_PI))) / 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 <= 6.8e-31) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.005555555555555556 * ((angle * (y_45_scale * Math.PI)) / 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 <= 6.8e-31: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) else: tmp = 180.0 * (math.atan((0.005555555555555556 * ((angle * (y_45_scale * math.pi)) / 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 <= 6.8e-31) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(Float64(angle * Float64(y_45_scale * pi)) / 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 <= 6.8e-31) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); else tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * pi)) / 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, 6.8e-31], 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[(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|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.8 \cdot 10^{-31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 6.8000000000000002e-31Initial program 15.6%
Taylor expanded in angle around 0
Applied rewrites13.5%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6440.9
Applied rewrites40.9%
if 6.8000000000000002e-31 < a Initial program 9.1%
Taylor expanded in x-scale around 0
Applied rewrites27.1%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites55.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6449.9
Applied rewrites49.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.8%
Taylor expanded in x-scale around 0
Applied rewrites29.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites45.3%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6440.5
Applied rewrites40.5%
herbie shell --seed 2025117
(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)))