
(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 28 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\pi}
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (pow (cbrt (sqrt PI)) 3.0)))
(if (<= b_m 4.2e-114)
(* 180.0 (/ (atan (/ (* y-scale (sin t_0)) (* x-scale t_1))) PI))
(if (<= b_m 5.4e+99)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
180.0
(/
(atan
(/
(* y-scale t_1)
(*
(sin
(*
(* (* 0.005555555555555556 angle) (sqrt PI))
(sqrt (* t_2 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 = pow(cbrt(sqrt(((double) M_PI))), 3.0);
double tmp;
if (b_m <= 4.2e-114) {
tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * t_1))) / ((double) M_PI));
} else if (b_m <= 5.4e+99) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * t_1) / (sin((((0.005555555555555556 * angle) * sqrt(((double) M_PI))) * sqrt((t_2 * t_2)))) * -x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double t_2 = Math.pow(Math.cbrt(Math.sqrt(Math.PI)), 3.0);
double tmp;
if (b_m <= 4.2e-114) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * t_1))) / Math.PI);
} else if (b_m <= 5.4e+99) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (Math.sin((((0.005555555555555556 * angle) * Math.sqrt(Math.PI)) * Math.sqrt((t_2 * t_2)))) * -x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = cbrt(sqrt(pi)) ^ 3.0 tmp = 0.0 if (b_m <= 4.2e-114) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * t_1))) / pi)); elseif (b_m <= 5.4e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / 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 * t_1) / Float64(sin(Float64(Float64(Float64(0.005555555555555556 * angle) * sqrt(pi)) * sqrt(Float64(t_2 * 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[Power[N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]}, If[LessEqual[b$95$m, 4.2e-114], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.4e+99], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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 * t$95$1), $MachinePrecision] / N[(N[Sin[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$2 * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := {\left(\sqrt[3]{\sqrt{\pi}}\right)}^{3}\\
\mathbf{if}\;b\_m \leq 4.2 \cdot 10^{-114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot t\_1}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\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 t\_1}{\sin \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt{\pi}\right) \cdot \sqrt{t\_2 \cdot t\_2}\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.19999999999999985e-114Initial program 14.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.5%
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.f6447.1
Applied rewrites47.1%
if 4.19999999999999985e-114 < b < 5.39999999999999978e99Initial program 40.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites32.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.1
Applied rewrites63.1%
if 5.39999999999999978e99 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
lift-PI.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6457.4
Applied rewrites57.4%
add-cube-cbrtN/A
pow3N/A
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
cbrt-prodN/A
unpow-prod-downN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-cbrt.f64N/A
lower-pow.f64N/A
lower-cbrt.f6467.8
Applied rewrites67.8%
Final simplification51.8%
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 (pow (cbrt (sqrt PI)) 3.0)))
(if (<= b_m 4.2e-114)
(* 180.0 (/ (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0)))) PI))
(if (<= b_m 3.5e+109)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (* 0.005555555555555556 (* angle (* t_1 t_1)))))))
(* 180.0 (/ 1.0 PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = pow(cbrt(sqrt(((double) M_PI))), 3.0);
double tmp;
if (b_m <= 4.2e-114) {
tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / ((double) M_PI));
} else if (b_m <= 3.5e+109) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = atan((-1.0 / ((x_45_scale / y_45_scale) * tan((0.005555555555555556 * (angle * (t_1 * t_1))))))) * (180.0 * (1.0 / ((double) M_PI)));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.pow(Math.cbrt(Math.sqrt(Math.PI)), 3.0);
double tmp;
if (b_m <= 4.2e-114) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0)))) / Math.PI);
} else if (b_m <= 3.5e+109) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((0.005555555555555556 * (angle * (t_1 * t_1))))))) * (180.0 * (1.0 / Math.PI));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cbrt(sqrt(pi)) ^ 3.0 tmp = 0.0 if (b_m <= 4.2e-114) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0)))) / pi)); elseif (b_m <= 3.5e+109) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * Float64(t_1 * t_1))))))) * Float64(180.0 * Float64(1.0 / pi))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]}, If[LessEqual[b$95$m, 4.2e-114], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 3.5e+109], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := {\left(\sqrt[3]{\sqrt{\pi}}\right)}^{3}\\
\mathbf{if}\;b\_m \leq 4.2 \cdot 10^{-114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 3.5 \cdot 10^{+109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \left(t\_1 \cdot t\_1\right)\right)\right)}\right) \cdot \left(180 \cdot \frac{1}{\pi}\right)\\
\end{array}
\end{array}
if b < 4.19999999999999985e-114Initial program 14.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.5%
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.f6447.1
Applied rewrites47.1%
if 4.19999999999999985e-114 < b < 3.49999999999999983e109Initial program 39.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites30.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.5
Applied rewrites63.5%
if 3.49999999999999983e109 < b Initial program 7.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites7.1%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6456.9
Applied rewrites56.9%
Applied rewrites57.1%
add-cube-cbrtN/A
pow3N/A
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
cbrt-prodN/A
unpow-prod-downN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-cbrt.f64N/A
lower-pow.f64N/A
lower-cbrt.f6467.0
Applied rewrites67.0%
Final simplification51.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 4.2e-114)
(* 180.0 (/ (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0)))) PI))
(if (<= b_m 6.5e+99)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
180.0
(/
(atan
(/
(*
y-scale
(cos
(*
0.005555555555555556
(* angle (* (sqrt (* PI (sqrt PI))) (sqrt (sqrt PI)))))))
(*
(sin (* (sqrt PI) (* (* 0.005555555555555556 angle) (sqrt 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 t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 4.2e-114) {
tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / ((double) M_PI));
} else if (b_m <= 6.5e+99) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * cos((0.005555555555555556 * (angle * (sqrt((((double) M_PI) * sqrt(((double) M_PI)))) * sqrt(sqrt(((double) M_PI)))))))) / (sin((sqrt(((double) M_PI)) * ((0.005555555555555556 * angle) * sqrt(((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 t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 4.2e-114) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0)))) / Math.PI);
} else if (b_m <= 6.5e+99) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.cos((0.005555555555555556 * (angle * (Math.sqrt((Math.PI * Math.sqrt(Math.PI))) * Math.sqrt(Math.sqrt(Math.PI))))))) / (Math.sin((Math.sqrt(Math.PI) * ((0.005555555555555556 * angle) * Math.sqrt(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): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 4.2e-114: tmp = 180.0 * (math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0)))) / math.pi) elif b_m <= 6.5e+99: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * math.cos((0.005555555555555556 * (angle * (math.sqrt((math.pi * math.sqrt(math.pi))) * math.sqrt(math.sqrt(math.pi))))))) / (math.sin((math.sqrt(math.pi) * ((0.005555555555555556 * angle) * math.sqrt(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) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 4.2e-114) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0)))) / pi)); elseif (b_m <= 6.5e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / 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 * cos(Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(Float64(pi * sqrt(pi))) * sqrt(sqrt(pi))))))) / Float64(sin(Float64(sqrt(pi) * Float64(Float64(0.005555555555555556 * angle) * sqrt(pi)))) * Float64(-x_45_scale)))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 4.2e-114) tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / pi); elseif (b_m <= 6.5e+99) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = 180.0 * (atan(((y_45_scale * cos((0.005555555555555556 * (angle * (sqrt((pi * sqrt(pi))) * sqrt(sqrt(pi))))))) / (sin((sqrt(pi) * ((0.005555555555555556 * angle) * sqrt(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_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 4.2e-114], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 6.5e+99], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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 * N[Cos[N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[N[(Pi * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 4.2 \cdot 10^{-114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 6.5 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\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 \cos \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)\right)\right)}{\sin \left(\sqrt{\pi} \cdot \left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt{\pi}\right)\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\
\end{array}
\end{array}
if b < 4.19999999999999985e-114Initial program 14.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.5%
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.f6447.1
Applied rewrites47.1%
if 4.19999999999999985e-114 < b < 6.5000000000000004e99Initial program 40.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites32.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.1
Applied rewrites63.1%
if 6.5000000000000004e99 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
lift-PI.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6457.4
Applied rewrites57.4%
lift-PI.f6457.4
rem-square-sqrtN/A
sqrt-unprodN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
pow1/2N/A
lower-sqrt.f6464.8
Applied rewrites64.8%
Final simplification51.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= b_m 4.2e-114)
(* 180.0 (/ (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0)))) PI))
(if (<= b_m 4.4e+99)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan
(*
0.005555555555555556
(* angle (* (sqrt (* PI (sqrt PI))) (sqrt (sqrt PI))))))))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (b_m <= 4.2e-114) {
tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / ((double) M_PI));
} else if (b_m <= 4.4e+99) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((0.005555555555555556 * (angle * (sqrt((((double) M_PI) * sqrt(((double) M_PI)))) * sqrt(sqrt(((double) M_PI))))))))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (b_m <= 4.2e-114) {
tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0)))) / Math.PI);
} else if (b_m <= 4.4e+99) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = (180.0 * (1.0 / Math.PI)) * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((0.005555555555555556 * (angle * (Math.sqrt((Math.PI * Math.sqrt(Math.PI))) * Math.sqrt(Math.sqrt(Math.PI)))))))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if b_m <= 4.2e-114: tmp = 180.0 * (math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0)))) / math.pi) elif b_m <= 4.4e+99: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = (180.0 * (1.0 / math.pi)) * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((0.005555555555555556 * (angle * (math.sqrt((math.pi * math.sqrt(math.pi))) * math.sqrt(math.sqrt(math.pi))))))))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (b_m <= 4.2e-114) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0)))) / pi)); elseif (b_m <= 4.4e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(Float64(pi * sqrt(pi))) * sqrt(sqrt(pi)))))))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (b_m <= 4.2e-114) tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / pi); elseif (b_m <= 4.4e+99) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = (180.0 * (1.0 / pi)) * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((0.005555555555555556 * (angle * (sqrt((pi * sqrt(pi))) * sqrt(sqrt(pi))))))))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 4.2e-114], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.4e+99], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[N[(Pi * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 4.2 \cdot 10^{-114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.4 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)\right)\right)}\right)\\
\end{array}
\end{array}
if b < 4.19999999999999985e-114Initial program 14.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.5%
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.f6447.1
Applied rewrites47.1%
if 4.19999999999999985e-114 < b < 4.39999999999999956e99Initial program 40.4%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites32.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.1
Applied rewrites63.1%
if 4.39999999999999956e99 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
Applied rewrites58.1%
lift-PI.f6458.1
rem-square-sqrtN/A
sqrt-unprodN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
pow1/2N/A
lower-sqrt.f6463.9
Applied rewrites63.9%
Final simplification51.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 180.0 (/ 1.0 PI))))
(if (<= b_m 9.5e-207)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.22e-124)
(*
t_0
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (/ (* 0.005555555555555556 angle) (/ 1.0 PI)))))))
(if (<= b_m 4.4e+99)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
t_0
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan
(*
0.005555555555555556
(*
angle
(* (sqrt (* PI (sqrt PI))) (sqrt (sqrt 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 = 180.0 * (1.0 / ((double) M_PI));
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.22e-124) {
tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan(((0.005555555555555556 * angle) / (1.0 / ((double) M_PI)))))));
} else if (b_m <= 4.4e+99) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((0.005555555555555556 * (angle * (sqrt((((double) M_PI) * sqrt(((double) M_PI)))) * sqrt(sqrt(((double) M_PI))))))))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (1.0 / Math.PI);
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.22e-124) {
tmp = t_0 * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan(((0.005555555555555556 * angle) / (1.0 / Math.PI))))));
} else if (b_m <= 4.4e+99) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = t_0 * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((0.005555555555555556 * (angle * (Math.sqrt((Math.PI * Math.sqrt(Math.PI))) * Math.sqrt(Math.sqrt(Math.PI)))))))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 180.0 * (1.0 / math.pi) tmp = 0 if b_m <= 9.5e-207: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.22e-124: tmp = t_0 * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan(((0.005555555555555556 * angle) / (1.0 / math.pi)))))) elif b_m <= 4.4e+99: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = t_0 * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((0.005555555555555556 * (angle * (math.sqrt((math.pi * math.sqrt(math.pi))) * math.sqrt(math.sqrt(math.pi))))))))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(180.0 * Float64(1.0 / pi)) tmp = 0.0 if (b_m <= 9.5e-207) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.22e-124) tmp = Float64(t_0 * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(Float64(0.005555555555555556 * angle) / Float64(1.0 / pi))))))); elseif (b_m <= 4.4e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(t_0 * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * Float64(sqrt(Float64(pi * sqrt(pi))) * sqrt(sqrt(pi)))))))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 180.0 * (1.0 / pi); tmp = 0.0; if (b_m <= 9.5e-207) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.22e-124) tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan(((0.005555555555555556 * angle) / (1.0 / pi)))))); elseif (b_m <= 4.4e+99) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((0.005555555555555556 * (angle * (sqrt((pi * sqrt(pi))) * sqrt(sqrt(pi))))))))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 9.5e-207], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.22e-124], N[(t$95$0 * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(N[(0.005555555555555556 * angle), $MachinePrecision] / N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.4e+99], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(t$95$0 * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * N[(N[Sqrt[N[(Pi * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{1}{\pi}\\
\mathbf{if}\;b\_m \leq 9.5 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.22 \cdot 10^{-124}:\\
\;\;\;\;t\_0 \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(\frac{0.005555555555555556 \cdot angle}{\frac{1}{\pi}}\right)}\right)\\
\mathbf{elif}\;b\_m \leq 4.4 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)\right)\right)}\right)\\
\end{array}
\end{array}
if b < 9.50000000000000007e-207Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 9.50000000000000007e-207 < b < 1.22000000000000001e-124Initial program 10.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6439.3
Applied rewrites39.3%
Applied rewrites39.5%
lift-PI.f64N/A
associate-*r*N/A
lift-*.f64N/A
remove-double-divN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6448.4
Applied rewrites48.4%
if 1.22000000000000001e-124 < b < 4.39999999999999956e99Initial program 38.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
if 4.39999999999999956e99 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
Applied rewrites58.1%
lift-PI.f6458.1
rem-square-sqrtN/A
sqrt-unprodN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
pow1/2N/A
lower-sqrt.f6463.9
Applied rewrites63.9%
Final simplification44.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 180.0 (/ 1.0 PI))))
(if (<= b_m 9.5e-207)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.22e-124)
(*
t_0
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (/ (* 0.005555555555555556 angle) (/ 1.0 PI)))))))
(if (<= b_m 1.1e+102)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
t_0
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (* PI (* 0.005555555555555556 angle))))))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (1.0 / ((double) M_PI));
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.22e-124) {
tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan(((0.005555555555555556 * angle) / (1.0 / ((double) M_PI)))))));
} else if (b_m <= 1.1e+102) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle))))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (1.0 / Math.PI);
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.22e-124) {
tmp = t_0 * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan(((0.005555555555555556 * angle) / (1.0 / Math.PI))))));
} else if (b_m <= 1.1e+102) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = t_0 * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle))))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 180.0 * (1.0 / math.pi) tmp = 0 if b_m <= 9.5e-207: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.22e-124: tmp = t_0 * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan(((0.005555555555555556 * angle) / (1.0 / math.pi)))))) elif b_m <= 1.1e+102: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = t_0 * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle)))))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(180.0 * Float64(1.0 / pi)) tmp = 0.0 if (b_m <= 9.5e-207) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.22e-124) tmp = Float64(t_0 * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(Float64(0.005555555555555556 * angle) / Float64(1.0 / pi))))))); elseif (b_m <= 1.1e+102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(t_0 * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle))))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 180.0 * (1.0 / pi); tmp = 0.0; if (b_m <= 9.5e-207) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.22e-124) tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan(((0.005555555555555556 * angle) / (1.0 / pi)))))); elseif (b_m <= 1.1e+102) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((pi * (0.005555555555555556 * angle)))))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 9.5e-207], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.22e-124], N[(t$95$0 * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(N[(0.005555555555555556 * angle), $MachinePrecision] / N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.1e+102], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(t$95$0 * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{1}{\pi}\\
\mathbf{if}\;b\_m \leq 9.5 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.22 \cdot 10^{-124}:\\
\;\;\;\;t\_0 \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(\frac{0.005555555555555556 \cdot angle}{\frac{1}{\pi}}\right)}\right)\\
\mathbf{elif}\;b\_m \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)\\
\end{array}
\end{array}
if b < 9.50000000000000007e-207Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 9.50000000000000007e-207 < b < 1.22000000000000001e-124Initial program 10.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6439.3
Applied rewrites39.3%
Applied rewrites39.5%
lift-PI.f64N/A
associate-*r*N/A
lift-*.f64N/A
remove-double-divN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6448.4
Applied rewrites48.4%
if 1.22000000000000001e-124 < b < 1.10000000000000004e102Initial program 38.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
if 1.10000000000000004e102 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
Applied rewrites58.1%
lift-PI.f64N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6461.3
Applied rewrites61.3%
Final simplification43.8%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 180.0 (/ 1.0 PI))))
(if (<= b_m 9.5e-207)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.65e-130)
(*
t_0
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (* 0.005555555555555556 (* angle PI)))))))
(if (<= b_m 1.1e+102)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
t_0
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (* PI (* 0.005555555555555556 angle))))))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (1.0 / ((double) M_PI));
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.65e-130) {
tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((0.005555555555555556 * (angle * ((double) M_PI)))))));
} else if (b_m <= 1.1e+102) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle))))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (1.0 / Math.PI);
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.65e-130) {
tmp = t_0 * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((0.005555555555555556 * (angle * Math.PI))))));
} else if (b_m <= 1.1e+102) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = t_0 * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle))))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = 180.0 * (1.0 / math.pi) tmp = 0 if b_m <= 9.5e-207: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.65e-130: tmp = t_0 * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((0.005555555555555556 * (angle * math.pi)))))) elif b_m <= 1.1e+102: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = t_0 * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle)))))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(180.0 * Float64(1.0 / pi)) tmp = 0.0 if (b_m <= 9.5e-207) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.65e-130) tmp = Float64(t_0 * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(0.005555555555555556 * Float64(angle * pi))))))); elseif (b_m <= 1.1e+102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(t_0 * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle))))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = 180.0 * (1.0 / pi); tmp = 0.0; if (b_m <= 9.5e-207) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.65e-130) tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((0.005555555555555556 * (angle * pi)))))); elseif (b_m <= 1.1e+102) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = t_0 * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((pi * (0.005555555555555556 * angle)))))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 9.5e-207], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.65e-130], N[(t$95$0 * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.1e+102], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(t$95$0 * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{1}{\pi}\\
\mathbf{if}\;b\_m \leq 9.5 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.65 \cdot 10^{-130}:\\
\;\;\;\;t\_0 \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\\
\mathbf{elif}\;b\_m \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)\\
\end{array}
\end{array}
if b < 9.50000000000000007e-207Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 9.50000000000000007e-207 < b < 1.6499999999999999e-130Initial program 10.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6439.3
Applied rewrites39.3%
Applied rewrites39.5%
lift-/.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f6439.5
remove-double-negN/A
neg-sub0N/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lift-/.f64N/A
distribute-frac-neg2N/A
lower-/.f64N/A
lower-neg.f6439.5
Applied rewrites39.5%
if 1.6499999999999999e-130 < b < 1.10000000000000004e102Initial program 38.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
if 1.10000000000000004e102 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
Applied rewrites58.1%
lift-PI.f64N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6461.3
Applied rewrites61.3%
Final simplification43.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 9.5e-207)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.22e-124)
(/
180.0
(/
PI
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (* angle (* 0.005555555555555556 PI))))))))
(if (<= b_m 1.1e+102)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (* PI (* 0.005555555555555556 angle)))))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.22e-124) {
tmp = 180.0 / (((double) M_PI) / atan((-1.0 / ((x_45_scale / y_45_scale) * tan((angle * (0.005555555555555556 * ((double) M_PI))))))));
} else if (b_m <= 1.1e+102) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle))))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.22e-124) {
tmp = 180.0 / (Math.PI / Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((angle * (0.005555555555555556 * Math.PI)))))));
} else if (b_m <= 1.1e+102) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = (180.0 * (1.0 / Math.PI)) * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle))))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 9.5e-207: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.22e-124: tmp = 180.0 / (math.pi / math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((angle * (0.005555555555555556 * math.pi))))))) elif b_m <= 1.1e+102: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = (180.0 * (1.0 / math.pi)) * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle)))))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 9.5e-207) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.22e-124) tmp = Float64(180.0 / Float64(pi / atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(angle * Float64(0.005555555555555556 * pi)))))))); elseif (b_m <= 1.1e+102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle))))))); 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 <= 9.5e-207) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.22e-124) tmp = 180.0 / (pi / atan((-1.0 / ((x_45_scale / y_45_scale) * tan((angle * (0.005555555555555556 * pi))))))); elseif (b_m <= 1.1e+102) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = (180.0 * (1.0 / pi)) * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((pi * (0.005555555555555556 * angle)))))); 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, 9.5e-207], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.22e-124], N[(180.0 / N[(Pi / N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.1e+102], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 9.5 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.22 \cdot 10^{-124}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}\right)}}\\
\mathbf{elif}\;b\_m \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)\\
\end{array}
\end{array}
if b < 9.50000000000000007e-207Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 9.50000000000000007e-207 < b < 1.22000000000000001e-124Initial program 10.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6439.3
Applied rewrites39.3%
Applied rewrites39.5%
lift-PI.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
if 1.22000000000000001e-124 < b < 1.10000000000000004e102Initial program 38.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
if 1.10000000000000004e102 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
Applied rewrites58.1%
lift-PI.f64N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6461.3
Applied rewrites61.3%
Final simplification43.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0
(*
(* 180.0 (/ 1.0 PI))
(atan
(/
-1.0
(*
(/ x-scale y-scale)
(tan (* PI (* 0.005555555555555556 angle)))))))))
(if (<= b_m 9.5e-207)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.65e-130)
t_0
(if (<= b_m 1.1e+102)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
t_0)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((((double) M_PI) * (0.005555555555555556 * angle))))));
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.65e-130) {
tmp = t_0;
} else if (b_m <= 1.1e+102) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = t_0;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (180.0 * (1.0 / Math.PI)) * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * Math.tan((Math.PI * (0.005555555555555556 * angle))))));
double tmp;
if (b_m <= 9.5e-207) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.65e-130) {
tmp = t_0;
} else if (b_m <= 1.1e+102) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = t_0;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = (180.0 * (1.0 / math.pi)) * math.atan((-1.0 / ((x_45_scale / y_45_scale) * math.tan((math.pi * (0.005555555555555556 * angle)))))) tmp = 0 if b_m <= 9.5e-207: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.65e-130: tmp = t_0 elif b_m <= 1.1e+102: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = t_0 return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * tan(Float64(pi * Float64(0.005555555555555556 * angle))))))) tmp = 0.0 if (b_m <= 9.5e-207) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.65e-130) tmp = t_0; elseif (b_m <= 1.1e+102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = t_0; end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = (180.0 * (1.0 / pi)) * atan((-1.0 / ((x_45_scale / y_45_scale) * tan((pi * (0.005555555555555556 * angle)))))); tmp = 0.0; if (b_m <= 9.5e-207) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.65e-130) tmp = t_0; elseif (b_m <= 1.1e+102) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = t_0; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 9.5e-207], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.65e-130], t$95$0, If[LessEqual[b$95$m, 1.1e+102], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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], t$95$0]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right)\\
\mathbf{if}\;b\_m \leq 9.5 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.65 \cdot 10^{-130}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b\_m \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if b < 9.50000000000000007e-207Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 9.50000000000000007e-207 < b < 1.6499999999999999e-130 or 1.10000000000000004e102 < b Initial program 10.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites22.1%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6453.1
Applied rewrites53.1%
Applied rewrites53.2%
lift-PI.f64N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6455.6
Applied rewrites55.6%
if 1.6499999999999999e-130 < b < 1.10000000000000004e102Initial program 38.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
Final simplification43.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (tan (* 0.005555555555555556 (* angle PI)))))
(if (<= b_m 6.4e-206)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.6e-130)
(* 180.0 (/ (atan (* y-scale (/ -1.0 (* x-scale t_0)))) PI))
(if (<= b_m 3.45e+145)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan (/ -1.0 (* (/ x-scale y-scale) t_0)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = tan((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.6e-130) {
tmp = 180.0 * (atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / ((double) M_PI));
} else if (b_m <= 3.45e+145) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((x_45_scale / y_45_scale) * t_0)));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.tan((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.6e-130) {
tmp = 180.0 * (Math.atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / Math.PI);
} else if (b_m <= 3.45e+145) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = (180.0 * (1.0 / Math.PI)) * Math.atan((-1.0 / ((x_45_scale / y_45_scale) * t_0)));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.tan((0.005555555555555556 * (angle * math.pi))) tmp = 0 if b_m <= 6.4e-206: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.6e-130: tmp = 180.0 * (math.atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / math.pi) elif b_m <= 3.45e+145: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = (180.0 * (1.0 / math.pi)) * math.atan((-1.0 / ((x_45_scale / y_45_scale) * t_0))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = tan(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (b_m <= 6.4e-206) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.6e-130) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(-1.0 / Float64(x_45_scale * t_0)))) / pi)); elseif (b_m <= 3.45e+145) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(x_45_scale / y_45_scale) * t_0)))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = tan((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (b_m <= 6.4e-206) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.6e-130) tmp = 180.0 * (atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / pi); elseif (b_m <= 3.45e+145) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = (180.0 * (1.0 / pi)) * atan((-1.0 / ((x_45_scale / y_45_scale) * t_0))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 6.4e-206], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.6e-130], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(-1.0 / N[(x$45$scale * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 3.45e+145], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(x$45$scale / y$45$scale), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;b\_m \leq 6.4 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.6 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 3.45 \cdot 10^{+145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot t\_0}\right)\\
\end{array}
\end{array}
if b < 6.39999999999999952e-206Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 6.39999999999999952e-206 < b < 1.6e-130Initial program 10.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6439.3
Applied rewrites39.3%
lift-PI.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6447.0
Applied rewrites47.0%
Applied rewrites39.3%
if 1.6e-130 < b < 3.45e145Initial program 36.7%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.0
Applied rewrites55.0%
if 3.45e145 < b Initial program 0.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6465.2
Applied rewrites65.2%
Applied rewrites65.4%
Final simplification43.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 1e-30)
(*
180.0
(/
(atan
(/
y-scale
(*
(sin (* (sqrt PI) (* (* 0.005555555555555556 angle) (sqrt PI))))
(- x-scale))))
PI))
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 1e-30) {
tmp = 180.0 * (atan((y_45_scale / (sin((sqrt(((double) M_PI)) * ((0.005555555555555556 * angle) * sqrt(((double) M_PI))))) * -x_45_scale))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 1e-30) {
tmp = 180.0 * (Math.atan((y_45_scale / (Math.sin((Math.sqrt(Math.PI) * ((0.005555555555555556 * angle) * Math.sqrt(Math.PI)))) * -x_45_scale))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 1e-30: tmp = 180.0 * (math.atan((y_45_scale / (math.sin((math.sqrt(math.pi) * ((0.005555555555555556 * angle) * math.sqrt(math.pi)))) * -x_45_scale))) / math.pi) else: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 1e-30) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale / Float64(sin(Float64(sqrt(pi) * Float64(Float64(0.005555555555555556 * angle) * sqrt(pi)))) * Float64(-x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 1e-30) tmp = 180.0 * (atan((y_45_scale / (sin((sqrt(pi) * ((0.005555555555555556 * angle) * sqrt(pi)))) * -x_45_scale))) / pi); else tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 1e-30], N[(180.0 * N[(N[ArcTan[N[(y$45$scale / N[(N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{\sin \left(\sqrt{\pi} \cdot \left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt{\pi}\right)\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 1e-30Initial program 19.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites34.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6447.9
Applied rewrites47.9%
lift-PI.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6448.0
Applied rewrites48.0%
Taylor expanded in angle around 0
Applied rewrites49.6%
if 1e-30 < a Initial program 11.6%
Applied rewrites14.9%
Taylor expanded in y-scale around inf
Applied rewrites14.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6423.2
Applied rewrites23.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.6
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites39.8%
Final simplification47.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (tan (* 0.005555555555555556 (* angle PI)))))
(if (<= b_m 6.4e-206)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.6e-130)
(* 180.0 (/ (atan (* y-scale (/ -1.0 (* x-scale t_0)))) PI))
(if (<= b_m 3.5e+145)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(* 180.0 (/ (atan (/ (/ y-scale (- x-scale)) t_0)) PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = tan((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.6e-130) {
tmp = 180.0 * (atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / ((double) M_PI));
} else if (b_m <= 3.5e+145) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale / -x_45_scale) / t_0)) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.tan((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.6e-130) {
tmp = 180.0 * (Math.atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / Math.PI);
} else if (b_m <= 3.5e+145) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale / -x_45_scale) / t_0)) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.tan((0.005555555555555556 * (angle * math.pi))) tmp = 0 if b_m <= 6.4e-206: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.6e-130: tmp = 180.0 * (math.atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / math.pi) elif b_m <= 3.5e+145: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale / -x_45_scale) / t_0)) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = tan(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (b_m <= 6.4e-206) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.6e-130) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(-1.0 / Float64(x_45_scale * t_0)))) / pi)); elseif (b_m <= 3.5e+145) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / 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 / Float64(-x_45_scale)) / t_0)) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = tan((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (b_m <= 6.4e-206) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.6e-130) tmp = 180.0 * (atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / pi); elseif (b_m <= 3.5e+145) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = 180.0 * (atan(((y_45_scale / -x_45_scale) / t_0)) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 6.4e-206], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.6e-130], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(-1.0 / N[(x$45$scale * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 3.5e+145], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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 / (-x$45$scale)), $MachinePrecision] / t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;b\_m \leq 6.4 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.6 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 3.5 \cdot 10^{+145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\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{\frac{y-scale}{-x-scale}}{t\_0}\right)}{\pi}\\
\end{array}
\end{array}
if b < 6.39999999999999952e-206Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 6.39999999999999952e-206 < b < 1.6e-130Initial program 10.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6439.3
Applied rewrites39.3%
lift-PI.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6447.0
Applied rewrites47.0%
Applied rewrites39.3%
if 1.6e-130 < b < 3.5000000000000001e145Initial program 36.7%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.0
Applied rewrites55.0%
if 3.5000000000000001e145 < b Initial program 0.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6465.2
Applied rewrites65.2%
lift-PI.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6463.7
Applied rewrites63.7%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
Applied rewrites65.4%
Final simplification43.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (tan (* 0.005555555555555556 (* angle PI)))))
(if (<= b_m 6.4e-206)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.6e-130)
(* 180.0 (/ (atan (* y-scale (/ -1.0 (* x-scale t_0)))) PI))
(if (<= b_m 5.4e+99)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(/
(atan (/ y-scale (* t_0 (- x-scale))))
(* 0.005555555555555556 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 = tan((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.6e-130) {
tmp = 180.0 * (atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / ((double) M_PI));
} else if (b_m <= 5.4e+99) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = atan((y_45_scale / (t_0 * -x_45_scale))) / (0.005555555555555556 * ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.tan((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.6e-130) {
tmp = 180.0 * (Math.atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / Math.PI);
} else if (b_m <= 5.4e+99) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = Math.atan((y_45_scale / (t_0 * -x_45_scale))) / (0.005555555555555556 * Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.tan((0.005555555555555556 * (angle * math.pi))) tmp = 0 if b_m <= 6.4e-206: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.6e-130: tmp = 180.0 * (math.atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / math.pi) elif b_m <= 5.4e+99: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = math.atan((y_45_scale / (t_0 * -x_45_scale))) / (0.005555555555555556 * math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = tan(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (b_m <= 6.4e-206) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.6e-130) tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(-1.0 / Float64(x_45_scale * t_0)))) / pi)); elseif (b_m <= 5.4e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(atan(Float64(y_45_scale / Float64(t_0 * Float64(-x_45_scale)))) / Float64(0.005555555555555556 * pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = tan((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (b_m <= 6.4e-206) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.6e-130) tmp = 180.0 * (atan((y_45_scale * (-1.0 / (x_45_scale * t_0)))) / pi); elseif (b_m <= 5.4e+99) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = atan((y_45_scale / (t_0 * -x_45_scale))) / (0.005555555555555556 * pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 6.4e-206], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.6e-130], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(-1.0 / N[(x$45$scale * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.4e+99], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[ArcTan[N[(y$45$scale / N[(t$95$0 * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;b\_m \leq 6.4 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.6 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{y-scale}{t\_0 \cdot \left(-x-scale\right)}\right)}{0.005555555555555556 \cdot \pi}\\
\end{array}
\end{array}
if b < 6.39999999999999952e-206Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 6.39999999999999952e-206 < b < 1.6e-130Initial program 10.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6439.3
Applied rewrites39.3%
lift-PI.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6447.0
Applied rewrites47.0%
Applied rewrites39.3%
if 1.6e-130 < b < 5.39999999999999978e99Initial program 38.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
if 5.39999999999999978e99 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
Applied rewrites58.1%
Applied rewrites58.0%
Final simplification43.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0 (tan (* 0.005555555555555556 (* angle PI)))))
(if (<= b_m 6.4e-206)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.6e-130)
(* -180.0 (/ (atan (/ y-scale (* x-scale t_0))) PI))
(if (<= b_m 5.4e+99)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(/
(atan (/ y-scale (* t_0 (- x-scale))))
(* 0.005555555555555556 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 = tan((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.6e-130) {
tmp = -180.0 * (atan((y_45_scale / (x_45_scale * t_0))) / ((double) M_PI));
} else if (b_m <= 5.4e+99) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = atan((y_45_scale / (t_0 * -x_45_scale))) / (0.005555555555555556 * ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.tan((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.6e-130) {
tmp = -180.0 * (Math.atan((y_45_scale / (x_45_scale * t_0))) / Math.PI);
} else if (b_m <= 5.4e+99) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = Math.atan((y_45_scale / (t_0 * -x_45_scale))) / (0.005555555555555556 * Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = math.tan((0.005555555555555556 * (angle * math.pi))) tmp = 0 if b_m <= 6.4e-206: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.6e-130: tmp = -180.0 * (math.atan((y_45_scale / (x_45_scale * t_0))) / math.pi) elif b_m <= 5.4e+99: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = math.atan((y_45_scale / (t_0 * -x_45_scale))) / (0.005555555555555556 * math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = tan(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (b_m <= 6.4e-206) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.6e-130) tmp = Float64(-180.0 * Float64(atan(Float64(y_45_scale / Float64(x_45_scale * t_0))) / pi)); elseif (b_m <= 5.4e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(atan(Float64(y_45_scale / Float64(t_0 * Float64(-x_45_scale)))) / Float64(0.005555555555555556 * pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = tan((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (b_m <= 6.4e-206) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.6e-130) tmp = -180.0 * (atan((y_45_scale / (x_45_scale * t_0))) / pi); elseif (b_m <= 5.4e+99) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = atan((y_45_scale / (t_0 * -x_45_scale))) / (0.005555555555555556 * pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 6.4e-206], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.6e-130], N[(-180.0 * N[(N[ArcTan[N[(y$45$scale / N[(x$45$scale * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.4e+99], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[ArcTan[N[(y$45$scale / N[(t$95$0 * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;b\_m \leq 6.4 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.6 \cdot 10^{-130}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale \cdot t\_0}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{y-scale}{t\_0 \cdot \left(-x-scale\right)}\right)}{0.005555555555555556 \cdot \pi}\\
\end{array}
\end{array}
if b < 6.39999999999999952e-206Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 6.39999999999999952e-206 < b < 1.6e-130Initial program 10.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites47.9%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6439.3
Applied rewrites39.3%
Applied rewrites39.5%
Applied rewrites39.3%
if 1.6e-130 < b < 5.39999999999999978e99Initial program 38.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
if 5.39999999999999978e99 < b Initial program 9.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites13.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.0
Applied rewrites58.0%
Applied rewrites58.1%
Applied rewrites58.0%
Final simplification43.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(let* ((t_0
(*
-180.0
(/
(atan
(/
y-scale
(* x-scale (tan (* 0.005555555555555556 (* angle PI))))))
PI))))
(if (<= b_m 6.4e-206)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.6e-130)
t_0
(if (<= b_m 5.4e+99)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
t_0)))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = -180.0 * (atan((y_45_scale / (x_45_scale * tan((0.005555555555555556 * (angle * ((double) M_PI))))))) / ((double) M_PI));
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.6e-130) {
tmp = t_0;
} else if (b_m <= 5.4e+99) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = t_0;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double t_0 = -180.0 * (Math.atan((y_45_scale / (x_45_scale * Math.tan((0.005555555555555556 * (angle * Math.PI)))))) / Math.PI);
double tmp;
if (b_m <= 6.4e-206) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 1.6e-130) {
tmp = t_0;
} else if (b_m <= 5.4e+99) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = t_0;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): t_0 = -180.0 * (math.atan((y_45_scale / (x_45_scale * math.tan((0.005555555555555556 * (angle * math.pi)))))) / math.pi) tmp = 0 if b_m <= 6.4e-206: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 1.6e-130: tmp = t_0 elif b_m <= 5.4e+99: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = t_0 return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = Float64(-180.0 * Float64(atan(Float64(y_45_scale / Float64(x_45_scale * tan(Float64(0.005555555555555556 * Float64(angle * pi)))))) / pi)) tmp = 0.0 if (b_m <= 6.4e-206) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.6e-130) tmp = t_0; elseif (b_m <= 5.4e+99) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = t_0; end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) t_0 = -180.0 * (atan((y_45_scale / (x_45_scale * tan((0.005555555555555556 * (angle * pi)))))) / pi); tmp = 0.0; if (b_m <= 6.4e-206) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 1.6e-130) tmp = t_0; elseif (b_m <= 5.4e+99) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = t_0; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(-180.0 * N[(N[ArcTan[N[(y$45$scale / N[(x$45$scale * N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 6.4e-206], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.6e-130], t$95$0, If[LessEqual[b$95$m, 5.4e+99], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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], t$95$0]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := -180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\
\mathbf{if}\;b\_m \leq 6.4 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.6 \cdot 10^{-130}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b\_m \leq 5.4 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if b < 6.39999999999999952e-206Initial program 15.0%
Applied rewrites17.4%
Taylor expanded in y-scale around inf
Applied rewrites18.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6424.2
Applied rewrites24.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.1
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.1%
if 6.39999999999999952e-206 < b < 1.6e-130 or 5.39999999999999978e99 < b Initial program 10.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites22.1%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6453.1
Applied rewrites53.1%
Applied rewrites53.2%
Applied rewrites53.1%
if 1.6e-130 < b < 5.39999999999999978e99Initial program 38.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites31.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.2
Applied rewrites58.2%
Final simplification43.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 5.5e-158)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.22e-124)
(*
180.0
(/
(atan
(/
(fma
(* angle angle)
(* (/ (* y-scale PI) x-scale) 0.001851851851851852)
(* -180.0 (/ y-scale (* PI x-scale))))
angle))
PI))
(if (<= b_m 6.4e+145)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan
(/
(fma
(* (* angle angle) 32400.0)
(/
(* (* PI (* PI PI)) (* y-scale 5.7155921353452215e-8))
(* PI (* PI x-scale)))
(/ (* y-scale -180.0) (* PI x-scale)))
angle)))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5.5e-158) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.22e-124) {
tmp = 180.0 * (atan((fma((angle * angle), (((y_45_scale * ((double) M_PI)) / x_45_scale) * 0.001851851851851852), (-180.0 * (y_45_scale / (((double) M_PI) * x_45_scale)))) / angle)) / ((double) M_PI));
} else if (b_m <= 6.4e+145) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((fma(((angle * angle) * 32400.0), (((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * (y_45_scale * 5.7155921353452215e-8)) / (((double) M_PI) * (((double) M_PI) * x_45_scale))), ((y_45_scale * -180.0) / (((double) M_PI) * x_45_scale))) / angle));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 5.5e-158) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.22e-124) tmp = Float64(180.0 * Float64(atan(Float64(fma(Float64(angle * angle), Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * 0.001851851851851852), Float64(-180.0 * Float64(y_45_scale / Float64(pi * x_45_scale)))) / angle)) / pi)); elseif (b_m <= 6.4e+145) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(fma(Float64(Float64(angle * angle) * 32400.0), Float64(Float64(Float64(pi * Float64(pi * pi)) * Float64(y_45_scale * 5.7155921353452215e-8)) / Float64(pi * Float64(pi * x_45_scale))), Float64(Float64(y_45_scale * -180.0) / Float64(pi * x_45_scale))) / angle))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 5.5e-158], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.22e-124], N[(180.0 * N[(N[ArcTan[N[(N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * 0.001851851851851852), $MachinePrecision] + N[(-180.0 * N[(y$45$scale / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 6.4e+145], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(N[(N[(N[(angle * angle), $MachinePrecision] * 32400.0), $MachinePrecision] * N[(N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * 5.7155921353452215e-8), $MachinePrecision]), $MachinePrecision] / N[(Pi * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 5.5 \cdot 10^{-158}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.22 \cdot 10^{-124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\mathsf{fma}\left(angle \cdot angle, \frac{y-scale \cdot \pi}{x-scale} \cdot 0.001851851851851852, -180 \cdot \frac{y-scale}{\pi \cdot x-scale}\right)}{angle}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 6.4 \cdot 10^{+145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot 32400, \frac{\left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(y-scale \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \left(\pi \cdot x-scale\right)}, \frac{y-scale \cdot -180}{\pi \cdot x-scale}\right)}{angle}\right)\\
\end{array}
\end{array}
if b < 5.50000000000000025e-158Initial program 14.7%
Applied rewrites17.1%
Taylor expanded in y-scale around inf
Applied rewrites18.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6423.7
Applied rewrites23.7%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6430.4
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites36.3%
if 5.50000000000000025e-158 < b < 1.22000000000000001e-124Initial program 15.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites44.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6446.8
Applied rewrites46.8%
Taylor expanded in angle around 0
lower-/.f64N/A
Applied rewrites44.9%
if 1.22000000000000001e-124 < b < 6.40000000000000015e145Initial program 36.7%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.0
Applied rewrites55.0%
if 6.40000000000000015e145 < b Initial program 0.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6465.2
Applied rewrites65.2%
Applied rewrites65.4%
Taylor expanded in angle around 0
Applied rewrites58.0%
Final simplification42.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 5.5e-158)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 1.22e-124)
(*
180.0
(/
(atan
(/
(fma
(* angle angle)
(* (/ (* y-scale PI) x-scale) 0.001851851851851852)
(* -180.0 (/ y-scale (* PI x-scale))))
angle))
PI))
(if (<= b_m 5.6e+146)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan
(/
-1.0
(* (* 0.005555555555555556 (* angle PI)) (/ x-scale y-scale)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 5.5e-158) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 1.22e-124) {
tmp = 180.0 * (atan((fma((angle * angle), (((y_45_scale * ((double) M_PI)) / x_45_scale) * 0.001851851851851852), (-180.0 * (y_45_scale / (((double) M_PI) * x_45_scale)))) / angle)) / ((double) M_PI));
} else if (b_m <= 5.6e+146) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((0.005555555555555556 * (angle * ((double) M_PI))) * (x_45_scale / y_45_scale))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 5.5e-158) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 1.22e-124) tmp = Float64(180.0 * Float64(atan(Float64(fma(Float64(angle * angle), Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * 0.001851851851851852), Float64(-180.0 * Float64(y_45_scale / Float64(pi * x_45_scale)))) / angle)) / pi)); elseif (b_m <= 5.6e+146) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(x_45_scale / y_45_scale))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 5.5e-158], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.22e-124], N[(180.0 * N[(N[ArcTan[N[(N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * 0.001851851851851852), $MachinePrecision] + N[(-180.0 * N[(y$45$scale / N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.6e+146], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 5.5 \cdot 10^{-158}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.22 \cdot 10^{-124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\mathsf{fma}\left(angle \cdot angle, \frac{y-scale \cdot \pi}{x-scale} \cdot 0.001851851851851852, -180 \cdot \frac{y-scale}{\pi \cdot x-scale}\right)}{angle}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.6 \cdot 10^{+146}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)\\
\end{array}
\end{array}
if b < 5.50000000000000025e-158Initial program 14.7%
Applied rewrites17.1%
Taylor expanded in y-scale around inf
Applied rewrites18.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6423.7
Applied rewrites23.7%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6430.4
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites36.3%
if 5.50000000000000025e-158 < b < 1.22000000000000001e-124Initial program 15.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites44.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6446.8
Applied rewrites46.8%
Taylor expanded in angle around 0
lower-/.f64N/A
Applied rewrites44.9%
if 1.22000000000000001e-124 < b < 5.6000000000000002e146Initial program 36.7%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.0
Applied rewrites55.0%
if 5.6000000000000002e146 < b Initial program 0.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6465.2
Applied rewrites65.2%
Applied rewrites65.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6463.6
Applied rewrites63.6%
Final simplification42.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 2.4e-138)
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))
(if (<= b_m 5.6e+146)
(*
180.0
(/
(atan
(/
(* 90.0 (* -2.0 (/ (* y-scale (* b_m b_m)) x-scale)))
(* (* angle PI) (* (+ b_m a) (- b_m a)))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan
(/
-1.0
(* (* 0.005555555555555556 (* angle PI)) (/ x-scale y-scale))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.4e-138) {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
} else if (b_m <= 5.6e+146) {
tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * ((double) M_PI)) * ((b_m + a) * (b_m - a))))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((0.005555555555555556 * (angle * ((double) M_PI))) * (x_45_scale / y_45_scale))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 2.4e-138) {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
} else if (b_m <= 5.6e+146) {
tmp = 180.0 * (Math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * Math.PI) * ((b_m + a) * (b_m - a))))) / Math.PI);
} else {
tmp = (180.0 * (1.0 / Math.PI)) * Math.atan((-1.0 / ((0.005555555555555556 * (angle * Math.PI)) * (x_45_scale / y_45_scale))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 2.4e-138: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) elif b_m <= 5.6e+146: tmp = 180.0 * (math.atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * math.pi) * ((b_m + a) * (b_m - a))))) / math.pi) else: tmp = (180.0 * (1.0 / math.pi)) * math.atan((-1.0 / ((0.005555555555555556 * (angle * math.pi)) * (x_45_scale / y_45_scale)))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 2.4e-138) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); elseif (b_m <= 5.6e+146) tmp = Float64(180.0 * Float64(atan(Float64(Float64(90.0 * Float64(-2.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / x_45_scale))) / Float64(Float64(angle * pi) * Float64(Float64(b_m + a) * Float64(b_m - a))))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(x_45_scale / y_45_scale))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 2.4e-138) tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); elseif (b_m <= 5.6e+146) tmp = 180.0 * (atan(((90.0 * (-2.0 * ((y_45_scale * (b_m * b_m)) / x_45_scale))) / ((angle * pi) * ((b_m + a) * (b_m - a))))) / pi); else tmp = (180.0 * (1.0 / pi)) * atan((-1.0 / ((0.005555555555555556 * (angle * pi)) * (x_45_scale / y_45_scale)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.4e-138], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.6e+146], N[(180.0 * N[(N[ArcTan[N[(N[(90.0 * N[(-2.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $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[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.4 \cdot 10^{-138}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 5.6 \cdot 10^{+146}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{90 \cdot \left(-2 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{x-scale}\right)}{\left(angle \cdot \pi\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)\\
\end{array}
\end{array}
if b < 2.3999999999999999e-138Initial program 14.8%
Applied rewrites17.1%
Taylor expanded in y-scale around inf
Applied rewrites18.2%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6423.6
Applied rewrites23.6%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6430.0
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites35.7%
if 2.3999999999999999e-138 < b < 5.6000000000000002e146Initial program 36.1%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites28.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.1
Applied rewrites54.1%
if 5.6000000000000002e146 < b Initial program 0.0%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6465.2
Applied rewrites65.2%
Applied rewrites65.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6463.6
Applied rewrites63.6%
Final simplification41.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 1.85e-31)
(* 180.0 (/ (atan (/ (* y-scale -180.0) (* angle (* PI x-scale)))) PI))
(*
180.0
(/
(atan
(*
(*
(* b_m -180.0)
(/
b_m
(* (- b_m a) (* (* x-scale x-scale) (* angle (* PI (+ b_m a)))))))
(* y-scale x-scale)))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 1.85e-31) {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (((double) M_PI) * (b_m + a))))))) * (y_45_scale * x_45_scale))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 1.85e-31) {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (angle * (Math.PI * x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (Math.PI * (b_m + a))))))) * (y_45_scale * x_45_scale))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 1.85e-31: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (angle * (math.pi * x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (math.pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 1.85e-31) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(angle * Float64(pi * x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(b_m * -180.0) * Float64(b_m / Float64(Float64(b_m - a) * Float64(Float64(x_45_scale * x_45_scale) * Float64(angle * Float64(pi * Float64(b_m + a))))))) * Float64(y_45_scale * x_45_scale))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 1.85e-31) tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (pi * x_45_scale)))) / pi); else tmp = 180.0 * (atan((((b_m * -180.0) * (b_m / ((b_m - a) * ((x_45_scale * x_45_scale) * (angle * (pi * (b_m + a))))))) * (y_45_scale * x_45_scale))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 1.85e-31], 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], N[(180.0 * N[(N[ArcTan[N[(N[(N[(b$95$m * -180.0), $MachinePrecision] * N[(b$95$m / N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(x$45$scale * x$45$scale), $MachinePrecision] * N[(angle * N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.85 \cdot 10^{-31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(b\_m \cdot -180\right) \cdot \frac{b\_m}{\left(b\_m - a\right) \cdot \left(\left(x-scale \cdot x-scale\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m + a\right)\right)\right)\right)}\right) \cdot \left(y-scale \cdot x-scale\right)\right)}{\pi}\\
\end{array}
\end{array}
if a < 1.8499999999999999e-31Initial program 19.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites34.7%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6447.9
Applied rewrites47.9%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6442.6
Applied rewrites42.6%
if 1.8499999999999999e-31 < a Initial program 11.6%
Applied rewrites14.9%
Taylor expanded in y-scale around inf
Applied rewrites14.6%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6423.2
Applied rewrites23.2%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6431.6
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites39.8%
Final simplification41.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.65e-130)
(*
180.0
(/
(atan
(* (* y-scale x-scale) (/ -180.0 (* PI (* angle (* x-scale x-scale))))))
PI))
(if (<= b_m 4.2e+109)
(*
180.0
(/
(atan
(/
(* -180.0 (* y-scale (* b_m b_m)))
(* (* angle x-scale) (* (- b_m a) (* PI (+ b_m a))))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan
(/
-1.0
(* (* 0.005555555555555556 (* angle PI)) (/ x-scale y-scale))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.65e-130) {
tmp = 180.0 * (atan(((y_45_scale * x_45_scale) * (-180.0 / (((double) M_PI) * (angle * (x_45_scale * x_45_scale)))))) / ((double) M_PI));
} else if (b_m <= 4.2e+109) {
tmp = 180.0 * (atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * ((b_m - a) * (((double) M_PI) * (b_m + a)))))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((0.005555555555555556 * (angle * ((double) M_PI))) * (x_45_scale / y_45_scale))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.65e-130) {
tmp = 180.0 * (Math.atan(((y_45_scale * x_45_scale) * (-180.0 / (Math.PI * (angle * (x_45_scale * x_45_scale)))))) / Math.PI);
} else if (b_m <= 4.2e+109) {
tmp = 180.0 * (Math.atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * ((b_m - a) * (Math.PI * (b_m + a)))))) / Math.PI);
} else {
tmp = (180.0 * (1.0 / Math.PI)) * Math.atan((-1.0 / ((0.005555555555555556 * (angle * Math.PI)) * (x_45_scale / y_45_scale))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.65e-130: tmp = 180.0 * (math.atan(((y_45_scale * x_45_scale) * (-180.0 / (math.pi * (angle * (x_45_scale * x_45_scale)))))) / math.pi) elif b_m <= 4.2e+109: tmp = 180.0 * (math.atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * ((b_m - a) * (math.pi * (b_m + a)))))) / math.pi) else: tmp = (180.0 * (1.0 / math.pi)) * math.atan((-1.0 / ((0.005555555555555556 * (angle * math.pi)) * (x_45_scale / y_45_scale)))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.65e-130) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * x_45_scale) * Float64(-180.0 / Float64(pi * Float64(angle * Float64(x_45_scale * x_45_scale)))))) / pi)); elseif (b_m <= 4.2e+109) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-180.0 * Float64(y_45_scale * Float64(b_m * b_m))) / Float64(Float64(angle * x_45_scale) * Float64(Float64(b_m - a) * Float64(pi * Float64(b_m + a)))))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(x_45_scale / y_45_scale))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.65e-130) tmp = 180.0 * (atan(((y_45_scale * x_45_scale) * (-180.0 / (pi * (angle * (x_45_scale * x_45_scale)))))) / pi); elseif (b_m <= 4.2e+109) tmp = 180.0 * (atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * ((b_m - a) * (pi * (b_m + a)))))) / pi); else tmp = (180.0 * (1.0 / pi)) * atan((-1.0 / ((0.005555555555555556 * (angle * pi)) * (x_45_scale / y_45_scale)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.65e-130], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[(-180.0 / N[(Pi * N[(angle * N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.2e+109], N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 * N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $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], N[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.65 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(y-scale \cdot x-scale\right) \cdot \frac{-180}{\pi \cdot \left(angle \cdot \left(x-scale \cdot x-scale\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 4.2 \cdot 10^{+109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{\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{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)\\
\end{array}
\end{array}
if b < 1.6499999999999999e-130Initial program 14.7%
Applied rewrites17.0%
Taylor expanded in y-scale around inf
Applied rewrites18.1%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6423.4
Applied rewrites23.4%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6434.5
Applied rewrites34.5%
if 1.6499999999999999e-130 < b < 4.2000000000000003e109Initial program 37.9%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites29.0%
Applied rewrites29.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
associate-*r*N/A
+-commutativeN/A
difference-of-squaresN/A
unpow2N/A
unpow2N/A
associate-*r*N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
unpow2N/A
unpow2N/A
Applied rewrites58.8%
if 4.2000000000000003e109 < b Initial program 7.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites7.1%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6456.9
Applied rewrites56.9%
Applied rewrites57.1%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6455.7
Applied rewrites55.7%
Final simplification40.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= b_m 1.65e-130)
(*
180.0
(/
(atan
(* (* y-scale x-scale) (/ -180.0 (* PI (* angle (* x-scale x-scale))))))
PI))
(if (<= b_m 1.04e+108)
(*
180.0
(/
(atan
(*
-180.0
(/
(* y-scale (* b_m b_m))
(* angle (* x-scale (* PI (* (+ b_m a) (- b_m a))))))))
PI))
(*
(* 180.0 (/ 1.0 PI))
(atan
(/
-1.0
(* (* 0.005555555555555556 (* angle PI)) (/ x-scale y-scale))))))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.65e-130) {
tmp = 180.0 * (atan(((y_45_scale * x_45_scale) * (-180.0 / (((double) M_PI) * (angle * (x_45_scale * x_45_scale)))))) / ((double) M_PI));
} else if (b_m <= 1.04e+108) {
tmp = 180.0 * (atan((-180.0 * ((y_45_scale * (b_m * b_m)) / (angle * (x_45_scale * (((double) M_PI) * ((b_m + a) * (b_m - a)))))))) / ((double) M_PI));
} else {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((0.005555555555555556 * (angle * ((double) M_PI))) * (x_45_scale / y_45_scale))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (b_m <= 1.65e-130) {
tmp = 180.0 * (Math.atan(((y_45_scale * x_45_scale) * (-180.0 / (Math.PI * (angle * (x_45_scale * x_45_scale)))))) / Math.PI);
} else if (b_m <= 1.04e+108) {
tmp = 180.0 * (Math.atan((-180.0 * ((y_45_scale * (b_m * b_m)) / (angle * (x_45_scale * (Math.PI * ((b_m + a) * (b_m - a)))))))) / Math.PI);
} else {
tmp = (180.0 * (1.0 / Math.PI)) * Math.atan((-1.0 / ((0.005555555555555556 * (angle * Math.PI)) * (x_45_scale / y_45_scale))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if b_m <= 1.65e-130: tmp = 180.0 * (math.atan(((y_45_scale * x_45_scale) * (-180.0 / (math.pi * (angle * (x_45_scale * x_45_scale)))))) / math.pi) elif b_m <= 1.04e+108: tmp = 180.0 * (math.atan((-180.0 * ((y_45_scale * (b_m * b_m)) / (angle * (x_45_scale * (math.pi * ((b_m + a) * (b_m - a)))))))) / math.pi) else: tmp = (180.0 * (1.0 / math.pi)) * math.atan((-1.0 / ((0.005555555555555556 * (angle * math.pi)) * (x_45_scale / y_45_scale)))) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (b_m <= 1.65e-130) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * x_45_scale) * Float64(-180.0 / Float64(pi * Float64(angle * Float64(x_45_scale * x_45_scale)))))) / pi)); elseif (b_m <= 1.04e+108) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(y_45_scale * Float64(b_m * b_m)) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a)))))))) / pi)); else tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(x_45_scale / y_45_scale))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (b_m <= 1.65e-130) tmp = 180.0 * (atan(((y_45_scale * x_45_scale) * (-180.0 / (pi * (angle * (x_45_scale * x_45_scale)))))) / pi); elseif (b_m <= 1.04e+108) tmp = 180.0 * (atan((-180.0 * ((y_45_scale * (b_m * b_m)) / (angle * (x_45_scale * (pi * ((b_m + a) * (b_m - a)))))))) / pi); else tmp = (180.0 * (1.0 / pi)) * atan((-1.0 / ((0.005555555555555556 * (angle * pi)) * (x_45_scale / y_45_scale)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 1.65e-130], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[(-180.0 / N[(Pi * N[(angle * N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.04e+108], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.65 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(y-scale \cdot x-scale\right) \cdot \frac{-180}{\pi \cdot \left(angle \cdot \left(x-scale \cdot x-scale\right)\right)}\right)}{\pi}\\
\mathbf{elif}\;b\_m \leq 1.04 \cdot 10^{+108}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)\\
\end{array}
\end{array}
if b < 1.6499999999999999e-130Initial program 14.7%
Applied rewrites17.0%
Taylor expanded in y-scale around inf
Applied rewrites18.1%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6423.4
Applied rewrites23.4%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6434.5
Applied rewrites34.5%
if 1.6499999999999999e-130 < b < 1.04e108Initial program 37.9%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites57.4%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.6
Applied rewrites56.6%
if 1.04e108 < b Initial program 7.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites7.1%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6456.9
Applied rewrites56.9%
Applied rewrites57.1%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6455.7
Applied rewrites55.7%
Final simplification40.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 8.1e+89)
(*
(* 180.0 (/ 1.0 PI))
(atan
(/ -1.0 (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-scale))))
(*
180.0
(/
(atan
(/
(* 180.0 (* y-scale (* b_m b_m)))
(* a (* angle (* a (* PI x-scale))))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 8.1e+89) {
tmp = (180.0 * (1.0 / ((double) M_PI))) * atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_45_scale)));
} else {
tmp = 180.0 * (atan(((180.0 * (y_45_scale * (b_m * b_m))) / (a * (angle * (a * (((double) M_PI) * x_45_scale)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 8.1e+89) {
tmp = (180.0 * (1.0 / Math.PI)) * Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_45_scale)));
} else {
tmp = 180.0 * (Math.atan(((180.0 * (y_45_scale * (b_m * b_m))) / (a * (angle * (a * (Math.PI * x_45_scale)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 8.1e+89: tmp = (180.0 * (1.0 / math.pi)) * math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_45_scale))) else: tmp = 180.0 * (math.atan(((180.0 * (y_45_scale * (b_m * b_m))) / (a * (angle * (a * (math.pi * x_45_scale)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 8.1e+89) tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_45_scale)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(180.0 * Float64(y_45_scale * Float64(b_m * b_m))) / Float64(a * Float64(angle * Float64(a * 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 (a <= 8.1e+89) tmp = (180.0 * (1.0 / pi)) * atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_45_scale))); else tmp = 180.0 * (atan(((180.0 * (y_45_scale * (b_m * b_m))) / (a * (angle * (a * (pi * x_45_scale)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 8.1e+89], N[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(180.0 * N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * N[(angle * N[(a * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.1 \cdot 10^{+89}:\\
\;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{a \cdot \left(angle \cdot \left(a \cdot \left(\pi \cdot x-scale\right)\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if a < 8.1e89Initial program 20.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites36.3%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6447.3
Applied rewrites47.3%
Applied rewrites48.3%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6442.7
Applied rewrites42.7%
if 8.1e89 < a Initial program 5.0%
Applied rewrites7.2%
Taylor expanded in y-scale around inf
Applied rewrites4.9%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6417.5
Applied rewrites17.5%
Taylor expanded in b around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6423.5
Applied rewrites23.5%
Final simplification39.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
:precision binary64
(if (<= a 6e-123)
(* 180.0 (/ (atan (/ (* y-scale -180.0) (* angle (* PI x-scale)))) PI))
(*
180.0
(/
(atan
(* (* y-scale x-scale) (/ -180.0 (* PI (* angle (* x-scale x-scale))))))
PI))))b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 6e-123) {
tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((y_45_scale * x_45_scale) * (-180.0 / (((double) M_PI) * (angle * (x_45_scale * x_45_scale)))))) / ((double) M_PI));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (a <= 6e-123) {
tmp = 180.0 * (Math.atan(((y_45_scale * -180.0) / (angle * (Math.PI * x_45_scale)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((y_45_scale * x_45_scale) * (-180.0 / (Math.PI * (angle * (x_45_scale * x_45_scale)))))) / Math.PI);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): tmp = 0 if a <= 6e-123: tmp = 180.0 * (math.atan(((y_45_scale * -180.0) / (angle * (math.pi * x_45_scale)))) / math.pi) else: tmp = 180.0 * (math.atan(((y_45_scale * x_45_scale) * (-180.0 / (math.pi * (angle * (x_45_scale * x_45_scale)))))) / math.pi) return tmp
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0 if (a <= 6e-123) tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(angle * Float64(pi * x_45_scale)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * x_45_scale) * Float64(-180.0 / Float64(pi * Float64(angle * Float64(x_45_scale * x_45_scale)))))) / pi)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 0.0; if (a <= 6e-123) tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (pi * x_45_scale)))) / pi); else tmp = 180.0 * (atan(((y_45_scale * x_45_scale) * (-180.0 / (pi * (angle * (x_45_scale * x_45_scale)))))) / pi); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[a, 6e-123], 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], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[(-180.0 / N[(Pi * N[(angle * N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6 \cdot 10^{-123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(y-scale \cdot x-scale\right) \cdot \frac{-180}{\pi \cdot \left(angle \cdot \left(x-scale \cdot x-scale\right)\right)}\right)}{\pi}\\
\end{array}
\end{array}
if a < 5.99999999999999968e-123Initial program 19.4%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites36.2%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6449.1
Applied rewrites49.1%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6444.0
Applied rewrites44.0%
if 5.99999999999999968e-123 < a Initial program 14.6%
Applied rewrites15.8%
Taylor expanded in y-scale around inf
Applied rewrites16.0%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6422.0
Applied rewrites22.0%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6431.7
Applied rewrites31.7%
Final simplification39.8%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (/ 180.0 (/ PI (atan (* -180.0 (/ y-scale (* angle (* PI x-scale))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 / (((double) M_PI) / atan((-180.0 * (y_45_scale / (angle * (((double) M_PI) * x_45_scale))))));
}
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.PI / Math.atan((-180.0 * (y_45_scale / (angle * (Math.PI * x_45_scale))))));
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 / (math.pi / math.atan((-180.0 * (y_45_scale / (angle * (math.pi * x_45_scale))))))
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 / Float64(pi / atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * x_45_scale))))))) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 / (pi / atan((-180.0 * (y_45_scale / (angle * (pi * x_45_scale)))))); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 / N[(Pi / N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\frac{180}{\frac{\pi}{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}}
\end{array}
Initial program 17.8%
Taylor expanded in x-scale around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites33.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.8
Applied rewrites42.8%
Applied rewrites43.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6438.2
Applied rewrites38.2%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 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) {
return 180.0 * (atan(((y_45_scale * -180.0) / (angle * (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan(((y_45_scale * -180.0) / (angle * (Math.PI * x_45_scale)))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan(((y_45_scale * -180.0) / (angle * (math.pi * x_45_scale)))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(angle * Float64(pi * x_45_scale)))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (pi * x_45_scale)))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(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|
\\
180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot 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 rewrites33.0%
Taylor expanded in b around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.8
Applied rewrites42.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6438.0
Applied rewrites38.0%
Final simplification38.0%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* PI x-scale))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (y_45_scale / (angle * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (Math.PI * x_45_scale))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (math.pi * x_45_scale))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * x_45_scale))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (pi * x_45_scale))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}
\end{array}
Initial program 17.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites15.0%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.0
Applied rewrites38.0%
Final simplification38.0%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* PI (* y-scale angle))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (x_45_scale / (((double) M_PI) * (y_45_scale * angle))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (x_45_scale / (Math.PI * (y_45_scale * angle))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (x_45_scale / (math.pi * (y_45_scale * angle))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(x_45_scale / Float64(pi * Float64(y_45_scale * angle))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (x_45_scale / (pi * (y_45_scale * angle))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(x$45$scale / N[(Pi * N[(y$45$scale * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{\pi \cdot \left(y-scale \cdot angle\right)}\right)}{\pi}
\end{array}
Initial program 17.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites15.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6415.4
Applied rewrites15.4%
lift-PI.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6415.4
Applied rewrites15.4%
Final simplification15.4%
b_m = (fabs.f64 b) (FPCore (a b_m angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* angle (* y-scale PI))))) PI)))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * Math.PI))))) / Math.PI);
}
b_m = math.fabs(b) def code(a, b_m, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-180.0 * (x_45_scale / (angle * (y_45_scale * math.pi))))) / math.pi)
b_m = abs(b) function code(a, b_m, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi))))) / pi)) end
b_m = abs(b); function tmp = code(a, b_m, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-180.0 * (x_45_scale / (angle * (y_45_scale * pi))))) / pi); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi}
\end{array}
Initial program 17.8%
Taylor expanded in angle around 0
associate-*r/N/A
lower-/.f64N/A
Applied rewrites15.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6415.4
Applied rewrites15.4%
herbie shell --seed 2024219
(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)))