
(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}
Sampling outcomes in binary64 precision:
Herbie found 14 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 (* 0.005555555555555556 (* angle PI)))))
(if (<= b_m 6.1e-30)
(* 180.0 (/ (atan (* (/ y-scale x-scale) t_0)) PI))
(if (or (<= b_m 14.6) (not (<= b_m 3.3e+46)))
(*
180.0
(/ (atan (* -0.5 (* y-scale (* 2.0 (/ 1.0 (* x-scale t_0)))))) PI))
(/
(*
180.0
(atan
(*
(/ y-scale x-scale)
(tan (* 0.005555555555555556 (* angle (* (sqrt PI) (sqrt 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 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (b_m <= 6.1e-30) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * t_0)) / ((double) M_PI));
} else if ((b_m <= 14.6) || !(b_m <= 3.3e+46)) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * t_0)))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * (sqrt(((double) M_PI)) * sqrt(((double) M_PI))))))))) / ((double) M_PI);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.sin((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (b_m <= 6.1e-30) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * t_0)) / Math.PI);
} else if ((b_m <= 14.6) || !(b_m <= 3.3e+46)) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * t_0)))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * (Math.sqrt(Math.PI) * Math.sqrt(Math.PI)))))))) / Math.PI;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.sin((0.005555555555555556 * (angle * math.pi))) tmp = 0 if b_m <= 6.1e-30: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * t_0)) / math.pi) elif (b_m <= 14.6) or not (b_m <= 3.3e+46): tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * t_0)))))) / math.pi) else: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * (math.sqrt(math.pi) * math.sqrt(math.pi)))))))) / 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 <= 6.1e-30) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * t_0)) / pi)); elseif ((b_m <= 14.6) || !(b_m <= 3.3e+46)) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(1.0 / Float64(x_45_scale * t_0)))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(pi) * sqrt(pi)))))))) / pi); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = sin((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (b_m <= 6.1e-30) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * t_0)) / pi); elseif ((b_m <= 14.6) || ~((b_m <= 3.3e+46))) tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * t_0)))))) / pi); else tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * (sqrt(pi) * sqrt(pi)))))))) / pi; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 6.1e-30], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b$95$m, 14.6], N[Not[LessEqual[b$95$m, 3.3e+46]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(1.0 / N[(x$45$scale * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 6.1 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot t\_0\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 14.6 \lor \neg \left(b\_m \leq 3.3 \cdot 10^{+46}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{1}{x-scale \cdot t\_0}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 6.09999999999999981e-30Initial program 12.0%
Simplified13.6%
Taylor expanded in x-scale around 0 25.0%
Simplified29.6%
Taylor expanded in a around inf 50.6%
times-frac52.8%
Simplified52.8%
Taylor expanded in angle around 0 53.3%
if 6.09999999999999981e-30 < b < 14.5999999999999996 or 3.2999999999999998e46 < b Initial program 16.1%
Simplified12.8%
Taylor expanded in x-scale around 0 32.4%
Simplified32.5%
Taylor expanded in a around 0 67.5%
Taylor expanded in angle around 0 74.4%
if 14.5999999999999996 < b < 3.2999999999999998e46Initial program 0.4%
Simplified0.6%
Taylor expanded in x-scale around 0 3.0%
Simplified3.6%
Taylor expanded in a around inf 73.7%
times-frac73.7%
Simplified73.7%
associate-*r/73.7%
quot-tan73.7%
Applied egg-rr73.7%
add-sqr-sqrt15.9%
Applied egg-rr74.9%
Final simplification59.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (cos (* 0.005555555555555556 (* angle PI))))
(t_1 (sin (* 0.005555555555555556 (* angle (* (sqrt PI) (sqrt PI)))))))
(if (<= a 2.6e-35)
(*
180.0
(/ (atan (* -0.5 (* y-scale (* 2.0 (/ t_0 (* x-scale t_1)))))) PI))
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 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 = cos((0.005555555555555556 * (angle * ((double) M_PI))));
double t_1 = sin((0.005555555555555556 * (angle * (sqrt(((double) M_PI)) * sqrt(((double) M_PI))))));
double tmp;
if (a <= 2.6e-35) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (t_0 / (x_45_scale * t_1)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / 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.cos((0.005555555555555556 * (angle * Math.PI)));
double t_1 = Math.sin((0.005555555555555556 * (angle * (Math.sqrt(Math.PI) * Math.sqrt(Math.PI)))));
double tmp;
if (a <= 2.6e-35) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (t_0 / (x_45_scale * t_1)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_1 / 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.cos((0.005555555555555556 * (angle * math.pi))) t_1 = math.sin((0.005555555555555556 * (angle * (math.sqrt(math.pi) * math.sqrt(math.pi))))) tmp = 0 if a <= 2.6e-35: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (t_0 / (x_45_scale * t_1)))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (t_1 / t_0))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = cos(Float64(0.005555555555555556 * Float64(angle * pi))) t_1 = sin(Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(pi) * sqrt(pi))))) tmp = 0.0 if (a <= 2.6e-35) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(t_0 / Float64(x_45_scale * t_1)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / 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 = cos((0.005555555555555556 * (angle * pi))); t_1 = sin((0.005555555555555556 * (angle * (sqrt(pi) * sqrt(pi))))); tmp = 0.0; if (a <= 2.6e-35) tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (t_0 / (x_45_scale * t_1)))))) / pi); else tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / 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[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a, 2.6e-35], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(t$95$0 / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
t_1 := \sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\right)\\
\mathbf{if}\;a \leq 2.6 \cdot 10^{-35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{t\_0}{x-scale \cdot t\_1}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if a < 2.60000000000000005e-35Initial program 13.7%
Simplified14.3%
Taylor expanded in x-scale around 0 28.4%
Simplified31.0%
Taylor expanded in a around 0 49.5%
add-sqr-sqrt51.8%
Applied egg-rr51.8%
if 2.60000000000000005e-35 < a Initial program 10.2%
Simplified9.9%
Taylor expanded in x-scale around 0 20.7%
Simplified25.5%
Taylor expanded in a around inf 54.6%
times-frac56.2%
Simplified56.2%
add-sqr-sqrt27.6%
Applied egg-rr58.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle (cbrt (pow PI 3.0))))))
(if (<= a 6.5e+16)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
2.0
(/
(cos t_0)
(* x-scale (sin (* 0.005555555555555556 (* angle PI)))))))))
PI))
(/ (* 180.0 (atan (* (/ y-scale x-scale) (tan 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 = 0.005555555555555556 * (angle * cbrt(pow(((double) M_PI), 3.0)));
double tmp;
if (a <= 6.5e+16) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos(t_0) / (x_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI)))))))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(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 = 0.005555555555555556 * (angle * Math.cbrt(Math.pow(Math.PI, 3.0)));
double tmp;
if (a <= 6.5e+16) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (Math.cos(t_0) / (x_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI))))))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0)))) / 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 * cbrt((pi ^ 3.0)))) tmp = 0.0 if (a <= 6.5e+16) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(cos(t_0) / Float64(x_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi))))))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(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[(0.005555555555555556 * N[(angle * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 6.5e+16], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(N[Cos[t$95$0], $MachinePrecision] / N[(x$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $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 \sqrt[3]{{\pi}^{3}}\right)\\
\mathbf{if}\;a \leq 6.5 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{\cos t\_0}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\end{array}
\end{array}
if a < 6.5e16Initial program 15.1%
Simplified15.7%
Taylor expanded in x-scale around 0 29.0%
Simplified32.0%
Taylor expanded in a around 0 49.0%
add-cbrt-cube51.8%
unpow251.8%
Applied egg-rr51.8%
unpow251.8%
unpow351.8%
Simplified51.8%
if 6.5e16 < a Initial program 5.9%
Simplified5.6%
Taylor expanded in x-scale around 0 17.9%
Simplified22.1%
Taylor expanded in a around inf 57.0%
times-frac58.9%
Simplified58.9%
associate-*r/59.1%
quot-tan59.1%
Applied egg-rr59.1%
add-cbrt-cube28.5%
unpow228.5%
Applied egg-rr59.3%
unpow228.5%
unpow328.5%
Simplified59.3%
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.4e+46)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
t_0
(cos (* 0.005555555555555556 (* angle (* (sqrt PI) (sqrt PI))))))))
PI))
(*
180.0
(/ (atan (* -0.5 (* y-scale (* 2.0 (/ 1.0 (* x-scale 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.4e+46) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_0 / cos((0.005555555555555556 * (angle * (sqrt(((double) M_PI)) * sqrt(((double) M_PI))))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * 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.4e+46) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_0 / Math.cos((0.005555555555555556 * (angle * (Math.sqrt(Math.PI) * Math.sqrt(Math.PI)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * 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.4e+46: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (t_0 / math.cos((0.005555555555555556 * (angle * (math.sqrt(math.pi) * math.sqrt(math.pi)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * 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.4e+46) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_0 / cos(Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(pi) * sqrt(pi)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(1.0 / Float64(x_45_scale * 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.4e+46) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_0 / cos((0.005555555555555556 * (angle * (sqrt(pi) * sqrt(pi)))))))) / pi); else tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * 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.4e+46], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$0 / N[Cos[N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(1.0 / N[(x$45$scale * t$95$0), $MachinePrecision]), $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)\\
\mathbf{if}\;b\_m \leq 1.4 \cdot 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_0}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{1}{x-scale \cdot t\_0}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.40000000000000009e46Initial program 12.8%
Simplified14.7%
Taylor expanded in x-scale around 0 26.0%
Simplified30.2%
Taylor expanded in a around inf 51.0%
times-frac53.0%
Simplified53.0%
add-sqr-sqrt36.2%
Applied egg-rr53.8%
if 1.40000000000000009e46 < b Initial program 11.8%
Simplified5.9%
Taylor expanded in x-scale around 0 25.7%
Simplified25.7%
Taylor expanded in a around 0 67.8%
Taylor expanded in angle around 0 72.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 3.6e+46)
(/ (* 180.0 (atan (* (/ y-scale x-scale) (tan t_0)))) PI)
(*
180.0
(/
(atan (* -0.5 (* y-scale (* 2.0 (/ 1.0 (* x-scale (sin 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 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 3.6e+46) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * sin(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 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 3.6e+46) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * Math.sin(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 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 3.6e+46: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan(t_0)))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * math.sin(t_0))))))) / 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 (b_m <= 3.6e+46) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(1.0 / Float64(x_45_scale * sin(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 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 3.6e+46) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / pi; else tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (x_45_scale * sin(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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.6e+46], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(1.0 / N[(x$45$scale * N[Sin[t$95$0], $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)\\
\mathbf{if}\;b\_m \leq 3.6 \cdot 10^{+46}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{1}{x-scale \cdot \sin t\_0}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.5999999999999999e46Initial program 12.8%
Simplified14.7%
Taylor expanded in x-scale around 0 26.0%
Simplified30.2%
Taylor expanded in a around inf 51.0%
times-frac53.0%
Simplified53.0%
associate-*r/53.1%
quot-tan53.1%
Applied egg-rr53.1%
if 3.5999999999999999e46 < b Initial program 11.8%
Simplified5.9%
Taylor expanded in x-scale around 0 25.7%
Simplified25.7%
Taylor expanded in a around 0 67.8%
Taylor expanded in angle around 0 72.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.7e+63)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI))))))
PI)
(*
180.0
(/ (atan (* -0.5 (/ (* y-scale 360.0) (* angle (* 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 (b_m <= 4.7e+63) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI))))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 360.0) / (angle * (((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 (b_m <= 4.7e+63) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI)))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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 b_m <= 4.7e+63: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi)))))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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 (b_m <= 4.7e+63) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi)))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 360.0) / Float64(angle * Float64(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 (b_m <= 4.7e+63) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi)))))) / pi; else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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[b$95$m, 4.7e+63], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 360.0), $MachinePrecision] / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.7 \cdot 10^{+63}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 360}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.7000000000000003e63Initial program 12.7%
Simplified14.5%
Taylor expanded in x-scale around 0 25.7%
Simplified29.9%
Taylor expanded in a around inf 51.5%
times-frac53.5%
Simplified53.5%
associate-*r/53.5%
quot-tan53.5%
Applied egg-rr53.5%
if 4.7000000000000003e63 < b Initial program 12.3%
Simplified6.1%
Taylor expanded in x-scale around 0 26.7%
Simplified26.7%
Taylor expanded in a around 0 70.5%
Taylor expanded in angle around 0 64.9%
associate-*r/65.2%
*-commutative65.2%
Simplified65.2%
Final simplification55.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 5.1e+63)
(*
180.0
(/
(atan (* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI)))))
PI))
(*
180.0
(/ (atan (* -0.5 (/ (* y-scale 360.0) (* angle (* 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 (b_m <= 5.1e+63) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 360.0) / (angle * (((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 (b_m <= 5.1e+63) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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 b_m <= 5.1e+63: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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 (b_m <= 5.1e+63) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 360.0) / Float64(angle * Float64(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 (b_m <= 5.1e+63) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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[b$95$m, 5.1e+63], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 360.0), $MachinePrecision] / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 5.1 \cdot 10^{+63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 360}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 5.0999999999999998e63Initial program 12.7%
Simplified14.5%
Taylor expanded in x-scale around 0 25.7%
Simplified29.9%
Taylor expanded in a around inf 51.5%
times-frac53.5%
Simplified53.5%
associate-*r/53.5%
quot-tan53.5%
Applied egg-rr53.5%
associate-/l*53.5%
*-commutative53.5%
Applied egg-rr53.5%
if 5.0999999999999998e63 < b Initial program 12.3%
Simplified6.1%
Taylor expanded in x-scale around 0 26.7%
Simplified26.7%
Taylor expanded in a around 0 70.5%
Taylor expanded in angle around 0 64.9%
associate-*r/65.2%
*-commutative65.2%
Simplified65.2%
Final simplification55.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 7.7e-69)
(*
180.0
(/
(atan (* y-scale (/ (tan (* 0.005555555555555556 (* angle PI))) x-scale)))
PI))
(if (<= b_m 3.1e+46)
(/
(*
180.0
(atan (* (* y-scale (/ PI x-scale)) (* 0.005555555555555556 angle))))
PI)
(*
180.0
(/ (atan (* -0.5 (/ (* y-scale 360.0) (* angle (* 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 (b_m <= 7.7e-69) {
tmp = 180.0 * (atan((y_45_scale * (tan((0.005555555555555556 * (angle * ((double) M_PI)))) / x_45_scale))) / ((double) M_PI));
} else if (b_m <= 3.1e+46) {
tmp = (180.0 * atan(((y_45_scale * (((double) M_PI) / x_45_scale)) * (0.005555555555555556 * angle)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 360.0) / (angle * (((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 (b_m <= 7.7e-69) {
tmp = 180.0 * (Math.atan((y_45_scale * (Math.tan((0.005555555555555556 * (angle * Math.PI))) / x_45_scale))) / Math.PI);
} else if (b_m <= 3.1e+46) {
tmp = (180.0 * Math.atan(((y_45_scale * (Math.PI / x_45_scale)) * (0.005555555555555556 * angle)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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 b_m <= 7.7e-69: tmp = 180.0 * (math.atan((y_45_scale * (math.tan((0.005555555555555556 * (angle * math.pi))) / x_45_scale))) / math.pi) elif b_m <= 3.1e+46: tmp = (180.0 * math.atan(((y_45_scale * (math.pi / x_45_scale)) * (0.005555555555555556 * angle)))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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 (b_m <= 7.7e-69) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(tan(Float64(0.005555555555555556 * Float64(angle * pi))) / x_45_scale))) / pi)); elseif (b_m <= 3.1e+46) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * Float64(pi / x_45_scale)) * Float64(0.005555555555555556 * angle)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 360.0) / Float64(angle * Float64(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 (b_m <= 7.7e-69) tmp = 180.0 * (atan((y_45_scale * (tan((0.005555555555555556 * (angle * pi))) / x_45_scale))) / pi); elseif (b_m <= 3.1e+46) tmp = (180.0 * atan(((y_45_scale * (pi / x_45_scale)) * (0.005555555555555556 * angle)))) / pi; else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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[b$95$m, 7.7e-69], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 3.1e+46], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision] * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 360.0), $MachinePrecision] / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 7.7 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 3.1 \cdot 10^{+46}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(y-scale \cdot \frac{\pi}{x-scale}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 360}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.70000000000000008e-69Initial program 11.3%
Simplified12.9%
Taylor expanded in x-scale around 0 25.3%
Simplified30.0%
Taylor expanded in a around inf 50.2%
times-frac52.6%
Simplified52.6%
associate-*l/50.2%
quot-tan50.2%
Applied egg-rr50.2%
associate-/l*52.4%
Simplified52.4%
if 7.70000000000000008e-69 < b < 3.09999999999999975e46Initial program 22.3%
Simplified25.9%
Taylor expanded in x-scale around 0 30.3%
Simplified31.2%
Taylor expanded in a around inf 55.8%
times-frac55.7%
Simplified55.7%
associate-*r/55.7%
quot-tan55.7%
Applied egg-rr55.7%
Taylor expanded in angle around 0 54.9%
associate-/l*54.8%
associate-*r*54.8%
*-commutative54.8%
associate-*r/54.8%
Simplified54.8%
if 3.09999999999999975e46 < b Initial program 11.8%
Simplified5.9%
Taylor expanded in x-scale around 0 25.7%
Simplified25.7%
Taylor expanded in a around 0 67.8%
Taylor expanded in angle around 0 64.4%
associate-*r/64.8%
*-commutative64.8%
Simplified64.8%
Final simplification55.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.5e+46)
(/
(*
180.0
(atan (* (* y-scale (/ PI x-scale)) (* 0.005555555555555556 angle))))
PI)
(*
180.0
(/ (atan (* -0.5 (/ (* y-scale 360.0) (* angle (* 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 (b_m <= 1.5e+46) {
tmp = (180.0 * atan(((y_45_scale * (((double) M_PI) / x_45_scale)) * (0.005555555555555556 * angle)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 360.0) / (angle * (((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 (b_m <= 1.5e+46) {
tmp = (180.0 * Math.atan(((y_45_scale * (Math.PI / x_45_scale)) * (0.005555555555555556 * angle)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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 b_m <= 1.5e+46: tmp = (180.0 * math.atan(((y_45_scale * (math.pi / x_45_scale)) * (0.005555555555555556 * angle)))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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 (b_m <= 1.5e+46) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * Float64(pi / x_45_scale)) * Float64(0.005555555555555556 * angle)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 360.0) / Float64(angle * Float64(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 (b_m <= 1.5e+46) tmp = (180.0 * atan(((y_45_scale * (pi / x_45_scale)) * (0.005555555555555556 * angle)))) / pi; else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 360.0) / (angle * (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[b$95$m, 1.5e+46], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision] * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 360.0), $MachinePrecision] / N[(angle * N[(Pi * x$45$scale), $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.5 \cdot 10^{+46}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(y-scale \cdot \frac{\pi}{x-scale}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 360}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.50000000000000012e46Initial program 12.8%
Simplified14.7%
Taylor expanded in x-scale around 0 26.0%
Simplified30.2%
Taylor expanded in a around inf 51.0%
times-frac53.0%
Simplified53.0%
associate-*r/53.1%
quot-tan53.1%
Applied egg-rr53.1%
Taylor expanded in angle around 0 47.2%
associate-/l*52.4%
associate-*r*52.4%
*-commutative52.4%
associate-*r/52.4%
Simplified52.4%
if 1.50000000000000012e46 < b Initial program 11.8%
Simplified5.9%
Taylor expanded in x-scale around 0 25.7%
Simplified25.7%
Taylor expanded in a around 0 67.8%
Taylor expanded in angle around 0 64.4%
associate-*r/64.8%
*-commutative64.8%
Simplified64.8%
Final simplification54.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 3.4e+46)
(/
(*
180.0
(atan (* (* y-scale (/ PI x-scale)) (* 0.005555555555555556 angle))))
PI)
(* 180.0 (/ (atan (* (/ -180.0 (* PI x-scale)) (/ y-scale angle))) 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.4e+46) {
tmp = (180.0 * atan(((y_45_scale * (((double) M_PI) / x_45_scale)) * (0.005555555555555556 * angle)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((-180.0 / (((double) M_PI) * x_45_scale)) * (y_45_scale / angle))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 3.4e+46) {
tmp = (180.0 * Math.atan(((y_45_scale * (Math.PI / x_45_scale)) * (0.005555555555555556 * angle)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((-180.0 / (Math.PI * x_45_scale)) * (y_45_scale / angle))) / 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.4e+46: tmp = (180.0 * math.atan(((y_45_scale * (math.pi / x_45_scale)) * (0.005555555555555556 * angle)))) / math.pi else: tmp = 180.0 * (math.atan(((-180.0 / (math.pi * x_45_scale)) * (y_45_scale / angle))) / 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.4e+46) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * Float64(pi / x_45_scale)) * Float64(0.005555555555555556 * angle)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-180.0 / Float64(pi * x_45_scale)) * Float64(y_45_scale / angle))) / 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.4e+46) tmp = (180.0 * atan(((y_45_scale * (pi / x_45_scale)) * (0.005555555555555556 * angle)))) / pi; else tmp = 180.0 * (atan(((-180.0 / (pi * x_45_scale)) * (y_45_scale / angle))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 3.4e+46], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision] * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 3.4 \cdot 10^{+46}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(y-scale \cdot \frac{\pi}{x-scale}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180}{\pi \cdot x-scale} \cdot \frac{y-scale}{angle}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.3999999999999998e46Initial program 12.8%
Simplified14.7%
Taylor expanded in x-scale around 0 26.0%
Simplified30.2%
Taylor expanded in a around inf 51.0%
times-frac53.0%
Simplified53.0%
associate-*r/53.1%
quot-tan53.1%
Applied egg-rr53.1%
Taylor expanded in angle around 0 47.2%
associate-/l*52.4%
associate-*r*52.4%
*-commutative52.4%
associate-*r/52.4%
Simplified52.4%
if 3.3999999999999998e46 < b Initial program 11.8%
Simplified5.9%
Taylor expanded in x-scale around 0 25.7%
Simplified25.7%
Taylor expanded in a around 0 67.8%
add-cbrt-cube71.9%
unpow271.9%
Applied egg-rr71.9%
unpow271.9%
unpow371.9%
Simplified71.9%
Taylor expanded in angle around 0 64.4%
associate-*r/64.8%
*-commutative64.8%
times-frac64.6%
*-commutative64.6%
Simplified64.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2e+46)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(* 180.0 (/ (atan (* (/ -180.0 (* PI x-scale)) (/ y-scale angle))) 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 <= 2e+46) {
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 / (((double) M_PI) * x_45_scale)) * (y_45_scale / angle))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2e+46) {
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 / (Math.PI * x_45_scale)) * (y_45_scale / angle))) / 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 <= 2e+46: 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 / (math.pi * x_45_scale)) * (y_45_scale / angle))) / 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 <= 2e+46) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-180.0 / Float64(pi * x_45_scale)) * Float64(y_45_scale / angle))) / 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 <= 2e+46) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); else tmp = 180.0 * (atan(((-180.0 / (pi * x_45_scale)) * (y_45_scale / angle))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2e+46], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2 \cdot 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180}{\pi \cdot x-scale} \cdot \frac{y-scale}{angle}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2e46Initial program 12.8%
Simplified14.7%
Taylor expanded in x-scale around 0 26.0%
Simplified30.2%
Taylor expanded in a around inf 51.0%
times-frac53.0%
Simplified53.0%
Taylor expanded in angle around 0 47.1%
associate-/l*52.3%
associate-/l*52.4%
Simplified52.4%
if 2e46 < b Initial program 11.8%
Simplified5.9%
Taylor expanded in x-scale around 0 25.7%
Simplified25.7%
Taylor expanded in a around 0 67.8%
add-cbrt-cube71.9%
unpow271.9%
Applied egg-rr71.9%
unpow271.9%
unpow371.9%
Simplified71.9%
Taylor expanded in angle around 0 64.4%
associate-*r/64.8%
*-commutative64.8%
times-frac64.6%
*-commutative64.6%
Simplified64.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 3.5e+46)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* 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 (b_m <= 3.5e+46) {
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 * (((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 (b_m <= 3.5e+46) {
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 * (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 b_m <= 3.5e+46: 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 * (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 (b_m <= 3.5e+46) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(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 (b_m <= 3.5e+46) 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 * (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[b$95$m, 3.5e+46], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $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.5 \cdot 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.49999999999999985e46Initial program 12.8%
Simplified14.7%
Taylor expanded in x-scale around 0 26.0%
Simplified30.2%
Taylor expanded in a around inf 51.0%
times-frac53.0%
Simplified53.0%
Taylor expanded in angle around 0 47.1%
associate-/l*52.3%
associate-/l*52.4%
Simplified52.4%
if 3.49999999999999985e46 < b Initial program 11.8%
Simplified5.9%
Taylor expanded in angle around 0 17.6%
associate-/l*17.6%
distribute-lft-out--17.6%
Simplified17.6%
Taylor expanded in a around 0 64.4%
Final simplification54.8%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* 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((-180.0 * (y_45_scale / (angle * (((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((-180.0 * (y_45_scale / (angle * (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((-180.0 * (y_45_scale / (angle * (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(-180.0 * Float64(y_45_scale / Float64(angle * Float64(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((-180.0 * (y_45_scale / (angle * (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[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}
\end{array}
Initial program 12.6%
Simplified12.9%
Taylor expanded in angle around 0 11.0%
associate-/l*11.5%
distribute-lft-out--11.5%
Simplified11.5%
Taylor expanded in a around 0 37.5%
Final simplification37.5%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* angle (* y-scale PI))))) 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((-180.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI)))))) / ((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((-180.0 * (x_45_scale / (angle * (y_45_scale * Math.PI))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * math.pi))))) / 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(-180.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * pi))))) / 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[(-180.0 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi}
\end{array}
Initial program 12.6%
Simplified12.9%
Taylor expanded in angle around 0 11.0%
associate-/l*11.5%
distribute-lft-out--11.5%
Simplified11.5%
Taylor expanded in a around inf 12.1%
herbie shell --seed 2024114
(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)))