
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-22)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 1.9e+72)
(*
180.0
(/
(atan
(/
(/ (* (* y-scale (* b_m b_m)) -180.0) x-scale)
(* (* angle PI) (* (- b_m a) (+ b_m a)))))
PI))
(if (<= b_m 5.7e+119)
(/
1.0
(/
PI
(*
180.0
(atan
(*
(/ y-scale x-scale)
(tan (* PI (* 0.005555555555555556 angle))))))))
(*
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.2e-22) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 1.9e+72) {
tmp = 180.0 * (atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * ((double) M_PI)) * ((b_m - a) * (b_m + a))))) / ((double) M_PI));
} else if (b_m <= 5.7e+119) {
tmp = 1.0 / (((double) M_PI) / (180.0 * atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle)))))));
} 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.2e-22) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else if (b_m <= 1.9e+72) {
tmp = 180.0 * (Math.atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * Math.PI) * ((b_m - a) * (b_m + a))))) / Math.PI);
} else if (b_m <= 5.7e+119) {
tmp = 1.0 / (Math.PI / (180.0 * Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle)))))));
} 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.2e-22: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi elif b_m <= 1.9e+72: tmp = 180.0 * (math.atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * math.pi) * ((b_m - a) * (b_m + a))))) / math.pi) elif b_m <= 5.7e+119: tmp = 1.0 / (math.pi / (180.0 * math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle))))))) 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.2e-22) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 1.9e+72) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) * -180.0) / x_45_scale) / Float64(Float64(angle * pi) * Float64(Float64(b_m - a) * Float64(b_m + a))))) / pi)); elseif (b_m <= 5.7e+119) tmp = Float64(1.0 / Float64(pi / Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle)))))))); 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.2e-22) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; elseif (b_m <= 1.9e+72) tmp = 180.0 * (atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * pi) * ((b_m - a) * (b_m + a))))) / pi); elseif (b_m <= 5.7e+119) tmp = 1.0 / (pi / (180.0 * atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle))))))); 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.2e-22], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+72], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * -180.0), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.7e+119], N[(1.0 / N[(Pi / N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $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.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{\left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right) \cdot -180}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.7 \cdot 10^{+119}:\\
\;\;\;\;\frac{1}{\frac{\pi}{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\\
\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.2000000000000001e-22Initial program 17.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.3
Applied rewrites54.3%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.4
Applied rewrites55.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.5
Applied rewrites55.5%
if 2.2000000000000001e-22 < b < 1.90000000000000003e72Initial program 44.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites33.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6440.6
Applied rewrites40.6%
if 1.90000000000000003e72 < b < 5.7000000000000002e119Initial program 20.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites50.4%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6450.3
Applied rewrites50.3%
Applied rewrites50.3%
Applied rewrites60.2%
if 5.7000000000000002e119 < b Initial program 3.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites11.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6470.2
Applied rewrites70.2%
Final simplification56.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0)))
(if (<= b_m 9.2e-51)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 2.5e+115)
(*
180.0
(/
(atan
(/
(* (* y-scale (* b_m b_m)) (pow t_1 2.0))
(* x-scale (* t_1 (* t_2 (* (+ b_m a) (- a b_m)))))))
PI))
(*
180.0
(/
(atan
(/
(*
y-scale
(fma 0.5 (cos (* (* angle PI) 0.011111111111111112)) 0.5))
(* t_2 (- x-scale))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double tmp;
if (b_m <= 9.2e-51) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 2.5e+115) {
tmp = 180.0 * (atan((((y_45_scale * (b_m * b_m)) * pow(t_1, 2.0)) / (x_45_scale * (t_1 * (t_2 * ((b_m + a) * (a - b_m))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * fma(0.5, cos(((angle * ((double) M_PI)) * 0.011111111111111112)), 0.5)) / (t_2 * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = sin(t_0) tmp = 0.0 if (b_m <= 9.2e-51) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 2.5e+115) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) * (t_1 ^ 2.0)) / Float64(x_45_scale * Float64(t_1 * Float64(t_2 * Float64(Float64(b_m + a) * Float64(a - b_m))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * fma(0.5, cos(Float64(Float64(angle * pi) * 0.011111111111111112)), 0.5)) / Float64(t_2 * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 9.2e-51], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 2.5e+115], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[(t$95$2 * N[(N[(b$95$m + a), $MachinePrecision] * N[(a - b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(0.5 * N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 9.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.5 \cdot 10^{+115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right) \cdot {t\_1}^{2}}{x-scale \cdot \left(t\_1 \cdot \left(t\_2 \cdot \left(\left(b\_m + a\right) \cdot \left(a - b\_m\right)\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \mathsf{fma}\left(0.5, \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right), 0.5\right)}{t\_2 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 9.20000000000000007e-51Initial program 17.7%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.8%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.8
Applied rewrites54.8%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6456.0
Applied rewrites56.0%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6456.0
Applied rewrites56.0%
if 9.20000000000000007e-51 < b < 2.50000000000000004e115Initial program 31.6%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6445.5
Applied rewrites45.5%
if 2.50000000000000004e115 < b Initial program 3.8%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites14.8%
Applied rewrites14.9%
Taylor expanded in angle around 0
Applied rewrites18.5%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
Applied rewrites75.6%
Final simplification56.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
(if (<= b_m 9.2e-51)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 2.5e+115)
(*
180.0
(/
(atan
(/
(* y-scale (* b_m b_m))
(* x-scale (* (cos t_0) (* t_1 (* (+ b_m a) (- a b_m)))))))
PI))
(*
180.0
(/
(atan
(/
(*
y-scale
(fma 0.5 (cos (* (* angle PI) 0.011111111111111112)) 0.5))
(* t_1 (- x-scale))))
PI))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (b_m <= 9.2e-51) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 2.5e+115) {
tmp = 180.0 * (atan(((y_45_scale * (b_m * b_m)) / (x_45_scale * (cos(t_0) * (t_1 * ((b_m + a) * (a - b_m))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * fma(0.5, cos(((angle * ((double) M_PI)) * 0.011111111111111112)), 0.5)) / (t_1 * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (b_m <= 9.2e-51) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 2.5e+115) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * Float64(b_m * b_m)) / Float64(x_45_scale * Float64(cos(t_0) * Float64(t_1 * Float64(Float64(b_m + a) * Float64(a - b_m))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * fma(0.5, cos(Float64(Float64(angle * pi) * 0.011111111111111112)), 0.5)) / Float64(t_1 * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 9.2e-51], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 2.5e+115], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[(t$95$1 * N[(N[(b$95$m + a), $MachinePrecision] * N[(a - b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(0.5 * N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 9.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.5 \cdot 10^{+115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale \cdot \left(\cos t\_0 \cdot \left(t\_1 \cdot \left(\left(b\_m + a\right) \cdot \left(a - b\_m\right)\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \mathsf{fma}\left(0.5, \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right), 0.5\right)}{t\_1 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 9.20000000000000007e-51Initial program 17.7%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.8%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.8
Applied rewrites54.8%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6456.0
Applied rewrites56.0%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6456.0
Applied rewrites56.0%
if 9.20000000000000007e-51 < b < 2.50000000000000004e115Initial program 31.6%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites44.4%
Taylor expanded in angle around 0
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6445.4
Applied rewrites45.4%
if 2.50000000000000004e115 < b Initial program 3.8%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites14.8%
Applied rewrites14.9%
Taylor expanded in angle around 0
Applied rewrites18.5%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
Applied rewrites75.6%
Final simplification56.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sin (* 0.005555555555555556 (* angle PI)))))
(if (<= b_m 1.62e-25)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 1.85e+115)
(*
180.0
(/
(atan
(*
(/ (* y-scale -0.5) x-scale)
(/ (* (* b_m b_m) 2.0) (* t_0 (* (- b_m a) (+ b_m a))))))
PI))
(*
180.0
(/
(atan
(/
(*
y-scale
(fma 0.5 (cos (* (* angle PI) 0.011111111111111112)) 0.5))
(* 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 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (b_m <= 1.62e-25) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 1.85e+115) {
tmp = 180.0 * (atan((((y_45_scale * -0.5) / x_45_scale) * (((b_m * b_m) * 2.0) / (t_0 * ((b_m - a) * (b_m + a)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * fma(0.5, cos(((angle * ((double) M_PI)) * 0.011111111111111112)), 0.5)) / (t_0 * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (b_m <= 1.62e-25) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 1.85e+115) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale * -0.5) / x_45_scale) * Float64(Float64(Float64(b_m * b_m) * 2.0) / Float64(t_0 * Float64(Float64(b_m - a) * Float64(b_m + a)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * fma(0.5, cos(Float64(Float64(angle * pi) * 0.011111111111111112)), 0.5)) / Float64(t_0 * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 1.62e-25], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.85e+115], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale * -0.5), $MachinePrecision] / x$45$scale), $MachinePrecision] * N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * 2.0), $MachinePrecision] / N[(t$95$0 * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[(0.5 * N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;b\_m \leq 1.62 \cdot 10^{-25}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.85 \cdot 10^{+115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -0.5}{x-scale} \cdot \frac{\left(b\_m \cdot b\_m\right) \cdot 2}{t\_0 \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \mathsf{fma}\left(0.5, \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right), 0.5\right)}{t\_0 \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.62e-25Initial program 17.5%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.4%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.6
Applied rewrites54.6%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.7
Applied rewrites55.7%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.7
Applied rewrites55.7%
if 1.62e-25 < b < 1.85000000000000003e115Initial program 36.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.1%
Applied rewrites47.7%
Taylor expanded in angle around 0
Applied rewrites47.2%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6444.4
Applied rewrites44.4%
if 1.85000000000000003e115 < b Initial program 3.7%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites17.9%
Applied rewrites17.9%
Taylor expanded in angle around 0
Applied rewrites17.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
Applied rewrites72.9%
Final simplification56.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.62e-25)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 1.55e+136)
(*
180.0
(/
(atan
(*
(/ (* y-scale -0.5) x-scale)
(/
(* (* b_m b_m) 2.0)
(*
(sin (* 0.005555555555555556 (* angle PI)))
(* (- b_m a) (+ b_m a))))))
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 <= 1.62e-25) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 1.55e+136) {
tmp = 180.0 * (atan((((y_45_scale * -0.5) / x_45_scale) * (((b_m * b_m) * 2.0) / (sin((0.005555555555555556 * (angle * ((double) M_PI)))) * ((b_m - a) * (b_m + a)))))) / ((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 <= 1.62e-25) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else if (b_m <= 1.55e+136) {
tmp = 180.0 * (Math.atan((((y_45_scale * -0.5) / x_45_scale) * (((b_m * b_m) * 2.0) / (Math.sin((0.005555555555555556 * (angle * Math.PI))) * ((b_m - a) * (b_m + a)))))) / 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 <= 1.62e-25: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi elif b_m <= 1.55e+136: tmp = 180.0 * (math.atan((((y_45_scale * -0.5) / x_45_scale) * (((b_m * b_m) * 2.0) / (math.sin((0.005555555555555556 * (angle * math.pi))) * ((b_m - a) * (b_m + a)))))) / 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 <= 1.62e-25) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 1.55e+136) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale * -0.5) / x_45_scale) * Float64(Float64(Float64(b_m * b_m) * 2.0) / Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(Float64(b_m - a) * Float64(b_m + a)))))) / 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 <= 1.62e-25) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; elseif (b_m <= 1.55e+136) tmp = 180.0 * (atan((((y_45_scale * -0.5) / x_45_scale) * (((b_m * b_m) * 2.0) / (sin((0.005555555555555556 * (angle * pi))) * ((b_m - a) * (b_m + a)))))) / 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, 1.62e-25], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.55e+136], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale * -0.5), $MachinePrecision] / x$45$scale), $MachinePrecision] * N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $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 1.62 \cdot 10^{-25}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.55 \cdot 10^{+136}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -0.5}{x-scale} \cdot \frac{\left(b\_m \cdot b\_m\right) \cdot 2}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\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 < 1.62e-25Initial program 17.5%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.4%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.6
Applied rewrites54.6%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.7
Applied rewrites55.7%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.7
Applied rewrites55.7%
if 1.62e-25 < b < 1.54999999999999992e136Initial program 32.7%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.7%
Applied rewrites48.2%
Taylor expanded in angle around 0
Applied rewrites47.8%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6445.8
Applied rewrites45.8%
if 1.54999999999999992e136 < b Initial program 0.0%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites9.1%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6473.7
Applied rewrites73.7%
Final simplification56.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-22)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 1.9e+72)
(*
180.0
(/
(atan
(/
(/ (* (* y-scale (* b_m b_m)) -180.0) x-scale)
(* (* angle PI) (* (- b_m a) (+ b_m a)))))
PI))
(if (<= b_m 5.7e+119)
(*
180.0
(/
(atan
(* (/ y-scale x-scale) (tan (* PI (* 0.005555555555555556 angle)))))
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.2e-22) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 1.9e+72) {
tmp = 180.0 * (atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * ((double) M_PI)) * ((b_m - a) * (b_m + a))))) / ((double) M_PI));
} else if (b_m <= 5.7e+119) {
tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * -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.2e-22) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else if (b_m <= 1.9e+72) {
tmp = 180.0 * (Math.atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * Math.PI) * ((b_m - a) * (b_m + a))))) / Math.PI);
} else if (b_m <= 5.7e+119) {
tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -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.2e-22: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi elif b_m <= 1.9e+72: tmp = 180.0 * (math.atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * math.pi) * ((b_m - a) * (b_m + a))))) / math.pi) elif b_m <= 5.7e+119: tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * -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.2e-22) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 1.9e+72) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) * -180.0) / x_45_scale) / Float64(Float64(angle * pi) * Float64(Float64(b_m - a) * Float64(b_m + a))))) / pi)); elseif (b_m <= 5.7e+119) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(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.2e-22) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; elseif (b_m <= 1.9e+72) tmp = 180.0 * (atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * pi) * ((b_m - a) * (b_m + a))))) / pi); elseif (b_m <= 5.7e+119) tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((pi * (0.005555555555555556 * angle))))) / 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.2e-22], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+72], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * -180.0), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.7e+119], 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], 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.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{\left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right) \cdot -180}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.7 \cdot 10^{+119}:\\
\;\;\;\;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}\\
\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.2000000000000001e-22Initial program 17.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.3
Applied rewrites54.3%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.4
Applied rewrites55.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.5
Applied rewrites55.5%
if 2.2000000000000001e-22 < b < 1.90000000000000003e72Initial program 44.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites33.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6440.6
Applied rewrites40.6%
if 1.90000000000000003e72 < b < 5.7000000000000002e119Initial program 20.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites50.4%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6450.3
Applied rewrites50.3%
Applied rewrites50.3%
Applied rewrites60.2%
if 5.7000000000000002e119 < b Initial program 3.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites11.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6470.2
Applied rewrites70.2%
Final simplification56.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-22)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 1.9e+72)
(*
180.0
(/
(atan
(/
(/ (* (* y-scale (* b_m b_m)) -180.0) x-scale)
(* (* angle PI) (* (- b_m a) (+ b_m a)))))
PI))
(if (<= b_m 2e+119)
(*
180.0
(/
(atan
(* y-scale (/ (tan (* PI (* 0.005555555555555556 angle))) 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.2e-22) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 1.9e+72) {
tmp = 180.0 * (atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * ((double) M_PI)) * ((b_m - a) * (b_m + a))))) / ((double) M_PI));
} else if (b_m <= 2e+119) {
tmp = 180.0 * (atan((y_45_scale * (tan((((double) M_PI) * (0.005555555555555556 * angle))) / 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.2e-22) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else if (b_m <= 1.9e+72) {
tmp = 180.0 * (Math.atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * Math.PI) * ((b_m - a) * (b_m + a))))) / Math.PI);
} else if (b_m <= 2e+119) {
tmp = 180.0 * (Math.atan((y_45_scale * (Math.tan((Math.PI * (0.005555555555555556 * angle))) / 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.2e-22: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi elif b_m <= 1.9e+72: tmp = 180.0 * (math.atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * math.pi) * ((b_m - a) * (b_m + a))))) / math.pi) elif b_m <= 2e+119: tmp = 180.0 * (math.atan((y_45_scale * (math.tan((math.pi * (0.005555555555555556 * angle))) / 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.2e-22) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 1.9e+72) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) * -180.0) / x_45_scale) / Float64(Float64(angle * pi) * Float64(Float64(b_m - a) * Float64(b_m + a))))) / pi)); elseif (b_m <= 2e+119) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(tan(Float64(pi * Float64(0.005555555555555556 * angle))) / 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.2e-22) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; elseif (b_m <= 1.9e+72) tmp = 180.0 * (atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * pi) * ((b_m - a) * (b_m + a))))) / pi); elseif (b_m <= 2e+119) tmp = 180.0 * (atan((y_45_scale * (tan((pi * (0.005555555555555556 * angle))) / 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.2e-22], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+72], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * -180.0), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2e+119], 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], 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.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{\left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right) \cdot -180}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2 \cdot 10^{+119}:\\
\;\;\;\;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}\\
\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.2000000000000001e-22Initial program 17.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.3
Applied rewrites54.3%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.4
Applied rewrites55.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.5
Applied rewrites55.5%
if 2.2000000000000001e-22 < b < 1.90000000000000003e72Initial program 44.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites33.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6440.6
Applied rewrites40.6%
if 1.90000000000000003e72 < b < 1.99999999999999989e119Initial program 20.3%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites50.4%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6450.3
Applied rewrites50.3%
lift-PI.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.2%
if 1.99999999999999989e119 < b Initial program 3.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites11.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6470.2
Applied rewrites70.2%
Final simplification56.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-22)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 1.35e+96)
(*
180.0
(/
(atan
(/
(/
(/ (* (* y-scale (* b_m b_m)) -180.0) x-scale)
(* (- b_m a) (+ b_m a)))
(* angle PI)))
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.2e-22) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 1.35e+96) {
tmp = 180.0 * (atan((((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((b_m - a) * (b_m + a))) / (angle * ((double) M_PI)))) / ((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.2e-22) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else if (b_m <= 1.35e+96) {
tmp = 180.0 * (Math.atan((((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((b_m - a) * (b_m + a))) / (angle * Math.PI))) / 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.2e-22: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi elif b_m <= 1.35e+96: tmp = 180.0 * (math.atan((((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((b_m - a) * (b_m + a))) / (angle * math.pi))) / 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.2e-22) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 1.35e+96) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) * -180.0) / x_45_scale) / Float64(Float64(b_m - a) * Float64(b_m + a))) / Float64(angle * pi))) / 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.2e-22) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; elseif (b_m <= 1.35e+96) tmp = 180.0 * (atan((((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((b_m - a) * (b_m + a))) / (angle * pi))) / 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.2e-22], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.35e+96], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * -180.0), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $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.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.35 \cdot 10^{+96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{\frac{\left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right) \cdot -180}{x-scale}}{\left(b\_m - a\right) \cdot \left(b\_m + a\right)}}{angle \cdot \pi}\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.2000000000000001e-22Initial program 17.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.3
Applied rewrites54.3%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.4
Applied rewrites55.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.5
Applied rewrites55.5%
if 2.2000000000000001e-22 < b < 1.35000000000000011e96Initial program 37.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites28.0%
Taylor expanded in x-scale around 0
lower-/.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6432.9
Applied rewrites32.9%
Applied rewrites38.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6440.0
Applied rewrites40.0%
if 1.35000000000000011e96 < b Initial program 9.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites14.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6464.8
Applied rewrites64.8%
Final simplification55.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-22)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 4.1e+99)
(*
180.0
(/
(atan
(/
(* 90.0 (/ (* (* y-scale (* b_m b_m)) -2.0) x-scale))
(* (* angle PI) (* (- b_m a) (+ b_m a)))))
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.2e-22) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 4.1e+99) {
tmp = 180.0 * (atan(((90.0 * (((y_45_scale * (b_m * b_m)) * -2.0) / x_45_scale)) / ((angle * ((double) M_PI)) * ((b_m - a) * (b_m + a))))) / ((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.2e-22) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else if (b_m <= 4.1e+99) {
tmp = 180.0 * (Math.atan(((90.0 * (((y_45_scale * (b_m * b_m)) * -2.0) / x_45_scale)) / ((angle * Math.PI) * ((b_m - a) * (b_m + a))))) / 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.2e-22: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi elif b_m <= 4.1e+99: tmp = 180.0 * (math.atan(((90.0 * (((y_45_scale * (b_m * b_m)) * -2.0) / x_45_scale)) / ((angle * math.pi) * ((b_m - a) * (b_m + a))))) / 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.2e-22) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 4.1e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) * -2.0) / x_45_scale)) / Float64(Float64(angle * pi) * Float64(Float64(b_m - a) * Float64(b_m + a))))) / 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.2e-22) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; elseif (b_m <= 4.1e+99) tmp = 180.0 * (atan(((90.0 * (((y_45_scale * (b_m * b_m)) * -2.0) / x_45_scale)) / ((angle * pi) * ((b_m - a) * (b_m + a))))) / 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.2e-22], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 4.1e+99], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $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.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.1 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \frac{\left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right) \cdot -2}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\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.2000000000000001e-22Initial program 17.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.3
Applied rewrites54.3%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.4
Applied rewrites55.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.5
Applied rewrites55.5%
if 2.2000000000000001e-22 < b < 4.09999999999999979e99Initial program 37.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites28.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6439.9
Applied rewrites39.9%
if 4.09999999999999979e99 < b Initial program 9.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites14.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6464.8
Applied rewrites64.8%
Final simplification55.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-22)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 4.1e+99)
(*
180.0
(/
(atan
(/
(/ (* (* y-scale (* b_m b_m)) -180.0) x-scale)
(* (* angle PI) (* (- b_m a) (+ b_m a)))))
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.2e-22) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 4.1e+99) {
tmp = 180.0 * (atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * ((double) M_PI)) * ((b_m - a) * (b_m + a))))) / ((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.2e-22) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else if (b_m <= 4.1e+99) {
tmp = 180.0 * (Math.atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * Math.PI) * ((b_m - a) * (b_m + a))))) / 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.2e-22: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi elif b_m <= 4.1e+99: tmp = 180.0 * (math.atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * math.pi) * ((b_m - a) * (b_m + a))))) / 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.2e-22) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 4.1e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) * -180.0) / x_45_scale) / Float64(Float64(angle * pi) * Float64(Float64(b_m - a) * Float64(b_m + a))))) / 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.2e-22) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; elseif (b_m <= 4.1e+99) tmp = 180.0 * (atan(((((y_45_scale * (b_m * b_m)) * -180.0) / x_45_scale) / ((angle * pi) * ((b_m - a) * (b_m + a))))) / 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.2e-22], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 4.1e+99], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * -180.0), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $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.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.1 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{\left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right) \cdot -180}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\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.2000000000000001e-22Initial program 17.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.3
Applied rewrites54.3%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.4
Applied rewrites55.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.5
Applied rewrites55.5%
if 2.2000000000000001e-22 < b < 4.09999999999999979e99Initial program 37.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites28.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6439.9
Applied rewrites39.9%
if 4.09999999999999979e99 < b Initial program 9.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites14.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6464.8
Applied rewrites64.8%
Final simplification55.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.2e-22)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale)))))
PI)
(if (<= b_m 1.9e+72)
(*
180.0
(/
(atan
(/
(* (* y-scale (* b_m b_m)) -180.0)
(* (* angle x-scale) (* (- b_m a) (* PI (+ b_m a))))))
PI))
(if (<= b_m 2.15e+103)
(*
180.0
(/
(atan (* 0.005555555555555556 (* y-scale (* 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.2e-22) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else if (b_m <= 1.9e+72) {
tmp = 180.0 * (atan((((y_45_scale * (b_m * b_m)) * -180.0) / ((angle * x_45_scale) * ((b_m - a) * (((double) M_PI) * (b_m + a)))))) / ((double) M_PI));
} else if (b_m <= 2.15e+103) {
tmp = 180.0 * (atan((0.005555555555555556 * (y_45_scale * (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.2e-22) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else if (b_m <= 1.9e+72) {
tmp = 180.0 * (Math.atan((((y_45_scale * (b_m * b_m)) * -180.0) / ((angle * x_45_scale) * ((b_m - a) * (Math.PI * (b_m + a)))))) / Math.PI);
} else if (b_m <= 2.15e+103) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (y_45_scale * (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.2e-22: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi elif b_m <= 1.9e+72: tmp = 180.0 * (math.atan((((y_45_scale * (b_m * b_m)) * -180.0) / ((angle * x_45_scale) * ((b_m - a) * (math.pi * (b_m + a)))))) / math.pi) elif b_m <= 2.15e+103: tmp = 180.0 * (math.atan((0.005555555555555556 * (y_45_scale * (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.2e-22) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale))))) / pi); elseif (b_m <= 1.9e+72) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) * -180.0) / Float64(Float64(angle * x_45_scale) * Float64(Float64(b_m - a) * Float64(pi * Float64(b_m + a)))))) / pi)); elseif (b_m <= 2.15e+103) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(y_45_scale * Float64(angle * Float64(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.2e-22) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; elseif (b_m <= 1.9e+72) tmp = 180.0 * (atan((((y_45_scale * (b_m * b_m)) * -180.0) / ((angle * x_45_scale) * ((b_m - a) * (pi * (b_m + a)))))) / pi); elseif (b_m <= 2.15e+103) tmp = 180.0 * (atan((0.005555555555555556 * (y_45_scale * (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.2e-22], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+72], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * -180.0), $MachinePrecision] / N[(N[(angle * x$45$scale), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.15e+103], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(y$45$scale * N[(angle * N[(Pi / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(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.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right) \cdot -180}{\left(angle \cdot x-scale\right) \cdot \left(\left(b\_m - a\right) \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 2.15 \cdot 10^{+103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(y-scale \cdot \left(angle \cdot \frac{\pi}{x-scale}\right)\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.2000000000000001e-22Initial program 17.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.3%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.3
Applied rewrites54.3%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.4
Applied rewrites55.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.5
Applied rewrites55.5%
if 2.2000000000000001e-22 < b < 1.90000000000000003e72Initial program 44.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites48.0%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f64N/A
lower--.f6440.6
Applied rewrites40.6%
if 1.90000000000000003e72 < b < 2.14999999999999984e103Initial program 0.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites40.7%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6461.6
Applied rewrites61.6%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6461.6
Applied rewrites61.6%
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6461.6
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6461.6
Applied rewrites61.6%
if 2.14999999999999984e103 < b Initial program 9.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.2%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6465.7
Applied rewrites65.7%
Final simplification55.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 0.0073)
(/
(*
180.0
(atan (* 0.005555555555555556 (* angle (/ (* y-scale 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 <= 0.0073) {
tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (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 <= 0.0073) {
tmp = (180.0 * Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (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 <= 0.0073: tmp = (180.0 * math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale))))) / math.pi else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (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 <= 0.0073) tmp = Float64(Float64(180.0 * atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * 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 <= 0.0073) tmp = (180.0 * atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale))))) / pi; else tmp = 180.0 * (atan(((y_45_scale * -180.0) / (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, 0.0073], N[(N[(180.0 * N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 0.0073:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \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 < 0.00730000000000000007Initial program 17.8%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.7%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.1
Applied rewrites54.1%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.2
Applied rewrites55.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-atan.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6455.2
Applied rewrites55.2%
if 0.00730000000000000007 < b Initial program 17.9%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites17.9%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6452.8
Applied rewrites52.8%
Final simplification54.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 0.0073)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (/ (* y-scale 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 <= 0.0073) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (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 <= 0.0073) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (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 <= 0.0073: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (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 <= 0.0073) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * 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 <= 0.0073) tmp = 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale)))) / pi); else tmp = 180.0 * (atan(((y_45_scale * -180.0) / (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, 0.0073], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * 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 0.0073:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \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 < 0.00730000000000000007Initial program 17.8%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.7%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6454.1
Applied rewrites54.1%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6455.2
Applied rewrites55.2%
if 0.00730000000000000007 < b Initial program 17.9%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites17.9%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6452.8
Applied rewrites52.8%
Final simplification54.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.9e+220)
(*
180.0
(/
(atan (* 0.005555555555555556 (* angle (/ (* y-scale PI) x-scale))))
PI))
(* 180.0 (/ (atan (* x-scale (/ -180.0 (* y-scale (* 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 (b_m <= 1.9e+220) {
tmp = 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * ((double) M_PI)) / x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((x_45_scale * (-180.0 / (y_45_scale * (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 (b_m <= 1.9e+220) {
tmp = 180.0 * (Math.atan((0.005555555555555556 * (angle * ((y_45_scale * Math.PI) / x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((x_45_scale * (-180.0 / (y_45_scale * (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 b_m <= 1.9e+220: tmp = 180.0 * (math.atan((0.005555555555555556 * (angle * ((y_45_scale * math.pi) / x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan((x_45_scale * (-180.0 / (y_45_scale * (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 (b_m <= 1.9e+220) tmp = Float64(180.0 * Float64(atan(Float64(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * pi) / x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(x_45_scale * Float64(-180.0 / Float64(y_45_scale * 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 (b_m <= 1.9e+220) tmp = 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * pi) / x_45_scale)))) / pi); else tmp = 180.0 * (atan((x_45_scale * (-180.0 / (y_45_scale * (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[b$95$m, 1.9e+220], N[(180.0 * N[(N[ArcTan[N[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(x$45$scale * N[(-180.0 / N[(y$45$scale * N[(angle * 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.9 \cdot 10^{+220}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(x-scale \cdot \frac{-180}{y-scale \cdot \left(angle \cdot \pi\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 1.89999999999999992e220Initial program 18.6%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.2%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6450.4
Applied rewrites50.4%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6451.2
Applied rewrites51.2%
if 1.89999999999999992e220 < b Initial program 0.0%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in a around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6431.2
Applied rewrites31.2%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6431.2
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6431.2
Applied rewrites31.2%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 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) {
return 180.0 * (atan((0.005555555555555556 * (angle * ((y_45_scale * ((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((0.005555555555555556 * (angle * ((y_45_scale * 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((0.005555555555555556 * (angle * ((y_45_scale * 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(0.005555555555555556 * Float64(angle * Float64(Float64(y_45_scale * 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((0.005555555555555556 * (angle * ((y_45_scale * 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[(0.005555555555555556 * N[(angle * N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \left(angle \cdot \frac{y-scale \cdot \pi}{x-scale}\right)\right)}{\pi}
\end{array}
Initial program 17.8%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.9%
Taylor expanded in b around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6448.8
Applied rewrites48.8%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-PI.f6449.5
Applied rewrites49.5%
herbie shell --seed 2024214
(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)))