
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2
(*
0.005555555555555556
(* angle (* (cbrt PI) (* (cbrt PI) (cbrt PI))))))
(t_3 (sin t_2))
(t_4 (cos t_0)))
(if (<= b_m 1.4e-104)
(*
180.0
(/
(atan
(/
(* y-scale t_1)
(*
x-scale
(cos (* 0.005555555555555556 (* angle (cbrt (* PI (* PI PI)))))))))
PI))
(if (<= b_m 7.5e-34)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(* 2.0 (pow (hypot (* t_1 a) (* b_m t_4)) 2.0))
(* (* x-scale t_4) (* t_3 (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 1.8e+54)
(* 180.0 (* (atan (* (/ y-scale x-scale) (tan t_2))) (/ 1.0 PI)))
(*
180.0
(/
(atan (* -0.5 (* y-scale (* 2.0 (/ t_4 (* x-scale t_3))))))
PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = 0.005555555555555556 * (angle * (cbrt(((double) M_PI)) * (cbrt(((double) M_PI)) * cbrt(((double) M_PI)))));
double t_3 = sin(t_2);
double t_4 = cos(t_0);
double tmp;
if (b_m <= 1.4e-104) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * cos((0.005555555555555556 * (angle * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))))))) / ((double) M_PI));
} else if (b_m <= 7.5e-34) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 * pow(hypot((t_1 * a), (b_m * t_4)), 2.0)) / ((x_45_scale * t_4) * (t_3 * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 1.8e+54) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_2))) * (1.0 / ((double) M_PI)));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (t_4 / (x_45_scale * t_3)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double t_2 = 0.005555555555555556 * (angle * (Math.cbrt(Math.PI) * (Math.cbrt(Math.PI) * Math.cbrt(Math.PI))));
double t_3 = Math.sin(t_2);
double t_4 = Math.cos(t_0);
double tmp;
if (b_m <= 1.4e-104) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * Math.cos((0.005555555555555556 * (angle * Math.cbrt((Math.PI * (Math.PI * Math.PI))))))))) / Math.PI);
} else if (b_m <= 7.5e-34) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 * Math.pow(Math.hypot((t_1 * a), (b_m * t_4)), 2.0)) / ((x_45_scale * t_4) * (t_3 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else if (b_m <= 1.8e+54) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_2))) * (1.0 / Math.PI));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (t_4 / (x_45_scale * t_3)))))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * Float64(cbrt(pi) * cbrt(pi))))) t_3 = sin(t_2) t_4 = cos(t_0) tmp = 0.0 if (b_m <= 1.4e-104) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * cos(Float64(0.005555555555555556 * Float64(angle * cbrt(Float64(pi * Float64(pi * pi))))))))) / pi)); elseif (b_m <= 7.5e-34) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 * (hypot(Float64(t_1 * a), Float64(b_m * t_4)) ^ 2.0)) / Float64(Float64(x_45_scale * t_4) * Float64(t_3 * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 1.8e+54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_2))) * Float64(1.0 / pi))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(t_4 / Float64(x_45_scale * t_3)))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.4e-104], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.5e-34], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 * N[Power[N[Sqrt[N[(t$95$1 * a), $MachinePrecision] ^ 2 + N[(b$95$m * t$95$4), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * t$95$4), $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.8e+54], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(t$95$4 / N[(x$45$scale * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot \left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)\right)\right)\\
t_3 := \sin t\_2\\
t_4 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 1.4 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.5 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{2 \cdot {\left(\mathsf{hypot}\left(t\_1 \cdot a, b\_m \cdot t\_4\right)\right)}^{2}}{\left(x-scale \cdot t\_4\right) \cdot \left(t\_3 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.8 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_2\right) \cdot \frac{1}{\pi}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{t\_4}{x-scale \cdot t\_3}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.4e-104Initial program 14.0%
Simplified13.3%
Taylor expanded in x-scale around 0 27.0%
Simplified30.7%
Taylor expanded in a around inf 46.8%
add-cbrt-cube48.7%
Applied egg-rr48.7%
if 1.4e-104 < b < 7.5000000000000004e-34Initial program 25.0%
Simplified31.6%
Taylor expanded in x-scale around 0 38.7%
Simplified52.7%
add-cube-cbrt59.6%
Applied egg-rr59.6%
if 7.5000000000000004e-34 < b < 1.8000000000000001e54Initial program 6.5%
Simplified7.0%
Taylor expanded in x-scale around 0 26.7%
Simplified27.4%
Taylor expanded in a around inf 56.6%
div-inv56.6%
times-frac60.2%
quot-tan60.2%
Applied egg-rr60.2%
add-cube-cbrt26.5%
Applied egg-rr60.9%
if 1.8000000000000001e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in x-scale around 0 13.5%
Simplified13.6%
Taylor expanded in a around 0 57.1%
add-cube-cbrt15.8%
Applied egg-rr59.4%
Final simplification52.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1
(*
0.005555555555555556
(* angle (* (cbrt PI) (* (cbrt PI) (cbrt PI))))))
(t_2 (sin t_1))
(t_3 (sin t_0))
(t_4 (cos t_0)))
(if (<= b_m 9e-105)
(*
180.0
(/
(atan
(/
(* y-scale t_3)
(*
x-scale
(cos (* 0.005555555555555556 (* angle (cbrt (* PI (* PI PI)))))))))
PI))
(if (<= b_m 5.6e-34)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(/
(* 2.0 (pow (hypot (* t_3 a) b_m) 2.0))
(* (* x-scale t_4) (* t_2 (- (pow b_m 2.0) (pow a 2.0))))))))
PI))
(if (<= b_m 2.2e+54)
(* 180.0 (* (atan (* (/ y-scale x-scale) (tan t_1))) (/ 1.0 PI)))
(*
180.0
(/
(atan (* -0.5 (* y-scale (* 2.0 (/ t_4 (* x-scale t_2))))))
PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = 0.005555555555555556 * (angle * (cbrt(((double) M_PI)) * (cbrt(((double) M_PI)) * cbrt(((double) M_PI)))));
double t_2 = sin(t_1);
double t_3 = sin(t_0);
double t_4 = cos(t_0);
double tmp;
if (b_m <= 9e-105) {
tmp = 180.0 * (atan(((y_45_scale * t_3) / (x_45_scale * cos((0.005555555555555556 * (angle * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))))))) / ((double) M_PI));
} else if (b_m <= 5.6e-34) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 * pow(hypot((t_3 * a), b_m), 2.0)) / ((x_45_scale * t_4) * (t_2 * (pow(b_m, 2.0) - pow(a, 2.0)))))))) / ((double) M_PI));
} else if (b_m <= 2.2e+54) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_1))) * (1.0 / ((double) M_PI)));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (t_4 / (x_45_scale * t_2)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = 0.005555555555555556 * (angle * (Math.cbrt(Math.PI) * (Math.cbrt(Math.PI) * Math.cbrt(Math.PI))));
double t_2 = Math.sin(t_1);
double t_3 = Math.sin(t_0);
double t_4 = Math.cos(t_0);
double tmp;
if (b_m <= 9e-105) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_3) / (x_45_scale * Math.cos((0.005555555555555556 * (angle * Math.cbrt((Math.PI * (Math.PI * Math.PI))))))))) / Math.PI);
} else if (b_m <= 5.6e-34) {
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_4) * (t_2 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0)))))))) / Math.PI);
} else if (b_m <= 2.2e+54) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_1))) * (1.0 / Math.PI));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (t_4 / (x_45_scale * t_2)))))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * Float64(cbrt(pi) * cbrt(pi))))) t_2 = sin(t_1) t_3 = sin(t_0) t_4 = cos(t_0) tmp = 0.0 if (b_m <= 9e-105) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_3) / Float64(x_45_scale * cos(Float64(0.005555555555555556 * Float64(angle * cbrt(Float64(pi * Float64(pi * pi))))))))) / pi)); elseif (b_m <= 5.6e-34) 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_4) * Float64(t_2 * Float64((b_m ^ 2.0) - (a ^ 2.0)))))))) / pi)); elseif (b_m <= 2.2e+54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_1))) * Float64(1.0 / pi))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(t_4 / Float64(x_45_scale * t_2)))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 9e-105], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$3), $MachinePrecision] / N[(x$45$scale * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.6e-34], 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$4), $MachinePrecision] * N[(t$95$2 * 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, 2.2e+54], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(t$95$4 / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot \left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)\right)\right)\\
t_2 := \sin t\_1\\
t_3 := \sin t\_0\\
t_4 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 9 \cdot 10^{-105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_3}{x-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.6 \cdot 10^{-34}:\\
\;\;\;\;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\_4\right) \cdot \left(t\_2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.2 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_1\right) \cdot \frac{1}{\pi}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{t\_4}{x-scale \cdot t\_2}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 8.9999999999999995e-105Initial program 14.0%
Simplified13.3%
Taylor expanded in x-scale around 0 27.0%
Simplified30.7%
Taylor expanded in a around inf 46.8%
add-cbrt-cube48.7%
Applied egg-rr48.7%
if 8.9999999999999995e-105 < b < 5.59999999999999994e-34Initial program 25.0%
Simplified31.6%
Taylor expanded in x-scale around 0 38.7%
Simplified52.7%
add-cube-cbrt59.6%
Applied egg-rr59.6%
Taylor expanded in angle around 0 59.5%
if 5.59999999999999994e-34 < b < 2.1999999999999999e54Initial program 6.5%
Simplified7.0%
Taylor expanded in x-scale around 0 26.7%
Simplified27.4%
Taylor expanded in a around inf 56.6%
div-inv56.6%
times-frac60.2%
quot-tan60.2%
Applied egg-rr60.2%
add-cube-cbrt26.5%
Applied egg-rr60.9%
if 2.1999999999999999e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in x-scale around 0 13.5%
Simplified13.6%
Taylor expanded in a around 0 57.1%
add-cube-cbrt15.8%
Applied egg-rr59.4%
Final simplification52.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= b_m 9.5e-120)
(*
180.0
(/
(atan
(/
(* y-scale t_1)
(*
x-scale
(cos (* 0.005555555555555556 (* angle (cbrt (* PI (* PI PI)))))))))
PI))
(if (<= b_m 9e-103)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
2.0
(/
(cos (* 0.005555555555555556 (* angle (* (sqrt PI) (sqrt PI)))))
(* t_1 x-scale))))))
PI))
(if (<= b_m 2.5e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan
(*
(/ y-scale x-scale)
(tan (pow (cbrt (* PI (* 0.005555555555555556 angle))) 3.0))))))
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
2.0
(/
(cos t_0)
(*
x-scale
(sin
(*
0.005555555555555556
(* angle (* (cbrt PI) (* (cbrt PI) (cbrt PI))))))))))))
PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (b_m <= 9.5e-120) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * cos((0.005555555555555556 * (angle * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))))))) / ((double) M_PI));
} else if (b_m <= 9e-103) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos((0.005555555555555556 * (angle * (sqrt(((double) M_PI)) * sqrt(((double) M_PI)))))) / (t_1 * x_45_scale)))))) / ((double) M_PI));
} else if (b_m <= 2.5e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan(pow(cbrt((((double) M_PI) * (0.005555555555555556 * angle))), 3.0)))));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos(t_0) / (x_45_scale * sin((0.005555555555555556 * (angle * (cbrt(((double) M_PI)) * (cbrt(((double) M_PI)) * cbrt(((double) M_PI))))))))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double tmp;
if (b_m <= 9.5e-120) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * Math.cos((0.005555555555555556 * (angle * Math.cbrt((Math.PI * (Math.PI * Math.PI))))))))) / Math.PI);
} else if (b_m <= 9e-103) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (Math.cos((0.005555555555555556 * (angle * (Math.sqrt(Math.PI) * Math.sqrt(Math.PI))))) / (t_1 * x_45_scale)))))) / Math.PI);
} else if (b_m <= 2.5e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan(Math.pow(Math.cbrt((Math.PI * (0.005555555555555556 * angle))), 3.0)))));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (Math.cos(t_0) / (x_45_scale * Math.sin((0.005555555555555556 * (angle * (Math.cbrt(Math.PI) * (Math.cbrt(Math.PI) * Math.cbrt(Math.PI)))))))))))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 9.5e-120) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * cos(Float64(0.005555555555555556 * Float64(angle * cbrt(Float64(pi * Float64(pi * pi))))))))) / pi)); elseif (b_m <= 9e-103) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(cos(Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(pi) * sqrt(pi))))) / Float64(t_1 * x_45_scale)))))) / pi)); elseif (b_m <= 2.5e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan((cbrt(Float64(pi * Float64(0.005555555555555556 * angle))) ^ 3.0)))))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(cos(t_0) / Float64(x_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * Float64(cbrt(pi) * cbrt(pi)))))))))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 9.5e-120], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9e-103], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(N[Cos[N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$1 * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.5e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[Power[N[Power[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(N[Cos[t$95$0], $MachinePrecision] / N[(x$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 9.5 \cdot 10^{-120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 9 \cdot 10^{-103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\right)}{t\_1 \cdot x-scale}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.5 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{\cos t\_0}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot \left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)\right)\right)\right)}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 9.49999999999999937e-120Initial program 13.2%
Simplified13.0%
Taylor expanded in x-scale around 0 27.0%
Simplified30.8%
Taylor expanded in a around inf 47.2%
add-cbrt-cube48.9%
Applied egg-rr48.9%
if 9.49999999999999937e-120 < b < 9e-103Initial program 60.0%
Simplified40.3%
Taylor expanded in x-scale around 0 41.7%
Simplified44.1%
Taylor expanded in a around 0 44.4%
add-sqr-sqrt69.9%
Applied egg-rr69.9%
if 9e-103 < b < 2.50000000000000003e54Initial program 12.8%
Simplified16.4%
Taylor expanded in x-scale around 0 30.4%
Simplified37.7%
Taylor expanded in a around inf 51.0%
div-inv51.0%
times-frac58.8%
quot-tan58.8%
Applied egg-rr58.8%
add-cube-cbrt49.6%
pow356.5%
associate-*r*59.6%
Applied egg-rr59.6%
if 2.50000000000000003e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in x-scale around 0 13.5%
Simplified13.6%
Taylor expanded in a around 0 57.1%
add-cube-cbrt15.8%
Applied egg-rr59.4%
Final simplification52.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* 0.005555555555555556 (* angle (* (sqrt PI) (sqrt PI))))))
(if (<= b_m 1e-119)
(*
180.0
(/
(atan
(/
(* y-scale t_1)
(*
x-scale
(cos (* 0.005555555555555556 (* angle (cbrt (* PI (* PI PI)))))))))
PI))
(if (<= b_m 7.8e-103)
(*
180.0
(/
(atan (* -0.5 (* y-scale (* 2.0 (/ (cos t_2) (* t_1 x-scale))))))
PI))
(if (<= b_m 6e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan
(*
(/ y-scale x-scale)
(tan (pow (cbrt (* PI (* 0.005555555555555556 angle))) 3.0))))))
(*
180.0
(/
(atan
(* -0.5 (* y-scale (* 2.0 (/ (cos t_0) (* x-scale (sin t_2)))))))
PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = 0.005555555555555556 * (angle * (sqrt(((double) M_PI)) * sqrt(((double) M_PI))));
double tmp;
if (b_m <= 1e-119) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * cos((0.005555555555555556 * (angle * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))))))) / ((double) M_PI));
} else if (b_m <= 7.8e-103) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos(t_2) / (t_1 * x_45_scale)))))) / ((double) M_PI));
} else if (b_m <= 6e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan(pow(cbrt((((double) M_PI) * (0.005555555555555556 * angle))), 3.0)))));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos(t_0) / (x_45_scale * sin(t_2))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double t_2 = 0.005555555555555556 * (angle * (Math.sqrt(Math.PI) * Math.sqrt(Math.PI)));
double tmp;
if (b_m <= 1e-119) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * Math.cos((0.005555555555555556 * (angle * Math.cbrt((Math.PI * (Math.PI * Math.PI))))))))) / Math.PI);
} else if (b_m <= 7.8e-103) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (Math.cos(t_2) / (t_1 * x_45_scale)))))) / Math.PI);
} else if (b_m <= 6e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan(Math.pow(Math.cbrt((Math.PI * (0.005555555555555556 * angle))), 3.0)))));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (Math.cos(t_0) / (x_45_scale * Math.sin(t_2))))))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(pi) * sqrt(pi)))) tmp = 0.0 if (b_m <= 1e-119) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * cos(Float64(0.005555555555555556 * Float64(angle * cbrt(Float64(pi * Float64(pi * pi))))))))) / pi)); elseif (b_m <= 7.8e-103) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(cos(t_2) / Float64(t_1 * x_45_scale)))))) / pi)); elseif (b_m <= 6e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan((cbrt(Float64(pi * Float64(0.005555555555555556 * angle))) ^ 3.0)))))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(cos(t_0) / Float64(x_45_scale * sin(t_2))))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1e-119], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7.8e-103], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(N[Cos[t$95$2], $MachinePrecision] / N[(t$95$1 * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 6e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[Power[N[Power[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(N[Cos[t$95$0], $MachinePrecision] / N[(x$45$scale * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\\
\mathbf{if}\;b\_m \leq 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 7.8 \cdot 10^{-103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{\cos t\_2}{t\_1 \cdot x-scale}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 6 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{\cos t\_0}{x-scale \cdot \sin t\_2}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.00000000000000001e-119Initial program 13.2%
Simplified13.0%
Taylor expanded in x-scale around 0 27.0%
Simplified30.8%
Taylor expanded in a around inf 47.2%
add-cbrt-cube48.9%
Applied egg-rr48.9%
if 1.00000000000000001e-119 < b < 7.8000000000000004e-103Initial program 60.0%
Simplified40.3%
Taylor expanded in x-scale around 0 41.7%
Simplified44.1%
Taylor expanded in a around 0 44.4%
add-sqr-sqrt69.9%
Applied egg-rr69.9%
if 7.8000000000000004e-103 < b < 5.9999999999999998e54Initial program 12.8%
Simplified16.4%
Taylor expanded in x-scale around 0 30.4%
Simplified37.7%
Taylor expanded in a around inf 51.0%
div-inv51.0%
times-frac58.8%
quot-tan58.8%
Applied egg-rr58.8%
add-cube-cbrt49.6%
pow356.5%
associate-*r*59.6%
Applied egg-rr59.6%
if 5.9999999999999998e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in x-scale around 0 13.5%
Simplified13.6%
Taylor expanded in a around 0 57.1%
add-sqr-sqrt56.9%
Applied egg-rr56.9%
Final simplification52.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.45e-100)
(*
180.0
(/
(atan
(/
(* y-scale (sin t_0))
(*
x-scale
(cos (* 0.005555555555555556 (* angle (cbrt (* PI (* PI PI)))))))))
PI))
(if (<= b_m 1.9e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan
(*
(/ y-scale x-scale)
(tan (pow (cbrt (* PI (* 0.005555555555555556 angle))) 3.0))))))
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
2.0
(/
(cos t_0)
(*
x-scale
(sin
(*
0.005555555555555556
(* angle (* (sqrt PI) (sqrt PI)))))))))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.45e-100) {
tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos((0.005555555555555556 * (angle * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))))))) / ((double) M_PI));
} else if (b_m <= 1.9e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan(pow(cbrt((((double) M_PI) * (0.005555555555555556 * angle))), 3.0)))));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (cos(t_0) / (x_45_scale * sin((0.005555555555555556 * (angle * (sqrt(((double) M_PI)) * sqrt(((double) M_PI)))))))))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 1.45e-100) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos((0.005555555555555556 * (angle * Math.cbrt((Math.PI * (Math.PI * Math.PI))))))))) / Math.PI);
} else if (b_m <= 1.9e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan(Math.pow(Math.cbrt((Math.PI * (0.005555555555555556 * angle))), 3.0)))));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (Math.cos(t_0) / (x_45_scale * Math.sin((0.005555555555555556 * (angle * (Math.sqrt(Math.PI) * Math.sqrt(Math.PI))))))))))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 1.45e-100) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(Float64(0.005555555555555556 * Float64(angle * cbrt(Float64(pi * Float64(pi * pi))))))))) / pi)); elseif (b_m <= 1.9e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan((cbrt(Float64(pi * Float64(0.005555555555555556 * angle))) ^ 3.0)))))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(cos(t_0) / Float64(x_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(pi) * sqrt(pi))))))))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.45e-100], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[Power[N[Power[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(N[Cos[t$95$0], $MachinePrecision] / N[(x$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 1.45 \cdot 10^{-100}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{\cos t\_0}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\right)}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.44999999999999988e-100Initial program 14.5%
Simplified13.8%
Taylor expanded in x-scale around 0 27.4%
Simplified31.1%
Taylor expanded in a around inf 46.6%
add-cbrt-cube48.4%
Applied egg-rr48.4%
if 1.44999999999999988e-100 < b < 1.9000000000000001e54Initial program 12.8%
Simplified16.4%
Taylor expanded in x-scale around 0 30.4%
Simplified37.7%
Taylor expanded in a around inf 51.0%
div-inv51.0%
times-frac58.8%
quot-tan58.8%
Applied egg-rr58.8%
add-cube-cbrt49.6%
pow356.5%
associate-*r*59.6%
Applied egg-rr59.6%
if 1.9000000000000001e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in x-scale around 0 13.5%
Simplified13.6%
Taylor expanded in a around 0 57.1%
add-sqr-sqrt56.9%
Applied egg-rr56.9%
Final simplification51.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= b_m 7.6e-101)
(*
180.0
(/
(atan
(/
(* y-scale t_1)
(*
x-scale
(cos (* 0.005555555555555556 (* angle (cbrt (* PI (* PI PI)))))))))
PI))
(if (<= b_m 1.7e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan
(*
(/ y-scale x-scale)
(tan (pow (cbrt (* PI (* 0.005555555555555556 angle))) 3.0))))))
(*
180.0
(/ (atan (* y-scale (/ (/ (cos t_0) (- x-scale)) t_1))) PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (b_m <= 7.6e-101) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * cos((0.005555555555555556 * (angle * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))))))) / ((double) M_PI));
} else if (b_m <= 1.7e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan(pow(cbrt((((double) M_PI) * (0.005555555555555556 * angle))), 3.0)))));
} else {
tmp = 180.0 * (atan((y_45_scale * ((cos(t_0) / -x_45_scale) / t_1))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double tmp;
if (b_m <= 7.6e-101) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * Math.cos((0.005555555555555556 * (angle * Math.cbrt((Math.PI * (Math.PI * Math.PI))))))))) / Math.PI);
} else if (b_m <= 1.7e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan(Math.pow(Math.cbrt((Math.PI * (0.005555555555555556 * angle))), 3.0)))));
} else {
tmp = 180.0 * (Math.atan((y_45_scale * ((Math.cos(t_0) / -x_45_scale) / t_1))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 7.6e-101) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * cos(Float64(0.005555555555555556 * Float64(angle * cbrt(Float64(pi * Float64(pi * pi))))))))) / pi)); elseif (b_m <= 1.7e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan((cbrt(Float64(pi * Float64(0.005555555555555556 * angle))) ^ 3.0)))))); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(cos(t_0) / Float64(-x_45_scale)) / t_1))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 7.6e-101], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.7e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[Power[N[Power[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(N[Cos[t$95$0], $MachinePrecision] / (-x$45$scale)), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 7.6 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.7 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\frac{\cos t\_0}{-x-scale}}{t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.6000000000000002e-101Initial program 14.5%
Simplified13.8%
Taylor expanded in x-scale around 0 27.4%
Simplified31.1%
Taylor expanded in a around inf 46.6%
add-cbrt-cube48.4%
Applied egg-rr48.4%
if 7.6000000000000002e-101 < b < 1.7e54Initial program 12.8%
Simplified16.4%
Taylor expanded in x-scale around 0 30.4%
Simplified37.7%
Taylor expanded in a around inf 51.0%
div-inv51.0%
times-frac58.8%
quot-tan58.8%
Applied egg-rr58.8%
add-cube-cbrt49.6%
pow356.5%
associate-*r*59.6%
Applied egg-rr59.6%
if 1.7e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in x-scale around 0 13.5%
Simplified13.6%
Taylor expanded in a around 0 57.1%
mul-1-neg57.1%
associate-/l*57.1%
associate-/r*57.1%
Simplified57.1%
Final simplification51.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 2.6e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan
(*
(/ y-scale x-scale)
(tan (pow (cbrt (* PI (* 0.005555555555555556 angle))) 3.0))))))
(*
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 <= 2.6e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan(pow(cbrt((((double) M_PI) * (0.005555555555555556 * angle))), 3.0)))));
} 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 <= 2.6e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan(Math.pow(Math.cbrt((Math.PI * (0.005555555555555556 * angle))), 3.0)))));
} 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 <= 2.6e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan((cbrt(Float64(pi * Float64(0.005555555555555556 * angle))) ^ 3.0)))))); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(cos(t_0) / Float64(-x_45_scale)) / sin(t_0)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 2.6e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[Power[N[Power[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(N[Cos[t$95$0], $MachinePrecision] / (-x$45$scale)), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 2.6 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\frac{\cos t\_0}{-x-scale}}{\sin t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.60000000000000007e54Initial program 14.2%
Simplified14.2%
Taylor expanded in x-scale around 0 27.8%
Simplified32.1%
Taylor expanded in a around inf 47.2%
div-inv47.2%
times-frac48.9%
quot-tan48.9%
Applied egg-rr48.9%
add-cube-cbrt46.5%
pow349.3%
associate-*r*48.7%
Applied egg-rr48.7%
if 2.60000000000000007e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in x-scale around 0 13.5%
Simplified13.6%
Taylor expanded in a around 0 57.1%
mul-1-neg57.1%
associate-/l*57.1%
associate-/r*57.1%
Simplified57.1%
Final simplification50.2%
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.2e+95)
(* 180.0 (* (/ 1.0 PI) (atan (* (/ y-scale x-scale) (tan t_0)))))
(*
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.2e+95) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan(t_0))));
} 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.2e+95) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0))));
} 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.2e+95: tmp = 180.0 * ((1.0 / math.pi) * math.atan(((y_45_scale / x_45_scale) * math.tan(t_0)))) 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.2e+95) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0))))); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(cos(t_0) / Float64(-x_45_scale)) / sin(t_0)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 1.2e+95) tmp = 180.0 * ((1.0 / pi) * atan(((y_45_scale / x_45_scale) * tan(t_0)))); 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.2e+95], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(N[Cos[t$95$0], $MachinePrecision] / (-x$45$scale)), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 1.2 \cdot 10^{+95}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\frac{\cos t\_0}{-x-scale}}{\sin t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.2e95Initial program 14.6%
Simplified14.6%
Taylor expanded in x-scale around 0 28.2%
Simplified32.4%
Taylor expanded in a around inf 47.0%
div-inv47.0%
times-frac48.6%
quot-tan48.7%
Applied egg-rr48.7%
if 1.2e95 < b Initial program 9.3%
Simplified2.5%
Taylor expanded in x-scale around 0 11.5%
Simplified11.7%
Taylor expanded in a around 0 56.1%
mul-1-neg56.1%
associate-/l*56.1%
associate-/r*56.1%
Simplified56.1%
Final simplification49.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 3.8e+54)
(* 180.0 (* (/ 1.0 PI) (atan (* (/ y-scale x-scale) (tan t_0)))))
(*
180.0
(/
(atan (* -0.5 (* y-scale (* 2.0 (/ 1.0 (* (sin t_0) x-scale))))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 3.8e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan(t_0))));
} else {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (sin(t_0) * x_45_scale)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 3.8e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0))));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (Math.sin(t_0) * x_45_scale)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 3.8e+54: tmp = 180.0 * ((1.0 / math.pi) * math.atan(((y_45_scale / x_45_scale) * math.tan(t_0)))) else: tmp = 180.0 * (math.atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (math.sin(t_0) * x_45_scale)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 3.8e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0))))); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(2.0 * Float64(1.0 / Float64(sin(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 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 3.8e+54) tmp = 180.0 * ((1.0 / pi) * atan(((y_45_scale / x_45_scale) * tan(t_0)))); else tmp = 180.0 * (atan((-0.5 * (y_45_scale * (2.0 * (1.0 / (sin(t_0) * x_45_scale)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.8e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(2.0 * N[(1.0 / N[(N[Sin[t$95$0], $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 3.8 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \frac{1}{\sin t\_0 \cdot x-scale}\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if b < 3.8000000000000002e54Initial program 14.2%
Simplified14.2%
Taylor expanded in x-scale around 0 27.8%
Simplified32.1%
Taylor expanded in a around inf 47.2%
div-inv47.2%
times-frac48.9%
quot-tan48.9%
Applied egg-rr48.9%
if 3.8000000000000002e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in x-scale around 0 13.5%
Simplified13.6%
Taylor expanded in a around 0 57.1%
Taylor expanded in angle around 0 60.0%
Final simplification50.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 9.8e+94)
(*
180.0
(*
(/ 1.0 PI)
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI)))))))
(*
180.0
(/
(atan
(* -180.0 (/ y-scale (* angle (* x-scale (cbrt (* PI (* PI 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 <= 9.8e+94) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI)))))));
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * cbrt((((double) M_PI) * (((double) M_PI) * ((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 <= 9.8e+94) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI))))));
} else {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.cbrt((Math.PI * (Math.PI * 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 <= 9.8e+94) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi))))))); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * cbrt(Float64(pi * Float64(pi * pi)))))))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 9.8e+94], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * 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]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 9.8 \cdot 10^{+94}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 9.7999999999999998e94Initial program 14.6%
Simplified14.6%
Taylor expanded in x-scale around 0 28.2%
Simplified32.4%
Taylor expanded in a around inf 47.0%
div-inv47.0%
times-frac48.6%
quot-tan48.7%
Applied egg-rr48.7%
if 9.7999999999999998e94 < b Initial program 9.3%
Simplified2.5%
Taylor expanded in angle around 0 9.3%
associate-/l*9.3%
distribute-lft-out--9.3%
associate-*r*9.3%
Simplified9.3%
Taylor expanded in a around 0 52.2%
add-cbrt-cube28.1%
Applied egg-rr52.2%
Final simplification49.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.4e+95)
(*
180.0
(*
(/ 1.0 PI)
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI)))))))
(*
180.0
(* (/ 1.0 PI) (atan (* -180.0 (/ y-scale (* PI (* angle x-scale)))))))))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.4e+95) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI)))))));
} else {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan((-180.0 * (y_45_scale / (((double) M_PI) * (angle * x_45_scale))))));
}
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.4e+95) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI))))));
} else {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan((-180.0 * (y_45_scale / (Math.PI * (angle * x_45_scale))))));
}
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.4e+95: tmp = 180.0 * ((1.0 / math.pi) * math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi)))))) else: tmp = 180.0 * ((1.0 / math.pi) * math.atan((-180.0 * (y_45_scale / (math.pi * (angle * x_45_scale)))))) 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.4e+95) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi))))))); else tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(-180.0 * Float64(y_45_scale / Float64(pi * Float64(angle * x_45_scale))))))); 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.4e+95) tmp = 180.0 * ((1.0 / pi) * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi)))))); else tmp = 180.0 * ((1.0 / pi) * atan((-180.0 * (y_45_scale / (pi * (angle * x_45_scale)))))); 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.4e+95], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * 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]), $MachinePrecision], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(Pi * N[(angle * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.4 \cdot 10^{+95}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(-180 \cdot \frac{y-scale}{\pi \cdot \left(angle \cdot x-scale\right)}\right)\right)\\
\end{array}
\end{array}
if b < 2.4e95Initial program 14.6%
Simplified14.6%
Taylor expanded in x-scale around 0 28.2%
Simplified32.4%
Taylor expanded in a around inf 47.0%
div-inv47.0%
times-frac48.6%
quot-tan48.7%
Applied egg-rr48.7%
if 2.4e95 < b Initial program 9.3%
Simplified2.5%
Taylor expanded in angle around 0 9.3%
associate-/l*9.3%
distribute-lft-out--9.3%
associate-*r*9.3%
Simplified9.3%
Taylor expanded in a around 0 52.2%
div-inv52.2%
*-commutative52.2%
associate-*r*52.2%
Applied egg-rr52.2%
Final simplification49.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.8e+95)
(*
180.0
(/
(atan (* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI)))))
PI))
(*
180.0
(* (/ 1.0 PI) (atan (* -180.0 (/ y-scale (* PI (* angle x-scale)))))))))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.8e+95) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan((-180.0 * (y_45_scale / (((double) M_PI) * (angle * x_45_scale))))));
}
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.8e+95) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan((-180.0 * (y_45_scale / (Math.PI * (angle * x_45_scale))))));
}
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.8e+95: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi))))) / math.pi) else: tmp = 180.0 * ((1.0 / math.pi) * math.atan((-180.0 * (y_45_scale / (math.pi * (angle * x_45_scale)))))) 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.8e+95) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi))))) / pi)); else tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(-180.0 * Float64(y_45_scale / Float64(pi * Float64(angle * x_45_scale))))))); 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.8e+95) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * ((1.0 / pi) * atan((-180.0 * (y_45_scale / (pi * (angle * x_45_scale)))))); 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.8e+95], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(Pi * N[(angle * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.8 \cdot 10^{+95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(-180 \cdot \frac{y-scale}{\pi \cdot \left(angle \cdot x-scale\right)}\right)\right)\\
\end{array}
\end{array}
if b < 1.79999999999999989e95Initial program 14.6%
Simplified14.6%
Taylor expanded in x-scale around 0 28.2%
Simplified32.4%
Taylor expanded in a around inf 47.0%
*-un-lft-identity47.0%
times-frac48.6%
quot-tan48.6%
Applied egg-rr48.6%
*-lft-identity48.6%
Simplified48.6%
if 1.79999999999999989e95 < b Initial program 9.3%
Simplified2.5%
Taylor expanded in angle around 0 9.3%
associate-/l*9.3%
distribute-lft-out--9.3%
associate-*r*9.3%
Simplified9.3%
Taylor expanded in a around 0 52.2%
div-inv52.2%
*-commutative52.2%
associate-*r*52.2%
Applied egg-rr52.2%
Final simplification49.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan (* (* 0.005555555555555556 (* angle PI)) (/ y-scale x-scale)))))
(*
180.0
(* (/ 1.0 PI) (atan (* -180.0 (/ y-scale (* PI (* angle x-scale)))))))))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.2e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((0.005555555555555556 * (angle * ((double) M_PI))) * (y_45_scale / x_45_scale))));
} else {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan((-180.0 * (y_45_scale / (((double) M_PI) * (angle * x_45_scale))))));
}
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.2e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((0.005555555555555556 * (angle * Math.PI)) * (y_45_scale / x_45_scale))));
} else {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan((-180.0 * (y_45_scale / (Math.PI * (angle * x_45_scale))))));
}
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.2e+54: tmp = 180.0 * ((1.0 / math.pi) * math.atan(((0.005555555555555556 * (angle * math.pi)) * (y_45_scale / x_45_scale)))) else: tmp = 180.0 * ((1.0 / math.pi) * math.atan((-180.0 * (y_45_scale / (math.pi * (angle * x_45_scale)))))) 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.2e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(y_45_scale / x_45_scale))))); else tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(-180.0 * Float64(y_45_scale / Float64(pi * Float64(angle * x_45_scale))))))); 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.2e+54) tmp = 180.0 * ((1.0 / pi) * atan(((0.005555555555555556 * (angle * pi)) * (y_45_scale / x_45_scale)))); else tmp = 180.0 * ((1.0 / pi) * atan((-180.0 * (y_45_scale / (pi * (angle * x_45_scale)))))); 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.2e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(Pi * N[(angle * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{y-scale}{x-scale}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(-180 \cdot \frac{y-scale}{\pi \cdot \left(angle \cdot x-scale\right)}\right)\right)\\
\end{array}
\end{array}
if b < 2.1999999999999999e54Initial program 14.2%
Simplified14.2%
Taylor expanded in x-scale around 0 27.8%
Simplified32.1%
Taylor expanded in a around inf 47.2%
div-inv47.2%
times-frac48.9%
quot-tan48.9%
Applied egg-rr48.9%
Taylor expanded in angle around 0 43.1%
if 2.1999999999999999e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in angle around 0 11.3%
associate-/l*11.3%
distribute-lft-out--11.3%
associate-*r*11.3%
Simplified11.3%
Taylor expanded in a around 0 53.2%
div-inv53.2%
*-commutative53.2%
associate-*r*53.2%
Applied egg-rr53.2%
Final simplification44.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 5e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan (* (* 0.005555555555555556 (* angle PI)) (/ y-scale x-scale)))))
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* PI x-scale))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan(((0.005555555555555556 * (angle * ((double) M_PI))) * (y_45_scale / x_45_scale))));
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan(((0.005555555555555556 * (angle * Math.PI)) * (y_45_scale / x_45_scale))));
} else {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (Math.PI * x_45_scale))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 5e+54: tmp = 180.0 * ((1.0 / math.pi) * math.atan(((0.005555555555555556 * (angle * math.pi)) * (y_45_scale / x_45_scale)))) else: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (math.pi * x_45_scale))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 5e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(y_45_scale / x_45_scale))))); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 5e+54) tmp = 180.0 * ((1.0 / pi) * atan(((0.005555555555555556 * (angle * pi)) * (y_45_scale / x_45_scale)))); else tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (pi * x_45_scale))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 5e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 5 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{y-scale}{x-scale}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 5.00000000000000005e54Initial program 14.2%
Simplified14.2%
Taylor expanded in x-scale around 0 27.8%
Simplified32.1%
Taylor expanded in a around inf 47.2%
div-inv47.2%
times-frac48.9%
quot-tan48.9%
Applied egg-rr48.9%
Taylor expanded in angle around 0 43.1%
if 5.00000000000000005e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in angle around 0 11.3%
associate-/l*11.3%
distribute-lft-out--11.3%
associate-*r*11.3%
Simplified11.3%
Taylor expanded in a around 0 53.2%
Final simplification44.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 5.7e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan (* angle (/ (* 0.005555555555555556 (* y-scale PI)) x-scale)))))
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* PI x-scale))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5.7e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan((angle * ((0.005555555555555556 * (y_45_scale * ((double) M_PI))) / x_45_scale))));
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5.7e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan((angle * ((0.005555555555555556 * (y_45_scale * Math.PI)) / x_45_scale))));
} else {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (Math.PI * x_45_scale))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 5.7e+54: tmp = 180.0 * ((1.0 / math.pi) * math.atan((angle * ((0.005555555555555556 * (y_45_scale * math.pi)) / x_45_scale)))) else: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (math.pi * x_45_scale))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 5.7e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(angle * Float64(Float64(0.005555555555555556 * Float64(y_45_scale * pi)) / x_45_scale))))); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 5.7e+54) tmp = 180.0 * ((1.0 / pi) * atan((angle * ((0.005555555555555556 * (y_45_scale * pi)) / x_45_scale)))); else tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (pi * x_45_scale))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 5.7e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(angle * N[(N[(0.005555555555555556 * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 5.7 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(angle \cdot \frac{0.005555555555555556 \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 5.6999999999999997e54Initial program 14.2%
Simplified14.2%
Taylor expanded in x-scale around 0 27.8%
Simplified32.1%
Taylor expanded in a around inf 47.2%
div-inv47.2%
times-frac48.9%
quot-tan48.9%
Applied egg-rr48.9%
Taylor expanded in angle around 0 39.0%
*-commutative39.0%
associate-/l*43.1%
associate-*r*43.1%
*-commutative43.1%
associate-*r/43.1%
*-commutative43.1%
Simplified43.1%
if 5.6999999999999997e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in angle around 0 11.3%
associate-/l*11.3%
distribute-lft-out--11.3%
associate-*r*11.3%
Simplified11.3%
Taylor expanded in a around 0 53.2%
Final simplification44.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.9e+54)
(*
180.0
(*
(/ 1.0 PI)
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))))
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* PI x-scale))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.9e+54) {
tmp = 180.0 * ((1.0 / ((double) M_PI)) * atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))));
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.9e+54) {
tmp = 180.0 * ((1.0 / Math.PI) * Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))));
} else {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (Math.PI * x_45_scale))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.9e+54: tmp = 180.0 * ((1.0 / math.pi) * math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale)))))) else: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (math.pi * x_45_scale))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.9e+54) tmp = Float64(180.0 * Float64(Float64(1.0 / pi) * atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))))); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.9e+54) tmp = 180.0 * ((1.0 / pi) * atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale)))))); else tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (pi * x_45_scale))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.9e+54], N[(180.0 * N[(N[(1.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.9 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.9000000000000001e54Initial program 14.2%
Simplified14.2%
Taylor expanded in x-scale around 0 27.8%
Simplified32.1%
Taylor expanded in a around inf 47.2%
div-inv47.2%
times-frac48.9%
quot-tan48.9%
Applied egg-rr48.9%
Taylor expanded in angle around 0 39.0%
associate-/l*43.1%
associate-/l*43.1%
Simplified43.1%
if 1.9000000000000001e54 < b Initial program 11.3%
Simplified4.7%
Taylor expanded in angle around 0 11.3%
associate-/l*11.3%
distribute-lft-out--11.3%
associate-*r*11.3%
Simplified11.3%
Taylor expanded in a around 0 53.2%
Final simplification44.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 5e-15)
(*
180.0
(/
(atan (* 0.005555555555555556 (/ (* angle (* y-scale PI)) x-scale)))
PI))
(* 180.0 (/ (atan (* -180.0 (/ (/ y-scale angle) (* PI x-scale)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5e-15) {
tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * ((double) M_PI))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5e-15) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * ((angle * (y_45_scale * Math.PI)) / x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale / angle) / (Math.PI * x_45_scale)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 5e-15: tmp = 180.0 * (math.atan((0.005555555555555556 * ((angle * (y_45_scale * math.pi)) / x_45_scale))) / math.pi) else: tmp = 180.0 * (math.atan((-180.0 * ((y_45_scale / angle) / (math.pi * x_45_scale)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 5e-15) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(Float64(angle * Float64(y_45_scale * pi)) / x_45_scale))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(pi * x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 5e-15) tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * pi)) / x_45_scale))) / pi); else tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (pi * x_45_scale)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 5e-15], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 5 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{\pi \cdot x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.99999999999999999e-15Initial program 14.6%
Simplified14.6%
Taylor expanded in x-scale around 0 27.4%
Simplified31.9%
Taylor expanded in a around inf 47.2%
Taylor expanded in angle around 0 39.9%
if 4.99999999999999999e-15 < b Initial program 10.7%
Simplified5.6%
Taylor expanded in angle around 0 12.6%
associate-/l*12.6%
distribute-lft-out--12.6%
associate-*r*12.6%
Simplified12.6%
Taylor expanded in a around 0 48.6%
div-inv48.6%
associate-*r*48.6%
Applied egg-rr48.6%
associate-*r/48.6%
*-rgt-identity48.6%
associate-*r*48.6%
associate-/r*48.7%
*-commutative48.7%
Simplified48.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) (* PI x-scale)))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * ((y_45_scale / angle) / (Math.PI * x_45_scale)))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * ((y_45_scale / angle) / (math.pi * x_45_scale)))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(pi * x_45_scale)))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * ((y_45_scale / angle) / (pi * x_45_scale)))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{\pi \cdot x-scale}\right)}{\pi}
\end{array}
Initial program 13.7%
Simplified12.5%
Taylor expanded in angle around 0 11.8%
associate-/l*12.2%
distribute-lft-out--12.2%
associate-*r*12.2%
Simplified12.2%
Taylor expanded in a around 0 35.2%
div-inv35.2%
associate-*r*35.1%
Applied egg-rr35.1%
associate-*r/35.2%
*-rgt-identity35.2%
associate-*r*35.2%
associate-/r*35.2%
*-commutative35.2%
Simplified35.2%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* PI x-scale))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (y_45_scale / (angle * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (Math.PI * x_45_scale))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (math.pi * x_45_scale))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * x_45_scale))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (pi * x_45_scale))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}
\end{array}
Initial program 13.7%
Simplified12.5%
Taylor expanded in angle around 0 11.8%
associate-/l*12.2%
distribute-lft-out--12.2%
associate-*r*12.2%
Simplified12.2%
Taylor expanded in a around 0 35.2%
Final simplification35.2%
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 13.7%
Simplified12.5%
Taylor expanded in angle around 0 11.8%
associate-/l*12.2%
distribute-lft-out--12.2%
associate-*r*12.2%
Simplified12.2%
Taylor expanded in a around inf 11.4%
herbie shell --seed 2024137
(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)))