
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (cos t_0)))
(if (<= b_m 2e-12)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))
t_1)))
PI))
(* 180.0 (/ (atan (/ (* y-scale t_1) (* (sin t_0) (- x-scale)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double tmp;
if (b_m <= 2e-12) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (sin((0.005555555555555556 * (angle * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))) / t_1))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (sin(t_0) * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double tmp;
if (b_m <= 2e-12) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (Math.sin((0.005555555555555556 * (angle * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0))))) / t_1))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (Math.sin(t_0) * -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) tmp = 0.0 if (b_m <= 2e-12) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))) / t_1))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(sin(t_0) * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 2e-12], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(N[Sin[t$95$0], $MachinePrecision] * (-x$45$scale)), $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 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 2 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)}{t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{\sin t\_0 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.99999999999999996e-12Initial program 11.8%
Simplified10.7%
Taylor expanded in x-scale around 0 25.1%
Simplified31.7%
Taylor expanded in a around inf 48.3%
times-frac49.7%
Simplified49.7%
add-cube-cbrt52.7%
pow252.7%
Applied egg-rr52.7%
if 1.99999999999999996e-12 < b Initial program 10.0%
Simplified10.1%
Taylor expanded in x-scale around 0 22.1%
Simplified22.3%
Taylor expanded in a around 0 60.6%
Final simplification54.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 2.6e-12)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(sin (pow (cbrt (* PI (* 0.005555555555555556 angle))) 3.0))))
PI))
(*
180.0
(/ (atan (/ (* y-scale (cos t_0)) (* (sin t_0) (- x-scale)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 2.6e-12) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin(pow(cbrt((((double) M_PI) * (0.005555555555555556 * angle))), 3.0)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * cos(t_0)) / (sin(t_0) * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 2.6e-12) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin(Math.pow(Math.cbrt((Math.PI * (0.005555555555555556 * angle))), 3.0)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.cos(t_0)) / (Math.sin(t_0) * -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 2.6e-12) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin((cbrt(Float64(pi * Float64(0.005555555555555556 * angle))) ^ 3.0)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * cos(t_0)) / Float64(sin(t_0) * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 2.6e-12], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[N[Power[N[Power[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[t$95$0], $MachinePrecision] * (-x$45$scale)), $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 2.6 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \cos t\_0}{\sin t\_0 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.59999999999999983e-12Initial program 11.8%
Simplified10.7%
Taylor expanded in x-scale around 0 25.1%
Simplified31.7%
Taylor expanded in a around inf 48.3%
times-frac49.7%
Simplified49.7%
Taylor expanded in angle around 0 51.4%
associate-*r*49.2%
add-cube-cbrt49.1%
pow350.8%
*-commutative50.8%
Applied egg-rr50.8%
if 2.59999999999999983e-12 < b Initial program 10.0%
Simplified10.1%
Taylor expanded in x-scale around 0 22.1%
Simplified22.3%
Taylor expanded in a around 0 60.6%
Final simplification53.1%
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 1.12e-13)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (tan t_0))) PI))
(*
180.0
(/ (atan (/ (* y-scale (cos t_0)) (* (sin t_0) (- x-scale)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.12e-13) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * cos(t_0)) / (sin(t_0) * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 1.12e-13) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.cos(t_0)) / (Math.sin(t_0) * -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 1.12e-13: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan(t_0))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * math.cos(t_0)) / (math.sin(t_0) * -x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 1.12e-13) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * cos(t_0)) / Float64(sin(t_0) * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 1.12e-13) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) / pi); else tmp = 180.0 * (atan(((y_45_scale * cos(t_0)) / (sin(t_0) * -x_45_scale))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.12e-13], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[t$95$0], $MachinePrecision] * (-x$45$scale)), $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 1.12 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \cos t\_0}{\sin t\_0 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.12e-13Initial program 11.8%
Simplified10.7%
Taylor expanded in x-scale around 0 25.1%
Simplified31.7%
Taylor expanded in a around inf 48.3%
times-frac49.7%
Simplified49.7%
add-cube-cbrt49.4%
pow349.3%
Applied egg-rr49.3%
Taylor expanded in y-scale around 0 48.3%
rem-cube-cbrt48.3%
*-commutative48.3%
associate-*r/48.3%
associate-*r*48.3%
*-commutative48.3%
associate-*l/49.7%
*-commutative49.7%
associate-*r*49.7%
Simplified49.7%
if 1.12e-13 < b Initial program 10.0%
Simplified10.1%
Taylor expanded in x-scale around 0 22.1%
Simplified22.3%
Taylor expanded in a around 0 60.6%
Final simplification52.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle))))
(if (<= b_m 9e-13)
(*
180.0
(/
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI)))))
PI))
(*
180.0
(/ (atan (* y-scale (/ (cos t_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 = ((double) M_PI) * (0.005555555555555556 * angle);
double tmp;
if (b_m <= 9e-13) {
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((y_45_scale * (cos(t_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 = Math.PI * (0.005555555555555556 * angle);
double tmp;
if (b_m <= 9e-13) {
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((y_45_scale * (Math.cos(t_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 = math.pi * (0.005555555555555556 * angle) tmp = 0 if b_m <= 9e-13: 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((y_45_scale * (math.cos(t_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(pi * Float64(0.005555555555555556 * angle)) tmp = 0.0 if (b_m <= 9e-13) 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(y_45_scale * Float64(cos(t_0) / Float64(x_45_scale * Float64(-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 = pi * (0.005555555555555556 * angle); tmp = 0.0; if (b_m <= 9e-13) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (atan((y_45_scale * (cos(t_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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 9e-13], 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[(y$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] / N[(x$45$scale * (-N[Sin[t$95$0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
\mathbf{if}\;b\_m \leq 9 \cdot 10^{-13}:\\
\;\;\;\;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(y-scale \cdot \frac{\cos t\_0}{x-scale \cdot \left(-\sin t\_0\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 9e-13Initial program 11.8%
Simplified10.7%
Taylor expanded in x-scale around 0 25.1%
Simplified31.7%
Taylor expanded in a around inf 48.3%
times-frac49.7%
Simplified49.7%
add-cube-cbrt49.4%
pow349.3%
Applied egg-rr49.3%
Taylor expanded in y-scale around 0 48.3%
rem-cube-cbrt48.3%
*-commutative48.3%
associate-*r/48.3%
associate-*r*48.3%
*-commutative48.3%
associate-*l/49.7%
*-commutative49.7%
associate-*r*49.7%
Simplified49.7%
if 9e-13 < b Initial program 10.0%
Simplified10.1%
Taylor expanded in x-scale around 0 22.1%
Simplified22.3%
pow-to-exp8.8%
Applied egg-rr8.8%
Taylor expanded in a around 0 60.6%
mul-1-neg60.6%
associate-/l*60.6%
distribute-lft-neg-in60.6%
associate-*r*60.3%
*-commutative60.3%
*-commutative60.3%
associate-*r*62.0%
*-commutative62.0%
Simplified62.0%
Final simplification52.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 6.5e-13)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (tan t_0))) PI))
(*
180.0
(/ (atan (/ y-scale (* x-scale (* (cos t_0) (- (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 <= 6.5e-13) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((y_45_scale / (x_45_scale * (cos(t_0) * -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 <= 6.5e-13) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((y_45_scale / (x_45_scale * (Math.cos(t_0) * -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 <= 6.5e-13: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan(t_0))) / math.pi) else: tmp = 180.0 * (math.atan((y_45_scale / (x_45_scale * (math.cos(t_0) * -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 <= 6.5e-13) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale / Float64(x_45_scale * Float64(cos(t_0) * Float64(-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 <= 6.5e-13) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) / pi); else tmp = 180.0 * (atan((y_45_scale / (x_45_scale * (cos(t_0) * -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, 6.5e-13], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * (-N[Sin[t$95$0], $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 6.5 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale \cdot \left(\cos t\_0 \cdot \left(-\sin t\_0\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 6.49999999999999957e-13Initial program 11.8%
Simplified10.7%
Taylor expanded in x-scale around 0 25.1%
Simplified31.7%
Taylor expanded in a around inf 48.3%
times-frac49.7%
Simplified49.7%
add-cube-cbrt49.4%
pow349.3%
Applied egg-rr49.3%
Taylor expanded in y-scale around 0 48.3%
rem-cube-cbrt48.3%
*-commutative48.3%
associate-*r/48.3%
associate-*r*48.3%
*-commutative48.3%
associate-*l/49.7%
*-commutative49.7%
associate-*r*49.7%
Simplified49.7%
if 6.49999999999999957e-13 < b Initial program 10.0%
Simplified10.1%
Taylor expanded in x-scale around 0 22.1%
Simplified22.3%
Taylor expanded in angle around 0 22.3%
Taylor expanded in a around 0 59.5%
mul-1-neg59.5%
*-commutative59.5%
Simplified59.5%
Final simplification52.0%
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 1.08e-16)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (tan t_0))) PI))
(*
180.0
(/ (atan (* (/ y-scale x-scale) (/ (cos t_0) (- (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 <= 1.08e-16) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (cos(t_0) / -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 <= 1.08e-16) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (Math.cos(t_0) / -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 <= 1.08e-16: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan(t_0))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (math.cos(t_0) / -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 <= 1.08e-16) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(cos(t_0) / Float64(-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 <= 1.08e-16) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) / pi); else tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (cos(t_0) / -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, 1.08e-16], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / (-N[Sin[t$95$0], $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 1.08 \cdot 10^{-16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\cos t\_0}{-\sin t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.08e-16Initial program 11.8%
Simplified10.7%
Taylor expanded in x-scale around 0 25.1%
Simplified31.7%
Taylor expanded in a around inf 48.3%
times-frac49.7%
Simplified49.7%
add-cube-cbrt49.4%
pow349.3%
Applied egg-rr49.3%
Taylor expanded in y-scale around 0 48.3%
rem-cube-cbrt48.3%
*-commutative48.3%
associate-*r/48.3%
associate-*r*48.3%
*-commutative48.3%
associate-*l/49.7%
*-commutative49.7%
associate-*r*49.7%
Simplified49.7%
if 1.08e-16 < b Initial program 10.0%
Simplified10.1%
Taylor expanded in x-scale around 0 22.1%
Simplified22.3%
Taylor expanded in a around 0 60.6%
mul-1-neg60.6%
times-frac62.1%
Simplified62.1%
Final simplification52.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 3.8e-206)
(*
180.0
(/
(atan (* -180.0 (/ y-scale (* angle (cbrt (pow (* x-scale PI) 3.0))))))
PI))
(*
180.0
(/
(atan (* (/ y-scale x-scale) (sin (* 0.005555555555555556 (* angle PI)))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 3.8e-206) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * cbrt(pow((x_45_scale * ((double) M_PI)), 3.0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * ((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 (a <= 3.8e-206) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * Math.cbrt(Math.pow((x_45_scale * Math.PI), 3.0)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin((0.005555555555555556 * (angle * 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 (a <= 3.8e-206) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * cbrt((Float64(x_45_scale * pi) ^ 3.0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(Float64(0.005555555555555556 * Float64(angle * pi))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 3.8e-206], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[Power[N[Power[N[(x$45$scale * Pi), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.8 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \sqrt[3]{{\left(x-scale \cdot \pi\right)}^{3}}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 3.80000000000000003e-206Initial program 10.0%
Simplified9.9%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.0%
distribute-lft-out--8.0%
associate-*r*8.0%
Simplified8.0%
Taylor expanded in a around 0 36.3%
add-cbrt-cube41.0%
pow341.0%
Applied egg-rr41.0%
if 3.80000000000000003e-206 < a Initial program 13.2%
Simplified11.5%
Taylor expanded in x-scale around 0 24.2%
Simplified31.0%
Taylor expanded in a around inf 47.2%
times-frac47.1%
Simplified47.1%
Taylor expanded in angle around 0 50.7%
Final simplification45.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 2.8e-206)
(/ (* 180.0 (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI))))) PI)
(*
180.0
(/
(atan (* (/ y-scale x-scale) (sin (* 0.005555555555555556 (* angle PI)))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 2.8e-206) {
tmp = (180.0 * atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * ((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 (a <= 2.8e-206) {
tmp = (180.0 * Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin((0.005555555555555556 * (angle * 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 a <= 2.8e-206: tmp = (180.0 * math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi))))) / math.pi else: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.sin((0.005555555555555556 * (angle * 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 (a <= 2.8e-206) tmp = Float64(Float64(180.0 * atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(Float64(0.005555555555555556 * Float64(angle * 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 (a <= 2.8e-206) tmp = (180.0 * atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi))))) / pi; else tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * 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[a, 2.8e-206], N[(N[(180.0 * N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.8 \cdot 10^{-206}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 2.8000000000000001e-206Initial program 10.0%
Simplified9.9%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.0%
distribute-lft-out--8.0%
associate-*r*8.0%
Simplified8.0%
Taylor expanded in a around 0 36.3%
associate-*r/36.3%
associate-/r*36.3%
Applied egg-rr36.3%
if 2.8000000000000001e-206 < a Initial program 13.2%
Simplified11.5%
Taylor expanded in x-scale around 0 24.2%
Simplified31.0%
Taylor expanded in a around inf 47.2%
times-frac47.1%
Simplified47.1%
Taylor expanded in angle around 0 50.7%
Final simplification42.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 3.8e-206)
(/ (* 180.0 (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI))))) PI)
(*
180.0
(/
(atan (/ (* y-scale (sin (* 0.005555555555555556 (* 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 (a <= 3.8e-206) {
tmp = (180.0 * atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((y_45_scale * sin((0.005555555555555556 * (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 (a <= 3.8e-206) {
tmp = (180.0 * Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (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 a <= 3.8e-206: tmp = (180.0 * math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi))))) / math.pi else: tmp = 180.0 * (math.atan(((y_45_scale * math.sin((0.005555555555555556 * (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 (a <= 3.8e-206) tmp = Float64(Float64(180.0 * atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * 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 <= 3.8e-206) tmp = (180.0 * atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi))))) / pi; else tmp = 180.0 * (atan(((y_45_scale * sin((0.005555555555555556 * (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[a, 3.8e-206], N[(N[(180.0 * N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.8 \cdot 10^{-206}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;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}\\
\end{array}
\end{array}
if a < 3.80000000000000003e-206Initial program 10.0%
Simplified9.9%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.0%
distribute-lft-out--8.0%
associate-*r*8.0%
Simplified8.0%
Taylor expanded in a around 0 36.3%
associate-*r/36.3%
associate-/r*36.3%
Applied egg-rr36.3%
if 3.80000000000000003e-206 < a Initial program 13.2%
Simplified11.5%
Taylor expanded in x-scale around 0 24.2%
Simplified31.0%
Taylor expanded in a around inf 47.2%
times-frac47.1%
Simplified47.1%
Taylor expanded in angle around 0 50.7%
Taylor expanded in y-scale around 0 50.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 7.4e+196)
(*
180.0
(/
(atan (* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI)))))
PI))
(*
180.0
(/ 1.0 (/ PI (atan (* (/ y-scale (* x-scale angle)) (/ -180.0 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.4e+196) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((y_45_scale / (x_45_scale * angle)) * (-180.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 tmp;
if (b_m <= 7.4e+196) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((y_45_scale / (x_45_scale * angle)) * (-180.0 / 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.4e+196: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi))))) / math.pi) else: tmp = 180.0 * (1.0 / (math.pi / math.atan(((y_45_scale / (x_45_scale * angle)) * (-180.0 / 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.4e+196) 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(1.0 / Float64(pi / atan(Float64(Float64(y_45_scale / Float64(x_45_scale * angle)) * Float64(-180.0 / 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.4e+196) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (1.0 / (pi / atan(((y_45_scale / (x_45_scale * angle)) * (-180.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_] := If[LessEqual[b$95$m, 7.4e+196], 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[(1.0 / N[(Pi / N[ArcTan[N[(N[(y$45$scale / N[(x$45$scale * angle), $MachinePrecision]), $MachinePrecision] * N[(-180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 7.4 \cdot 10^{+196}:\\
\;\;\;\;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{1}{\frac{\pi}{\tan^{-1} \left(\frac{y-scale}{x-scale \cdot angle} \cdot \frac{-180}{\pi}\right)}}\\
\end{array}
\end{array}
if b < 7.3999999999999998e196Initial program 12.2%
Simplified11.4%
Taylor expanded in x-scale around 0 26.2%
Simplified31.7%
Taylor expanded in a around inf 47.2%
times-frac48.4%
Simplified48.4%
add-cube-cbrt48.0%
pow348.0%
Applied egg-rr47.3%
Taylor expanded in y-scale around 0 47.2%
rem-cube-cbrt47.2%
*-commutative47.2%
associate-*r/47.2%
associate-*r*46.5%
*-commutative46.5%
associate-*l/47.6%
*-commutative47.6%
associate-*r*48.4%
Simplified48.4%
if 7.3999999999999998e196 < b Initial program 0.0%
Simplified0.0%
Taylor expanded in angle around 0 0.0%
associate-*r/0.0%
associate-*r*0.0%
distribute-lft-out--0.0%
associate-*r*0.0%
Simplified0.0%
Taylor expanded in a around 0 64.3%
clear-num64.3%
inv-pow64.3%
associate-/r*64.3%
Applied egg-rr64.3%
unpow-164.3%
associate-/l/64.3%
*-commutative64.3%
associate-/l*64.5%
*-commutative64.5%
associate-*r*64.5%
times-frac64.5%
Simplified64.5%
Final simplification49.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 3.5e-206)
(/ (* 180.0 (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI))))) PI)
(*
180.0
(/
(atan (* y-scale (/ (sin (* PI (* 0.005555555555555556 angle))) 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 <= 3.5e-206) {
tmp = (180.0 * atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((y_45_scale * (sin((((double) M_PI) * (0.005555555555555556 * angle))) / 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 <= 3.5e-206) {
tmp = (180.0 * Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((y_45_scale * (Math.sin((Math.PI * (0.005555555555555556 * angle))) / 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 <= 3.5e-206: tmp = (180.0 * math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi))))) / math.pi else: tmp = 180.0 * (math.atan((y_45_scale * (math.sin((math.pi * (0.005555555555555556 * angle))) / 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 <= 3.5e-206) tmp = Float64(Float64(180.0 * atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(sin(Float64(pi * Float64(0.005555555555555556 * angle))) / 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 <= 3.5e-206) tmp = (180.0 * atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi))))) / pi; else tmp = 180.0 * (atan((y_45_scale * (sin((pi * (0.005555555555555556 * angle))) / 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, 3.5e-206], N[(N[(180.0 * N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $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 3.5 \cdot 10^{-206}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 3.49999999999999989e-206Initial program 10.0%
Simplified9.9%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.0%
distribute-lft-out--8.0%
associate-*r*8.0%
Simplified8.0%
Taylor expanded in a around 0 36.3%
associate-*r/36.3%
associate-/r*36.3%
Applied egg-rr36.3%
if 3.49999999999999989e-206 < a Initial program 13.2%
Simplified11.5%
Taylor expanded in x-scale around 0 24.2%
Simplified31.0%
Taylor expanded in a around inf 47.2%
times-frac47.1%
Simplified47.1%
Taylor expanded in angle around 0 50.7%
Taylor expanded in y-scale around 0 50.7%
associate-/l*49.5%
associate-*r*44.7%
*-commutative44.7%
Simplified44.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 3.6e-207)
(/ (* 180.0 (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI))))) PI)
(*
180.0
(/
(atan (* (/ y-scale x-scale) (* 0.005555555555555556 (* angle PI))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 3.6e-207) {
tmp = (180.0 * atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * ((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 (a <= 3.6e-207) {
tmp = (180.0 * Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * 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 a <= 3.6e-207: tmp = (180.0 * math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi))))) / math.pi else: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * 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 (a <= 3.6e-207) tmp = Float64(Float64(180.0 * atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(0.005555555555555556 * Float64(angle * 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 (a <= 3.6e-207) tmp = (180.0 * atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi))))) / pi; else tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * 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[a, 3.6e-207], N[(N[(180.0 * N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.6 \cdot 10^{-207}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 3.5999999999999997e-207Initial program 10.0%
Simplified9.9%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.0%
distribute-lft-out--8.0%
associate-*r*8.0%
Simplified8.0%
Taylor expanded in a around 0 36.3%
associate-*r/36.3%
associate-/r*36.3%
Applied egg-rr36.3%
if 3.5999999999999997e-207 < a Initial program 13.2%
Simplified11.5%
Taylor expanded in x-scale around 0 24.2%
Simplified31.0%
Taylor expanded in a around inf 47.2%
times-frac47.1%
Simplified47.1%
Taylor expanded in angle around 0 50.7%
Taylor expanded in angle around 0 47.0%
Final simplification40.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 3.5e-206)
(/ (* 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 <= 3.5e-206) {
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 <= 3.5e-206) {
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 <= 3.5e-206: 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 <= 3.5e-206) tmp = Float64(Float64(180.0 * atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * 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 (a <= 3.5e-206) 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, 3.5e-206], N[(N[(180.0 * N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.5 \cdot 10^{-206}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 3.49999999999999989e-206Initial program 10.0%
Simplified9.9%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.0%
distribute-lft-out--8.0%
associate-*r*8.0%
Simplified8.0%
Taylor expanded in a around 0 36.3%
associate-*r/36.3%
associate-/r*36.3%
Applied egg-rr36.3%
if 3.49999999999999989e-206 < a Initial program 13.2%
Simplified11.5%
Taylor expanded in x-scale around 0 24.2%
Simplified31.0%
Taylor expanded in a around inf 47.2%
times-frac47.1%
Simplified47.1%
Taylor expanded in angle around 0 50.7%
Taylor expanded in angle around 0 42.7%
associate-/l*47.0%
associate-/l*47.0%
Simplified47.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 3.8e-206)
(* 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 <= 3.8e-206) {
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 <= 3.8e-206) {
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 <= 3.8e-206: 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 <= 3.8e-206) 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(angle * Float64(y_45_scale * 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 (a <= 3.8e-206) 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, 3.8e-206], 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[(angle * N[(y$45$scale * 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}\;a \leq 3.8 \cdot 10^{-206}:\\
\;\;\;\;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 \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 3.80000000000000003e-206Initial program 10.0%
Simplified9.9%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.0%
distribute-lft-out--8.0%
associate-*r*8.0%
Simplified8.0%
Taylor expanded in a around 0 36.3%
if 3.80000000000000003e-206 < a Initial program 13.2%
Simplified11.5%
Taylor expanded in x-scale around 0 24.2%
Simplified31.0%
Taylor expanded in a around inf 47.2%
times-frac47.1%
Simplified47.1%
Taylor expanded in angle around 0 50.7%
Taylor expanded in angle around 0 42.7%
associate-/l*47.0%
associate-/l*47.0%
Simplified47.0%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 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) {
return 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_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 * (y_45_scale / (angle * (x_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 * (y_45_scale / (angle * (x_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(y_45_scale / Float64(angle * Float64(x_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 * (y_45_scale / (angle * (x_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[(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|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}
\end{array}
Initial program 11.4%
Simplified10.6%
Taylor expanded in angle around 0 8.6%
associate-*r/8.6%
associate-*r*6.9%
distribute-lft-out--6.9%
associate-*r*6.9%
Simplified6.9%
Taylor expanded in a around 0 33.3%
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 11.4%
Simplified10.6%
Taylor expanded in angle around 0 8.6%
associate-*r/8.6%
associate-*r*6.9%
distribute-lft-out--6.9%
associate-*r*6.9%
Simplified6.9%
Taylor expanded in a around inf 10.1%
herbie shell --seed 2024175
(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)))