
(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 12 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 (cos t_0)))
(if (<= b_m 2.5e-207)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_0 t_2))) PI))
(if (<= b_m 1.9e-54)
(* 180.0 (* (atan (* (/ y-scale x-scale) (tan t_0))) (/ 1.0 PI)))
(if (<= b_m 1.7e+114)
(*
180.0
(/
(atan
(*
-0.5
(*
y-scale
(*
(/ 2.0 x-scale)
(/
(pow (hypot (* a t_1) (* b_m t_2)) 2.0)
(* t_2 (* t_1 (- (pow b_m 2.0) (pow a 2.0)))))))))
PI))
(*
180.0
(/
(atan
(/
(* (pow (cos (pow (cbrt t_0) 3.0)) 2.0) (- y-scale))
(* 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 t_2 = cos(t_0);
double tmp;
if (b_m <= 2.5e-207) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_0 / t_2))) / ((double) M_PI));
} else if (b_m <= 1.9e-54) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) * (1.0 / ((double) M_PI)));
} else if (b_m <= 1.7e+114) {
tmp = 180.0 * (atan((-0.5 * (y_45_scale * ((2.0 / x_45_scale) * (pow(hypot((a * t_1), (b_m * t_2)), 2.0) / (t_2 * (t_1 * (pow(b_m, 2.0) - pow(a, 2.0))))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((pow(cos(pow(cbrt(t_0), 3.0)), 2.0) * -y_45_scale) / (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 t_2 = Math.cos(t_0);
double tmp;
if (b_m <= 2.5e-207) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_0 / t_2))) / Math.PI);
} else if (b_m <= 1.9e-54) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0))) * (1.0 / Math.PI));
} else if (b_m <= 1.7e+114) {
tmp = 180.0 * (Math.atan((-0.5 * (y_45_scale * ((2.0 / x_45_scale) * (Math.pow(Math.hypot((a * t_1), (b_m * t_2)), 2.0) / (t_2 * (t_1 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((Math.pow(Math.cos(Math.pow(Math.cbrt(t_0), 3.0)), 2.0) * -y_45_scale) / (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) t_2 = cos(t_0) tmp = 0.0 if (b_m <= 2.5e-207) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_0 / t_2))) / pi)); elseif (b_m <= 1.9e-54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0))) * Float64(1.0 / pi))); elseif (b_m <= 1.7e+114) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(y_45_scale * Float64(Float64(2.0 / x_45_scale) * Float64((hypot(Float64(a * t_1), Float64(b_m * t_2)) ^ 2.0) / Float64(t_2 * Float64(t_1 * Float64((b_m ^ 2.0) - (a ^ 2.0))))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64((cos((cbrt(t_0) ^ 3.0)) ^ 2.0) * Float64(-y_45_scale)) / 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]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 2.5e-207], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$0 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.9e-54], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.7e+114], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(y$45$scale * N[(N[(2.0 / x$45$scale), $MachinePrecision] * N[(N[Power[N[Sqrt[N[(a * t$95$1), $MachinePrecision] ^ 2 + N[(b$95$m * t$95$2), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$2 * N[(t$95$1 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[Power[N[Cos[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] * (-y$45$scale)), $MachinePrecision] / N[(x$45$scale * 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\\
t_2 := \cos t\_0\\
\mathbf{if}\;b\_m \leq 2.5 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_0}{t\_2}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{-54}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right) \cdot \frac{1}{\pi}\right)\\
\mathbf{elif}\;b\_m \leq 1.7 \cdot 10^{+114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(y-scale \cdot \left(\frac{2}{x-scale} \cdot \frac{{\left(\mathsf{hypot}\left(a \cdot t\_1, b\_m \cdot t\_2\right)\right)}^{2}}{t\_2 \cdot \left(t\_1 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right)}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{{\cos \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)}^{2} \cdot \left(-y-scale\right)}{x-scale \cdot t\_1}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.50000000000000007e-207Initial program 12.5%
Simplified11.4%
Taylor expanded in x-scale around 0 29.7%
Simplified31.2%
Taylor expanded in a around inf 51.6%
times-frac52.9%
Simplified52.9%
Taylor expanded in angle around 0 48.9%
if 2.50000000000000007e-207 < b < 1.9000000000000001e-54Initial program 16.8%
Simplified15.3%
Taylor expanded in x-scale around 0 23.1%
Simplified29.0%
Taylor expanded in a around inf 61.6%
times-frac68.6%
Simplified68.6%
div-inv68.5%
quot-tan68.5%
Applied egg-rr68.5%
if 1.9000000000000001e-54 < b < 1.7e114Initial program 26.4%
Simplified22.2%
Taylor expanded in x-scale around 0 43.4%
Simplified50.5%
times-frac52.4%
associate-*r*52.4%
Applied egg-rr52.4%
if 1.7e114 < b Initial program 2.6%
Simplified2.7%
Taylor expanded in a around 0 2.6%
Simplified2.6%
Taylor expanded in angle around 0 2.6%
Taylor expanded in x-scale around 0 72.9%
add-cube-cbrt72.9%
pow373.0%
Applied egg-rr73.0%
Final simplification55.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 2e-208)
(* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_0 (cos t_0)))) PI))
(if (<= b_m 5.8e-55)
(* 180.0 (* (atan (* (/ y-scale x-scale) (tan t_0))) (/ 1.0 PI)))
(* 180.0 (/ (atan (/ y-scale (* (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 <= 2e-208) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_0 / cos(t_0)))) / ((double) M_PI));
} else if (b_m <= 5.8e-55) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) * (1.0 / ((double) M_PI)));
} else {
tmp = 180.0 * (atan((y_45_scale / (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 <= 2e-208) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * (t_0 / Math.cos(t_0)))) / Math.PI);
} else if (b_m <= 5.8e-55) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan(t_0))) * (1.0 / Math.PI));
} else {
tmp = 180.0 * (Math.atan((y_45_scale / (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 <= 2e-208: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * (t_0 / math.cos(t_0)))) / math.pi) elif b_m <= 5.8e-55: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan(t_0))) * (1.0 / math.pi)) else: tmp = 180.0 * (math.atan((y_45_scale / (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 <= 2e-208) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(t_0 / cos(t_0)))) / pi)); elseif (b_m <= 5.8e-55) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(t_0))) * Float64(1.0 / pi))); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale / Float64(sin(t_0) * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 2e-208) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * (t_0 / cos(t_0)))) / pi); elseif (b_m <= 5.8e-55) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan(t_0))) * (1.0 / pi)); else tmp = 180.0 * (atan((y_45_scale / (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, 2e-208], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(t$95$0 / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.8e-55], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale / N[(N[Sin[t$95$0], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 2 \cdot 10^{-208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_0}{\cos t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.8 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \left(\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right) \cdot \frac{1}{\pi}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{\sin t\_0 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.0000000000000002e-208Initial program 12.5%
Simplified11.4%
Taylor expanded in x-scale around 0 29.7%
Simplified31.2%
Taylor expanded in a around inf 51.6%
times-frac52.9%
Simplified52.9%
Taylor expanded in angle around 0 48.9%
if 2.0000000000000002e-208 < b < 5.8e-55Initial program 17.2%
Simplified15.7%
Taylor expanded in x-scale around 0 23.7%
Simplified29.7%
Taylor expanded in a around inf 60.6%
times-frac67.8%
Simplified67.8%
div-inv67.7%
quot-tan67.7%
Applied egg-rr67.7%
if 5.8e-55 < b Initial program 11.3%
Simplified9.7%
Taylor expanded in a around 0 8.6%
Simplified8.6%
Taylor expanded in angle around 0 8.6%
Taylor expanded in x-scale around 0 62.4%
Taylor expanded in angle around 0 62.5%
Final simplification55.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 4.8e-49)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* PI (* x-scale angle))))) PI))
(/
(*
180.0
(atan
(* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle PI))))))
PI)))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 4.8e-49) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (((double) M_PI) * (x_45_scale * angle))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI))))))) / ((double) M_PI);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 4.8e-49) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (Math.PI * (x_45_scale * angle))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI)))))) / Math.PI;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 4.8e-49: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (math.pi * (x_45_scale * angle))))) / math.pi) else: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi)))))) / math.pi return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 4.8e-49) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(pi * Float64(x_45_scale * angle))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi)))))) / pi); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 4.8e-49) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (pi * (x_45_scale * angle))))) / pi); else tmp = (180.0 * atan(((y_45_scale / x_45_scale) * tan((0.005555555555555556 * (angle * pi)))))) / pi; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 4.8e-49], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(Pi * N[(x$45$scale * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.8 \cdot 10^{-49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{\pi \cdot \left(x-scale \cdot angle\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\end{array}
if a < 4.79999999999999985e-49Initial program 11.7%
Simplified10.6%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.8%
distribute-lft-out--8.8%
associate-*r*8.8%
Simplified8.8%
Taylor expanded in a around 0 44.5%
pow144.5%
associate-*r*44.5%
Applied egg-rr44.5%
unpow144.5%
*-commutative44.5%
Simplified44.5%
if 4.79999999999999985e-49 < a Initial program 16.0%
Simplified14.4%
Taylor expanded in x-scale around 0 26.5%
Simplified28.6%
Taylor expanded in a around inf 65.3%
times-frac66.6%
Simplified66.6%
associate-*r/66.6%
quot-tan66.6%
Applied egg-rr66.6%
Final simplification50.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 1.15e-48)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* PI (* x-scale angle))))) PI))
(*
180.0
(/
(atan (* (/ y-scale x-scale) (tan (* PI (* 0.005555555555555556 angle)))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 1.15e-48) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (((double) M_PI) * (x_45_scale * angle))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 1.15e-48) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (Math.PI * (x_45_scale * angle))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 1.15e-48: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (math.pi * (x_45_scale * angle))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 1.15e-48) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(pi * Float64(x_45_scale * angle))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 1.15e-48) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (pi * (x_45_scale * angle))))) / pi); else tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 1.15e-48], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(Pi * N[(x$45$scale * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.15 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{\pi \cdot \left(x-scale \cdot angle\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 1.15e-48Initial program 11.7%
Simplified10.6%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.8%
distribute-lft-out--8.8%
associate-*r*8.8%
Simplified8.8%
Taylor expanded in a around 0 44.5%
pow144.5%
associate-*r*44.5%
Applied egg-rr44.5%
unpow144.5%
*-commutative44.5%
Simplified44.5%
if 1.15e-48 < a Initial program 16.0%
Simplified14.4%
Taylor expanded in x-scale around 0 26.5%
Simplified28.6%
Taylor expanded in a around inf 65.3%
times-frac66.6%
Simplified66.6%
associate-*r/66.6%
quot-tan66.6%
Applied egg-rr66.6%
associate-/l*66.6%
associate-*r*66.4%
*-commutative66.4%
Applied egg-rr66.4%
Final simplification50.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 8e-49)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* PI (* x-scale angle))))) PI))
(*
180.0
(/
(atan (* y-scale (/ (tan (* PI (* 0.005555555555555556 angle))) x-scale)))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 8e-49) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (((double) M_PI) * (x_45_scale * angle))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((y_45_scale * (tan((((double) M_PI) * (0.005555555555555556 * angle))) / x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 8e-49) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (Math.PI * (x_45_scale * angle))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((y_45_scale * (Math.tan((Math.PI * (0.005555555555555556 * angle))) / x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 8e-49: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (math.pi * (x_45_scale * angle))))) / math.pi) else: tmp = 180.0 * (math.atan((y_45_scale * (math.tan((math.pi * (0.005555555555555556 * angle))) / x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 8e-49) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(pi * Float64(x_45_scale * angle))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(tan(Float64(pi * Float64(0.005555555555555556 * angle))) / x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 8e-49) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (pi * (x_45_scale * angle))))) / pi); else tmp = 180.0 * (atan((y_45_scale * (tan((pi * (0.005555555555555556 * angle))) / x_45_scale))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 8e-49], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(Pi * N[(x$45$scale * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8 \cdot 10^{-49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{\pi \cdot \left(x-scale \cdot angle\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 7.99999999999999949e-49Initial program 11.7%
Simplified10.6%
Taylor expanded in angle around 0 9.5%
associate-*r/9.5%
associate-*r*8.8%
distribute-lft-out--8.8%
associate-*r*8.8%
Simplified8.8%
Taylor expanded in a around 0 44.5%
pow144.5%
associate-*r*44.5%
Applied egg-rr44.5%
unpow144.5%
*-commutative44.5%
Simplified44.5%
if 7.99999999999999949e-49 < a Initial program 16.0%
Simplified14.4%
Taylor expanded in x-scale around 0 26.5%
Simplified28.6%
Taylor expanded in a around inf 65.3%
times-frac66.6%
Simplified66.6%
associate-*r/66.6%
quot-tan66.6%
Applied egg-rr66.6%
associate-*r/66.6%
associate-*l/65.3%
associate-/l*63.9%
associate-*r*63.8%
Simplified63.8%
Final simplification49.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e+38)
(/
(*
180.0
(atan (* (/ y-scale x-scale) (* 0.005555555555555556 (* angle PI)))))
PI)
(/ (* 180.0 (atan (/ (* y-scale -180.0) (* PI (* x-scale angle))))) 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.2e+38) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((y_45_scale * -180.0) / (((double) M_PI) * (x_45_scale * angle))))) / ((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.2e+38) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * Math.PI))))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((y_45_scale * -180.0) / (Math.PI * (x_45_scale * angle))))) / 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.2e+38: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * math.pi))))) / math.pi else: tmp = (180.0 * math.atan(((y_45_scale * -180.0) / (math.pi * (x_45_scale * angle))))) / 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.2e+38) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(0.005555555555555556 * Float64(angle * pi))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * -180.0) / Float64(pi * Float64(x_45_scale * angle))))) / 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.2e+38) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * pi))))) / pi; else tmp = (180.0 * atan(((y_45_scale * -180.0) / (pi * (x_45_scale * angle))))) / 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.2e+38], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(Pi * N[(x$45$scale * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{\pi \cdot \left(x-scale \cdot angle\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.20000000000000006e38Initial program 14.2%
Simplified13.2%
Taylor expanded in x-scale around 0 29.3%
Simplified32.3%
Taylor expanded in a around inf 52.0%
times-frac54.7%
Simplified54.7%
associate-*r/54.7%
quot-tan54.7%
Applied egg-rr54.7%
Taylor expanded in angle around 0 50.8%
if 2.20000000000000006e38 < b Initial program 6.7%
Simplified4.6%
Taylor expanded in angle around 0 4.8%
associate-*r/4.8%
associate-*r*2.5%
distribute-lft-out--2.5%
associate-*r*2.5%
Simplified2.5%
Taylor expanded in a around 0 56.7%
associate-*r/56.7%
associate-*r/57.0%
associate-*r*57.0%
Applied egg-rr57.0%
Final simplification51.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.45e+38)
(/
(*
180.0
(atan (* (/ y-scale x-scale) (* 0.005555555555555556 (* angle PI)))))
PI)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.45e+38) {
tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * ((double) M_PI)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.45e+38) {
tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * Math.PI))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.45e+38: tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * math.pi))))) / math.pi else: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.45e+38) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(0.005555555555555556 * Float64(angle * pi))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.45e+38) tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (0.005555555555555556 * (angle * pi))))) / pi; else tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.45e+38], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.45000000000000003e38Initial program 14.2%
Simplified13.2%
Taylor expanded in x-scale around 0 29.3%
Simplified32.3%
Taylor expanded in a around inf 52.0%
times-frac54.7%
Simplified54.7%
associate-*r/54.7%
quot-tan54.7%
Applied egg-rr54.7%
Taylor expanded in angle around 0 50.8%
if 1.45000000000000003e38 < b Initial program 6.7%
Simplified4.6%
Taylor expanded in angle around 0 4.8%
associate-*r/4.8%
associate-*r*2.5%
distribute-lft-out--2.5%
associate-*r*2.5%
Simplified2.5%
Taylor expanded in a around 0 56.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.16e+43)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (* y-scale (/ PI x-scale))))))
PI)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.16e+43) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * (y_45_scale * (((double) M_PI) / x_45_scale)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.16e+43) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * (y_45_scale * (Math.PI / x_45_scale)))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 2.16e+43: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * (y_45_scale * (math.pi / x_45_scale)))))) / math.pi else: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.16e+43) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(y_45_scale * Float64(pi / x_45_scale)))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.16e+43) tmp = (180.0 * atan((0.005555555555555556 * (angle * (y_45_scale * (pi / x_45_scale)))))) / pi; else tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.16e+43], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(y$45$scale * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.16 \cdot 10^{+43}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \left(y-scale \cdot \frac{\pi}{x-scale}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.1600000000000001e43Initial program 14.2%
Simplified13.2%
Taylor expanded in x-scale around 0 29.3%
Simplified32.3%
Taylor expanded in a around inf 52.0%
times-frac54.7%
Simplified54.7%
associate-*r/54.7%
quot-tan54.7%
Applied egg-rr54.7%
Taylor expanded in angle around 0 43.3%
associate-/l*50.8%
associate-/l*50.8%
Simplified50.8%
if 2.1600000000000001e43 < b Initial program 6.7%
Simplified4.6%
Taylor expanded in angle around 0 4.8%
associate-*r/4.8%
associate-*r*2.5%
distribute-lft-out--2.5%
associate-*r*2.5%
Simplified2.5%
Taylor expanded in a around 0 56.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 8e+22)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* PI (* x-scale angle))))) PI))
(*
180.0
(/
(atan (* 0.005555555555555556 (/ (* angle (* y-scale PI)) x-scale)))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 8e+22) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (((double) M_PI) * (x_45_scale * angle))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * ((double) M_PI))) / x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 8e+22) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (Math.PI * (x_45_scale * angle))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.005555555555555556 * ((angle * (y_45_scale * Math.PI)) / x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 8e+22: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (math.pi * (x_45_scale * angle))))) / math.pi) else: tmp = 180.0 * (math.atan((0.005555555555555556 * ((angle * (y_45_scale * math.pi)) / x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 8e+22) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(pi * Float64(x_45_scale * angle))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(Float64(angle * Float64(y_45_scale * pi)) / x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 8e+22) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (pi * (x_45_scale * angle))))) / pi); else tmp = 180.0 * (atan((0.005555555555555556 * ((angle * (y_45_scale * pi)) / x_45_scale))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 8e+22], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(Pi * N[(x$45$scale * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8 \cdot 10^{+22}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{\pi \cdot \left(x-scale \cdot angle\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if a < 8e22Initial program 14.3%
Simplified13.2%
Taylor expanded in angle around 0 10.8%
associate-*r/10.8%
associate-*r*9.2%
distribute-lft-out--9.2%
associate-*r*9.2%
Simplified9.2%
Taylor expanded in a around 0 44.4%
pow144.4%
associate-*r*44.4%
Applied egg-rr44.4%
unpow144.4%
*-commutative44.4%
Simplified44.4%
if 8e22 < a Initial program 7.5%
Simplified5.8%
Taylor expanded in x-scale around 0 16.0%
Simplified18.7%
Taylor expanded in a around inf 66.7%
times-frac68.5%
Simplified68.5%
Taylor expanded in angle around 0 56.0%
Final simplification46.8%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ y-scale (* PI (* x-scale angle))))) 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 / (((double) M_PI) * (x_45_scale * angle))))) / ((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 / (Math.PI * (x_45_scale * angle))))) / 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 / (math.pi * (x_45_scale * angle))))) / 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(pi * Float64(x_45_scale * angle))))) / 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 / (pi * (x_45_scale * angle))))) / 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[(Pi * N[(x$45$scale * angle), $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}{\pi \cdot \left(x-scale \cdot angle\right)}\right)}{\pi}
\end{array}
Initial program 12.9%
Simplified11.7%
Taylor expanded in angle around 0 9.0%
associate-*r/9.0%
associate-*r*7.7%
distribute-lft-out--7.7%
associate-*r*7.7%
Simplified7.7%
Taylor expanded in a around 0 40.6%
pow140.6%
associate-*r*40.6%
Applied egg-rr40.6%
unpow140.6%
*-commutative40.6%
Simplified40.6%
Final simplification40.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}
\end{array}
Initial program 12.9%
Simplified11.7%
Taylor expanded in angle around 0 9.0%
associate-*r/9.0%
associate-*r*7.7%
distribute-lft-out--7.7%
associate-*r*7.7%
Simplified7.7%
Taylor expanded in a around 0 40.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* angle (* y-scale PI))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * Math.PI))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * math.pi))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * pi))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi}
\end{array}
Initial program 12.9%
Simplified11.7%
Taylor expanded in angle around 0 9.0%
associate-*r/9.0%
associate-*r*7.7%
distribute-lft-out--7.7%
associate-*r*7.7%
Simplified7.7%
Taylor expanded in a around inf 13.7%
herbie shell --seed 2024165
(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)))