
(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 19 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 (* PI (* 0.005555555555555556 angle)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (cos t_1))
(t_3 (sin t_1)))
(if (<= b_m 2.2e-16)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))
t_2)))
PI))
(if (<= b_m 2.1e+71)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(* 2.0 (pow (hypot (* t_3 a) (* b_m t_2)) 2.0))
(*
(* x-scale t_2)
(*
(sin (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0))))
(- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 5.5e+129)
(* 180.0 (/ (atan (* (/ y-scale x-scale) t_3)) PI))
(*
180.0
(/
(atan
(* -0.5 (* y-scale (* (/ 2.0 (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = cos(t_1);
double t_3 = sin(t_1);
double tmp;
if (b_m <= 2.2e-16) {
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_2))) / ((double) M_PI));
} else if (b_m <= 2.1e+71) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 * pow(hypot((t_3 * a), (b_m * t_2)), 2.0)) / ((x_45_scale * t_2) * (sin((0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0)))) * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 5.5e+129) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * t_3)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / 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 = Math.PI * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.cos(t_1);
double t_3 = Math.sin(t_1);
double tmp;
if (b_m <= 2.2e-16) {
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_2))) / Math.PI);
} else if (b_m <= 2.1e+71) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 * Math.pow(Math.hypot((t_3 * a), (b_m * t_2)), 2.0)) / ((x_45_scale * t_2) * (Math.sin((0.005555555555555556 * (angle * Math.pow(Math.sqrt(Math.PI), 2.0)))) * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else if (b_m <= 5.5e+129) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * t_3)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / 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(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = cos(t_1) t_3 = sin(t_1) tmp = 0.0 if (b_m <= 2.2e-16) 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_2))) / pi)); elseif (b_m <= 2.1e+71) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 * (hypot(Float64(t_3 * a), Float64(b_m * t_2)) ^ 2.0)) / Float64(Float64(x_45_scale * t_2) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0)))) * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 5.5e+129) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * t_3)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / sin(t_0)) * Float64(cos(t_0) / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[b$95$m, 2.2e-16], 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$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.1e+71], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 * N[Power[N[Sqrt[N[(t$95$3 * a), $MachinePrecision] ^ 2 + N[(b$95$m * t$95$2), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * t$95$2), $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.5e+129], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \cos t\_1\\
t_3 := \sin t\_1\\
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{-16}:\\
\;\;\;\;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\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.1 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{2 \cdot {\left(\mathsf{hypot}\left(t\_3 \cdot a, b\_m \cdot t\_2\right)\right)}^{2}}{\left(x-scale \cdot t\_2\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right) \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot t\_3\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{\sin t\_0} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.2e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cube-cbrt52.4%
pow252.4%
Applied egg-rr52.4%
if 2.2e-16 < b < 2.09999999999999989e71Initial program 41.3%
Simplified27.3%
Taylor expanded in x-scale around 0 64.9%
Simplified73.9%
add-sqr-sqrt79.0%
pow279.0%
Applied egg-rr79.0%
if 2.09999999999999989e71 < b < 5.49999999999999984e129Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 5.49999999999999984e129 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in x-scale around 0 5.7%
Simplified5.8%
add-sqr-sqrt5.8%
pow25.8%
Applied egg-rr5.8%
Taylor expanded in a around 0 70.8%
associate-*r/70.8%
*-commutative70.8%
times-frac70.9%
associate-*r*67.9%
*-commutative67.9%
associate-*r*70.8%
*-commutative70.8%
Simplified70.8%
Final simplification58.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (cos t_1))
(t_3 (sin t_1)))
(if (<= b_m 4.8e-17)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))
t_2)))
PI))
(if (<= b_m 2.2e+71)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(* 2.0 (pow (hypot (* t_3 a) b_m) 2.0))
(*
(* x-scale t_2)
(*
(sin (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0))))
(- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 6.5e+130)
(* 180.0 (/ (atan (* (/ y-scale x-scale) t_3)) PI))
(*
180.0
(/
(atan
(* -0.5 (* y-scale (* (/ 2.0 (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = cos(t_1);
double t_3 = sin(t_1);
double tmp;
if (b_m <= 4.8e-17) {
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_2))) / ((double) M_PI));
} else if (b_m <= 2.2e+71) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 * pow(hypot((t_3 * a), b_m), 2.0)) / ((x_45_scale * t_2) * (sin((0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0)))) * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 6.5e+130) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * t_3)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / 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 = Math.PI * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.cos(t_1);
double t_3 = Math.sin(t_1);
double tmp;
if (b_m <= 4.8e-17) {
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_2))) / Math.PI);
} else if (b_m <= 2.2e+71) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 * Math.pow(Math.hypot((t_3 * a), b_m), 2.0)) / ((x_45_scale * t_2) * (Math.sin((0.005555555555555556 * (angle * Math.pow(Math.sqrt(Math.PI), 2.0)))) * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else if (b_m <= 6.5e+130) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * t_3)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / 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(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = cos(t_1) t_3 = sin(t_1) tmp = 0.0 if (b_m <= 4.8e-17) 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_2))) / pi)); elseif (b_m <= 2.2e+71) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 * (hypot(Float64(t_3 * a), b_m) ^ 2.0)) / Float64(Float64(x_45_scale * t_2) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0)))) * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 6.5e+130) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * t_3)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / sin(t_0)) * Float64(cos(t_0) / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[b$95$m, 4.8e-17], 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$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.2e+71], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 * N[Power[N[Sqrt[N[(t$95$3 * a), $MachinePrecision] ^ 2 + b$95$m ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * t$95$2), $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 6.5e+130], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \cos t\_1\\
t_3 := \sin t\_1\\
\mathbf{if}\;b\_m \leq 4.8 \cdot 10^{-17}:\\
\;\;\;\;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\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.2 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{2 \cdot {\left(\mathsf{hypot}\left(t\_3 \cdot a, b\_m\right)\right)}^{2}}{\left(x-scale \cdot t\_2\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right) \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 6.5 \cdot 10^{+130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot t\_3\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{\sin t\_0} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.79999999999999973e-17Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cube-cbrt52.4%
pow252.4%
Applied egg-rr52.4%
if 4.79999999999999973e-17 < b < 2.19999999999999995e71Initial program 41.3%
Simplified27.3%
Taylor expanded in x-scale around 0 64.9%
Simplified73.9%
add-sqr-sqrt79.0%
pow279.0%
Applied egg-rr79.0%
Taylor expanded in angle around 0 78.9%
if 2.19999999999999995e71 < b < 6.5e130Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 6.5e130 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in x-scale around 0 5.7%
Simplified5.8%
add-sqr-sqrt5.8%
pow25.8%
Applied egg-rr5.8%
Taylor expanded in a around 0 70.8%
associate-*r/70.8%
*-commutative70.8%
times-frac70.9%
associate-*r*67.9%
*-commutative67.9%
associate-*r*70.8%
*-commutative70.8%
Simplified70.8%
Final simplification58.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (cos t_1))
(t_3 (sin t_1)))
(if (<= b_m 1.5e-16)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))
t_2)))
PI))
(if (<= b_m 2.1e+71)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
(/ 2.0 (* x-scale t_2))
(/
(pow (hypot (* t_3 a) (* b_m t_2)) 2.0)
(* t_3 (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 1.65e+130)
(* 180.0 (/ (atan (* (/ y-scale x-scale) t_3)) PI))
(*
180.0
(/
(atan
(* -0.5 (* y-scale (* (/ 2.0 (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = cos(t_1);
double t_3 = sin(t_1);
double tmp;
if (b_m <= 1.5e-16) {
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_2))) / ((double) M_PI));
} else if (b_m <= 2.1e+71) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / (x_45_scale * t_2)) * (pow(hypot((t_3 * a), (b_m * t_2)), 2.0) / (t_3 * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 1.65e+130) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * t_3)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / 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 = Math.PI * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.cos(t_1);
double t_3 = Math.sin(t_1);
double tmp;
if (b_m <= 1.5e-16) {
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_2))) / Math.PI);
} else if (b_m <= 2.1e+71) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / (x_45_scale * t_2)) * (Math.pow(Math.hypot((t_3 * a), (b_m * t_2)), 2.0) / (t_3 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else if (b_m <= 1.65e+130) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * t_3)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / 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(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = cos(t_1) t_3 = sin(t_1) tmp = 0.0 if (b_m <= 1.5e-16) 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_2))) / pi)); elseif (b_m <= 2.1e+71) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / Float64(x_45_scale * t_2)) * Float64((hypot(Float64(t_3 * a), Float64(b_m * t_2)) ^ 2.0) / Float64(t_3 * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 1.65e+130) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * t_3)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / sin(t_0)) * Float64(cos(t_0) / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[b$95$m, 1.5e-16], 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$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.1e+71], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sqrt[N[(t$95$3 * a), $MachinePrecision] ^ 2 + N[(b$95$m * t$95$2), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$3 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.65e+130], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \cos t\_1\\
t_3 := \sin t\_1\\
\mathbf{if}\;b\_m \leq 1.5 \cdot 10^{-16}:\\
\;\;\;\;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\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.1 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{x-scale \cdot t\_2} \cdot \frac{{\left(\mathsf{hypot}\left(t\_3 \cdot a, b\_m \cdot t\_2\right)\right)}^{2}}{t\_3 \cdot \left({b\_m}^{2} - {a}^{2}\right)}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.65 \cdot 10^{+130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot t\_3\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{\sin t\_0} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.49999999999999997e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cube-cbrt52.4%
pow252.4%
Applied egg-rr52.4%
if 1.49999999999999997e-16 < b < 2.09999999999999989e71Initial program 41.3%
Simplified27.3%
Taylor expanded in x-scale around 0 64.9%
Simplified73.9%
times-frac73.9%
*-commutative73.9%
Applied egg-rr73.9%
if 2.09999999999999989e71 < b < 1.65e130Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 1.65e130 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in x-scale around 0 5.7%
Simplified5.8%
add-sqr-sqrt5.8%
pow25.8%
Applied egg-rr5.8%
Taylor expanded in a around 0 70.8%
associate-*r/70.8%
*-commutative70.8%
times-frac70.9%
associate-*r*67.9%
*-commutative67.9%
associate-*r*70.8%
*-commutative70.8%
Simplified70.8%
Final simplification57.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (sin t_1))
(t_3 (cos t_1)))
(if (<= b_m 2.05e-16)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))
t_3)))
PI))
(if (<= b_m 2.2e+71)
(/
(*
180.0
(atan
(*
y-scale
(/
(pow (hypot (* t_2 a) (* b_m t_3)) 2.0)
(* (* x-scale t_3) (* t_2 (- (pow a 2.0) (pow b_m 2.0))))))))
PI)
(if (<= b_m 4.2e+129)
(* 180.0 (/ (atan (* (/ y-scale x-scale) t_2)) PI))
(*
180.0
(/
(atan
(* -0.5 (* y-scale (* (/ 2.0 (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = cos(t_1);
double tmp;
if (b_m <= 2.05e-16) {
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_3))) / ((double) M_PI));
} else if (b_m <= 2.2e+71) {
tmp = (180.0 * atan((y_45_scale * (pow(hypot((t_2 * a), (b_m * t_3)), 2.0) / ((x_45_scale * t_3) * (t_2 * (pow(a, 2.0) - pow(b_m, 2.0)))))))) / ((double) M_PI);
} else if (b_m <= 4.2e+129) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * t_2)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / 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 = Math.PI * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.sin(t_1);
double t_3 = Math.cos(t_1);
double tmp;
if (b_m <= 2.05e-16) {
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_3))) / Math.PI);
} else if (b_m <= 2.2e+71) {
tmp = (180.0 * Math.atan((y_45_scale * (Math.pow(Math.hypot((t_2 * a), (b_m * t_3)), 2.0) / ((x_45_scale * t_3) * (t_2 * (Math.pow(a, 2.0) - Math.pow(b_m, 2.0)))))))) / Math.PI;
} else if (b_m <= 4.2e+129) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * t_2)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / 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(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = cos(t_1) tmp = 0.0 if (b_m <= 2.05e-16) 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_3))) / pi)); elseif (b_m <= 2.2e+71) tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale * Float64((hypot(Float64(t_2 * a), Float64(b_m * t_3)) ^ 2.0) / Float64(Float64(x_45_scale * t_3) * Float64(t_2 * Float64((a ^ 2.0) - (b_m ^ 2.0)))))))) / pi); elseif (b_m <= 4.2e+129) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * t_2)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / sin(t_0)) * Float64(cos(t_0) / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$1], $MachinePrecision]}, If[LessEqual[b$95$m, 2.05e-16], 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$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.2e+71], N[(N[(180.0 * N[ArcTan[N[(y$45$scale * N[(N[Power[N[Sqrt[N[(t$95$2 * a), $MachinePrecision] ^ 2 + N[(b$95$m * t$95$3), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[(x$45$scale * t$95$3), $MachinePrecision] * N[(t$95$2 * N[(N[Power[a, 2.0], $MachinePrecision] - N[Power[b$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 4.2e+129], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \cos t\_1\\
\mathbf{if}\;b\_m \leq 2.05 \cdot 10^{-16}:\\
\;\;\;\;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\_3}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.2 \cdot 10^{+71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \frac{{\left(\mathsf{hypot}\left(t\_2 \cdot a, b\_m \cdot t\_3\right)\right)}^{2}}{\left(x-scale \cdot t\_3\right) \cdot \left(t\_2 \cdot \left({a}^{2} - {b\_m}^{2}\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.2 \cdot 10^{+129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot t\_2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{\sin t\_0} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.05000000000000003e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cube-cbrt52.4%
pow252.4%
Applied egg-rr52.4%
if 2.05000000000000003e-16 < b < 2.19999999999999995e71Initial program 41.3%
Simplified27.3%
Taylor expanded in x-scale around 0 64.9%
Simplified73.9%
add-exp-log40.8%
Applied egg-rr40.8%
Taylor expanded in angle around 0 64.9%
associate-*r/64.9%
Simplified73.9%
if 2.19999999999999995e71 < b < 4.19999999999999993e129Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 4.19999999999999993e129 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in x-scale around 0 5.7%
Simplified5.8%
add-sqr-sqrt5.8%
pow25.8%
Applied egg-rr5.8%
Taylor expanded in a around 0 70.8%
associate-*r/70.8%
*-commutative70.8%
times-frac70.9%
associate-*r*67.9%
*-commutative67.9%
associate-*r*70.8%
*-commutative70.8%
Simplified70.8%
Final simplification57.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 6.2e-17)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (pow (cbrt PI) 2.0)))))
(cos t_1))))
PI))
(if (<= b_m 2.15e+71)
(*
180.0
(/
(atan
(*
-180.0
(/
(* y-scale (pow b_m 2.0))
(* angle (* x-scale (* PI (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 4.2e+129)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (sin t_1))) PI))
(*
180.0
(/
(atan
(* -0.5 (* y-scale (* (/ 2.0 (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 6.2e-17) {
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(t_1)))) / ((double) M_PI));
} else if (b_m <= 2.15e+71) {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale * pow(b_m, 2.0)) / (angle * (x_45_scale * (((double) M_PI) * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 4.2e+129) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin(t_1))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / 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 = Math.PI * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 6.2e-17) {
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(t_1)))) / Math.PI);
} else if (b_m <= 2.15e+71) {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale * Math.pow(b_m, 2.0)) / (angle * (x_45_scale * (Math.PI * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else if (b_m <= 4.2e+129) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin(t_1))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / 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(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 6.2e-17) 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(t_1)))) / pi)); elseif (b_m <= 2.15e+71) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale * (b_m ^ 2.0)) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 4.2e+129) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(t_1))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / sin(t_0)) * Float64(cos(t_0) / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 6.2e-17], 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[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.15e+71], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale * N[Power[b$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.2e+129], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 6.2 \cdot 10^{-17}:\\
\;\;\;\;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 t\_1}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.15 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale \cdot {b\_m}^{2}}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.2 \cdot 10^{+129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin t\_1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{\sin t\_0} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 6.1999999999999997e-17Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cube-cbrt52.4%
pow252.4%
Applied egg-rr52.4%
if 6.1999999999999997e-17 < b < 2.14999999999999992e71Initial program 41.3%
Simplified27.3%
Taylor expanded in x-scale around 0 64.9%
Simplified73.9%
Taylor expanded in angle around 0 65.0%
if 2.14999999999999992e71 < b < 4.19999999999999993e129Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 4.19999999999999993e129 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in x-scale around 0 5.7%
Simplified5.8%
add-sqr-sqrt5.8%
pow25.8%
Applied egg-rr5.8%
Taylor expanded in a around 0 70.8%
associate-*r/70.8%
*-commutative70.8%
times-frac70.9%
associate-*r*67.9%
*-commutative67.9%
associate-*r*70.8%
*-commutative70.8%
Simplified70.8%
Final simplification56.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 8e-17)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(sin (* 0.005555555555555556 (* angle (cbrt (pow PI 3.0)))))
(cos t_1))))
PI))
(if (<= b_m 1.9e+71)
(*
180.0
(/
(atan
(*
-180.0
(/
(* y-scale (pow b_m 2.0))
(* angle (* x-scale (* PI (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 4.4e+129)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (sin t_1))) PI))
(*
180.0
(/
(atan
(* -0.5 (* y-scale (* (/ 2.0 (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 8e-17) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (sin((0.005555555555555556 * (angle * cbrt(pow(((double) M_PI), 3.0))))) / cos(t_1)))) / ((double) M_PI));
} else if (b_m <= 1.9e+71) {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale * pow(b_m, 2.0)) / (angle * (x_45_scale * (((double) M_PI) * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 4.4e+129) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin(t_1))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / 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 = Math.PI * (0.005555555555555556 * angle);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 8e-17) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (Math.sin((0.005555555555555556 * (angle * Math.cbrt(Math.pow(Math.PI, 3.0))))) / Math.cos(t_1)))) / Math.PI);
} else if (b_m <= 1.9e+71) {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale * Math.pow(b_m, 2.0)) / (angle * (x_45_scale * (Math.PI * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else if (b_m <= 4.4e+129) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin(t_1))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / 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(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 8e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * cbrt((pi ^ 3.0))))) / cos(t_1)))) / pi)); elseif (b_m <= 1.9e+71) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale * (b_m ^ 2.0)) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 4.4e+129) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(t_1))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / sin(t_0)) * Float64(cos(t_0) / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 8e-17], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+71], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale * N[Power[b$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.4e+129], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 8 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{{\pi}^{3}}\right)\right)}{\cos t\_1}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale \cdot {b\_m}^{2}}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.4 \cdot 10^{+129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin t\_1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{\sin t\_0} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 8.00000000000000057e-17Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cbrt-cube54.0%
pow354.0%
Applied egg-rr54.0%
if 8.00000000000000057e-17 < b < 1.9e71Initial program 41.3%
Simplified27.3%
Taylor expanded in x-scale around 0 64.9%
Simplified73.9%
Taylor expanded in angle around 0 65.0%
if 1.9e71 < b < 4.3999999999999999e129Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 4.3999999999999999e129 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in x-scale around 0 5.7%
Simplified5.8%
add-sqr-sqrt5.8%
pow25.8%
Applied egg-rr5.8%
Taylor expanded in a around 0 70.8%
associate-*r/70.8%
*-commutative70.8%
times-frac70.9%
associate-*r*67.9%
*-commutative67.9%
associate-*r*70.8%
*-commutative70.8%
Simplified70.8%
Final simplification57.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1 (sin t_0))
(t_2 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 1.16e-234)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 (cos t_2)))) PI))
(if (<= b_m 2.3e-16)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(sin (* 0.005555555555555556 (* angle (cbrt (pow PI 3.0)))))))
PI))
(if (<= b_m 2.15e+71)
(*
180.0
(/
(atan
(*
-180.0
(/
(* y-scale (pow b_m 2.0))
(* angle (* x-scale (* PI (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 4.2e+129)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (sin t_2))) PI))
(*
180.0
(/
(atan (* -0.5 (* y-scale (* (/ 2.0 t_1) (/ (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = sin(t_0);
double t_2 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.16e-234) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos(t_2)))) / ((double) M_PI));
} else if (b_m <= 2.3e-16) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * cbrt(pow(((double) M_PI), 3.0))))))) / ((double) M_PI));
} else if (b_m <= 2.15e+71) {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale * pow(b_m, 2.0)) / (angle * (x_45_scale * (((double) M_PI) * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 4.2e+129) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin(t_2))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / t_1) * (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 = Math.PI * (0.005555555555555556 * angle);
double t_1 = Math.sin(t_0);
double t_2 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 1.16e-234) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_1 / Math.cos(t_2)))) / Math.PI);
} else if (b_m <= 2.3e-16) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin((0.005555555555555556 * (angle * Math.cbrt(Math.pow(Math.PI, 3.0))))))) / Math.PI);
} else if (b_m <= 2.15e+71) {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale * Math.pow(b_m, 2.0)) / (angle * (x_45_scale * (Math.PI * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else if (b_m <= 4.2e+129) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin(t_2))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / t_1) * (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(pi * Float64(0.005555555555555556 * angle)) t_1 = sin(t_0) t_2 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 1.16e-234) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / cos(t_2)))) / pi)); elseif (b_m <= 2.3e-16) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(Float64(0.005555555555555556 * Float64(angle * cbrt((pi ^ 3.0))))))) / pi)); elseif (b_m <= 2.15e+71) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale * (b_m ^ 2.0)) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 4.2e+129) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(t_2))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / t_1) * Float64(cos(t_0) / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.16e-234], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.3e-16], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.15e+71], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale * N[Power[b$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.2e+129], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / t$95$1), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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)\\
t_1 := \sin t\_0\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 1.16 \cdot 10^{-234}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{\cos t\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.3 \cdot 10^{-16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.15 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale \cdot {b\_m}^{2}}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.2 \cdot 10^{+129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin t\_2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{t\_1} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.16000000000000004e-234Initial program 16.7%
Simplified14.6%
Taylor expanded in x-scale around 0 22.8%
Simplified27.5%
Taylor expanded in a around inf 43.2%
times-frac45.0%
Simplified45.0%
add-cbrt-cube47.1%
pow347.1%
Applied egg-rr47.1%
Taylor expanded in angle around inf 45.0%
associate-*r*45.8%
*-commutative45.8%
Simplified45.8%
if 1.16000000000000004e-234 < b < 2.2999999999999999e-16Initial program 8.3%
Simplified7.1%
Taylor expanded in x-scale around 0 32.8%
Simplified37.4%
Taylor expanded in a around inf 58.3%
times-frac64.3%
Simplified64.3%
add-cbrt-cube67.5%
pow367.5%
Applied egg-rr67.5%
Taylor expanded in angle around 0 65.8%
if 2.2999999999999999e-16 < b < 2.14999999999999992e71Initial program 41.3%
Simplified27.3%
Taylor expanded in x-scale around 0 64.9%
Simplified73.9%
Taylor expanded in angle around 0 65.0%
if 2.14999999999999992e71 < b < 4.19999999999999993e129Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 4.19999999999999993e129 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in x-scale around 0 5.7%
Simplified5.8%
add-sqr-sqrt5.8%
pow25.8%
Applied egg-rr5.8%
Taylor expanded in a around 0 70.8%
associate-*r/70.8%
*-commutative70.8%
times-frac70.9%
associate-*r*67.9%
*-commutative67.9%
associate-*r*70.8%
*-commutative70.8%
Simplified70.8%
Final simplification56.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle))) (t_1 (sin t_0)))
(if (<= b_m 8e-233)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/ t_1 (cos (* 0.005555555555555556 (* angle PI))))))
PI))
(if (<= b_m 5.6e-17)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(sin (* 0.005555555555555556 (* angle (cbrt (pow PI 3.0)))))))
PI))
(*
180.0
(/
(atan (* -0.5 (* y-scale (* (/ 2.0 t_1) (/ (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = sin(t_0);
double tmp;
if (b_m <= 8e-233) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_1 / cos((0.005555555555555556 * (angle * ((double) M_PI))))))) / ((double) M_PI));
} else if (b_m <= 5.6e-17) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * cbrt(pow(((double) M_PI), 3.0))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / t_1) * (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 = Math.PI * (0.005555555555555556 * angle);
double t_1 = Math.sin(t_0);
double tmp;
if (b_m <= 8e-233) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_1 / Math.cos((0.005555555555555556 * (angle * Math.PI)))))) / Math.PI);
} else if (b_m <= 5.6e-17) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin((0.005555555555555556 * (angle * Math.cbrt(Math.pow(Math.PI, 3.0))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / t_1) * (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(pi * Float64(0.005555555555555556 * angle)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 8e-233) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_1 / cos(Float64(0.005555555555555556 * Float64(angle * pi)))))) / pi)); elseif (b_m <= 5.6e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(Float64(0.005555555555555556 * Float64(angle * cbrt((pi ^ 3.0))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / t_1) * Float64(cos(t_0) / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 8e-233], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$1 / N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.6e-17], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / t$95$1), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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)\\
t_1 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 8 \cdot 10^{-233}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.6 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{t\_1} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.99999999999999966e-233Initial program 16.7%
Simplified14.6%
Taylor expanded in x-scale around 0 22.8%
Simplified27.5%
Taylor expanded in a around inf 43.2%
times-frac45.0%
Simplified45.0%
add-cbrt-cube47.1%
pow347.1%
Applied egg-rr47.1%
Taylor expanded in angle around inf 45.0%
associate-*r*45.8%
*-commutative45.8%
Simplified45.8%
if 7.99999999999999966e-233 < b < 5.5999999999999998e-17Initial program 8.3%
Simplified7.1%
Taylor expanded in x-scale around 0 32.8%
Simplified37.4%
Taylor expanded in a around inf 58.3%
times-frac64.3%
Simplified64.3%
add-cbrt-cube67.5%
pow367.5%
Applied egg-rr67.5%
Taylor expanded in angle around 0 65.8%
if 5.5999999999999998e-17 < b Initial program 19.4%
Simplified14.2%
Taylor expanded in x-scale around 0 29.5%
Simplified32.4%
add-sqr-sqrt34.1%
pow234.1%
Applied egg-rr34.1%
Taylor expanded in a around 0 60.3%
associate-*r/60.3%
*-commutative60.3%
times-frac60.3%
associate-*r*58.6%
*-commutative58.6%
associate-*r*60.3%
*-commutative60.3%
Simplified60.3%
Final simplification54.8%
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 2.8e-33)
(/ (* 180.0 (atan (* (/ y-scale x-scale) (tan t_0)))) PI)
(*
180.0
(/
(atan (* -0.5 (* y-scale (* (/ 2.0 (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 = ((double) M_PI) * (0.005555555555555556 * angle);
double tmp;
if (b_m <= 2.8e-33) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / 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 = Math.PI * (0.005555555555555556 * angle);
double tmp;
if (b_m <= 2.8e-33) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / 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 = math.pi * (0.005555555555555556 * angle) tmp = 0 if b_m <= 2.8e-33: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan(t_0)))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * ((2.0 / 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(pi * Float64(0.005555555555555556 * angle)) tmp = 0.0 if (b_m <= 2.8e-33) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / sin(t_0)) * Float64(cos(t_0) / 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 = pi * (0.005555555555555556 * angle); tmp = 0.0; if (b_m <= 2.8e-33) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / pi; else tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 2.8e-33], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] / x$45$scale), $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 2.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{\sin t\_0} \cdot \frac{\cos t\_0}{x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.8e-33Initial program 13.6%
Simplified12.4%
Taylor expanded in x-scale around 0 26.8%
Simplified31.5%
Taylor expanded in a around inf 47.7%
times-frac50.9%
Simplified50.9%
add-cbrt-cube54.0%
pow354.0%
Applied egg-rr54.0%
associate-*r/54.1%
rem-cbrt-cube51.0%
tan-quot51.0%
associate-*r*49.7%
Applied egg-rr49.7%
if 2.8e-33 < b Initial program 19.7%
Simplified13.5%
Taylor expanded in x-scale around 0 28.0%
Simplified30.8%
add-sqr-sqrt32.4%
pow232.4%
Applied egg-rr32.4%
Taylor expanded in a around 0 57.4%
associate-*r/57.4%
*-commutative57.4%
times-frac57.5%
associate-*r*57.1%
*-commutative57.1%
associate-*r*58.7%
*-commutative58.7%
Simplified58.7%
Final simplification52.4%
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 1.62e-34)
(/ (* 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 = ((double) M_PI) * (0.005555555555555556 * angle);
double tmp;
if (b_m <= 1.62e-34) {
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 = Math.PI * (0.005555555555555556 * angle);
double tmp;
if (b_m <= 1.62e-34) {
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 = math.pi * (0.005555555555555556 * angle) tmp = 0 if b_m <= 1.62e-34: 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(pi * Float64(0.005555555555555556 * angle)) tmp = 0.0 if (b_m <= 1.62e-34) 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 / 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 = pi * (0.005555555555555556 * angle); tmp = 0.0; if (b_m <= 1.62e-34) 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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.62e-34], 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 / 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 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
\mathbf{if}\;b\_m \leq 1.62 \cdot 10^{-34}:\\
\;\;\;\;\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}{x-scale} \cdot \frac{\cos t\_0}{-\sin t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.62000000000000006e-34Initial program 13.6%
Simplified12.4%
Taylor expanded in x-scale around 0 26.8%
Simplified31.5%
Taylor expanded in a around inf 47.7%
times-frac50.9%
Simplified50.9%
add-cbrt-cube54.0%
pow354.0%
Applied egg-rr54.0%
associate-*r/54.1%
rem-cbrt-cube51.0%
tan-quot51.0%
associate-*r*49.7%
Applied egg-rr49.7%
if 1.62000000000000006e-34 < b Initial program 19.7%
Simplified13.5%
Taylor expanded in x-scale around 0 28.0%
Simplified30.8%
add-sqr-sqrt32.4%
pow232.4%
Applied egg-rr32.4%
Taylor expanded in a around 0 57.5%
mul-1-neg57.5%
times-frac59.8%
distribute-rgt-neg-in59.8%
associate-*r*58.2%
*-commutative58.2%
associate-*r*61.1%
*-commutative61.1%
Simplified61.1%
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.6e-16)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* PI (* 0.005555555555555556 angle))))))
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 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.6e-16) {
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((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 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 1.6e-16) {
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((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 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 1.6e-16: 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((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(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 1.6e-16) tmp = Float64(Float64(180.0 * 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(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 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 1.6e-16) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle)))))) / 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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.6e-16], N[(N[(180.0 * 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] / Pi), $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 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 1.6 \cdot 10^{-16}:\\
\;\;\;\;\frac{180 \cdot \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(y-scale \cdot \frac{\cos t\_0}{x-scale \cdot \left(-\sin t\_0\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.60000000000000011e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cbrt-cube54.0%
pow354.0%
Applied egg-rr54.0%
associate-*r/54.0%
rem-cbrt-cube51.6%
tan-quot51.6%
associate-*r*49.8%
Applied egg-rr49.8%
if 1.60000000000000011e-16 < b Initial program 19.4%
Simplified14.2%
Taylor expanded in x-scale around 0 29.5%
Simplified32.4%
Taylor expanded in a around 0 60.3%
mul-1-neg60.3%
associate-/l*60.3%
Simplified60.3%
Final simplification52.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 8e-7)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* PI (* 0.005555555555555556 angle))))))
PI)
(if (<= b_m 2.05e+71)
(*
180.0
(log
(exp (/ (atan (* -180.0 (/ (/ y-scale angle) (* x-scale PI)))) PI))))
(if (<= b_m 6.5e+130)
(*
180.0
(/
(atan
(* (/ y-scale x-scale) (sin (* 0.005555555555555556 (* angle PI)))))
PI))
(*
180.0
(/ (atan (* (/ (/ y-scale angle) PI) (/ -180.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 tmp;
if (b_m <= 8e-7) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle)))))) / ((double) M_PI);
} else if (b_m <= 2.05e+71) {
tmp = 180.0 * log(exp((atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * ((double) M_PI))))) / ((double) M_PI))));
} else if (b_m <= 6.5e+130) {
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((((y_45_scale / angle) / ((double) M_PI)) * (-180.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 tmp;
if (b_m <= 8e-7) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle)))))) / Math.PI;
} else if (b_m <= 2.05e+71) {
tmp = 180.0 * Math.log(Math.exp((Math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * Math.PI)))) / Math.PI)));
} else if (b_m <= 6.5e+130) {
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((((y_45_scale / angle) / Math.PI) * (-180.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): tmp = 0 if b_m <= 8e-7: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle)))))) / math.pi elif b_m <= 2.05e+71: tmp = 180.0 * math.log(math.exp((math.atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * math.pi)))) / math.pi))) elif b_m <= 6.5e+130: 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((((y_45_scale / angle) / math.pi) * (-180.0 / x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 8e-7) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle)))))) / pi); elseif (b_m <= 2.05e+71) tmp = Float64(180.0 * log(exp(Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(x_45_scale * pi)))) / pi)))); elseif (b_m <= 6.5e+130) 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(Float64(Float64(y_45_scale / angle) / pi) * Float64(-180.0 / x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 8e-7) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle)))))) / pi; elseif (b_m <= 2.05e+71) tmp = 180.0 * log(exp((atan((-180.0 * ((y_45_scale / angle) / (x_45_scale * pi)))) / pi))); elseif (b_m <= 6.5e+130) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (atan((((y_45_scale / angle) / pi) * (-180.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_] := If[LessEqual[b$95$m, 8e-7], N[(N[(180.0 * 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] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 2.05e+71], N[(180.0 * N[Log[N[Exp[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]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 6.5e+130], 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[(N[(N[(y$45$scale / angle), $MachinePrecision] / Pi), $MachinePrecision] * N[(-180.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 8 \cdot 10^{-7}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.05 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \log \left(e^{\frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{x-scale \cdot \pi}\right)}{\pi}}\right)\\
\mathbf{elif}\;b\_m \leq 6.5 \cdot 10^{+130}:\\
\;\;\;\;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(\frac{\frac{y-scale}{angle}}{\pi} \cdot \frac{-180}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.9999999999999996e-7Initial program 14.1%
Simplified11.9%
Taylor expanded in x-scale around 0 27.2%
Simplified31.8%
Taylor expanded in a around inf 48.4%
times-frac51.5%
Simplified51.5%
add-cbrt-cube53.9%
pow353.9%
Applied egg-rr53.9%
associate-*r/54.0%
rem-cbrt-cube51.6%
tan-quot51.6%
associate-*r*49.8%
Applied egg-rr49.8%
if 7.9999999999999996e-7 < b < 2.0500000000000001e71Initial program 44.6%
Simplified33.3%
Taylor expanded in angle around 0 28.6%
associate-/l*28.6%
distribute-lft-out--28.6%
Simplified28.6%
Taylor expanded in a around 0 52.2%
add-log-exp62.5%
*-commutative62.5%
associate-/r*62.5%
*-commutative62.5%
Applied egg-rr62.5%
if 2.0500000000000001e71 < b < 6.5e130Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 6.5e130 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in angle around 0 5.4%
associate-/l*5.4%
distribute-lft-out--5.4%
Simplified5.4%
Taylor expanded in a around 0 70.3%
associate-*r/70.6%
*-commutative70.6%
Applied egg-rr70.6%
associate-/l*70.3%
*-commutative70.3%
associate-/l/70.3%
*-commutative70.3%
associate-*l/70.5%
times-frac70.5%
Simplified70.5%
Final simplification54.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.9e-16)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* PI (* 0.005555555555555556 angle))))))
PI)
(if (<= b_m 2.1e+71)
(*
180.0
(/ (atan (* -180.0 (/ 1.0 (/ (* angle (* x-scale PI)) y-scale)))) PI))
(if (<= b_m 1.65e+130)
(*
180.0
(/
(atan
(* (/ y-scale x-scale) (sin (* 0.005555555555555556 (* angle PI)))))
PI))
(*
180.0
(/ (atan (* (/ (/ y-scale angle) PI) (/ -180.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 tmp;
if (b_m <= 2.9e-16) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle)))))) / ((double) M_PI);
} else if (b_m <= 2.1e+71) {
tmp = 180.0 * (atan((-180.0 * (1.0 / ((angle * (x_45_scale * ((double) M_PI))) / y_45_scale)))) / ((double) M_PI));
} else if (b_m <= 1.65e+130) {
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((((y_45_scale / angle) / ((double) M_PI)) * (-180.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 tmp;
if (b_m <= 2.9e-16) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle)))))) / Math.PI;
} else if (b_m <= 2.1e+71) {
tmp = 180.0 * (Math.atan((-180.0 * (1.0 / ((angle * (x_45_scale * Math.PI)) / y_45_scale)))) / Math.PI);
} else if (b_m <= 1.65e+130) {
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((((y_45_scale / angle) / Math.PI) * (-180.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): tmp = 0 if b_m <= 2.9e-16: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle)))))) / math.pi elif b_m <= 2.1e+71: tmp = 180.0 * (math.atan((-180.0 * (1.0 / ((angle * (x_45_scale * math.pi)) / y_45_scale)))) / math.pi) elif b_m <= 1.65e+130: 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((((y_45_scale / angle) / math.pi) * (-180.0 / x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.9e-16) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle)))))) / pi); elseif (b_m <= 2.1e+71) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(1.0 / Float64(Float64(angle * Float64(x_45_scale * pi)) / y_45_scale)))) / pi)); elseif (b_m <= 1.65e+130) 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(Float64(Float64(y_45_scale / angle) / pi) * Float64(-180.0 / x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.9e-16) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle)))))) / pi; elseif (b_m <= 2.1e+71) tmp = 180.0 * (atan((-180.0 * (1.0 / ((angle * (x_45_scale * pi)) / y_45_scale)))) / pi); elseif (b_m <= 1.65e+130) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (atan((((y_45_scale / angle) / pi) * (-180.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_] := If[LessEqual[b$95$m, 2.9e-16], N[(N[(180.0 * 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] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 2.1e+71], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(1.0 / N[(N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.65e+130], 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[(N[(N[(y$45$scale / angle), $MachinePrecision] / Pi), $MachinePrecision] * N[(-180.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.9 \cdot 10^{-16}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.1 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{1}{\frac{angle \cdot \left(x-scale \cdot \pi\right)}{y-scale}}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.65 \cdot 10^{+130}:\\
\;\;\;\;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(\frac{\frac{y-scale}{angle}}{\pi} \cdot \frac{-180}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.8999999999999998e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cbrt-cube54.0%
pow354.0%
Applied egg-rr54.0%
associate-*r/54.0%
rem-cbrt-cube51.6%
tan-quot51.6%
associate-*r*49.8%
Applied egg-rr49.8%
if 2.8999999999999998e-16 < b < 2.09999999999999989e71Initial program 41.3%
Simplified27.3%
Taylor expanded in angle around 0 23.6%
associate-/l*23.6%
distribute-lft-out--23.6%
Simplified23.6%
Taylor expanded in a around 0 53.0%
clear-num56.3%
inv-pow56.3%
*-commutative56.3%
Applied egg-rr56.3%
unpow-156.3%
Simplified56.3%
if 2.09999999999999989e71 < b < 1.65e130Initial program 25.3%
Simplified25.3%
Taylor expanded in x-scale around 0 42.4%
Simplified42.7%
Taylor expanded in a around inf 52.5%
times-frac52.5%
Simplified52.5%
Taylor expanded in angle around 0 63.2%
if 1.65e130 < b Initial program 5.2%
Simplified3.4%
Taylor expanded in angle around 0 5.4%
associate-/l*5.4%
distribute-lft-out--5.4%
Simplified5.4%
Taylor expanded in a around 0 70.3%
associate-*r/70.6%
*-commutative70.6%
Applied egg-rr70.6%
associate-/l*70.3%
*-commutative70.3%
associate-/l/70.3%
*-commutative70.3%
associate-*l/70.5%
times-frac70.5%
Simplified70.5%
Final simplification54.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.4e-16)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* PI (* 0.005555555555555556 angle))))))
PI)
(* 180.0 (/ (atan (* (/ (/ y-scale angle) PI) (/ -180.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 tmp;
if (b_m <= 1.4e-16) {
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((((y_45_scale / angle) / ((double) M_PI)) * (-180.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 tmp;
if (b_m <= 1.4e-16) {
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((((y_45_scale / angle) / Math.PI) * (-180.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): tmp = 0 if b_m <= 1.4e-16: 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((((y_45_scale / angle) / math.pi) * (-180.0 / x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.4e-16) tmp = Float64(Float64(180.0 * 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(Float64(Float64(y_45_scale / angle) / pi) * Float64(-180.0 / x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.4e-16) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle)))))) / pi; else tmp = 180.0 * (atan((((y_45_scale / angle) / pi) * (-180.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_] := If[LessEqual[b$95$m, 1.4e-16], N[(N[(180.0 * 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] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale / angle), $MachinePrecision] / Pi), $MachinePrecision] * N[(-180.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.4 \cdot 10^{-16}:\\
\;\;\;\;\frac{180 \cdot \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(\frac{\frac{y-scale}{angle}}{\pi} \cdot \frac{-180}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.4000000000000001e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
add-cbrt-cube54.0%
pow354.0%
Applied egg-rr54.0%
associate-*r/54.0%
rem-cbrt-cube51.6%
tan-quot51.6%
associate-*r*49.8%
Applied egg-rr49.8%
if 1.4000000000000001e-16 < b Initial program 19.4%
Simplified14.2%
Taylor expanded in angle around 0 14.2%
associate-/l*14.2%
distribute-lft-out--14.2%
Simplified14.2%
Taylor expanded in a around 0 60.7%
associate-*r/60.8%
*-commutative60.8%
Applied egg-rr60.8%
associate-/l*60.7%
*-commutative60.7%
associate-/l/60.7%
*-commutative60.7%
associate-*l/60.8%
times-frac60.8%
Simplified60.8%
Final simplification52.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.05e-16)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI))))))
PI)
(* 180.0 (/ (atan (* (/ (/ y-scale angle) PI) (/ -180.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 tmp;
if (b_m <= 2.05e-16) {
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 / angle) / ((double) M_PI)) * (-180.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 tmp;
if (b_m <= 2.05e-16) {
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 / angle) / Math.PI) * (-180.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): tmp = 0 if b_m <= 2.05e-16: 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 / angle) / math.pi) * (-180.0 / x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.05e-16) 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(Float64(Float64(y_45_scale / angle) / pi) * Float64(-180.0 / x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.05e-16) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi)))))) / pi; else tmp = 180.0 * (atan((((y_45_scale / angle) / pi) * (-180.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_] := If[LessEqual[b$95$m, 2.05e-16], 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[(N[(N[(y$45$scale / angle), $MachinePrecision] / Pi), $MachinePrecision] * N[(-180.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.05 \cdot 10^{-16}:\\
\;\;\;\;\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{\frac{y-scale}{angle}}{\pi} \cdot \frac{-180}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.05000000000000003e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
associate-*r/51.6%
quot-tan51.6%
Applied egg-rr51.6%
if 2.05000000000000003e-16 < b Initial program 19.4%
Simplified14.2%
Taylor expanded in angle around 0 14.2%
associate-/l*14.2%
distribute-lft-out--14.2%
Simplified14.2%
Taylor expanded in a around 0 60.7%
associate-*r/60.8%
*-commutative60.8%
Applied egg-rr60.8%
associate-/l*60.7%
*-commutative60.7%
associate-/l/60.7%
*-commutative60.7%
associate-*l/60.8%
times-frac60.8%
Simplified60.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.9e-16)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(* 180.0 (/ (atan (* (/ (/ y-scale angle) PI) (/ -180.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 tmp;
if (b_m <= 2.9e-16) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((y_45_scale / angle) / ((double) M_PI)) * (-180.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 tmp;
if (b_m <= 2.9e-16) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((y_45_scale / angle) / Math.PI) * (-180.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): tmp = 0 if b_m <= 2.9e-16: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) else: tmp = 180.0 * (math.atan((((y_45_scale / angle) / math.pi) * (-180.0 / x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.9e-16) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale / angle) / pi) * Float64(-180.0 / x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.9e-16) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); else tmp = 180.0 * (atan((((y_45_scale / angle) / pi) * (-180.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_] := If[LessEqual[b$95$m, 2.9e-16], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale / angle), $MachinePrecision] / Pi), $MachinePrecision] * N[(-180.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.9 \cdot 10^{-16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale}{angle}}{\pi} \cdot \frac{-180}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.8999999999999998e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
Taylor expanded in angle around 0 45.7%
associate-/l*50.2%
associate-/l*50.2%
Simplified50.2%
if 2.8999999999999998e-16 < b Initial program 19.4%
Simplified14.2%
Taylor expanded in angle around 0 14.2%
associate-/l*14.2%
distribute-lft-out--14.2%
Simplified14.2%
Taylor expanded in a around 0 60.7%
associate-*r/60.8%
*-commutative60.8%
Applied egg-rr60.8%
associate-/l*60.7%
*-commutative60.7%
associate-/l/60.7%
*-commutative60.7%
associate-*l/60.8%
times-frac60.8%
Simplified60.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 3.1e-16)
(*
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 <= 3.1e-16) {
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 <= 3.1e-16) {
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 <= 3.1e-16: 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 <= 3.1e-16) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 3.1e-16) 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, 3.1e-16], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 3.1 \cdot 10^{-16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.1000000000000001e-16Initial program 13.8%
Simplified12.1%
Taylor expanded in x-scale around 0 26.2%
Simplified30.9%
Taylor expanded in a around inf 48.3%
times-frac51.5%
Simplified51.5%
Taylor expanded in angle around 0 45.7%
associate-/l*50.2%
associate-/l*50.2%
Simplified50.2%
if 3.1000000000000001e-16 < b Initial program 19.4%
Simplified14.2%
Taylor expanded in angle around 0 14.2%
associate-/l*14.2%
distribute-lft-out--14.2%
Simplified14.2%
Taylor expanded in a around 0 60.7%
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 15.4%
Simplified12.7%
Taylor expanded in angle around 0 10.5%
associate-/l*10.5%
distribute-lft-out--10.5%
Simplified10.5%
Taylor expanded in a around 0 39.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 15.4%
Simplified12.7%
Taylor expanded in angle around 0 10.5%
associate-/l*10.5%
distribute-lft-out--10.5%
Simplified10.5%
Taylor expanded in a around inf 12.3%
herbie shell --seed 2024131
(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)))