
(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 (* angle (* 0.005555555555555556 PI))))
(if (<= b_m 2.1e-167)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(if (<= b_m 4.2e+72)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI))))))
PI)
(/
(* 180.0 (atan (* (/ (/ (cos t_0) x-scale) (sin t_0)) (- y-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 = angle * (0.005555555555555556 * ((double) M_PI));
double tmp;
if (b_m <= 2.1e-167) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else if (b_m <= 4.2e+72) {
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((((cos(t_0) / x_45_scale) / sin(t_0)) * -y_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 = angle * (0.005555555555555556 * Math.PI);
double tmp;
if (b_m <= 2.1e-167) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else if (b_m <= 4.2e+72) {
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((((Math.cos(t_0) / x_45_scale) / Math.sin(t_0)) * -y_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 = angle * (0.005555555555555556 * math.pi) tmp = 0 if b_m <= 2.1e-167: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) elif b_m <= 4.2e+72: 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((((math.cos(t_0) / x_45_scale) / math.sin(t_0)) * -y_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(angle * Float64(0.005555555555555556 * pi)) tmp = 0.0 if (b_m <= 2.1e-167) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); elseif (b_m <= 4.2e+72) 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(Float64(180.0 * atan(Float64(Float64(Float64(cos(t_0) / x_45_scale) / sin(t_0)) * Float64(-y_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 = angle * (0.005555555555555556 * pi); tmp = 0.0; if (b_m <= 2.1e-167) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); elseif (b_m <= 4.2e+72) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi)))))) / pi; else tmp = (180.0 * atan((((cos(t_0) / x_45_scale) / sin(t_0)) * -y_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[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 2.1e-167], 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], If[LessEqual[b$95$m, 4.2e+72], 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[(N[(180.0 * N[ArcTan[N[(N[(N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * (-y$45$scale)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 2.1 \cdot 10^{-167}:\\
\;\;\;\;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{elif}\;b\_m \leq 4.2 \cdot 10^{+72}:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{\cos t\_0}{x-scale}}{\sin t\_0} \cdot \left(-y-scale\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.10000000000000017e-167Initial program 8.4%
Simplified7.2%
Taylor expanded in x-scale around 0 21.7%
Simplified27.1%
Taylor expanded in a around inf 53.4%
times-frac54.7%
Simplified54.7%
add-cube-cbrt56.7%
pow256.7%
Applied egg-rr56.7%
Taylor expanded in angle around 0 49.3%
associate-/l*52.4%
associate-/l*52.4%
Simplified52.4%
if 2.10000000000000017e-167 < b < 4.2000000000000003e72Initial program 25.4%
Simplified20.0%
Taylor expanded in x-scale around 0 40.1%
Simplified40.4%
Taylor expanded in a around inf 46.2%
times-frac47.9%
Simplified47.9%
associate-*r/47.9%
quot-tan47.9%
Applied egg-rr47.9%
if 4.2000000000000003e72 < b Initial program 7.1%
Simplified4.5%
Taylor expanded in b around inf 39.1%
Taylor expanded in y-scale around inf 24.5%
fma-define24.5%
Simplified24.6%
Taylor expanded in x-scale around 0 64.9%
associate-*r/64.8%
Simplified64.3%
Final simplification53.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* angle (* 0.005555555555555556 PI))))
(if (<= b_m 5.6e+71)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))
(cos (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0)))))))
PI))
(/
(* 180.0 (atan (* (/ (/ (cos t_0) x-scale) (sin t_0)) (- y-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 = angle * (0.005555555555555556 * ((double) M_PI));
double tmp;
if (b_m <= 5.6e+71) {
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))))) / cos((0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0))))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((cos(t_0) / x_45_scale) / sin(t_0)) * -y_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 = angle * (0.005555555555555556 * Math.PI);
double tmp;
if (b_m <= 5.6e+71) {
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))))) / Math.cos((0.005555555555555556 * (angle * Math.pow(Math.sqrt(Math.PI), 2.0))))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((Math.cos(t_0) / x_45_scale) / Math.sin(t_0)) * -y_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(angle * Float64(0.005555555555555556 * pi)) tmp = 0.0 if (b_m <= 5.6e+71) 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))))) / cos(Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0))))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(cos(t_0) / x_45_scale) / sin(t_0)) * Float64(-y_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[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 5.6e+71], 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] / N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * (-y$45$scale)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 5.6 \cdot 10^{+71}:\\
\;\;\;\;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)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{\cos t\_0}{x-scale}}{\sin t\_0} \cdot \left(-y-scale\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 5.60000000000000004e71Initial program 12.7%
Simplified10.4%
Taylor expanded in x-scale around 0 26.4%
Simplified30.6%
Taylor expanded in a around inf 51.7%
times-frac53.2%
Simplified53.2%
add-cube-cbrt55.8%
pow255.8%
Applied egg-rr55.8%
add-sqr-sqrt54.5%
pow254.5%
Applied egg-rr54.5%
if 5.60000000000000004e71 < b Initial program 6.9%
Simplified4.4%
Taylor expanded in b around inf 38.1%
Taylor expanded in y-scale around inf 23.8%
fma-define23.8%
Simplified23.9%
Taylor expanded in x-scale around 0 63.3%
associate-*r/63.2%
Simplified62.7%
Final simplification55.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* angle (* 0.005555555555555556 PI))))
(if (<= b_m 4.3e+72)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))
(cos (* 0.005555555555555556 (* angle PI))))))
PI))
(/
(* 180.0 (atan (* (/ (/ (cos t_0) x-scale) (sin t_0)) (- y-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 = angle * (0.005555555555555556 * ((double) M_PI));
double tmp;
if (b_m <= 4.3e+72) {
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))))) / cos((0.005555555555555556 * (angle * ((double) M_PI))))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((cos(t_0) / x_45_scale) / sin(t_0)) * -y_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 = angle * (0.005555555555555556 * Math.PI);
double tmp;
if (b_m <= 4.3e+72) {
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))))) / Math.cos((0.005555555555555556 * (angle * Math.PI)))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((Math.cos(t_0) / x_45_scale) / Math.sin(t_0)) * -y_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(angle * Float64(0.005555555555555556 * pi)) tmp = 0.0 if (b_m <= 4.3e+72) 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))))) / cos(Float64(0.005555555555555556 * Float64(angle * pi)))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(cos(t_0) / x_45_scale) / sin(t_0)) * Float64(-y_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[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 4.3e+72], 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] / N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * (-y$45$scale)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+72}:\\
\;\;\;\;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)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{\cos t\_0}{x-scale}}{\sin t\_0} \cdot \left(-y-scale\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.3000000000000001e72Initial program 12.7%
Simplified10.4%
Taylor expanded in x-scale around 0 26.3%
Simplified30.5%
Taylor expanded in a around inf 51.6%
times-frac53.0%
Simplified53.0%
add-cube-cbrt55.6%
pow255.6%
Applied egg-rr55.6%
if 4.3000000000000001e72 < b Initial program 7.1%
Simplified4.5%
Taylor expanded in b around inf 39.1%
Taylor expanded in y-scale around inf 24.5%
fma-define24.5%
Simplified24.6%
Taylor expanded in x-scale around 0 64.9%
associate-*r/64.8%
Simplified64.3%
Final simplification56.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* angle (* 0.005555555555555556 PI))))
(if (<= b_m 4.4e+71)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))))
PI))
(/
(* 180.0 (atan (* (/ (/ (cos t_0) x-scale) (sin t_0)) (- y-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 = angle * (0.005555555555555556 * ((double) M_PI));
double tmp;
if (b_m <= 4.4e+71) {
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))))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((cos(t_0) / x_45_scale) / sin(t_0)) * -y_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 = angle * (0.005555555555555556 * Math.PI);
double tmp;
if (b_m <= 4.4e+71) {
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))))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((Math.cos(t_0) / x_45_scale) / Math.sin(t_0)) * -y_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(angle * Float64(0.005555555555555556 * pi)) tmp = 0.0 if (b_m <= 4.4e+71) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(cos(t_0) / x_45_scale) / sin(t_0)) * Float64(-y_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[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 4.4e+71], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * 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]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * (-y$45$scale)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 4.4 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{\cos t\_0}{x-scale}}{\sin t\_0} \cdot \left(-y-scale\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.39999999999999989e71Initial program 12.7%
Simplified10.4%
Taylor expanded in x-scale around 0 26.4%
Simplified30.6%
Taylor expanded in a around inf 51.7%
times-frac53.2%
Simplified53.2%
add-cube-cbrt55.8%
pow255.8%
Applied egg-rr55.8%
Taylor expanded in angle around 0 54.5%
if 4.39999999999999989e71 < b Initial program 6.9%
Simplified4.4%
Taylor expanded in b around inf 38.1%
Taylor expanded in y-scale around inf 23.8%
fma-define23.8%
Simplified23.9%
Taylor expanded in x-scale around 0 63.3%
associate-*r/63.2%
Simplified62.7%
Final simplification55.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* angle (* 0.005555555555555556 PI))))
(if (<= b_m 2e-168)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(if (<= b_m 1.3e+73)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI))))))
PI)
(*
180.0
(/ (atan (/ y-scale (* (sin t_0) (* (cos 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 = angle * (0.005555555555555556 * ((double) M_PI));
double tmp;
if (b_m <= 2e-168) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else if (b_m <= 1.3e+73) {
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 / (sin(t_0) * (cos(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 = angle * (0.005555555555555556 * Math.PI);
double tmp;
if (b_m <= 2e-168) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else if (b_m <= 1.3e+73) {
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.sin(t_0) * (Math.cos(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 = angle * (0.005555555555555556 * math.pi) tmp = 0 if b_m <= 2e-168: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) elif b_m <= 1.3e+73: 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.sin(t_0) * (math.cos(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(angle * Float64(0.005555555555555556 * pi)) tmp = 0.0 if (b_m <= 2e-168) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); elseif (b_m <= 1.3e+73) 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(y_45_scale / Float64(sin(t_0) * Float64(cos(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 = angle * (0.005555555555555556 * pi); tmp = 0.0; if (b_m <= 2e-168) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); elseif (b_m <= 1.3e+73) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi)))))) / pi; else tmp = 180.0 * (atan((y_45_scale / (sin(t_0) * (cos(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[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 2e-168], 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], If[LessEqual[b$95$m, 1.3e+73], 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[(y$45$scale / N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 2 \cdot 10^{-168}:\\
\;\;\;\;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{elif}\;b\_m \leq 1.3 \cdot 10^{+73}:\\
\;\;\;\;\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(\frac{y-scale}{\sin t\_0 \cdot \left(\cos t\_0 \cdot \left(-x-scale\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.0000000000000001e-168Initial program 8.4%
Simplified7.2%
Taylor expanded in x-scale around 0 21.7%
Simplified27.1%
Taylor expanded in a around inf 53.4%
times-frac54.7%
Simplified54.7%
add-cube-cbrt56.7%
pow256.7%
Applied egg-rr56.7%
Taylor expanded in angle around 0 49.3%
associate-/l*52.4%
associate-/l*52.4%
Simplified52.4%
if 2.0000000000000001e-168 < b < 1.3e73Initial program 25.4%
Simplified20.0%
Taylor expanded in x-scale around 0 40.1%
Simplified40.4%
Taylor expanded in a around inf 46.2%
times-frac47.9%
Simplified47.9%
associate-*r/47.9%
quot-tan47.9%
Applied egg-rr47.9%
if 1.3e73 < b Initial program 7.1%
Simplified4.5%
Taylor expanded in angle around 0 4.3%
distribute-lft-out--4.3%
Simplified4.3%
Taylor expanded in a around 0 63.8%
associate-*r/63.8%
mul-1-neg63.8%
associate-*r*63.8%
*-commutative63.8%
associate-*r*61.9%
*-commutative61.9%
*-commutative61.9%
associate-*r*63.1%
*-commutative63.1%
Simplified63.1%
Final simplification53.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 5.8e-169)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(if (<= b_m 1.95e+73)
(/ (* 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 <= 5.8e-169) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else if (b_m <= 1.95e+73) {
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 <= 5.8e-169) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else if (b_m <= 1.95e+73) {
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 <= 5.8e-169: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) elif b_m <= 1.95e+73: 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 <= 5.8e-169) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); elseif (b_m <= 1.95e+73) 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(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 <= 5.8e-169) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); elseif (b_m <= 1.95e+73) 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, 5.8e-169], 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], If[LessEqual[b$95$m, 1.95e+73], 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[(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 5.8 \cdot 10^{-169}:\\
\;\;\;\;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{elif}\;b\_m \leq 1.95 \cdot 10^{+73}:\\
\;\;\;\;\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(\frac{y-scale \cdot \cos t\_0}{\sin t\_0 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 5.80000000000000038e-169Initial program 8.4%
Simplified7.2%
Taylor expanded in x-scale around 0 21.7%
Simplified27.1%
Taylor expanded in a around inf 53.4%
times-frac54.7%
Simplified54.7%
add-cube-cbrt56.7%
pow256.7%
Applied egg-rr56.7%
Taylor expanded in angle around 0 49.3%
associate-/l*52.4%
associate-/l*52.4%
Simplified52.4%
if 5.80000000000000038e-169 < b < 1.95e73Initial program 25.4%
Simplified20.0%
Taylor expanded in x-scale around 0 40.1%
Simplified40.4%
Taylor expanded in a around inf 46.2%
times-frac47.9%
Simplified47.9%
associate-*r/47.9%
quot-tan47.9%
Applied egg-rr47.9%
if 1.95e73 < b Initial program 7.1%
Simplified4.5%
Taylor expanded in x-scale around 0 12.3%
Simplified17.9%
Taylor expanded in a around 0 64.9%
mul-1-neg64.9%
Simplified64.9%
Final simplification53.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.55e-153)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(if (<= b_m 2.5e-84)
(*
180.0
(/
1.0
(/
PI
(atan
(*
(/ y-scale x-scale)
(tan (* PI (* 0.005555555555555556 angle))))))))
(if (<= b_m 2.1e+106)
(*
180.0
(/
(atan
(* (/ y-scale x-scale) (sin (* 0.005555555555555556 (* angle PI)))))
PI))
(*
180.0
(/ (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI)))) PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.55e-153) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else if (b_m <= 2.5e-84) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle)))))));
} else if (b_m <= 2.1e+106) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.55e-153) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else if (b_m <= 2.5e-84) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle)))))));
} else if (b_m <= 2.1e+106) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin((0.005555555555555556 * (angle * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.55e-153: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) elif b_m <= 2.5e-84: tmp = 180.0 * (1.0 / (math.pi / math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle))))))) elif b_m <= 2.1e+106: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.sin((0.005555555555555556 * (angle * math.pi))))) / math.pi) else: tmp = 180.0 * (math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.55e-153) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); elseif (b_m <= 2.5e-84) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle)))))))); elseif (b_m <= 2.1e+106) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(Float64(0.005555555555555556 * Float64(angle * pi))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.55e-153) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); elseif (b_m <= 2.5e-84) tmp = 180.0 * (1.0 / (pi / atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle))))))); elseif (b_m <= 2.1e+106) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.55e-153], 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], If[LessEqual[b$95$m, 2.5e-84], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.1e+106], 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], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.55 \cdot 10^{-153}:\\
\;\;\;\;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{elif}\;b\_m \leq 2.5 \cdot 10^{-84}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\\
\mathbf{elif}\;b\_m \leq 2.1 \cdot 10^{+106}:\\
\;\;\;\;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}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.54999999999999997e-153Initial program 8.9%
Simplified7.7%
Taylor expanded in x-scale around 0 22.7%
Simplified28.0%
Taylor expanded in a around inf 53.9%
times-frac55.3%
Simplified55.3%
add-cube-cbrt57.2%
pow257.2%
Applied egg-rr57.2%
Taylor expanded in angle around 0 49.3%
associate-/l*53.0%
associate-/l*53.0%
Simplified53.0%
if 1.54999999999999997e-153 < b < 2.5000000000000001e-84Initial program 11.3%
Simplified11.3%
Taylor expanded in x-scale around 0 24.7%
Simplified25.7%
Taylor expanded in a around inf 57.5%
times-frac57.5%
Simplified57.5%
add-cube-cbrt57.6%
pow257.6%
Applied egg-rr57.6%
unpow257.6%
add-cube-cbrt57.5%
tan-quot57.5%
rem-exp-log32.6%
clear-num32.6%
Applied egg-rr57.5%
unpow-157.5%
*-commutative57.5%
*-commutative57.5%
associate-*r*68.5%
*-commutative68.5%
associate-*l*68.6%
Simplified68.6%
if 2.5000000000000001e-84 < b < 2.10000000000000005e106Initial program 25.5%
Simplified19.1%
Taylor expanded in x-scale around 0 38.3%
Simplified40.6%
Taylor expanded in a around inf 41.2%
times-frac43.1%
Simplified43.1%
Taylor expanded in angle around 0 48.4%
if 2.10000000000000005e106 < b Initial program 7.8%
Simplified4.9%
Taylor expanded in b around inf 42.7%
Taylor expanded in y-scale around inf 26.7%
fma-define26.7%
Simplified26.8%
Taylor expanded in angle around 0 54.7%
associate-/r*54.7%
*-commutative54.7%
Simplified54.7%
Final simplification52.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.5e-154)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(if (<= b_m 1.52e+106)
(*
180.0
(/
1.0
(/
PI
(atan
(*
(/ y-scale x-scale)
(tan (* PI (* 0.005555555555555556 angle))))))))
(* 180.0 (/ (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.5e-154) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else if (b_m <= 1.52e+106) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle)))))));
} else {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.5e-154) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else if (b_m <= 1.52e+106) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle)))))));
} else {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 4.5e-154: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) elif b_m <= 1.52e+106: tmp = 180.0 * (1.0 / (math.pi / math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle))))))) else: tmp = 180.0 * (math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.5e-154) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); elseif (b_m <= 1.52e+106) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle)))))))); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 4.5e-154) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); elseif (b_m <= 1.52e+106) tmp = 180.0 * (1.0 / (pi / atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle))))))); else tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.5e-154], 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], If[LessEqual[b$95$m, 1.52e+106], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.5 \cdot 10^{-154}:\\
\;\;\;\;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{elif}\;b\_m \leq 1.52 \cdot 10^{+106}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.4999999999999997e-154Initial program 8.9%
Simplified7.7%
Taylor expanded in x-scale around 0 22.7%
Simplified28.0%
Taylor expanded in a around inf 53.9%
times-frac55.3%
Simplified55.3%
add-cube-cbrt57.2%
pow257.2%
Applied egg-rr57.2%
Taylor expanded in angle around 0 49.3%
associate-/l*53.0%
associate-/l*53.0%
Simplified53.0%
if 4.4999999999999997e-154 < b < 1.52e106Initial program 23.6%
Simplified18.2%
Taylor expanded in x-scale around 0 36.4%
Simplified38.6%
Taylor expanded in a around inf 44.5%
times-frac46.1%
Simplified46.1%
add-cube-cbrt50.7%
pow250.7%
Applied egg-rr50.7%
unpow250.7%
add-cube-cbrt46.1%
tan-quot46.1%
rem-exp-log29.8%
clear-num29.8%
Applied egg-rr46.2%
unpow-146.2%
*-commutative46.2%
*-commutative46.2%
associate-*r*46.0%
*-commutative46.0%
associate-*l*45.9%
Simplified45.9%
if 1.52e106 < b Initial program 7.6%
Simplified4.8%
Taylor expanded in b around inf 41.4%
Taylor expanded in y-scale around inf 25.9%
fma-define25.9%
Simplified26.1%
Taylor expanded in angle around 0 53.3%
associate-/r*53.3%
*-commutative53.3%
Simplified53.3%
Final simplification51.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.5e-154)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(if (<= b_m 1.52e+106)
(*
180.0
(/
(atan
(* (/ y-scale x-scale) (tan (* PI (* 0.005555555555555556 angle)))))
PI))
(* 180.0 (/ (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.5e-154) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else if (b_m <= 1.52e+106) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.5e-154) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else if (b_m <= 1.52e+106) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 4.5e-154: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) elif b_m <= 1.52e+106: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle))))) / math.pi) else: tmp = 180.0 * (math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.5e-154) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); elseif (b_m <= 1.52e+106) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 4.5e-154) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); elseif (b_m <= 1.52e+106) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle))))) / pi); else tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.5e-154], 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], If[LessEqual[b$95$m, 1.52e+106], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.5 \cdot 10^{-154}:\\
\;\;\;\;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{elif}\;b\_m \leq 1.52 \cdot 10^{+106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.4999999999999997e-154Initial program 8.9%
Simplified7.7%
Taylor expanded in x-scale around 0 22.7%
Simplified28.0%
Taylor expanded in a around inf 53.9%
times-frac55.3%
Simplified55.3%
add-cube-cbrt57.2%
pow257.2%
Applied egg-rr57.2%
Taylor expanded in angle around 0 49.3%
associate-/l*53.0%
associate-/l*53.0%
Simplified53.0%
if 4.4999999999999997e-154 < b < 1.52e106Initial program 23.6%
Simplified18.2%
Taylor expanded in x-scale around 0 36.4%
Simplified38.6%
Taylor expanded in a around inf 44.5%
times-frac46.1%
Simplified46.1%
add-exp-log29.8%
quot-tan29.8%
Applied egg-rr29.8%
Taylor expanded in y-scale around 0 44.5%
associate-*l/46.1%
*-commutative46.1%
*-commutative46.1%
associate-*r*46.0%
*-commutative46.0%
associate-*l*45.9%
Simplified45.9%
if 1.52e106 < b Initial program 7.6%
Simplified4.8%
Taylor expanded in b around inf 41.4%
Taylor expanded in y-scale around inf 25.9%
fma-define25.9%
Simplified26.1%
Taylor expanded in angle around 0 53.3%
associate-/r*53.3%
*-commutative53.3%
Simplified53.3%
Final simplification51.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 8.4e-7)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(if (<= b_m 4.4e+73)
(*
180.0
(/
(atan
(* y-scale (/ (tan (* 0.005555555555555556 (* angle PI))) x-scale)))
PI))
(* 180.0 (/ (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 8.4e-7) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else if (b_m <= 4.4e+73) {
tmp = 180.0 * (atan((y_45_scale * (tan((0.005555555555555556 * (angle * ((double) M_PI)))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 8.4e-7) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else if (b_m <= 4.4e+73) {
tmp = 180.0 * (Math.atan((y_45_scale * (Math.tan((0.005555555555555556 * (angle * Math.PI))) / x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 8.4e-7: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) elif b_m <= 4.4e+73: tmp = 180.0 * (math.atan((y_45_scale * (math.tan((0.005555555555555556 * (angle * math.pi))) / x_45_scale))) / math.pi) else: tmp = 180.0 * (math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 8.4e-7) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); elseif (b_m <= 4.4e+73) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(tan(Float64(0.005555555555555556 * Float64(angle * pi))) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 8.4e-7) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); elseif (b_m <= 4.4e+73) tmp = 180.0 * (atan((y_45_scale * (tan((0.005555555555555556 * (angle * pi))) / x_45_scale))) / pi); else tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 8.4e-7], 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], If[LessEqual[b$95$m, 4.4e+73], 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], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 8.4 \cdot 10^{-7}:\\
\;\;\;\;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{elif}\;b\_m \leq 4.4 \cdot 10^{+73}:\\
\;\;\;\;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{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 8.4e-7Initial program 10.9%
Simplified9.9%
Taylor expanded in x-scale around 0 24.3%
Simplified28.9%
Taylor expanded in a around inf 52.7%
times-frac54.3%
Simplified54.3%
add-cube-cbrt57.3%
pow257.3%
Applied egg-rr57.3%
Taylor expanded in angle around 0 48.9%
associate-/l*52.9%
associate-/l*53.0%
Simplified53.0%
if 8.4e-7 < b < 4.4e73Initial program 27.5%
Simplified14.3%
Taylor expanded in x-scale around 0 43.8%
Simplified44.0%
Taylor expanded in a around inf 41.8%
times-frac41.8%
Simplified41.8%
add-exp-log30.8%
quot-tan30.8%
Applied egg-rr30.8%
Taylor expanded in y-scale around 0 41.8%
associate-/l*41.8%
Simplified41.8%
if 4.4e73 < b Initial program 7.1%
Simplified4.5%
Taylor expanded in b around inf 39.1%
Taylor expanded in y-scale around inf 24.5%
fma-define24.5%
Simplified24.6%
Taylor expanded in angle around 0 50.6%
associate-/r*50.7%
*-commutative50.7%
Simplified50.7%
Final simplification51.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.2e+35)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(* 180.0 (/ (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.2e+35) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.2e+35) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 4.2e+35: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) else: tmp = 180.0 * (math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.2e+35) 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(Float64(y_45_scale / angle) / Float64(x_45_scale * pi)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 4.2e+35) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); else tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.2e+35], 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[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.2 \cdot 10^{+35}:\\
\;\;\;\;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{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.1999999999999998e35Initial program 12.6%
Simplified10.7%
Taylor expanded in x-scale around 0 25.3%
Simplified29.7%
Taylor expanded in a around inf 52.3%
times-frac53.8%
Simplified53.8%
add-cube-cbrt56.5%
pow256.5%
Applied egg-rr56.5%
Taylor expanded in angle around 0 47.6%
associate-/l*51.3%
associate-/l*51.3%
Simplified51.3%
if 4.1999999999999998e35 < b Initial program 8.3%
Simplified3.9%
Taylor expanded in b around inf 32.3%
Taylor expanded in y-scale around inf 20.1%
fma-define20.1%
Simplified20.2%
Taylor expanded in angle around 0 49.6%
associate-/r*49.6%
*-commutative49.6%
Simplified49.6%
Final simplification51.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(Float64(y_45_scale / 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[(N[(y$45$scale / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}
\end{array}
Initial program 11.9%
Simplified9.5%
Taylor expanded in b around inf 22.8%
Taylor expanded in y-scale around inf 13.1%
fma-define13.1%
Simplified13.1%
Taylor expanded in angle around 0 35.6%
associate-/r*35.6%
*-commutative35.6%
Simplified35.6%
Final simplification35.6%
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.9%
Simplified9.5%
Taylor expanded in angle around 0 11.6%
associate-*r/11.6%
associate-*r*11.0%
distribute-lft-out--11.0%
associate-*r*11.0%
Simplified11.0%
Taylor expanded in a around 0 35.6%
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.9%
Simplified9.5%
Taylor expanded in angle around 0 11.6%
associate-*r/11.6%
associate-*r*11.0%
distribute-lft-out--11.0%
associate-*r*11.0%
Simplified11.0%
Taylor expanded in a around inf 9.5%
herbie shell --seed 2024151
(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)))