
(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 13 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
(if (<= b_m 6.5e+71)
(/
(*
180.0
(atan
(*
(tan (/ (* (* angle PI) 0.011111111111111112) 2.0))
(/ y-scale x-scale))))
PI)
(*
180.0
(/
(atan
(/
(*
y-scale
(cos (* 0.005555555555555556 (* angle (cbrt (* PI (* PI PI)))))))
(* (sin (* (* angle PI) 0.005555555555555556)) (- 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 <= 6.5e+71) {
tmp = (180.0 * atan((tan((((angle * ((double) M_PI)) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((y_45_scale * cos((0.005555555555555556 * (angle * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))))) / (sin(((angle * ((double) M_PI)) * 0.005555555555555556)) * -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 <= 6.5e+71) {
tmp = (180.0 * Math.atan((Math.tan((((angle * Math.PI) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.cos((0.005555555555555556 * (angle * Math.cbrt((Math.PI * (Math.PI * Math.PI))))))) / (Math.sin(((angle * Math.PI) * 0.005555555555555556)) * -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 <= 6.5e+71) tmp = Float64(Float64(180.0 * atan(Float64(tan(Float64(Float64(Float64(angle * pi) * 0.011111111111111112) / 2.0)) * Float64(y_45_scale / x_45_scale)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * cos(Float64(0.005555555555555556 * Float64(angle * cbrt(Float64(pi * Float64(pi * pi))))))) / Float64(sin(Float64(Float64(angle * pi) * 0.005555555555555556)) * 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_] := If[LessEqual[b$95$m, 6.5e+71], N[(N[(180.0 * N[ArcTan[N[(N[Tan[N[(N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 6.5 \cdot 10^{+71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan \left(\frac{\left(angle \cdot \pi\right) \cdot 0.011111111111111112}{2}\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 6.49999999999999954e71Initial program 18.3%
Applied egg-rr18.5%
Taylor expanded in a around inf
Simplified11.3%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.1%
Applied egg-rr51.8%
if 6.49999999999999954e71 < b Initial program 17.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.1%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6479.1
Simplified79.1%
add-cbrt-cubeN/A
lower-cbrt.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-*.f6484.5
Applied egg-rr84.5%
Final simplification57.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.2e+71)
(/
(*
180.0
(atan
(*
(tan (/ (* (* angle PI) 0.011111111111111112) 2.0))
(/ y-scale x-scale))))
PI)
(*
(atan
(/
-1.0
(* (/ x-scale y-scale) (tan (* angle (* PI 0.005555555555555556))))))
(* 180.0 (/ 1.0 PI)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.2e+71) {
tmp = (180.0 * atan((tan((((angle * ((double) M_PI)) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / ((double) M_PI);
} else {
tmp = atan((-1.0 / ((x_45_scale / y_45_scale) * tan((angle * (((double) M_PI) * 0.005555555555555556)))))) * (180.0 * (1.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 tmp;
if (b_m <= 4.2e+71) {
tmp = (180.0 * Math.atan((Math.tan((((angle * Math.PI) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / Math.PI;
} else {
tmp = Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((angle * (Math.PI * 0.005555555555555556)))))) * (180.0 * (1.0 / Math.PI));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 4.2e+71: tmp = (180.0 * math.atan((math.tan((((angle * math.pi) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / math.pi else: tmp = math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((angle * (math.pi * 0.005555555555555556)))))) * (180.0 * (1.0 / math.pi)) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.2e+71) tmp = Float64(Float64(180.0 * atan(Float64(tan(Float64(Float64(Float64(angle * pi) * 0.011111111111111112) / 2.0)) * Float64(y_45_scale / x_45_scale)))) / pi); else tmp = Float64(atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(angle * Float64(pi * 0.005555555555555556)))))) * Float64(180.0 * Float64(1.0 / pi))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 4.2e+71) tmp = (180.0 * atan((tan((((angle * pi) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / pi; else tmp = atan((-1.0 / ((x_45_scale / y_45_scale) * tan((angle * (pi * 0.005555555555555556)))))) * (180.0 * (1.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_] := If[LessEqual[b$95$m, 4.2e+71], N[(N[(180.0 * N[ArcTan[N[(N[Tan[N[(N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.2 \cdot 10^{+71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan \left(\frac{\left(angle \cdot \pi\right) \cdot 0.011111111111111112}{2}\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}\right) \cdot \left(180 \cdot \frac{1}{\pi}\right)\\
\end{array}
\end{array}
if b < 4.19999999999999978e71Initial program 18.3%
Applied egg-rr18.5%
Taylor expanded in a around inf
Simplified11.3%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.1%
Applied egg-rr51.8%
if 4.19999999999999978e71 < b Initial program 17.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.1%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6479.1
Simplified79.1%
Applied egg-rr81.6%
lift-PI.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6484.0
Applied egg-rr84.0%
Final simplification57.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.3e+79)
(/
(*
180.0
(atan
(*
(tan (/ (* (* angle PI) 0.011111111111111112) 2.0))
(/ y-scale x-scale))))
PI)
(*
(/ 180.0 PI)
(atan
(*
y-scale
(/ -1.0 (* x-scale (tan (* (* angle PI) 0.005555555555555556)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.3e+79) {
tmp = (180.0 * atan((tan((((angle * ((double) M_PI)) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((y_45_scale * (-1.0 / (x_45_scale * tan(((angle * ((double) M_PI)) * 0.005555555555555556))))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.3e+79) {
tmp = (180.0 * Math.atan((Math.tan((((angle * Math.PI) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((y_45_scale * (-1.0 / (x_45_scale * Math.tan(((angle * Math.PI) * 0.005555555555555556))))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 4.3e+79: tmp = (180.0 * math.atan((math.tan((((angle * math.pi) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((y_45_scale * (-1.0 / (x_45_scale * math.tan(((angle * math.pi) * 0.005555555555555556)))))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.3e+79) tmp = Float64(Float64(180.0 * atan(Float64(tan(Float64(Float64(Float64(angle * pi) * 0.011111111111111112) / 2.0)) * Float64(y_45_scale / x_45_scale)))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(y_45_scale * Float64(-1.0 / Float64(x_45_scale * tan(Float64(Float64(angle * pi) * 0.005555555555555556))))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 4.3e+79) tmp = (180.0 * atan((tan((((angle * pi) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / pi; else tmp = (180.0 / pi) * atan((y_45_scale * (-1.0 / (x_45_scale * tan(((angle * pi) * 0.005555555555555556)))))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.3e+79], N[(N[(180.0 * N[ArcTan[N[(N[Tan[N[(N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(y$45$scale * N[(-1.0 / N[(x$45$scale * N[Tan[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+79}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan \left(\frac{\left(angle \cdot \pi\right) \cdot 0.011111111111111112}{2}\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot \tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)\\
\end{array}
\end{array}
if b < 4.3000000000000003e79Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Applied egg-rr52.1%
if 4.3000000000000003e79 < b Initial program 15.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6481.0
Simplified81.0%
Applied egg-rr83.6%
lift-/.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-atan.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6483.6
Applied egg-rr81.1%
Final simplification56.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.3e+79)
(*
180.0
(/
(atan
(*
y-scale
(/ (tan (/ (* (* angle PI) 0.011111111111111112) 2.0)) x-scale)))
PI))
(*
(/ 180.0 PI)
(atan
(*
y-scale
(/ -1.0 (* x-scale (tan (* (* angle PI) 0.005555555555555556)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.3e+79) {
tmp = 180.0 * (atan((y_45_scale * (tan((((angle * ((double) M_PI)) * 0.011111111111111112) / 2.0)) / x_45_scale))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((y_45_scale * (-1.0 / (x_45_scale * tan(((angle * ((double) M_PI)) * 0.005555555555555556))))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.3e+79) {
tmp = 180.0 * (Math.atan((y_45_scale * (Math.tan((((angle * Math.PI) * 0.011111111111111112) / 2.0)) / x_45_scale))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((y_45_scale * (-1.0 / (x_45_scale * Math.tan(((angle * Math.PI) * 0.005555555555555556))))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 4.3e+79: tmp = 180.0 * (math.atan((y_45_scale * (math.tan((((angle * math.pi) * 0.011111111111111112) / 2.0)) / x_45_scale))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((y_45_scale * (-1.0 / (x_45_scale * math.tan(((angle * math.pi) * 0.005555555555555556)))))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.3e+79) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(tan(Float64(Float64(Float64(angle * pi) * 0.011111111111111112) / 2.0)) / x_45_scale))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(y_45_scale * Float64(-1.0 / Float64(x_45_scale * tan(Float64(Float64(angle * pi) * 0.005555555555555556))))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 4.3e+79) tmp = 180.0 * (atan((y_45_scale * (tan((((angle * pi) * 0.011111111111111112) / 2.0)) / x_45_scale))) / pi); else tmp = (180.0 / pi) * atan((y_45_scale * (-1.0 / (x_45_scale * tan(((angle * pi) * 0.005555555555555556)))))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.3e+79], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[Tan[N[(N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(y$45$scale * N[(-1.0 / N[(x$45$scale * N[Tan[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{\tan \left(\frac{\left(angle \cdot \pi\right) \cdot 0.011111111111111112}{2}\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot \tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)\\
\end{array}
\end{array}
if b < 4.3000000000000003e79Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Applied egg-rr49.9%
if 4.3000000000000003e79 < b Initial program 15.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6481.0
Simplified81.0%
Applied egg-rr83.6%
lift-/.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-atan.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6483.6
Applied egg-rr81.1%
Final simplification54.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.3e+79)
(*
180.0
(/
(atan
(*
y-scale
(/
(*
angle
(fma
(* angle angle)
(fma
(* (* PI PI) -2.05761316872428e-5)
(* PI -0.003703703703703704)
(* (* PI (* PI PI)) -1.9051973784484073e-8))
(* PI 0.005555555555555556)))
x-scale)))
PI))
(*
(/ 180.0 PI)
(atan
(*
y-scale
(/ -1.0 (* x-scale (tan (* (* angle PI) 0.005555555555555556)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 4.3e+79) {
tmp = 180.0 * (atan((y_45_scale * ((angle * fma((angle * angle), fma(((((double) M_PI) * ((double) M_PI)) * -2.05761316872428e-5), (((double) M_PI) * -0.003703703703703704), ((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * -1.9051973784484073e-8)), (((double) M_PI) * 0.005555555555555556))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((y_45_scale * (-1.0 / (x_45_scale * tan(((angle * ((double) M_PI)) * 0.005555555555555556))))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.3e+79) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(angle * fma(Float64(angle * angle), fma(Float64(Float64(pi * pi) * -2.05761316872428e-5), Float64(pi * -0.003703703703703704), Float64(Float64(pi * Float64(pi * pi)) * -1.9051973784484073e-8)), Float64(pi * 0.005555555555555556))) / x_45_scale))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(y_45_scale * Float64(-1.0 / Float64(x_45_scale * tan(Float64(Float64(angle * pi) * 0.005555555555555556))))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.3e+79], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(angle * N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -2.05761316872428e-5), $MachinePrecision] * N[(Pi * -0.003703703703703704), $MachinePrecision] + N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * -1.9051973784484073e-8), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(y$45$scale * N[(-1.0 / N[(x$45$scale * N[Tan[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot \tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)\\
\end{array}
\end{array}
if b < 4.3000000000000003e79Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Taylor expanded in angle around 0
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower-fma.f64N/A
Simplified49.2%
if 4.3000000000000003e79 < b Initial program 15.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6481.0
Simplified81.0%
Applied egg-rr83.6%
lift-/.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-atan.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6483.6
Applied egg-rr81.1%
Final simplification54.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 4.3e+79)
(*
180.0
(/
(atan
(*
y-scale
(/
(*
angle
(fma
(* angle angle)
(fma
(* (* PI PI) -2.05761316872428e-5)
(* PI -0.003703703703703704)
(* (* PI (* PI PI)) -1.9051973784484073e-8))
(* PI 0.005555555555555556)))
x-scale)))
PI))
(/
(*
180.0
(atan
(/ y-scale (* (tan (* (* angle PI) 0.005555555555555556)) (- 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 <= 4.3e+79) {
tmp = 180.0 * (atan((y_45_scale * ((angle * fma((angle * angle), fma(((((double) M_PI) * ((double) M_PI)) * -2.05761316872428e-5), (((double) M_PI) * -0.003703703703703704), ((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * -1.9051973784484073e-8)), (((double) M_PI) * 0.005555555555555556))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((y_45_scale / (tan(((angle * ((double) M_PI)) * 0.005555555555555556)) * -x_45_scale)))) / ((double) M_PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 4.3e+79) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(angle * fma(Float64(angle * angle), fma(Float64(Float64(pi * pi) * -2.05761316872428e-5), Float64(pi * -0.003703703703703704), Float64(Float64(pi * Float64(pi * pi)) * -1.9051973784484073e-8)), Float64(pi * 0.005555555555555556))) / x_45_scale))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale / Float64(tan(Float64(Float64(angle * pi) * 0.005555555555555556)) * 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_] := If[LessEqual[b$95$m, 4.3e+79], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(angle * N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -2.05761316872428e-5), $MachinePrecision] * N[(Pi * -0.003703703703703704), $MachinePrecision] + N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * -1.9051973784484073e-8), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(y$45$scale / N[(N[Tan[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.3000000000000003e79Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Taylor expanded in angle around 0
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower-fma.f64N/A
Simplified49.2%
if 4.3000000000000003e79 < b Initial program 15.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6481.0
Simplified81.0%
Applied egg-rr83.6%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified81.0%
Final simplification54.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.05e+81)
(*
180.0
(/
(atan
(*
y-scale
(/
(*
angle
(fma
(* angle angle)
(fma
(* (* PI PI) -2.05761316872428e-5)
(* PI -0.003703703703703704)
(* (* PI (* PI PI)) -1.9051973784484073e-8))
(* PI 0.005555555555555556)))
x-scale)))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan (/ (* y-scale -180.0) (* (* angle PI) x-scale))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.05e+81) {
tmp = 180.0 * (atan((y_45_scale * ((angle * fma((angle * angle), fma(((((double) M_PI) * ((double) M_PI)) * -2.05761316872428e-5), (((double) M_PI) * -0.003703703703703704), ((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * -1.9051973784484073e-8)), (((double) M_PI) * 0.005555555555555556))) / x_45_scale))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan(((y_45_scale * -180.0) / ((angle * ((double) M_PI)) * x_45_scale)));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.05e+81) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(angle * fma(Float64(angle * angle), fma(Float64(Float64(pi * pi) * -2.05761316872428e-5), Float64(pi * -0.003703703703703704), Float64(Float64(pi * Float64(pi * pi)) * -1.9051973784484073e-8)), Float64(pi * 0.005555555555555556))) / x_45_scale))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(Float64(y_45_scale * -180.0) / Float64(Float64(angle * pi) * x_45_scale)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.05e+81], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(angle * N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -2.05761316872428e-5), $MachinePrecision] * N[(Pi * -0.003703703703703704), $MachinePrecision] + N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * -1.9051973784484073e-8), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{\left(angle \cdot \pi\right) \cdot x-scale}\right)\\
\end{array}
\end{array}
if b < 2.05000000000000006e81Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Taylor expanded in angle around 0
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower-fma.f64N/A
Simplified49.2%
if 2.05000000000000006e81 < b Initial program 15.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6481.0
Simplified81.0%
Applied egg-rr83.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6480.8
Simplified80.8%
Final simplification54.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.05e+81)
(*
180.0
(/
(atan (* y-scale (* 0.005555555555555556 (/ (* angle PI) x-scale))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan (/ (* y-scale -180.0) (* (* angle PI) x-scale))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.05e+81) {
tmp = 180.0 * (atan((y_45_scale * (0.005555555555555556 * ((angle * ((double) M_PI)) / x_45_scale)))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan(((y_45_scale * -180.0) / ((angle * ((double) M_PI)) * x_45_scale)));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.05e+81) {
tmp = 180.0 * (Math.atan((y_45_scale * (0.005555555555555556 * ((angle * Math.PI) / x_45_scale)))) / Math.PI);
} else {
tmp = (180.0 * (1.0 / Math.PI)) * Math.atan(((y_45_scale * -180.0) / ((angle * Math.PI) * x_45_scale)));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 2.05e+81: tmp = 180.0 * (math.atan((y_45_scale * (0.005555555555555556 * ((angle * math.pi) / x_45_scale)))) / math.pi) else: tmp = (180.0 * (1.0 / math.pi)) * math.atan(((y_45_scale * -180.0) / ((angle * math.pi) * x_45_scale))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.05e+81) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(0.005555555555555556 * Float64(Float64(angle * pi) / x_45_scale)))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(Float64(y_45_scale * -180.0) / Float64(Float64(angle * pi) * x_45_scale)))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.05e+81) tmp = 180.0 * (atan((y_45_scale * (0.005555555555555556 * ((angle * pi) / x_45_scale)))) / pi); else tmp = (180.0 * (1.0 / pi)) * atan(((y_45_scale * -180.0) / ((angle * pi) * x_45_scale))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.05e+81], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(0.005555555555555556 * N[(N[(angle * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \left(0.005555555555555556 \cdot \frac{angle \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{\left(angle \cdot \pi\right) \cdot x-scale}\right)\\
\end{array}
\end{array}
if b < 2.05000000000000006e81Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6449.1
Simplified49.1%
if 2.05000000000000006e81 < b Initial program 15.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6481.0
Simplified81.0%
Applied egg-rr83.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6480.8
Simplified80.8%
Final simplification54.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.05e+81)
(*
180.0
(/
(atan (* y-scale (* 0.005555555555555556 (/ (* angle PI) x-scale))))
PI))
(* 180.0 (/ (atan (/ (* y-scale -180.0) (* (* 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 <= 2.05e+81) {
tmp = 180.0 * (atan((y_45_scale * (0.005555555555555556 * ((angle * ((double) M_PI)) / x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / ((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 <= 2.05e+81) {
tmp = 180.0 * (Math.atan((y_45_scale * (0.005555555555555556 * ((angle * Math.PI) / x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / ((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 <= 2.05e+81: tmp = 180.0 * (math.atan((y_45_scale * (0.005555555555555556 * ((angle * math.pi) / x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / ((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 <= 2.05e+81) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(0.005555555555555556 * Float64(Float64(angle * pi) / x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(Float64(angle * 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 <= 2.05e+81) tmp = 180.0 * (atan((y_45_scale * (0.005555555555555556 * ((angle * pi) / x_45_scale)))) / pi); else tmp = 180.0 * (atan(((y_45_scale * -180.0) / ((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, 2.05e+81], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(0.005555555555555556 * N[(N[(angle * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \left(0.005555555555555556 \cdot \frac{angle \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{\left(angle \cdot \pi\right) \cdot x-scale}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.05000000000000006e81Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6449.1
Simplified49.1%
if 2.05000000000000006e81 < b Initial program 15.3%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Simplified17.6%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Simplified17.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6480.8
Simplified80.8%
Final simplification54.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.05e+81)
(*
180.0
(/
(atan (* y-scale (* 0.005555555555555556 (/ (* angle PI) x-scale))))
PI))
(* 180.0 (/ (atan (/ (* y-scale -180.0) (* 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 <= 2.05e+81) {
tmp = 180.0 * (atan((y_45_scale * (0.005555555555555556 * ((angle * ((double) M_PI)) / x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (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 <= 2.05e+81) {
tmp = 180.0 * (Math.atan((y_45_scale * (0.005555555555555556 * ((angle * Math.PI) / x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (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 <= 2.05e+81: tmp = 180.0 * (math.atan((y_45_scale * (0.005555555555555556 * ((angle * math.pi) / x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (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 <= 2.05e+81) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(0.005555555555555556 * Float64(Float64(angle * pi) / x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(angle * Float64(pi * x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.05e+81) tmp = 180.0 * (atan((y_45_scale * (0.005555555555555556 * ((angle * pi) / x_45_scale)))) / pi); else tmp = 180.0 * (atan(((y_45_scale * -180.0) / (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, 2.05e+81], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(0.005555555555555556 * N[(N[(angle * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(angle * 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 2.05 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \left(0.005555555555555556 \cdot \frac{angle \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.05000000000000006e81Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6449.1
Simplified49.1%
if 2.05000000000000006e81 < b Initial program 15.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Simplified27.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6481.0
Simplified81.0%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6480.8
Simplified80.8%
Final simplification54.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.05e+81)
(*
180.0
(/
(atan (* y-scale (* 0.005555555555555556 (/ (* angle 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 <= 2.05e+81) {
tmp = 180.0 * (atan((y_45_scale * (0.005555555555555556 * ((angle * ((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 <= 2.05e+81) {
tmp = 180.0 * (Math.atan((y_45_scale * (0.005555555555555556 * ((angle * 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 <= 2.05e+81: tmp = 180.0 * (math.atan((y_45_scale * (0.005555555555555556 * ((angle * 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 <= 2.05e+81) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(0.005555555555555556 * Float64(Float64(angle * pi) / x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * x_45_scale))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.05e+81) tmp = 180.0 * (atan((y_45_scale * (0.005555555555555556 * ((angle * 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, 2.05e+81], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(0.005555555555555556 * N[(N[(angle * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \left(0.005555555555555556 \cdot \frac{angle \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 2.05000000000000006e81Initial program 18.7%
Applied egg-rr18.9%
Taylor expanded in a around inf
Simplified11.7%
Taylor expanded in x-scale around 0
lower-/.f64N/A
Simplified29.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6449.1
Simplified49.1%
if 2.05000000000000006e81 < b Initial program 15.3%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Simplified17.6%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6480.7
Simplified80.7%
Final simplification54.1%
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 18.1%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Simplified14.7%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6441.2
Simplified41.2%
Final simplification41.2%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* angle (* PI y-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 * (x_45_scale / (angle * (((double) M_PI) * y_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 * (x_45_scale / (angle * (Math.PI * y_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 * (x_45_scale / (angle * (math.pi * y_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(x_45_scale / Float64(angle * Float64(pi * y_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 * (x_45_scale / (angle * (pi * y_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[(x$45$scale / N[(angle * N[(Pi * y$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{x-scale}{angle \cdot \left(\pi \cdot y-scale\right)}\right)}{\pi}
\end{array}
Initial program 18.1%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Simplified14.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6414.4
Simplified14.4%
Final simplification14.4%
herbie shell --seed 2024208
(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)))