
(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 15 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 (pow (cbrt t_0) 3.0)))
(t_2 (sin t_0))
(t_3 (cos t_0)))
(if (<= b_m 2.2e-17)
(* 180.0 (/ (atan (/ (* y-scale t_1) (* x-scale t_3))) PI))
(if (<= b_m 6.6e+74)
(*
180.0
(/
(atan
(*
(/ y-scale x-scale)
(/
(pow (hypot (* a t_2) (* b_m t_3)) 2.0)
(* t_3 (* t_2 (- (pow a 2.0) (pow b_m 2.0)))))))
PI))
(if (<= b_m 1.95e+105)
(* 180.0 (/ (atan (/ (* y-scale t_2) x-scale)) PI))
(*
180.0
(/
(atan (/ (* y-scale (cbrt (pow t_3 3.0))) (* t_1 (- x-scale))))
PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(pow(cbrt(t_0), 3.0));
double t_2 = sin(t_0);
double t_3 = cos(t_0);
double tmp;
if (b_m <= 2.2e-17) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * t_3))) / ((double) M_PI));
} else if (b_m <= 6.6e+74) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (pow(hypot((a * t_2), (b_m * t_3)), 2.0) / (t_3 * (t_2 * (pow(a, 2.0) - pow(b_m, 2.0))))))) / ((double) M_PI));
} else if (b_m <= 1.95e+105) {
tmp = 180.0 * (atan(((y_45_scale * t_2) / x_45_scale)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * cbrt(pow(t_3, 3.0))) / (t_1 * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
double t_2 = Math.sin(t_0);
double t_3 = Math.cos(t_0);
double tmp;
if (b_m <= 2.2e-17) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * t_3))) / Math.PI);
} else if (b_m <= 6.6e+74) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (Math.pow(Math.hypot((a * t_2), (b_m * t_3)), 2.0) / (t_3 * (t_2 * (Math.pow(a, 2.0) - Math.pow(b_m, 2.0))))))) / Math.PI);
} else if (b_m <= 1.95e+105) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_2) / x_45_scale)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.cbrt(Math.pow(t_3, 3.0))) / (t_1 * -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin((cbrt(t_0) ^ 3.0)) t_2 = sin(t_0) t_3 = cos(t_0) tmp = 0.0 if (b_m <= 2.2e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * t_3))) / pi)); elseif (b_m <= 6.6e+74) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64((hypot(Float64(a * t_2), Float64(b_m * t_3)) ^ 2.0) / Float64(t_3 * Float64(t_2 * Float64((a ^ 2.0) - (b_m ^ 2.0))))))) / pi)); elseif (b_m <= 1.95e+105) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_2) / x_45_scale)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * cbrt((t_3 ^ 3.0))) / Float64(t_1 * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 2.2e-17], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 6.6e+74], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[Power[N[Sqrt[N[(a * t$95$2), $MachinePrecision] ^ 2 + N[(b$95$m * t$95$3), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$3 * N[(t$95$2 * N[(N[Power[a, 2.0], $MachinePrecision] - N[Power[b$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.95e+105], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$2), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Power[N[Power[t$95$3, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
t_2 := \sin t\_0\\
t_3 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot t\_3}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 6.6 \cdot 10^{+74}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{{\left(\mathsf{hypot}\left(a \cdot t\_2, b\_m \cdot t\_3\right)\right)}^{2}}{t\_3 \cdot \left(t\_2 \cdot \left({a}^{2} - {b\_m}^{2}\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.95 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_2}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sqrt[3]{{t\_3}^{3}}}{t\_1 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.2e-17Initial program 11.8%
Simplified12.7%
Taylor expanded in x-scale around 0 26.3%
Simplified28.0%
Taylor expanded in a around inf 51.2%
add-cube-cbrt53.3%
pow352.5%
Applied egg-rr52.5%
if 2.2e-17 < b < 6.6000000000000004e74Initial program 25.4%
Simplified21.2%
Taylor expanded in x-scale around 0 65.1%
Simplified70.6%
add-sqr-sqrt70.6%
Applied egg-rr70.6%
Taylor expanded in y-scale around 0 65.1%
Simplified71.0%
if 6.6000000000000004e74 < b < 1.94999999999999989e105Initial program 1.9%
Simplified14.6%
Taylor expanded in x-scale around 0 1.9%
Simplified3.0%
Taylor expanded in angle around 0 3.0%
Taylor expanded in a around inf 78.6%
if 1.94999999999999989e105 < b Initial program 4.3%
Simplified4.2%
Taylor expanded in x-scale around 0 13.9%
Simplified14.0%
Taylor expanded in a around 0 70.7%
add-cube-cbrt23.7%
pow323.9%
Applied egg-rr74.9%
add-cbrt-cube74.9%
unpow274.9%
Applied egg-rr74.9%
unpow274.9%
unpow374.9%
Simplified74.9%
Final simplification59.2%
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 (pow (cbrt t_0) 3.0)))
(t_2 (cos t_0)))
(if (<= b_m 2.9e-15)
(* 180.0 (/ (atan (/ (* y-scale t_1) (* x-scale t_2))) PI))
(*
180.0
(/
(atan (/ (* y-scale (cbrt (pow t_2 3.0))) (* t_1 (- x-scale))))
PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(pow(cbrt(t_0), 3.0));
double t_2 = cos(t_0);
double tmp;
if (b_m <= 2.9e-15) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * t_2))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * cbrt(pow(t_2, 3.0))) / (t_1 * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
double t_2 = Math.cos(t_0);
double tmp;
if (b_m <= 2.9e-15) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * t_2))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.cbrt(Math.pow(t_2, 3.0))) / (t_1 * -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin((cbrt(t_0) ^ 3.0)) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 2.9e-15) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * t_2))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * cbrt((t_2 ^ 3.0))) / Float64(t_1 * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 2.9e-15], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Power[N[Power[t$95$2, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 2.9 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sqrt[3]{{t\_2}^{3}}}{t\_1 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.90000000000000019e-15Initial program 11.8%
Simplified12.7%
Taylor expanded in x-scale around 0 26.3%
Simplified28.0%
Taylor expanded in a around inf 51.2%
add-cube-cbrt53.3%
pow352.5%
Applied egg-rr52.5%
if 2.90000000000000019e-15 < b Initial program 9.4%
Simplified9.8%
Taylor expanded in x-scale around 0 25.6%
Simplified27.3%
Taylor expanded in a around 0 60.5%
add-cube-cbrt32.2%
pow332.3%
Applied egg-rr65.6%
add-cbrt-cube65.6%
unpow265.6%
Applied egg-rr65.6%
unpow265.6%
unpow365.6%
Simplified65.6%
Final simplification56.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 (pow (cbrt t_0) 3.0)))
(t_2 (cos t_0)))
(if (<= b_m 4.3e-17)
(* 180.0 (/ (atan (/ (* y-scale t_1) (* x-scale t_2))) PI))
(* 180.0 (/ (atan (/ (* y-scale t_2) (* t_1 (- x-scale)))) PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(pow(cbrt(t_0), 3.0));
double t_2 = cos(t_0);
double tmp;
if (b_m <= 4.3e-17) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * t_2))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * t_2) / (t_1 * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
double t_2 = Math.cos(t_0);
double tmp;
if (b_m <= 4.3e-17) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * t_2))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * t_2) / (t_1 * -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin((cbrt(t_0) ^ 3.0)) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 4.3e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * t_2))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_2) / Float64(t_1 * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 4.3e-17], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$2), $MachinePrecision] / N[(t$95$1 * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 4.3 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_2}{t\_1 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.30000000000000023e-17Initial program 11.8%
Simplified12.7%
Taylor expanded in x-scale around 0 26.3%
Simplified28.0%
Taylor expanded in a around inf 51.2%
add-cube-cbrt53.3%
pow352.5%
Applied egg-rr52.5%
if 4.30000000000000023e-17 < b Initial program 9.4%
Simplified9.8%
Taylor expanded in x-scale around 0 25.6%
Simplified27.3%
Taylor expanded in a around 0 60.5%
add-cube-cbrt32.2%
pow332.3%
Applied egg-rr65.6%
Final simplification56.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 (cos t_0))
(t_2 (atan (* y-scale (/ t_1 (* x-scale (sin t_0)))))))
(if (<= b_m 1.75e-86)
(*
180.0
(/ (atan (/ (* y-scale (sin (pow (cbrt t_0) 3.0))) (* x-scale t_1))) PI))
(if (<= b_m 2.8e-64)
(* 180.0 (/ -1.0 (/ PI t_2)))
(if (<= b_m 2.05e+105)
(/ (* 180.0 (atan (* (/ y-scale x-scale) (tan t_0)))) PI)
(* 180.0 (/ 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 = cos(t_0);
double t_2 = atan((y_45_scale * (t_1 / (x_45_scale * sin(t_0)))));
double tmp;
if (b_m <= 1.75e-86) {
tmp = 180.0 * (atan(((y_45_scale * sin(pow(cbrt(t_0), 3.0))) / (x_45_scale * t_1))) / ((double) M_PI));
} else if (b_m <= 2.8e-64) {
tmp = 180.0 * (-1.0 / (((double) M_PI) / t_2));
} else if (b_m <= 2.05e+105) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / ((double) M_PI);
} else {
tmp = 180.0 * (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.cos(t_0);
double t_2 = Math.atan((y_45_scale * (t_1 / (x_45_scale * Math.sin(t_0)))));
double tmp;
if (b_m <= 1.75e-86) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin(Math.pow(Math.cbrt(t_0), 3.0))) / (x_45_scale * t_1))) / Math.PI);
} else if (b_m <= 2.8e-64) {
tmp = 180.0 * (-1.0 / (Math.PI / t_2));
} else if (b_m <= 2.05e+105) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0)))) / Math.PI;
} else {
tmp = 180.0 * (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 = cos(t_0) t_2 = atan(Float64(y_45_scale * Float64(t_1 / Float64(x_45_scale * sin(t_0))))) tmp = 0.0 if (b_m <= 1.75e-86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin((cbrt(t_0) ^ 3.0))) / Float64(x_45_scale * t_1))) / pi)); elseif (b_m <= 2.8e-64) tmp = Float64(180.0 * Float64(-1.0 / Float64(pi / t_2))); elseif (b_m <= 2.05e+105) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0)))) / pi); else tmp = Float64(180.0 * Float64(t_2 / Float64(-pi))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(y$45$scale * N[(t$95$1 / N[(x$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 1.75e-86], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.8e-64], N[(180.0 * N[(-1.0 / N[(Pi / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.05e+105], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(t$95$2 / (-Pi)), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \tan^{-1} \left(y-scale \cdot \frac{t\_1}{x-scale \cdot \sin t\_0}\right)\\
\mathbf{if}\;b\_m \leq 1.75 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)}{x-scale \cdot t\_1}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.8 \cdot 10^{-64}:\\
\;\;\;\;180 \cdot \frac{-1}{\frac{\pi}{t\_2}}\\
\mathbf{elif}\;b\_m \leq 2.05 \cdot 10^{+105}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{t\_2}{-\pi}\\
\end{array}
\end{array}
if b < 1.7500000000000001e-86Initial program 9.6%
Simplified10.6%
Taylor expanded in x-scale around 0 24.1%
Simplified25.9%
Taylor expanded in a around inf 51.5%
add-cube-cbrt53.8%
pow352.9%
Applied egg-rr52.9%
if 1.7500000000000001e-86 < b < 2.80000000000000004e-64Initial program 66.7%
Simplified66.7%
Taylor expanded in x-scale around 0 99.5%
Simplified100.0%
Taylor expanded in a around 0 99.5%
clear-num100.0%
inv-pow100.0%
mul-1-neg100.0%
atan-neg100.0%
associate-/l*100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
if 2.80000000000000004e-64 < b < 2.0500000000000001e105Initial program 21.5%
Simplified22.2%
Taylor expanded in x-scale around 0 44.3%
Simplified47.7%
Taylor expanded in a around inf 55.2%
associate-*r/55.3%
times-frac60.1%
quot-tan60.1%
Applied egg-rr60.1%
if 2.0500000000000001e105 < b Initial program 4.3%
Simplified4.2%
Taylor expanded in x-scale around 0 13.9%
Simplified14.0%
Taylor expanded in a around 0 70.7%
*-un-lft-identity70.7%
mul-1-neg70.7%
atan-neg70.7%
associate-/l*70.7%
Applied egg-rr70.7%
*-lft-identity70.7%
Simplified70.7%
Final simplification58.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 2.65e+23)
(*
180.0
(/ (atan (/ (* y-scale t_1) (* x-scale (cos (pow (cbrt t_0) 3.0))))) PI))
(if (<= b_m 2e+105)
(* 180.0 (/ (atan (* -0.5 (* y-scale (/ (* t_1 -2.0) x-scale)))) PI))
(*
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 <= 2.65e+23) {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (x_45_scale * cos(pow(cbrt(t_0), 3.0))))) / ((double) M_PI));
} else if (b_m <= 2e+105) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((t_1 * -2.0) / x_45_scale)))) / ((double) M_PI));
} 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 <= 2.65e+23) {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (x_45_scale * Math.cos(Math.pow(Math.cbrt(t_0), 3.0))))) / Math.PI);
} else if (b_m <= 2e+105) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((t_1 * -2.0) / x_45_scale)))) / Math.PI);
} 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 <= 2.65e+23) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * cos((cbrt(t_0) ^ 3.0))))) / pi)); elseif (b_m <= 2e+105) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(t_1 * -2.0) / x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(cos(t_0) / Float64(x_45_scale * t_1)))) / Float64(-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, 2.65e+23], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2e+105], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(t$95$1 * -2.0), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] / N[(x$45$scale * t$95$1), $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 2.65 \cdot 10^{+23}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \frac{t\_1 \cdot -2}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\cos t\_0}{x-scale \cdot t\_1}\right)}{-\pi}\\
\end{array}
\end{array}
if b < 2.6500000000000001e23Initial program 11.6%
Simplified12.5%
Taylor expanded in x-scale around 0 28.5%
Simplified30.1%
Taylor expanded in a around inf 51.4%
add-cube-cbrt52.4%
pow351.6%
Applied egg-rr52.9%
if 2.6500000000000001e23 < b < 1.9999999999999999e105Initial program 23.4%
Simplified25.2%
Taylor expanded in x-scale around 0 34.2%
Simplified40.8%
Taylor expanded in angle around 0 35.3%
Taylor expanded in a around inf 62.3%
associate-*r/62.3%
Simplified62.3%
if 1.9999999999999999e105 < b Initial program 4.3%
Simplified4.2%
Taylor expanded in x-scale around 0 13.9%
Simplified14.0%
Taylor expanded in a around 0 70.7%
*-un-lft-identity70.7%
mul-1-neg70.7%
atan-neg70.7%
associate-/l*70.7%
Applied egg-rr70.7%
*-lft-identity70.7%
Simplified70.7%
Final simplification57.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 1.95e+105)
(/ (* 180.0 (atan (* (/ y-scale x-scale) (tan t_0)))) PI)
(*
180.0
(/ (atan (* y-scale (/ (cos t_0) (* x-scale (sin t_0))))) (- PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.95e+105) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((y_45_scale * (cos(t_0) / (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.95e+105) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((y_45_scale * (Math.cos(t_0) / (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.95e+105: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan(t_0)))) / math.pi else: tmp = 180.0 * (math.atan((y_45_scale * (math.cos(t_0) / (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.95e+105) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(cos(t_0) / Float64(x_45_scale * sin(t_0))))) / Float64(-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.95e+105) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / pi; else tmp = 180.0 * (atan((y_45_scale * (cos(t_0) / (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.95e+105], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] / N[(x$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-Pi)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 1.95 \cdot 10^{+105}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\cos t\_0}{x-scale \cdot \sin t\_0}\right)}{-\pi}\\
\end{array}
\end{array}
if b < 1.94999999999999989e105Initial program 12.7%
Simplified13.6%
Taylor expanded in x-scale around 0 29.0%
Simplified31.1%
Taylor expanded in a around inf 51.4%
associate-*r/51.5%
times-frac53.3%
quot-tan53.3%
Applied egg-rr53.3%
if 1.94999999999999989e105 < b Initial program 4.3%
Simplified4.2%
Taylor expanded in x-scale around 0 13.9%
Simplified14.0%
Taylor expanded in a around 0 70.7%
*-un-lft-identity70.7%
mul-1-neg70.7%
atan-neg70.7%
associate-/l*70.7%
Applied egg-rr70.7%
*-lft-identity70.7%
Simplified70.7%
Final simplification56.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 1.95e+105)
(/ (* 180.0 (atan (* (/ y-scale x-scale) (tan t_0)))) PI)
(/
(* (atan (* y-scale (/ (cos t_0) (* x-scale (sin t_0))))) -180.0)
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 1.95e+105) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / ((double) M_PI);
} else {
tmp = (atan((y_45_scale * (cos(t_0) / (x_45_scale * sin(t_0))))) * -180.0) / ((double) M_PI);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 1.95e+105) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0)))) / Math.PI;
} else {
tmp = (Math.atan((y_45_scale * (Math.cos(t_0) / (x_45_scale * Math.sin(t_0))))) * -180.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.95e+105: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan(t_0)))) / math.pi else: tmp = (math.atan((y_45_scale * (math.cos(t_0) / (x_45_scale * math.sin(t_0))))) * -180.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.95e+105) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0)))) / pi); else tmp = Float64(Float64(atan(Float64(y_45_scale * Float64(cos(t_0) / Float64(x_45_scale * sin(t_0))))) * -180.0) / pi); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 1.95e+105) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / pi; else tmp = (atan((y_45_scale * (cos(t_0) / (x_45_scale * sin(t_0))))) * -180.0) / pi; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.95e+105], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(N[ArcTan[N[(y$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] / N[(x$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -180.0), $MachinePrecision] / Pi), $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.95 \cdot 10^{+105}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(y-scale \cdot \frac{\cos t\_0}{x-scale \cdot \sin t\_0}\right) \cdot -180}{\pi}\\
\end{array}
\end{array}
if b < 1.94999999999999989e105Initial program 12.7%
Simplified13.6%
Taylor expanded in x-scale around 0 29.0%
Simplified31.1%
Taylor expanded in a around inf 51.4%
associate-*r/51.5%
times-frac53.3%
quot-tan53.3%
Applied egg-rr53.3%
if 1.94999999999999989e105 < b Initial program 4.3%
Simplified4.2%
Taylor expanded in x-scale around 0 13.9%
Simplified14.0%
Taylor expanded in a around 0 70.7%
associate-*r/70.7%
mul-1-neg70.7%
atan-neg70.7%
associate-/l*70.7%
Applied egg-rr70.7%
distribute-rgt-neg-out70.7%
distribute-lft-neg-in70.7%
metadata-eval70.7%
Simplified70.7%
Final simplification56.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 2e+105)
(/ (* 180.0 (atan (* (/ y-scale x-scale) (tan t_0)))) PI)
(* 180.0 (/ (atan (/ y-scale (* 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 <= 2e+105) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((y_45_scale / (x_45_scale * -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 <= 2e+105) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((y_45_scale / (x_45_scale * -Math.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 <= 2e+105: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan(t_0)))) / math.pi else: tmp = 180.0 * (math.atan((y_45_scale / (x_45_scale * -math.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 <= 2e+105) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale / Float64(x_45_scale * Float64(-sin(t_0))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 2e+105) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan(t_0)))) / pi; else tmp = 180.0 * (atan((y_45_scale / (x_45_scale * -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, 2e+105], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale / N[(x$45$scale * (-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 \cdot 10^{+105}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale \cdot \left(-\sin t\_0\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.9999999999999999e105Initial program 12.7%
Simplified13.6%
Taylor expanded in x-scale around 0 29.0%
Simplified31.1%
Taylor expanded in a around inf 51.4%
associate-*r/51.5%
times-frac53.3%
quot-tan53.3%
Applied egg-rr53.3%
if 1.9999999999999999e105 < b Initial program 4.3%
Simplified4.2%
Taylor expanded in x-scale around 0 13.9%
Simplified14.0%
Taylor expanded in a around 0 70.7%
Taylor expanded in angle around 0 67.5%
Final simplification56.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.6e+105)
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI))))))
PI)
(* 180.0 (/ (atan (/ (* y-scale -180.0) (* PI (* angle x-scale)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.6e+105) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI))))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (((double) M_PI) * (angle * x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.6e+105) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI)))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (Math.PI * (angle * x_45_scale)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 2.6e+105: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi)))))) / math.pi else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (math.pi * (angle * x_45_scale)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.6e+105) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi)))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(pi * Float64(angle * x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.6e+105) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi)))))) / pi; else tmp = 180.0 * (atan(((y_45_scale * -180.0) / (pi * (angle * x_45_scale)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.6e+105], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(Pi * N[(angle * 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 2.6 \cdot 10^{+105}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{\pi \cdot \left(angle \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.6000000000000002e105Initial program 12.7%
Simplified13.6%
Taylor expanded in x-scale around 0 29.0%
Simplified31.1%
Taylor expanded in a around inf 51.4%
associate-*r/51.5%
times-frac53.3%
quot-tan53.3%
Applied egg-rr53.3%
if 2.6000000000000002e105 < b Initial program 4.3%
Simplified4.2%
Taylor expanded in angle around 0 8.0%
associate-*r/8.0%
associate-*r*7.8%
distribute-lft-out--7.8%
associate-*r*7.8%
Simplified7.8%
Taylor expanded in a around 0 64.3%
associate-*r/64.3%
associate-*r*64.3%
Applied egg-rr64.3%
Final simplification55.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 8.2e+105)
(*
180.0
(/
(atan (* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI)))))
PI))
(* 180.0 (/ (atan (/ (* y-scale -180.0) (* PI (* angle x-scale)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 8.2e+105) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (((double) M_PI) * (angle * x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 8.2e+105) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (Math.PI * (angle * x_45_scale)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 8.2e+105: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (math.pi * (angle * x_45_scale)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 8.2e+105) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(pi * Float64(angle * x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 8.2e+105) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi))))) / pi); else tmp = 180.0 * (atan(((y_45_scale * -180.0) / (pi * (angle * x_45_scale)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 8.2e+105], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(Pi * N[(angle * 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 8.2 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{\pi \cdot \left(angle \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 8.2000000000000005e105Initial program 12.7%
Simplified13.6%
Taylor expanded in x-scale around 0 29.0%
Simplified31.1%
Taylor expanded in a around inf 51.4%
associate-*r/51.5%
times-frac53.3%
quot-tan53.3%
Applied egg-rr53.3%
associate-*r/53.3%
Simplified53.3%
if 8.2000000000000005e105 < b Initial program 4.3%
Simplified4.2%
Taylor expanded in angle around 0 8.0%
associate-*r/8.0%
associate-*r*7.8%
distribute-lft-out--7.8%
associate-*r*7.8%
Simplified7.8%
Taylor expanded in a around 0 64.3%
associate-*r/64.3%
associate-*r*64.3%
Applied egg-rr64.3%
Final simplification55.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 7e+39)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale)))))
PI))
(* 180.0 (/ (atan (/ (* y-scale -180.0) (* PI (* angle x-scale)))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 7e+39) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (((double) M_PI) * (angle * x_45_scale)))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 7e+39) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (Math.PI * (angle * x_45_scale)))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 7e+39: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (math.pi * (angle * x_45_scale)))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 7e+39) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(pi * Float64(angle * x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 7e+39) tmp = 180.0 * (atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale))))) / pi); else tmp = 180.0 * (atan(((y_45_scale * -180.0) / (pi * (angle * x_45_scale)))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 7e+39], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(Pi * N[(angle * 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 7 \cdot 10^{+39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{\pi \cdot \left(angle \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.0000000000000003e39Initial program 12.0%
Simplified12.8%
Taylor expanded in x-scale around 0 28.6%
Simplified30.7%
Taylor expanded in a around inf 51.2%
Taylor expanded in angle around 0 45.9%
associate-/l*52.3%
associate-/l*52.3%
Simplified52.3%
if 7.0000000000000003e39 < b Initial program 8.3%
Simplified8.8%
Taylor expanded in angle around 0 9.6%
associate-*r/9.6%
associate-*r*9.3%
distribute-lft-out--9.3%
associate-*r*9.3%
Simplified9.3%
Taylor expanded in a around 0 59.2%
associate-*r/59.2%
associate-*r*59.2%
Applied egg-rr59.2%
Final simplification54.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 7.2e+39)
(*
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 <= 7.2e+39) {
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 <= 7.2e+39) {
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 <= 7.2e+39: 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 <= 7.2e+39) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale / angle) / Float64(pi * x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 7.2e+39) 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, 7.2e+39], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale / angle), $MachinePrecision] / N[(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 7.2 \cdot 10^{+39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale}{angle}}{\pi \cdot x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 7.19999999999999969e39Initial program 12.0%
Simplified12.8%
Taylor expanded in x-scale around 0 28.6%
Simplified30.7%
Taylor expanded in a around inf 51.2%
Taylor expanded in angle around 0 45.9%
associate-/l*52.3%
associate-/l*52.3%
Simplified52.3%
if 7.19999999999999969e39 < b Initial program 8.3%
Simplified8.8%
Taylor expanded in x-scale around 0 18.7%
Simplified19.0%
Taylor expanded in a around 0 62.3%
Taylor expanded in angle around 0 59.2%
associate-/r*59.2%
Simplified59.2%
Final simplification54.0%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ (/ y-scale angle) (* 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 11.1%
Simplified11.8%
Taylor expanded in x-scale around 0 26.1%
Simplified27.8%
Taylor expanded in a around 0 50.2%
Taylor expanded in angle around 0 45.4%
associate-/r*45.5%
Simplified45.5%
Final simplification45.5%
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 11.1%
Simplified11.8%
Taylor expanded in angle around 0 10.2%
associate-*r/10.2%
associate-*r*9.6%
distribute-lft-out--9.6%
associate-*r*9.6%
Simplified9.6%
Taylor expanded in a around 0 45.4%
Final simplification45.4%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* angle (* y-scale PI))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * Math.PI))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * math.pi))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * pi))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi}
\end{array}
Initial program 11.1%
Simplified11.8%
Taylor expanded in angle around 0 10.2%
associate-*r/10.2%
associate-*r*9.6%
distribute-lft-out--9.6%
associate-*r*9.6%
Simplified9.6%
Taylor expanded in a around inf 14.6%
herbie shell --seed 2024170
(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)))