
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2 (- (pow b 2) (pow a 2))) t_2) t_1) x-scale)
y-scale))
(t_4
(/
(/ (+ (pow (* a t_1) 2) (pow (* b t_2) 2)) y-scale)
y-scale))
(t_5
(/
(/ (+ (pow (* a t_2) 2) (pow (* b t_1) 2)) x-scale)
x-scale)))
(*
180
(/
(atan
(/
(- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2) (pow t_3 2))))
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), $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 * N[(N[Power[b, 2], $MachinePrecision] - N[Power[a, 2], $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], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2], $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], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180 * 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], $MachinePrecision] + N[Power[t$95$3, 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\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}
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2 (- (pow b 2) (pow a 2))) t_2) t_1) x-scale)
y-scale))
(t_4
(/
(/ (+ (pow (* a t_1) 2) (pow (* b t_2) 2)) y-scale)
y-scale))
(t_5
(/
(/ (+ (pow (* a t_2) 2) (pow (* b t_1) 2)) x-scale)
x-scale)))
(*
180
(/
(atan
(/
(- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2) (pow t_3 2))))
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), $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 * N[(N[Power[b, 2], $MachinePrecision] - N[Power[a, 2], $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], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2], $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], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180 * 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], $MachinePrecision] + N[Power[t$95$3, 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\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}
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sin (+ (- (* (* 1/180 angle) PI)) (/ PI 2))))
(t_1 (* 1/180 (* angle PI)))
(t_2 (sin t_1))
(t_3 (* PI (* 1/180 angle)))
(t_4 (cos (* t_3 2)))
(t_5
(+
(* (* (- 1/2 (* t_4 -1/2)) (fabs b)) (fabs b))
(* (* (- 1/2 (* t_4 1/2)) a) a)))
(t_6 (+ t_3 (* PI 1/2))))
(if (<=
(fabs b)
505722209957371/129672361527531029953512745740348785969138944757576153124864291552832900356653379574990845279596993571506183956603149661949848471106617978371464838566061365220661931356297172615168)
(*
180
(/
(atan
(*
1/2
(/
(* y-scale (+ (sqrt (pow t_2 4)) (pow t_2 2)))
(* x-scale (* (cos t_1) t_2)))))
PI))
(if (<=
(fabs b)
4700000000000000148361747323825931103558522205772788003643235620135666226520116591311172463219459907167493118835025449318626232710337861869483941284567545167576087960485888)
(*
180
(/
(atan
(*
-1/2
(*
(/
(/ (+ (fabs t_5) t_5) x-scale)
(* (sin t_3) (+ (fabs b) a)))
(/ (/ y-scale (cos t_3)) (- (fabs b) a)))))
PI))
(*
180
(/
(atan
(*
-1/2
(/
(*
y-scale
(+
(sqrt (pow t_0 4))
(/ (+ (sin (- t_6 t_3)) (sin (+ t_6 t_3))) 2)))
(* x-scale (* t_0 t_2)))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = sin((-((0.005555555555555556 * angle) * ((double) M_PI)) + (((double) M_PI) / 2.0)));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_4 = cos((t_3 * 2.0));
double t_5 = (((0.5 - (t_4 * -0.5)) * fabs(b)) * fabs(b)) + (((0.5 - (t_4 * 0.5)) * a) * a);
double t_6 = t_3 + (((double) M_PI) * 0.5);
double tmp;
if (fabs(b) <= 3.9e-165) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (cos(t_1) * t_2))))) / ((double) M_PI));
} else if (fabs(b) <= 4.7e+171) {
tmp = 180.0 * (atan((-0.5 * ((((fabs(t_5) + t_5) / x_45_scale) / (sin(t_3) * (fabs(b) + a))) * ((y_45_scale / cos(t_3)) / (fabs(b) - a))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_0, 4.0)) + ((sin((t_6 - t_3)) + sin((t_6 + t_3))) / 2.0))) / (x_45_scale * (t_0 * t_2))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.sin((-((0.005555555555555556 * angle) * Math.PI) + (Math.PI / 2.0)));
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double t_2 = Math.sin(t_1);
double t_3 = Math.PI * (0.005555555555555556 * angle);
double t_4 = Math.cos((t_3 * 2.0));
double t_5 = (((0.5 - (t_4 * -0.5)) * Math.abs(b)) * Math.abs(b)) + (((0.5 - (t_4 * 0.5)) * a) * a);
double t_6 = t_3 + (Math.PI * 0.5);
double tmp;
if (Math.abs(b) <= 3.9e-165) {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_2, 4.0)) + Math.pow(t_2, 2.0))) / (x_45_scale * (Math.cos(t_1) * t_2))))) / Math.PI);
} else if (Math.abs(b) <= 4.7e+171) {
tmp = 180.0 * (Math.atan((-0.5 * ((((Math.abs(t_5) + t_5) / x_45_scale) / (Math.sin(t_3) * (Math.abs(b) + a))) * ((y_45_scale / Math.cos(t_3)) / (Math.abs(b) - a))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_0, 4.0)) + ((Math.sin((t_6 - t_3)) + Math.sin((t_6 + t_3))) / 2.0))) / (x_45_scale * (t_0 * t_2))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = math.sin((-((0.005555555555555556 * angle) * math.pi) + (math.pi / 2.0))) t_1 = 0.005555555555555556 * (angle * math.pi) t_2 = math.sin(t_1) t_3 = math.pi * (0.005555555555555556 * angle) t_4 = math.cos((t_3 * 2.0)) t_5 = (((0.5 - (t_4 * -0.5)) * math.fabs(b)) * math.fabs(b)) + (((0.5 - (t_4 * 0.5)) * a) * a) t_6 = t_3 + (math.pi * 0.5) tmp = 0 if math.fabs(b) <= 3.9e-165: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_2, 4.0)) + math.pow(t_2, 2.0))) / (x_45_scale * (math.cos(t_1) * t_2))))) / math.pi) elif math.fabs(b) <= 4.7e+171: tmp = 180.0 * (math.atan((-0.5 * ((((math.fabs(t_5) + t_5) / x_45_scale) / (math.sin(t_3) * (math.fabs(b) + a))) * ((y_45_scale / math.cos(t_3)) / (math.fabs(b) - a))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_0, 4.0)) + ((math.sin((t_6 - t_3)) + math.sin((t_6 + t_3))) / 2.0))) / (x_45_scale * (t_0 * t_2))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = sin(Float64(Float64(-Float64(Float64(0.005555555555555556 * angle) * pi)) + Float64(pi / 2.0))) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = Float64(pi * Float64(0.005555555555555556 * angle)) t_4 = cos(Float64(t_3 * 2.0)) t_5 = Float64(Float64(Float64(Float64(0.5 - Float64(t_4 * -0.5)) * abs(b)) * abs(b)) + Float64(Float64(Float64(0.5 - Float64(t_4 * 0.5)) * a) * a)) t_6 = Float64(t_3 + Float64(pi * 0.5)) tmp = 0.0 if (abs(b) <= 3.9e-165) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_1) * t_2))))) / pi)); elseif (abs(b) <= 4.7e+171) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(Float64(abs(t_5) + t_5) / x_45_scale) / Float64(sin(t_3) * Float64(abs(b) + a))) * Float64(Float64(y_45_scale / cos(t_3)) / Float64(abs(b) - a))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_0 ^ 4.0)) + Float64(Float64(sin(Float64(t_6 - t_3)) + sin(Float64(t_6 + t_3))) / 2.0))) / Float64(x_45_scale * Float64(t_0 * t_2))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = sin((-((0.005555555555555556 * angle) * pi) + (pi / 2.0))); t_1 = 0.005555555555555556 * (angle * pi); t_2 = sin(t_1); t_3 = pi * (0.005555555555555556 * angle); t_4 = cos((t_3 * 2.0)); t_5 = (((0.5 - (t_4 * -0.5)) * abs(b)) * abs(b)) + (((0.5 - (t_4 * 0.5)) * a) * a); t_6 = t_3 + (pi * 0.5); tmp = 0.0; if (abs(b) <= 3.9e-165) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / (x_45_scale * (cos(t_1) * t_2))))) / pi); elseif (abs(b) <= 4.7e+171) tmp = 180.0 * (atan((-0.5 * ((((abs(t_5) + t_5) / x_45_scale) / (sin(t_3) * (abs(b) + a))) * ((y_45_scale / cos(t_3)) / (abs(b) - a))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_0 ^ 4.0)) + ((sin((t_6 - t_3)) + sin((t_6 + t_3))) / 2.0))) / (x_45_scale * (t_0 * t_2))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Sin[N[((-N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]) + N[(Pi / 2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[(1/180 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[N[(t$95$3 * 2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(1/2 - N[(t$95$4 * -1/2), $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1/2 - N[(t$95$4 * 1/2), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 + N[(Pi * 1/2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 505722209957371/129672361527531029953512745740348785969138944757576153124864291552832900356653379574990845279596993571506183956603149661949848471106617978371464838566061365220661931356297172615168], N[(180 * N[(N[ArcTan[N[(1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$1], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 4700000000000000148361747323825931103558522205772788003643235620135666226520116591311172463219459907167493118835025449318626232710337861869483941284567545167576087960485888], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(N[(N[(N[Abs[t$95$5], $MachinePrecision] + t$95$5), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[Sin[t$95$3], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(y$45$scale / N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] / N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$0, 4], $MachinePrecision]], $MachinePrecision] + N[(N[(N[Sin[N[(t$95$6 - t$95$3), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(t$95$6 + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
t_0 := \sin \left(\left(-\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) + \frac{\pi}{2}\right)\\
t_1 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \pi \cdot \left(\frac{1}{180} \cdot angle\right)\\
t_4 := \cos \left(t\_3 \cdot 2\right)\\
t_5 := \left(\left(\frac{1}{2} - t\_4 \cdot \frac{-1}{2}\right) \cdot \left|b\right|\right) \cdot \left|b\right| + \left(\left(\frac{1}{2} - t\_4 \cdot \frac{1}{2}\right) \cdot a\right) \cdot a\\
t_6 := t\_3 + \pi \cdot \frac{1}{2}\\
\mathbf{if}\;\left|b\right| \leq \frac{505722209957371}{129672361527531029953512745740348785969138944757576153124864291552832900356653379574990845279596993571506183956603149661949848471106617978371464838566061365220661931356297172615168}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(\cos t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 4700000000000000148361747323825931103558522205772788003643235620135666226520116591311172463219459907167493118835025449318626232710337861869483941284567545167576087960485888:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{\frac{\left|t\_5\right| + t\_5}{x-scale}}{\sin t\_3 \cdot \left(\left|b\right| + a\right)} \cdot \frac{\frac{y-scale}{\cos t\_3}}{\left|b\right| - a}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_0}^{4}} + \frac{\sin \left(t\_6 - t\_3\right) + \sin \left(t\_6 + t\_3\right)}{2}\right)}{x-scale \cdot \left(t\_0 \cdot t\_2\right)}\right)}{\pi}\\
\end{array}
if b < 3.8999999999999999e-165Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.4%
if 3.8999999999999999e-165 < b < 4.7000000000000001e171Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Applied rewrites41.0%
if 4.7000000000000001e171 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites43.7%
Applied rewrites43.6%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 1/180 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* PI (* 1/180 angle)))
(t_3 (+ t_2 (* PI 1/2)))
(t_4 (* (* 1/180 angle) PI))
(t_5 (sin (+ (- t_4) (/ PI 2))))
(t_6 (cos t_4)))
(if (<=
(fabs b)
6521557777124079/6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152)
(*
180
(/
(atan
(*
1/2
(/
(* y-scale (+ (sqrt (pow t_1 4)) (pow t_1 2)))
(* x-scale (* (cos t_0) t_1)))))
PI))
(if (<=
(fabs b)
1000000000000000023093091302697871548929838224851699275430564578154842189679457688865761796867950761110782385438258574196599190113135873506876029716653690185712031431446635648758966669803520)
(*
180
(/
(atan
(*
-1/2
(*
(/ y-scale (* x-scale t_6))
(/
(+ (- 1/2 (* -1/2 (cos (* t_4 2)))) (sqrt (pow t_6 4)))
(sin t_4)))))
PI))
(*
180
(/
(atan
(*
-1/2
(/
(*
y-scale
(+
(sqrt (pow t_5 4))
(/ (+ (sin (- t_3 t_2)) (sin (+ t_3 t_2))) 2)))
(* x-scale (* t_5 t_1)))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_3 = t_2 + (((double) M_PI) * 0.5);
double t_4 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_5 = sin((-t_4 + (((double) M_PI) / 2.0)));
double t_6 = cos(t_4);
double tmp;
if (fabs(b) <= 9.5e-142) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (cos(t_0) * t_1))))) / ((double) M_PI));
} else if (fabs(b) <= 1e+189) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * t_6)) * (((0.5 - (-0.5 * cos((t_4 * 2.0)))) + sqrt(pow(t_6, 4.0))) / sin(t_4))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_5, 4.0)) + ((sin((t_3 - t_2)) + sin((t_3 + t_2))) / 2.0))) / (x_45_scale * (t_5 * t_1))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double t_2 = Math.PI * (0.005555555555555556 * angle);
double t_3 = t_2 + (Math.PI * 0.5);
double t_4 = (0.005555555555555556 * angle) * Math.PI;
double t_5 = Math.sin((-t_4 + (Math.PI / 2.0)));
double t_6 = Math.cos(t_4);
double tmp;
if (Math.abs(b) <= 9.5e-142) {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_1, 4.0)) + Math.pow(t_1, 2.0))) / (x_45_scale * (Math.cos(t_0) * t_1))))) / Math.PI);
} else if (Math.abs(b) <= 1e+189) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale / (x_45_scale * t_6)) * (((0.5 - (-0.5 * Math.cos((t_4 * 2.0)))) + Math.sqrt(Math.pow(t_6, 4.0))) / Math.sin(t_4))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_5, 4.0)) + ((Math.sin((t_3 - t_2)) + Math.sin((t_3 + t_2))) / 2.0))) / (x_45_scale * (t_5 * t_1))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) t_2 = math.pi * (0.005555555555555556 * angle) t_3 = t_2 + (math.pi * 0.5) t_4 = (0.005555555555555556 * angle) * math.pi t_5 = math.sin((-t_4 + (math.pi / 2.0))) t_6 = math.cos(t_4) tmp = 0 if math.fabs(b) <= 9.5e-142: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_1, 4.0)) + math.pow(t_1, 2.0))) / (x_45_scale * (math.cos(t_0) * t_1))))) / math.pi) elif math.fabs(b) <= 1e+189: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale / (x_45_scale * t_6)) * (((0.5 - (-0.5 * math.cos((t_4 * 2.0)))) + math.sqrt(math.pow(t_6, 4.0))) / math.sin(t_4))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_5, 4.0)) + ((math.sin((t_3 - t_2)) + math.sin((t_3 + t_2))) / 2.0))) / (x_45_scale * (t_5 * t_1))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(pi * Float64(0.005555555555555556 * angle)) t_3 = Float64(t_2 + Float64(pi * 0.5)) t_4 = Float64(Float64(0.005555555555555556 * angle) * pi) t_5 = sin(Float64(Float64(-t_4) + Float64(pi / 2.0))) t_6 = cos(t_4) tmp = 0.0 if (abs(b) <= 9.5e-142) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_0) * t_1))))) / pi)); elseif (abs(b) <= 1e+189) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * t_6)) * Float64(Float64(Float64(0.5 - Float64(-0.5 * cos(Float64(t_4 * 2.0)))) + sqrt((t_6 ^ 4.0))) / sin(t_4))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_5 ^ 4.0)) + Float64(Float64(sin(Float64(t_3 - t_2)) + sin(Float64(t_3 + t_2))) / 2.0))) / Float64(x_45_scale * Float64(t_5 * t_1))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); t_2 = pi * (0.005555555555555556 * angle); t_3 = t_2 + (pi * 0.5); t_4 = (0.005555555555555556 * angle) * pi; t_5 = sin((-t_4 + (pi / 2.0))); t_6 = cos(t_4); tmp = 0.0; if (abs(b) <= 9.5e-142) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / (x_45_scale * (cos(t_0) * t_1))))) / pi); elseif (abs(b) <= 1e+189) tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * t_6)) * (((0.5 - (-0.5 * cos((t_4 * 2.0)))) + sqrt((t_6 ^ 4.0))) / sin(t_4))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_5 ^ 4.0)) + ((sin((t_3 - t_2)) + sin((t_3 + t_2))) / 2.0))) / (x_45_scale * (t_5 * t_1))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(1/180 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(Pi * 1/2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$5 = N[Sin[N[((-t$95$4) + N[(Pi / 2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[Cos[t$95$4], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 6521557777124079/6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152], N[(180 * N[(N[ArcTan[N[(1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1000000000000000023093091302697871548929838224851699275430564578154842189679457688865761796867950761110782385438258574196599190113135873506876029716653690185712031431446635648758966669803520], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale / N[(x$45$scale * t$95$6), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1/2 - N[(-1/2 * N[Cos[N[(t$95$4 * 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$6, 4], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$5, 4], $MachinePrecision]], $MachinePrecision] + N[(N[(N[Sin[N[(t$95$3 - t$95$2), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(t$95$3 + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$5 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
t_0 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \pi \cdot \left(\frac{1}{180} \cdot angle\right)\\
t_3 := t\_2 + \pi \cdot \frac{1}{2}\\
t_4 := \left(\frac{1}{180} \cdot angle\right) \cdot \pi\\
t_5 := \sin \left(\left(-t\_4\right) + \frac{\pi}{2}\right)\\
t_6 := \cos t\_4\\
\mathbf{if}\;\left|b\right| \leq \frac{6521557777124079}{6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(\cos t\_0 \cdot t\_1\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1000000000000000023093091302697871548929838224851699275430564578154842189679457688865761796867950761110782385438258574196599190113135873506876029716653690185712031431446635648758966669803520:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale \cdot t\_6} \cdot \frac{\left(\frac{1}{2} - \frac{-1}{2} \cdot \cos \left(t\_4 \cdot 2\right)\right) + \sqrt{{t\_6}^{4}}}{\sin t\_4}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_5}^{4}} + \frac{\sin \left(t\_3 - t\_2\right) + \sin \left(t\_3 + t\_2\right)}{2}\right)}{x-scale \cdot \left(t\_5 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
if b < 9.4999999999999997e-142Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.4%
if 9.4999999999999997e-142 < b < 1e189Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Applied rewrites45.0%
if 1e189 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites43.7%
Applied rewrites43.6%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 1/180 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* (* 1/180 angle) PI))
(t_3 (sin (+ (- t_2) (/ PI 2))))
(t_4 (cos t_2)))
(if (<=
(fabs b)
6521557777124079/6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152)
(*
180
(/
(atan
(*
1/2
(/
(* y-scale (+ (sqrt (pow t_1 4)) (pow t_1 2)))
(* x-scale (* (cos t_0) t_1)))))
PI))
(if (<=
(fabs b)
469999999999999970563649869298309134543181772858568999113992453223497518507572124819051670436308844544)
(*
180
(/
(atan
(*
-1/2
(*
(/ y-scale (* x-scale t_4))
(/
(+ (- 1/2 (* -1/2 (cos (* t_2 2)))) (sqrt (pow t_4 4)))
(sin t_2)))))
PI))
(*
180
(/
(atan
(*
-1/2
(/
(*
y-scale
(+
(sqrt (pow t_3 4))
(-
1/2
(*
1/2
(cos
(* 2 (+ (* PI 1/2) (* (* 1/180 angle) (- PI)))))))))
(* x-scale (* t_3 t_1)))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_3 = sin((-t_2 + (((double) M_PI) / 2.0)));
double t_4 = cos(t_2);
double tmp;
if (fabs(b) <= 9.5e-142) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (cos(t_0) * t_1))))) / ((double) M_PI));
} else if (fabs(b) <= 4.7e+101) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * t_4)) * (((0.5 - (-0.5 * cos((t_2 * 2.0)))) + sqrt(pow(t_4, 4.0))) / sin(t_2))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_3, 4.0)) + (0.5 - (0.5 * cos((2.0 * ((((double) M_PI) * 0.5) + ((0.005555555555555556 * angle) * -((double) M_PI))))))))) / (x_45_scale * (t_3 * t_1))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double t_2 = (0.005555555555555556 * angle) * Math.PI;
double t_3 = Math.sin((-t_2 + (Math.PI / 2.0)));
double t_4 = Math.cos(t_2);
double tmp;
if (Math.abs(b) <= 9.5e-142) {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_1, 4.0)) + Math.pow(t_1, 2.0))) / (x_45_scale * (Math.cos(t_0) * t_1))))) / Math.PI);
} else if (Math.abs(b) <= 4.7e+101) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale / (x_45_scale * t_4)) * (((0.5 - (-0.5 * Math.cos((t_2 * 2.0)))) + Math.sqrt(Math.pow(t_4, 4.0))) / Math.sin(t_2))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_3, 4.0)) + (0.5 - (0.5 * Math.cos((2.0 * ((Math.PI * 0.5) + ((0.005555555555555556 * angle) * -Math.PI)))))))) / (x_45_scale * (t_3 * t_1))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) t_2 = (0.005555555555555556 * angle) * math.pi t_3 = math.sin((-t_2 + (math.pi / 2.0))) t_4 = math.cos(t_2) tmp = 0 if math.fabs(b) <= 9.5e-142: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (math.sqrt(math.pow(t_1, 4.0)) + math.pow(t_1, 2.0))) / (x_45_scale * (math.cos(t_0) * t_1))))) / math.pi) elif math.fabs(b) <= 4.7e+101: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale / (x_45_scale * t_4)) * (((0.5 - (-0.5 * math.cos((t_2 * 2.0)))) + math.sqrt(math.pow(t_4, 4.0))) / math.sin(t_2))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_3, 4.0)) + (0.5 - (0.5 * math.cos((2.0 * ((math.pi * 0.5) + ((0.005555555555555556 * angle) * -math.pi)))))))) / (x_45_scale * (t_3 * t_1))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(Float64(0.005555555555555556 * angle) * pi) t_3 = sin(Float64(Float64(-t_2) + Float64(pi / 2.0))) t_4 = cos(t_2) tmp = 0.0 if (abs(b) <= 9.5e-142) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / Float64(x_45_scale * Float64(cos(t_0) * t_1))))) / pi)); elseif (abs(b) <= 4.7e+101) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * t_4)) * Float64(Float64(Float64(0.5 - Float64(-0.5 * cos(Float64(t_2 * 2.0)))) + sqrt((t_4 ^ 4.0))) / sin(t_2))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 4.0)) + Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * Float64(Float64(pi * 0.5) + Float64(Float64(0.005555555555555556 * angle) * Float64(-pi))))))))) / Float64(x_45_scale * Float64(t_3 * t_1))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); t_2 = (0.005555555555555556 * angle) * pi; t_3 = sin((-t_2 + (pi / 2.0))); t_4 = cos(t_2); tmp = 0.0; if (abs(b) <= 9.5e-142) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / (x_45_scale * (cos(t_0) * t_1))))) / pi); elseif (abs(b) <= 4.7e+101) tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * t_4)) * (((0.5 - (-0.5 * cos((t_2 * 2.0)))) + sqrt((t_4 ^ 4.0))) / sin(t_2))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_3 ^ 4.0)) + (0.5 - (0.5 * cos((2.0 * ((pi * 0.5) + ((0.005555555555555556 * angle) * -pi)))))))) / (x_45_scale * (t_3 * t_1))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[((-t$95$2) + N[(Pi / 2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$2], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 6521557777124079/6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152], N[(180 * N[(N[ArcTan[N[(1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 469999999999999970563649869298309134543181772858568999113992453223497518507572124819051670436308844544], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale / N[(x$45$scale * t$95$4), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1/2 - N[(-1/2 * N[Cos[N[(t$95$2 * 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$4, 4], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 4], $MachinePrecision]], $MachinePrecision] + N[(1/2 - N[(1/2 * N[Cos[N[(2 * N[(N[(Pi * 1/2), $MachinePrecision] + N[(N[(1/180 * angle), $MachinePrecision] * (-Pi)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \left(\frac{1}{180} \cdot angle\right) \cdot \pi\\
t_3 := \sin \left(\left(-t\_2\right) + \frac{\pi}{2}\right)\\
t_4 := \cos t\_2\\
\mathbf{if}\;\left|b\right| \leq \frac{6521557777124079}{6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(\cos t\_0 \cdot t\_1\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 469999999999999970563649869298309134543181772858568999113992453223497518507572124819051670436308844544:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale \cdot t\_4} \cdot \frac{\left(\frac{1}{2} - \frac{-1}{2} \cdot \cos \left(t\_2 \cdot 2\right)\right) + \sqrt{{t\_4}^{4}}}{\sin t\_2}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{4}} + \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\pi \cdot \frac{1}{2} + \left(\frac{1}{180} \cdot angle\right) \cdot \left(-\pi\right)\right)\right)\right)\right)}{x-scale \cdot \left(t\_3 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
if b < 9.4999999999999997e-142Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.4%
if 9.4999999999999997e-142 < b < 4.6999999999999997e101Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Applied rewrites45.0%
if 4.6999999999999997e101 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites43.7%
lift-pow.f64N/A
unpow2N/A
lift-sin.f64N/A
lift-sin.f64N/A
sqr-sin-aN/A
lower--.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6443.7%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6443.7%
Applied rewrites43.7%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 1/180 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* (* 1/180 angle) PI))
(t_3 (cos t_2)))
(if (<=
(fabs a)
3971269629433431/22062609052407949194914912829723655182432452436340449411589077584864795549696863280514640007775234351335139574205343723266588256764674929278332446003804266456490594464708719691973688066349246310341854370928394768482304)
(*
180
(/
(atan
(*
-1/2
(/
(* y-scale (+ 2 (* -1/16200 (* (pow angle 2) (pow PI 2)))))
(* x-scale (* (cos t_0) t_1)))))
PI))
(if (<=
(fabs a)
5199999999999999743620500170434112096282277997106680004070138614598363835262804433151404497352922772996105403228846404251529846771139083612415066112)
(*
180
(/
(atan
(*
-1/2
(*
(/ y-scale (* x-scale t_3))
(/
(+ (- 1/2 (* -1/2 (cos (* t_2 2)))) (sqrt (pow t_3 4)))
(sin t_2)))))
PI))
(*
180
(/
(atan
(*
-1/2
(*
(*
-1
(/
(- 1/2 (* 1/2 (cos (* 1/90 (* angle PI)))))
(* x-scale t_1)))
(/ y-scale t_3))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_3 = cos(t_2);
double tmp;
if (fabs(a) <= 1.8e-202) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / (x_45_scale * (cos(t_0) * t_1))))) / ((double) M_PI));
} else if (fabs(a) <= 5.2e+147) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * t_3)) * (((0.5 - (-0.5 * cos((t_2 * 2.0)))) + sqrt(pow(t_3, 4.0))) / sin(t_2))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (x_45_scale * t_1))) * (y_45_scale / t_3)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double t_2 = (0.005555555555555556 * angle) * Math.PI;
double t_3 = Math.cos(t_2);
double tmp;
if (Math.abs(a) <= 1.8e-202) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (Math.pow(angle, 2.0) * Math.pow(Math.PI, 2.0))))) / (x_45_scale * (Math.cos(t_0) * t_1))))) / Math.PI);
} else if (Math.abs(a) <= 5.2e+147) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale / (x_45_scale * t_3)) * (((0.5 - (-0.5 * Math.cos((t_2 * 2.0)))) + Math.sqrt(Math.pow(t_3, 4.0))) / Math.sin(t_2))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (x_45_scale * t_1))) * (y_45_scale / t_3)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) t_2 = (0.005555555555555556 * angle) * math.pi t_3 = math.cos(t_2) tmp = 0 if math.fabs(a) <= 1.8e-202: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (math.pow(angle, 2.0) * math.pow(math.pi, 2.0))))) / (x_45_scale * (math.cos(t_0) * t_1))))) / math.pi) elif math.fabs(a) <= 5.2e+147: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale / (x_45_scale * t_3)) * (((0.5 - (-0.5 * math.cos((t_2 * 2.0)))) + math.sqrt(math.pow(t_3, 4.0))) / math.sin(t_2))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (x_45_scale * t_1))) * (y_45_scale / t_3)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(Float64(0.005555555555555556 * angle) * pi) t_3 = cos(t_2) tmp = 0.0 if (abs(a) <= 1.8e-202) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / Float64(x_45_scale * Float64(cos(t_0) * t_1))))) / pi)); elseif (abs(a) <= 5.2e+147) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / Float64(x_45_scale * t_3)) * Float64(Float64(Float64(0.5 - Float64(-0.5 * cos(Float64(t_2 * 2.0)))) + sqrt((t_3 ^ 4.0))) / sin(t_2))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(x_45_scale * t_1))) * Float64(y_45_scale / t_3)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); t_2 = (0.005555555555555556 * angle) * pi; t_3 = cos(t_2); tmp = 0.0; if (abs(a) <= 1.8e-202) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle ^ 2.0) * (pi ^ 2.0))))) / (x_45_scale * (cos(t_0) * t_1))))) / pi); elseif (abs(a) <= 5.2e+147) tmp = 180.0 * (atan((-0.5 * ((y_45_scale / (x_45_scale * t_3)) * (((0.5 - (-0.5 * cos((t_2 * 2.0)))) + sqrt((t_3 ^ 4.0))) / sin(t_2))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (x_45_scale * t_1))) * (y_45_scale / t_3)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 3971269629433431/22062609052407949194914912829723655182432452436340449411589077584864795549696863280514640007775234351335139574205343723266588256764674929278332446003804266456490594464708719691973688066349246310341854370928394768482304], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(2 + N[(-1/16200 * N[(N[Power[angle, 2], $MachinePrecision] * N[Power[Pi, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 5199999999999999743620500170434112096282277997106680004070138614598363835262804433151404497352922772996105403228846404251529846771139083612415066112], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale / N[(x$45$scale * t$95$3), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1/2 - N[(-1/2 * N[Cos[N[(t$95$2 * 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$3, 4], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(-1 * N[(N[(1/2 - N[(1/2 * N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \left(\frac{1}{180} \cdot angle\right) \cdot \pi\\
t_3 := \cos t\_2\\
\mathbf{if}\;\left|a\right| \leq \frac{3971269629433431}{22062609052407949194914912829723655182432452436340449411589077584864795549696863280514640007775234351335139574205343723266588256764674929278332446003804266456490594464708719691973688066349246310341854370928394768482304}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 + \frac{-1}{16200} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale \cdot \left(\cos t\_0 \cdot t\_1\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 5199999999999999743620500170434112096282277997106680004070138614598363835262804433151404497352922772996105403228846404251529846771139083612415066112:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale \cdot t\_3} \cdot \frac{\left(\frac{1}{2} - \frac{-1}{2} \cdot \cos \left(t\_2 \cdot 2\right)\right) + \sqrt{{t\_3}^{4}}}{\sin t\_2}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\left(-1 \cdot \frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot t\_1}\right) \cdot \frac{y-scale}{t\_3}\right)\right)}{\pi}\\
\end{array}
if a < 1.8000000000000001e-202Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
if 1.8000000000000001e-202 < a < 5.1999999999999997e147Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Applied rewrites45.0%
if 5.1999999999999997e147 < a Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 1/180 angle) PI))
(t_1 (sin (+ (- t_0) (/ PI 2))))
(t_2 (sin (* 1/180 (* angle PI)))))
(if (<=
(fabs a)
2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048)
(*
180
(/
(atan
(*
-1/2
(/
(*
y-scale
(+
(sqrt (pow t_1 4))
(-
1/2
(*
1/2
(cos (* 2 (+ (* PI 1/2) (* (* 1/180 angle) (- PI)))))))))
(* x-scale (* t_1 t_2)))))
PI))
(*
180
(/
(atan
(*
-1/2
(*
(*
-1
(/
(- 1/2 (* 1/2 (cos (* 1/90 (* angle PI)))))
(* x-scale t_2)))
(/ y-scale (cos t_0)))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = sin((-t_0 + (((double) M_PI) / 2.0)));
double t_2 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (fabs(a) <= 2.9e+150) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + (0.5 - (0.5 * cos((2.0 * ((((double) M_PI) * 0.5) + ((0.005555555555555556 * angle) * -((double) M_PI))))))))) / (x_45_scale * (t_1 * t_2))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (x_45_scale * t_2))) * (y_45_scale / cos(t_0))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double t_1 = Math.sin((-t_0 + (Math.PI / 2.0)));
double t_2 = Math.sin((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (Math.abs(a) <= 2.9e+150) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_1, 4.0)) + (0.5 - (0.5 * Math.cos((2.0 * ((Math.PI * 0.5) + ((0.005555555555555556 * angle) * -Math.PI)))))))) / (x_45_scale * (t_1 * t_2))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (x_45_scale * t_2))) * (y_45_scale / Math.cos(t_0))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi t_1 = math.sin((-t_0 + (math.pi / 2.0))) t_2 = math.sin((0.005555555555555556 * (angle * math.pi))) tmp = 0 if math.fabs(a) <= 2.9e+150: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_1, 4.0)) + (0.5 - (0.5 * math.cos((2.0 * ((math.pi * 0.5) + ((0.005555555555555556 * angle) * -math.pi)))))))) / (x_45_scale * (t_1 * t_2))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (x_45_scale * t_2))) * (y_45_scale / math.cos(t_0))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = sin(Float64(Float64(-t_0) + Float64(pi / 2.0))) t_2 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (abs(a) <= 2.9e+150) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * Float64(Float64(pi * 0.5) + Float64(Float64(0.005555555555555556 * angle) * Float64(-pi))))))))) / Float64(x_45_scale * Float64(t_1 * t_2))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(x_45_scale * t_2))) * Float64(y_45_scale / cos(t_0))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (0.005555555555555556 * angle) * pi; t_1 = sin((-t_0 + (pi / 2.0))); t_2 = sin((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (abs(a) <= 2.9e+150) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (0.5 - (0.5 * cos((2.0 * ((pi * 0.5) + ((0.005555555555555556 * angle) * -pi)))))))) / (x_45_scale * (t_1 * t_2))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (x_45_scale * t_2))) * (y_45_scale / cos(t_0))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[((-t$95$0) + N[(Pi / 2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4], $MachinePrecision]], $MachinePrecision] + N[(1/2 - N[(1/2 * N[Cos[N[(2 * N[(N[(Pi * 1/2), $MachinePrecision] + N[(N[(1/180 * angle), $MachinePrecision] * (-Pi)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(-1 * N[(N[(1/2 - N[(1/2 * N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \left(\frac{1}{180} \cdot angle\right) \cdot \pi\\
t_1 := \sin \left(\left(-t\_0\right) + \frac{\pi}{2}\right)\\
t_2 := \sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;\left|a\right| \leq 2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\pi \cdot \frac{1}{2} + \left(\frac{1}{180} \cdot angle\right) \cdot \left(-\pi\right)\right)\right)\right)\right)}{x-scale \cdot \left(t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\left(-1 \cdot \frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot t\_2}\right) \cdot \frac{y-scale}{\cos t\_0}\right)\right)}{\pi}\\
\end{array}
if a < 2.9000000000000001e150Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites43.7%
lift-pow.f64N/A
unpow2N/A
lift-sin.f64N/A
lift-sin.f64N/A
sqr-sin-aN/A
lower--.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-*.f6443.7%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6443.7%
Applied rewrites43.7%
if 2.9000000000000001e150 < a Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 1/180 angle) PI))
(t_1 (sin (+ (- t_0) (/ PI 2))))
(t_2 (sin (* 1/180 (* angle PI)))))
(if (<=
(fabs a)
2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048)
(*
180
(/
(atan
(*
-1/2
(/
(*
y-scale
(+
(sqrt (pow t_1 4))
(-
1/2
(*
1/2
(cos (* 2 (+ (* PI (* 1/180 angle)) (* PI 1/2))))))))
(* x-scale (* t_1 t_2)))))
PI))
(*
180
(/
(atan
(*
-1/2
(*
(*
-1
(/
(- 1/2 (* 1/2 (cos (* 1/90 (* angle PI)))))
(* x-scale t_2)))
(/ y-scale (cos t_0)))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = sin((-t_0 + (((double) M_PI) / 2.0)));
double t_2 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (fabs(a) <= 2.9e+150) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + (0.5 - (0.5 * cos((2.0 * ((((double) M_PI) * (0.005555555555555556 * angle)) + (((double) M_PI) * 0.5)))))))) / (x_45_scale * (t_1 * t_2))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (x_45_scale * t_2))) * (y_45_scale / cos(t_0))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double t_1 = Math.sin((-t_0 + (Math.PI / 2.0)));
double t_2 = Math.sin((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (Math.abs(a) <= 2.9e+150) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_1, 4.0)) + (0.5 - (0.5 * Math.cos((2.0 * ((Math.PI * (0.005555555555555556 * angle)) + (Math.PI * 0.5)))))))) / (x_45_scale * (t_1 * t_2))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (x_45_scale * t_2))) * (y_45_scale / Math.cos(t_0))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi t_1 = math.sin((-t_0 + (math.pi / 2.0))) t_2 = math.sin((0.005555555555555556 * (angle * math.pi))) tmp = 0 if math.fabs(a) <= 2.9e+150: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_1, 4.0)) + (0.5 - (0.5 * math.cos((2.0 * ((math.pi * (0.005555555555555556 * angle)) + (math.pi * 0.5)))))))) / (x_45_scale * (t_1 * t_2))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (x_45_scale * t_2))) * (y_45_scale / math.cos(t_0))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = sin(Float64(Float64(-t_0) + Float64(pi / 2.0))) t_2 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (abs(a) <= 2.9e+150) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * Float64(Float64(pi * Float64(0.005555555555555556 * angle)) + Float64(pi * 0.5)))))))) / Float64(x_45_scale * Float64(t_1 * t_2))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(x_45_scale * t_2))) * Float64(y_45_scale / cos(t_0))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (0.005555555555555556 * angle) * pi; t_1 = sin((-t_0 + (pi / 2.0))); t_2 = sin((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (abs(a) <= 2.9e+150) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (0.5 - (0.5 * cos((2.0 * ((pi * (0.005555555555555556 * angle)) + (pi * 0.5)))))))) / (x_45_scale * (t_1 * t_2))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (x_45_scale * t_2))) * (y_45_scale / cos(t_0))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[((-t$95$0) + N[(Pi / 2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4], $MachinePrecision]], $MachinePrecision] + N[(1/2 - N[(1/2 * N[Cos[N[(2 * N[(N[(Pi * N[(1/180 * angle), $MachinePrecision]), $MachinePrecision] + N[(Pi * 1/2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(-1 * N[(N[(1/2 - N[(1/2 * N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \left(\frac{1}{180} \cdot angle\right) \cdot \pi\\
t_1 := \sin \left(\left(-t\_0\right) + \frac{\pi}{2}\right)\\
t_2 := \sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;\left|a\right| \leq 2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot \left(\pi \cdot \left(\frac{1}{180} \cdot angle\right) + \pi \cdot \frac{1}{2}\right)\right)\right)\right)}{x-scale \cdot \left(t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\left(-1 \cdot \frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot t\_2}\right) \cdot \frac{y-scale}{\cos t\_0}\right)\right)}{\pi}\\
\end{array}
if a < 2.9000000000000001e150Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites43.7%
Applied rewrites43.7%
if 2.9000000000000001e150 < a Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 1/180 angle) PI))
(t_1 (sin (+ (- t_0) (/ PI 2))))
(t_2 (sin (* 1/180 (* angle PI)))))
(if (<=
(fabs a)
2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048)
(*
180
(/
(atan
(*
-1/2
(/
(*
y-scale
(+
(sqrt (pow t_1 4))
(- 1/2 (* (cos (* (* PI (* 1/180 angle)) 2)) -1/2))))
(* x-scale (* t_1 t_2)))))
PI))
(*
180
(/
(atan
(*
-1/2
(*
(*
-1
(/
(- 1/2 (* 1/2 (cos (* 1/90 (* angle PI)))))
(* x-scale t_2)))
(/ y-scale (cos t_0)))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = sin((-t_0 + (((double) M_PI) / 2.0)));
double t_2 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (fabs(a) <= 2.9e+150) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + (0.5 - (cos(((((double) M_PI) * (0.005555555555555556 * angle)) * 2.0)) * -0.5)))) / (x_45_scale * (t_1 * t_2))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (x_45_scale * t_2))) * (y_45_scale / cos(t_0))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double t_1 = Math.sin((-t_0 + (Math.PI / 2.0)));
double t_2 = Math.sin((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (Math.abs(a) <= 2.9e+150) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_1, 4.0)) + (0.5 - (Math.cos(((Math.PI * (0.005555555555555556 * angle)) * 2.0)) * -0.5)))) / (x_45_scale * (t_1 * t_2))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (x_45_scale * t_2))) * (y_45_scale / Math.cos(t_0))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi t_1 = math.sin((-t_0 + (math.pi / 2.0))) t_2 = math.sin((0.005555555555555556 * (angle * math.pi))) tmp = 0 if math.fabs(a) <= 2.9e+150: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_1, 4.0)) + (0.5 - (math.cos(((math.pi * (0.005555555555555556 * angle)) * 2.0)) * -0.5)))) / (x_45_scale * (t_1 * t_2))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (x_45_scale * t_2))) * (y_45_scale / math.cos(t_0))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = sin(Float64(Float64(-t_0) + Float64(pi / 2.0))) t_2 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (abs(a) <= 2.9e+150) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + Float64(0.5 - Float64(cos(Float64(Float64(pi * Float64(0.005555555555555556 * angle)) * 2.0)) * -0.5)))) / Float64(x_45_scale * Float64(t_1 * t_2))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(x_45_scale * t_2))) * Float64(y_45_scale / cos(t_0))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (0.005555555555555556 * angle) * pi; t_1 = sin((-t_0 + (pi / 2.0))); t_2 = sin((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (abs(a) <= 2.9e+150) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (0.5 - (cos(((pi * (0.005555555555555556 * angle)) * 2.0)) * -0.5)))) / (x_45_scale * (t_1 * t_2))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (x_45_scale * t_2))) * (y_45_scale / cos(t_0))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[((-t$95$0) + N[(Pi / 2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4], $MachinePrecision]], $MachinePrecision] + N[(1/2 - N[(N[Cos[N[(N[(Pi * N[(1/180 * angle), $MachinePrecision]), $MachinePrecision] * 2), $MachinePrecision]], $MachinePrecision] * -1/2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(-1 * N[(N[(1/2 - N[(1/2 * N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \left(\frac{1}{180} \cdot angle\right) \cdot \pi\\
t_1 := \sin \left(\left(-t\_0\right) + \frac{\pi}{2}\right)\\
t_2 := \sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;\left|a\right| \leq 2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + \left(\frac{1}{2} - \cos \left(\left(\pi \cdot \left(\frac{1}{180} \cdot angle\right)\right) \cdot 2\right) \cdot \frac{-1}{2}\right)\right)}{x-scale \cdot \left(t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\left(-1 \cdot \frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot t\_2}\right) \cdot \frac{y-scale}{\cos t\_0}\right)\right)}{\pi}\\
\end{array}
if a < 2.9000000000000001e150Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites43.7%
Applied rewrites43.7%
if 2.9000000000000001e150 < a Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 1/180 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* (* 1/180 angle) PI))
(t_3 (cos t_0)))
(if (<=
(fabs a)
3971269629433431/22062609052407949194914912829723655182432452436340449411589077584864795549696863280514640007775234351335139574205343723266588256764674929278332446003804266456490594464708719691973688066349246310341854370928394768482304)
(*
180
(/
(atan
(*
-1/2
(/
(* y-scale (+ 2 (* -1/16200 (* (pow angle 2) (pow PI 2)))))
(* x-scale (* t_3 t_1)))))
PI))
(if (<=
(fabs a)
1699999999999999912907609170973020012775018432251201871731878125713115669634488652511760448142731708872264698920231792191774834493090941696901612830720)
(*
180
(/
(atan
(*
-1/2
(/
(*
y-scale
(+ (sqrt (pow t_3 4)) (- 1/2 (* -1/2 (cos (* t_2 2))))))
(* x-scale (* t_3 (sin (* PI (* 1/180 angle))))))))
PI))
(*
180
(/
(atan
(*
-1/2
(*
(*
-1
(/
(- 1/2 (* 1/2 (cos (* 1/90 (* angle PI)))))
(* x-scale t_1)))
(/ y-scale (cos t_2)))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_3 = cos(t_0);
double tmp;
if (fabs(a) <= 1.8e-202) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / (x_45_scale * (t_3 * t_1))))) / ((double) M_PI));
} else if (fabs(a) <= 1.7e+150) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_3, 4.0)) + (0.5 - (-0.5 * cos((t_2 * 2.0)))))) / (x_45_scale * (t_3 * sin((((double) M_PI) * (0.005555555555555556 * angle)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (x_45_scale * t_1))) * (y_45_scale / cos(t_2))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double t_2 = (0.005555555555555556 * angle) * Math.PI;
double t_3 = Math.cos(t_0);
double tmp;
if (Math.abs(a) <= 1.8e-202) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (Math.pow(angle, 2.0) * Math.pow(Math.PI, 2.0))))) / (x_45_scale * (t_3 * t_1))))) / Math.PI);
} else if (Math.abs(a) <= 1.7e+150) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_3, 4.0)) + (0.5 - (-0.5 * Math.cos((t_2 * 2.0)))))) / (x_45_scale * (t_3 * Math.sin((Math.PI * (0.005555555555555556 * angle)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (x_45_scale * t_1))) * (y_45_scale / Math.cos(t_2))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) t_2 = (0.005555555555555556 * angle) * math.pi t_3 = math.cos(t_0) tmp = 0 if math.fabs(a) <= 1.8e-202: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (math.pow(angle, 2.0) * math.pow(math.pi, 2.0))))) / (x_45_scale * (t_3 * t_1))))) / math.pi) elif math.fabs(a) <= 1.7e+150: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_3, 4.0)) + (0.5 - (-0.5 * math.cos((t_2 * 2.0)))))) / (x_45_scale * (t_3 * math.sin((math.pi * (0.005555555555555556 * angle)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (x_45_scale * t_1))) * (y_45_scale / math.cos(t_2))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = Float64(Float64(0.005555555555555556 * angle) * pi) t_3 = cos(t_0) tmp = 0.0 if (abs(a) <= 1.8e-202) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / Float64(x_45_scale * Float64(t_3 * t_1))))) / pi)); elseif (abs(a) <= 1.7e+150) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_3 ^ 4.0)) + Float64(0.5 - Float64(-0.5 * cos(Float64(t_2 * 2.0)))))) / Float64(x_45_scale * Float64(t_3 * sin(Float64(pi * Float64(0.005555555555555556 * angle)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(x_45_scale * t_1))) * Float64(y_45_scale / cos(t_2))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); t_2 = (0.005555555555555556 * angle) * pi; t_3 = cos(t_0); tmp = 0.0; if (abs(a) <= 1.8e-202) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle ^ 2.0) * (pi ^ 2.0))))) / (x_45_scale * (t_3 * t_1))))) / pi); elseif (abs(a) <= 1.7e+150) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_3 ^ 4.0)) + (0.5 - (-0.5 * cos((t_2 * 2.0)))))) / (x_45_scale * (t_3 * sin((pi * (0.005555555555555556 * angle)))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (x_45_scale * t_1))) * (y_45_scale / cos(t_2))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 3971269629433431/22062609052407949194914912829723655182432452436340449411589077584864795549696863280514640007775234351335139574205343723266588256764674929278332446003804266456490594464708719691973688066349246310341854370928394768482304], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(2 + N[(-1/16200 * N[(N[Power[angle, 2], $MachinePrecision] * N[Power[Pi, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 1699999999999999912907609170973020012775018432251201871731878125713115669634488652511760448142731708872264698920231792191774834493090941696901612830720], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$3, 4], $MachinePrecision]], $MachinePrecision] + N[(1/2 - N[(-1/2 * N[Cos[N[(t$95$2 * 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$3 * N[Sin[N[(Pi * N[(1/180 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(-1 * N[(N[(1/2 - N[(1/2 * N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \left(\frac{1}{180} \cdot angle\right) \cdot \pi\\
t_3 := \cos t\_0\\
\mathbf{if}\;\left|a\right| \leq \frac{3971269629433431}{22062609052407949194914912829723655182432452436340449411589077584864795549696863280514640007775234351335139574205343723266588256764674929278332446003804266456490594464708719691973688066349246310341854370928394768482304}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 + \frac{-1}{16200} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale \cdot \left(t\_3 \cdot t\_1\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 1699999999999999912907609170973020012775018432251201871731878125713115669634488652511760448142731708872264698920231792191774834493090941696901612830720:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{t\_3}^{4}} + \left(\frac{1}{2} - \frac{-1}{2} \cdot \cos \left(t\_2 \cdot 2\right)\right)\right)}{x-scale \cdot \left(t\_3 \cdot \sin \left(\pi \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\left(-1 \cdot \frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot t\_1}\right) \cdot \frac{y-scale}{\cos t\_2}\right)\right)}{\pi}\\
\end{array}
if a < 1.8000000000000001e-202Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
if 1.8000000000000001e-202 < a < 1.6999999999999999e150Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
lift-pow.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
cos-neg-revN/A
lift-cos.f64N/A
Applied rewrites44.1%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f6443.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.6%
Applied rewrites43.6%
if 1.6999999999999999e150 < a Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* PI (* 1/180 angle)))
(t_1 (* (* 1/180 angle) PI))
(t_2 (sin (* 1/180 (* angle PI)))))
(if (<=
(fabs a)
2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048)
(*
180
(/
(atan
(*
-1/2
(/
(*
(+
(- 1/2 (* (cos (* t_0 2)) -1/2))
(sqrt (pow (cos t_0) 4)))
y-scale)
(* x-scale (* (sin (+ (- t_1) (/ PI 2))) t_2)))))
PI))
(*
180
(/
(atan
(*
-1/2
(*
(*
-1
(/
(- 1/2 (* 1/2 (cos (* 1/90 (* angle PI)))))
(* x-scale t_2)))
(/ y-scale (cos t_1)))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_2 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (fabs(a) <= 2.9e+150) {
tmp = 180.0 * (atan((-0.5 * ((((0.5 - (cos((t_0 * 2.0)) * -0.5)) + sqrt(pow(cos(t_0), 4.0))) * y_45_scale) / (x_45_scale * (sin((-t_1 + (((double) M_PI) / 2.0))) * t_2))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (x_45_scale * t_2))) * (y_45_scale / cos(t_1))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = Math.PI * (0.005555555555555556 * angle);
double t_1 = (0.005555555555555556 * angle) * Math.PI;
double t_2 = Math.sin((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (Math.abs(a) <= 2.9e+150) {
tmp = 180.0 * (Math.atan((-0.5 * ((((0.5 - (Math.cos((t_0 * 2.0)) * -0.5)) + Math.sqrt(Math.pow(Math.cos(t_0), 4.0))) * y_45_scale) / (x_45_scale * (Math.sin((-t_1 + (Math.PI / 2.0))) * t_2))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (x_45_scale * t_2))) * (y_45_scale / Math.cos(t_1))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = math.pi * (0.005555555555555556 * angle) t_1 = (0.005555555555555556 * angle) * math.pi t_2 = math.sin((0.005555555555555556 * (angle * math.pi))) tmp = 0 if math.fabs(a) <= 2.9e+150: tmp = 180.0 * (math.atan((-0.5 * ((((0.5 - (math.cos((t_0 * 2.0)) * -0.5)) + math.sqrt(math.pow(math.cos(t_0), 4.0))) * y_45_scale) / (x_45_scale * (math.sin((-t_1 + (math.pi / 2.0))) * t_2))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (x_45_scale * t_2))) * (y_45_scale / math.cos(t_1))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(pi * Float64(0.005555555555555556 * angle)) t_1 = Float64(Float64(0.005555555555555556 * angle) * pi) t_2 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (abs(a) <= 2.9e+150) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(Float64(0.5 - Float64(cos(Float64(t_0 * 2.0)) * -0.5)) + sqrt((cos(t_0) ^ 4.0))) * y_45_scale) / Float64(x_45_scale * Float64(sin(Float64(Float64(-t_1) + Float64(pi / 2.0))) * t_2))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(x_45_scale * t_2))) * Float64(y_45_scale / cos(t_1))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = pi * (0.005555555555555556 * angle); t_1 = (0.005555555555555556 * angle) * pi; t_2 = sin((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (abs(a) <= 2.9e+150) tmp = 180.0 * (atan((-0.5 * ((((0.5 - (cos((t_0 * 2.0)) * -0.5)) + sqrt((cos(t_0) ^ 4.0))) * y_45_scale) / (x_45_scale * (sin((-t_1 + (pi / 2.0))) * t_2))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (x_45_scale * t_2))) * (y_45_scale / cos(t_1))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(Pi * N[(1/180 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(N[(N[(1/2 - N[(N[Cos[N[(t$95$0 * 2), $MachinePrecision]], $MachinePrecision] * -1/2), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[N[Cos[t$95$0], $MachinePrecision], 4], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(x$45$scale * N[(N[Sin[N[((-t$95$1) + N[(Pi / 2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(-1 * N[(N[(1/2 - N[(1/2 * N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \pi \cdot \left(\frac{1}{180} \cdot angle\right)\\
t_1 := \left(\frac{1}{180} \cdot angle\right) \cdot \pi\\
t_2 := \sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;\left|a\right| \leq 2900000000000000107961941866579936686259904815488944729533684104093453888725962706275104804501574089084822385368712666949211755170394406495162149634048:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{\left(\left(\frac{1}{2} - \cos \left(t\_0 \cdot 2\right) \cdot \frac{-1}{2}\right) + \sqrt{{\cos t\_0}^{4}}\right) \cdot y-scale}{x-scale \cdot \left(\sin \left(\left(-t\_1\right) + \frac{\pi}{2}\right) \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\left(-1 \cdot \frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot t\_2}\right) \cdot \frac{y-scale}{\cos t\_1}\right)\right)}{\pi}\\
\end{array}
if a < 2.9000000000000001e150Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites44.1%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites43.7%
Applied rewrites43.5%
if 2.9000000000000001e150 < a Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 1/180 (* angle PI))) (t_1 (sin t_0)))
(if (<=
(fabs a)
5736278353626067/44125218104815898389829825659447310364864904872680898823178155169729591099393726561029280015550468702670279148410687446533176513529349858556664892007608532912981188929417439383947376132698492620683708741856789536964608)
(*
180
(/
(atan
(*
-1/2
(/
(* y-scale (+ 2 (* -1/16200 (* (pow angle 2) (pow PI 2)))))
(* x-scale (* (cos t_0) t_1)))))
PI))
(if (<=
(fabs a)
40999999999999997839159965741444279295869417591640676449979453405807028869287387332608)
(*
180
(/
(atan
(*
-1/2
(/
(* y-scale (+ (sqrt (pow 1 4)) (pow 1 2)))
(* x-scale (* 1 t_1)))))
PI))
(*
180
(/
(atan
(*
-1/2
(*
(*
-1
(/
(- 1/2 (* 1/2 (cos (* 1/90 (* angle PI)))))
(* x-scale t_1)))
(/ y-scale (cos (* (* 1/180 angle) PI))))))
PI))))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double tmp;
if (fabs(a) <= 1.3e-202) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.0))))) / (x_45_scale * (cos(t_0) * t_1))))) / ((double) M_PI));
} else if (fabs(a) <= 4.1e+85) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(1.0, 4.0)) + pow(1.0, 2.0))) / (x_45_scale * (1.0 * t_1))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI)))))) / (x_45_scale * t_1))) * (y_45_scale / cos(((0.005555555555555556 * angle) * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double tmp;
if (Math.abs(a) <= 1.3e-202) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (Math.pow(angle, 2.0) * Math.pow(Math.PI, 2.0))))) / (x_45_scale * (Math.cos(t_0) * t_1))))) / Math.PI);
} else if (Math.abs(a) <= 4.1e+85) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(1.0, 4.0)) + Math.pow(1.0, 2.0))) / (x_45_scale * (1.0 * t_1))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI))))) / (x_45_scale * t_1))) * (y_45_scale / Math.cos(((0.005555555555555556 * angle) * Math.PI)))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = math.sin(t_0) tmp = 0 if math.fabs(a) <= 1.3e-202: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * (math.pow(angle, 2.0) * math.pow(math.pi, 2.0))))) / (x_45_scale * (math.cos(t_0) * t_1))))) / math.pi) elif math.fabs(a) <= 4.1e+85: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(1.0, 4.0)) + math.pow(1.0, 2.0))) / (x_45_scale * (1.0 * t_1))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi))))) / (x_45_scale * t_1))) * (y_45_scale / math.cos(((0.005555555555555556 * angle) * math.pi)))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) tmp = 0.0 if (abs(a) <= 1.3e-202) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / Float64(x_45_scale * Float64(cos(t_0) * t_1))))) / pi)); elseif (abs(a) <= 4.1e+85) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((1.0 ^ 4.0)) + (1.0 ^ 2.0))) / Float64(x_45_scale * Float64(1.0 * t_1))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi))))) / Float64(x_45_scale * t_1))) * Float64(y_45_scale / cos(Float64(Float64(0.005555555555555556 * angle) * pi)))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = sin(t_0); tmp = 0.0; if (abs(a) <= 1.3e-202) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (2.0 + (-6.17283950617284e-5 * ((angle ^ 2.0) * (pi ^ 2.0))))) / (x_45_scale * (cos(t_0) * t_1))))) / pi); elseif (abs(a) <= 4.1e+85) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((1.0 ^ 4.0)) + (1.0 ^ 2.0))) / (x_45_scale * (1.0 * t_1))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi))))) / (x_45_scale * t_1))) * (y_45_scale / cos(((0.005555555555555556 * angle) * pi)))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 5736278353626067/44125218104815898389829825659447310364864904872680898823178155169729591099393726561029280015550468702670279148410687446533176513529349858556664892007608532912981188929417439383947376132698492620683708741856789536964608], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(2 + N[(-1/16200 * N[(N[Power[angle, 2], $MachinePrecision] * N[Power[Pi, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 40999999999999997839159965741444279295869417591640676449979453405807028869287387332608], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[1, 4], $MachinePrecision]], $MachinePrecision] + N[Power[1, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(-1 * N[(N[(1/2 - N[(1/2 * N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / N[Cos[N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;\left|a\right| \leq \frac{5736278353626067}{44125218104815898389829825659447310364864904872680898823178155169729591099393726561029280015550468702670279148410687446533176513529349858556664892007608532912981188929417439383947376132698492620683708741856789536964608}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 + \frac{-1}{16200} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{x-scale \cdot \left(\cos t\_0 \cdot t\_1\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 40999999999999997839159965741444279295869417591640676449979453405807028869287387332608:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(\sqrt{{1}^{4}} + {1}^{2}\right)}{x-scale \cdot \left(1 \cdot t\_1\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\left(-1 \cdot \frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot t\_1}\right) \cdot \frac{y-scale}{\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
if a < 1.3e-202Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-pow.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
if 1.3e-202 < a < 4.0999999999999998e85Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
Applied rewrites43.9%
Taylor expanded in angle around 0
Applied rewrites43.8%
Taylor expanded in angle around 0
Applied rewrites43.7%
if 4.0999999999999998e85 < a Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (/ y-scale (cos (* (* 1/180 angle) PI))))
(t_1 (cos (* 1/90 (* angle PI))))
(t_2 (* x-scale (sin (* 1/180 (* angle PI))))))
(if (<=
(fabs a)
29499999999999999942029727796120104892334941046160218484639498723436284346368000)
(*
180
(/ (atan (* -1/2 (* (/ (- 1/2 (* -1/2 t_1)) t_2) t_0))) PI))
(*
180
(/
(atan (* -1/2 (* (* -1 (/ (- 1/2 (* 1/2 t_1)) t_2)) t_0)))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = y_45_scale / cos(((0.005555555555555556 * angle) * ((double) M_PI)));
double t_1 = cos((0.011111111111111112 * (angle * ((double) M_PI))));
double t_2 = x_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (fabs(a) <= 2.95e+79) {
tmp = 180.0 * (atan((-0.5 * (((0.5 - (-0.5 * t_1)) / t_2) * t_0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * t_1)) / t_2)) * t_0))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = y_45_scale / Math.cos(((0.005555555555555556 * angle) * Math.PI));
double t_1 = Math.cos((0.011111111111111112 * (angle * Math.PI)));
double t_2 = x_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)));
double tmp;
if (Math.abs(a) <= 2.95e+79) {
tmp = 180.0 * (Math.atan((-0.5 * (((0.5 - (-0.5 * t_1)) / t_2) * t_0))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * t_1)) / t_2)) * t_0))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = y_45_scale / math.cos(((0.005555555555555556 * angle) * math.pi)) t_1 = math.cos((0.011111111111111112 * (angle * math.pi))) t_2 = x_45_scale * math.sin((0.005555555555555556 * (angle * math.pi))) tmp = 0 if math.fabs(a) <= 2.95e+79: tmp = 180.0 * (math.atan((-0.5 * (((0.5 - (-0.5 * t_1)) / t_2) * t_0))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * t_1)) / t_2)) * t_0))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(y_45_scale / cos(Float64(Float64(0.005555555555555556 * angle) * pi))) t_1 = cos(Float64(0.011111111111111112 * Float64(angle * pi))) t_2 = Float64(x_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) tmp = 0.0 if (abs(a) <= 2.95e+79) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(0.5 - Float64(-0.5 * t_1)) / t_2) * t_0))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(0.5 - Float64(0.5 * t_1)) / t_2)) * t_0))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = y_45_scale / cos(((0.005555555555555556 * angle) * pi)); t_1 = cos((0.011111111111111112 * (angle * pi))); t_2 = x_45_scale * sin((0.005555555555555556 * (angle * pi))); tmp = 0.0; if (abs(a) <= 2.95e+79) tmp = 180.0 * (atan((-0.5 * (((0.5 - (-0.5 * t_1)) / t_2) * t_0))) / pi); else tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((0.5 - (0.5 * t_1)) / t_2)) * t_0))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(y$45$scale / N[Cos[N[(N[(1/180 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(x$45$scale * N[Sin[N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 29499999999999999942029727796120104892334941046160218484639498723436284346368000], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(N[(1/2 - N[(-1/2 * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(-1 * N[(N[(1/2 - N[(1/2 * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \frac{y-scale}{\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}\\
t_1 := \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\\
t_2 := x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;\left|a\right| \leq 29499999999999999942029727796120104892334941046160218484639498723436284346368000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{\frac{1}{2} - \frac{-1}{2} \cdot t\_1}{t\_2} \cdot t\_0\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\left(-1 \cdot \frac{\frac{1}{2} - \frac{1}{2} \cdot t\_1}{t\_2}\right) \cdot t\_0\right)\right)}{\pi}\\
\end{array}
if a < 2.95e79Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites39.9%
if 2.95e79 < a Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Applied rewrites28.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites31.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 1/180 (* angle PI)))
(t_1 (* x-scale (* (cos t_0) (sin t_0)))))
(if (<=
(fabs b)
6521557777124079/6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152)
(*
180
(/
(atan
(*
1/2
(/
(* y-scale (- 1/2 (* 1/2 (cos (* 1/90 (* angle PI))))))
t_1)))
PI))
(* 180 (/ (atan (* -1/2 (/ (* y-scale 2) t_1))) PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = x_45_scale * (cos(t_0) * sin(t_0));
double tmp;
if (fabs(b) <= 9.5e-142) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (0.5 - (0.5 * cos((0.011111111111111112 * (angle * ((double) M_PI))))))) / t_1))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = x_45_scale * (Math.cos(t_0) * Math.sin(t_0));
double tmp;
if (Math.abs(b) <= 9.5e-142) {
tmp = 180.0 * (Math.atan((0.5 * ((y_45_scale * (0.5 - (0.5 * Math.cos((0.011111111111111112 * (angle * Math.PI)))))) / t_1))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) t_1 = x_45_scale * (math.cos(t_0) * math.sin(t_0)) tmp = 0 if math.fabs(b) <= 9.5e-142: tmp = 180.0 * (math.atan((0.5 * ((y_45_scale * (0.5 - (0.5 * math.cos((0.011111111111111112 * (angle * math.pi)))))) / t_1))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(x_45_scale * Float64(cos(t_0) * sin(t_0))) tmp = 0.0 if (abs(b) <= 9.5e-142) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(y_45_scale * Float64(0.5 - Float64(0.5 * cos(Float64(0.011111111111111112 * Float64(angle * pi)))))) / t_1))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / t_1))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); t_1 = x_45_scale * (cos(t_0) * sin(t_0)); tmp = 0.0; if (abs(b) <= 9.5e-142) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (0.5 - (0.5 * cos((0.011111111111111112 * (angle * pi)))))) / t_1))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 6521557777124079/6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152], N[(180 * N[(N[ArcTan[N[(1/2 * N[(N[(y$45$scale * N[(1/2 - N[(1/2 * N[Cos[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * 2), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
t_1 := x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)\\
\mathbf{if}\;\left|b\right| \leq \frac{6521557777124079}{6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{2} \cdot \frac{y-scale \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\right)}{t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot 2}{t\_1}\right)}{\pi}\\
\end{array}
if b < 9.4999999999999997e-142Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Applied rewrites24.4%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites30.4%
if 9.4999999999999997e-142 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
Applied rewrites43.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 1/180 (* angle PI))))
(if (<=
(fabs b)
500000000000000025277713862997516907114118515401501639510240737361116381988542702912116688552531109626208556618350592)
(*
180
(/
(atan
(*
-90
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1 (pow x-scale 4))) (/ 1 (pow x-scale 2)))))
(* angle PI))))
PI))
(*
180
(/
(atan
(* -1/2 (/ (* y-scale 2) (* x-scale (* (cos t_0) (sin t_0))))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (fabs(b) <= 5e+116) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / pow(x_45_scale, 4.0))) + (1.0 / pow(x_45_scale, 2.0))))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (Math.abs(b) <= 5e+116) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt((1.0 / Math.pow(x_45_scale, 4.0))) + (1.0 / Math.pow(x_45_scale, 2.0))))) / (angle * Math.PI)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (Math.cos(t_0) * Math.sin(t_0)))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if math.fabs(b) <= 5e+116: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt((1.0 / math.pow(x_45_scale, 4.0))) + (1.0 / math.pow(x_45_scale, 2.0))))) / (angle * math.pi)))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (math.cos(t_0) * math.sin(t_0)))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (abs(b) <= 5e+116) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(1.0 / (x_45_scale ^ 4.0))) + Float64(1.0 / (x_45_scale ^ 2.0))))) / Float64(angle * pi)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / Float64(x_45_scale * Float64(cos(t_0) * sin(t_0)))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (abs(b) <= 5e+116) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((1.0 / (x_45_scale ^ 4.0))) + (1.0 / (x_45_scale ^ 2.0))))) / (angle * pi)))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 500000000000000025277713862997516907114118515401501639510240737361116381988542702912116688552531109626208556618350592], N[(180 * N[(N[ArcTan[N[(-90 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1 / N[Power[x$45$scale, 4], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1 / N[Power[x$45$scale, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * 2), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|b\right| \leq 500000000000000025277713862997516907114118515401501639510240737361116381988542702912116688552531109626208556618350592:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{\frac{1}{{x-scale}^{4}}} + \frac{1}{{x-scale}^{2}}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot 2}{x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)}\right)}{\pi}\\
\end{array}
if b < 5.0000000000000003e116Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites11.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
if 5.0000000000000003e116 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
Applied rewrites43.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 1/180 (* angle PI))))
(if (<=
(fabs b)
2453517582613197/15829145694278690179872161345257420162248406342477557754500035589945422406818039498900249667919554879334250971265032917718487362195632077437922953926521162746662833417516744704)
(*
180
(/
(atan
(*
90
(*
x-scale
(* -1 (/ y-scale (* angle (* (pow x-scale 2) PI)))))))
PI))
(*
180
(/
(atan
(* -1/2 (/ (* y-scale 2) (* x-scale (* (cos t_0) (sin t_0))))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (fabs(b) <= 1.55e-160) {
tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (pow(x_45_scale, 2.0) * ((double) M_PI)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (Math.abs(b) <= 1.55e-160) {
tmp = 180.0 * (Math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (Math.pow(x_45_scale, 2.0) * Math.PI))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (Math.cos(t_0) * Math.sin(t_0)))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if math.fabs(b) <= 1.55e-160: tmp = 180.0 * (math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (math.pow(x_45_scale, 2.0) * math.pi))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (math.cos(t_0) * math.sin(t_0)))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (abs(b) <= 1.55e-160) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(x_45_scale * Float64(-1.0 * Float64(y_45_scale / Float64(angle * Float64((x_45_scale ^ 2.0) * pi))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / Float64(x_45_scale * Float64(cos(t_0) * sin(t_0)))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (abs(b) <= 1.55e-160) tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * ((x_45_scale ^ 2.0) * pi))))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(1/180 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 2453517582613197/15829145694278690179872161345257420162248406342477557754500035589945422406818039498900249667919554879334250971265032917718487362195632077437922953926521162746662833417516744704], N[(180 * N[(N[ArcTan[N[(90 * N[(x$45$scale * N[(-1 * N[(y$45$scale / N[(angle * N[(N[Power[x$45$scale, 2], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(N[(y$45$scale * 2), $MachinePrecision] / N[(x$45$scale * N[(N[Cos[t$95$0], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \frac{1}{180} \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|b\right| \leq \frac{2453517582613197}{15829145694278690179872161345257420162248406342477557754500035589945422406818039498900249667919554879334250971265032917718487362195632077437922953926521162746662833417516744704}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \left(x-scale \cdot \left(-1 \cdot \frac{y-scale}{angle \cdot \left({x-scale}^{2} \cdot \pi\right)}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \frac{y-scale \cdot 2}{x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)}\right)}{\pi}\\
\end{array}
if b < 1.55e-160Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites11.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f6437.6%
Applied rewrites37.6%
if 1.55e-160 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
Applied rewrites43.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<=
(fabs b)
23503115526865/2026130648867672343023636652192949780767796011837127392576004555513014068072709055859231957493703024554784124321924213467966382361040905912054138102594708831572842677442143322112)
(*
180
(/
(atan
(*
90
(*
x-scale
(* -1 (/ y-scale (* angle (* (pow x-scale 2) PI)))))))
PI))
(if (<=
(fabs b)
60000000000000001213132747629356819314565779392861464468266611372480240299889858561521869651968)
(*
180
(/
(atan
(*
-90
(/
(* (pow (fabs b) 2) y-scale)
(*
angle
(* x-scale (* PI (* (+ a (fabs b)) (- (fabs b) a))))))))
PI))
(*
180
(/
(atan (* -1/2 (* 360 (/ y-scale (* angle (* x-scale PI))))))
PI)))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(b) <= 1.16e-164) {
tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (pow(x_45_scale, 2.0) * ((double) M_PI)))))))) / ((double) M_PI));
} else if (fabs(b) <= 6e+94) {
tmp = 180.0 * (atan((-90.0 * ((pow(fabs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (((double) M_PI) * ((a + fabs(b)) * (fabs(b) - a)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (Math.abs(b) <= 1.16e-164) {
tmp = 180.0 * (Math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (Math.pow(x_45_scale, 2.0) * Math.PI))))))) / Math.PI);
} else if (Math.abs(b) <= 6e+94) {
tmp = 180.0 * (Math.atan((-90.0 * ((Math.pow(Math.abs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (Math.PI * ((a + Math.abs(b)) * (Math.abs(b) - a)))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(b) <= 1.16e-164: tmp = 180.0 * (math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (math.pow(x_45_scale, 2.0) * math.pi))))))) / math.pi) elif math.fabs(b) <= 6e+94: tmp = 180.0 * (math.atan((-90.0 * ((math.pow(math.fabs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (math.pi * ((a + math.fabs(b)) * (math.fabs(b) - a)))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(b) <= 1.16e-164) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(x_45_scale * Float64(-1.0 * Float64(y_45_scale / Float64(angle * Float64((x_45_scale ^ 2.0) * pi))))))) / pi)); elseif (abs(b) <= 6e+94) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64((abs(b) ^ 2.0) * y_45_scale) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(Float64(a + abs(b)) * Float64(abs(b) - a)))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(b) <= 1.16e-164) tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * ((x_45_scale ^ 2.0) * pi))))))) / pi); elseif (abs(b) <= 6e+94) tmp = 180.0 * (atan((-90.0 * (((abs(b) ^ 2.0) * y_45_scale) / (angle * (x_45_scale * (pi * ((a + abs(b)) * (abs(b) - a)))))))) / pi); else tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[b], $MachinePrecision], 23503115526865/2026130648867672343023636652192949780767796011837127392576004555513014068072709055859231957493703024554784124321924213467966382361040905912054138102594708831572842677442143322112], N[(180 * N[(N[ArcTan[N[(90 * N[(x$45$scale * N[(-1 * N[(y$45$scale / N[(angle * N[(N[Power[x$45$scale, 2], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 60000000000000001213132747629356819314565779392861464468266611372480240299889858561521869651968], N[(180 * N[(N[ArcTan[N[(-90 * N[(N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(360 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq \frac{23503115526865}{2026130648867672343023636652192949780767796011837127392576004555513014068072709055859231957493703024554784124321924213467966382361040905912054138102594708831572842677442143322112}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \left(x-scale \cdot \left(-1 \cdot \frac{y-scale}{angle \cdot \left({x-scale}^{2} \cdot \pi\right)}\right)\right)\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 60000000000000001213132747629356819314565779392861464468266611372480240299889858561521869651968:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{{\left(\left|b\right|\right)}^{2} \cdot y-scale}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(\left(a + \left|b\right|\right) \cdot \left(\left|b\right| - a\right)\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
if b < 1.16e-164Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites11.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f6437.6%
Applied rewrites37.6%
if 1.16e-164 < b < 6.0000000000000001e94Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites11.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.6%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6423.6%
Applied rewrites23.6%
if 6.0000000000000001e94 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.9%
Applied rewrites37.9%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<=
(fabs b)
25000000000000001156277033976049868500306568098768172122972181800318138438444912730845854970550856282997415612622422647729849422379110449158688002277376)
(*
180
(/
(atan
(*
90
(*
x-scale
(* -1 (/ y-scale (* angle (* (pow x-scale 2) PI)))))))
PI))
(*
180
(/
(atan (* -1/2 (* 360 (/ y-scale (* angle (* x-scale PI))))))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(b) <= 2.5e+151) {
tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (pow(x_45_scale, 2.0) * ((double) M_PI)))))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (Math.abs(b) <= 2.5e+151) {
tmp = 180.0 * (Math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (Math.pow(x_45_scale, 2.0) * Math.PI))))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(b) <= 2.5e+151: tmp = 180.0 * (math.atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * (math.pow(x_45_scale, 2.0) * math.pi))))))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(b) <= 2.5e+151) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(x_45_scale * Float64(-1.0 * Float64(y_45_scale / Float64(angle * Float64((x_45_scale ^ 2.0) * pi))))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(b) <= 2.5e+151) tmp = 180.0 * (atan((90.0 * (x_45_scale * (-1.0 * (y_45_scale / (angle * ((x_45_scale ^ 2.0) * pi))))))) / pi); else tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[b], $MachinePrecision], 25000000000000001156277033976049868500306568098768172122972181800318138438444912730845854970550856282997415612622422647729849422379110449158688002277376], N[(180 * N[(N[ArcTan[N[(90 * N[(x$45$scale * N[(-1 * N[(y$45$scale / N[(angle * N[(N[Power[x$45$scale, 2], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180 * N[(N[ArcTan[N[(-1/2 * N[(360 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 25000000000000001156277033976049868500306568098768172122972181800318138438444912730845854970550856282997415612622422647729849422379110449158688002277376:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \left(x-scale \cdot \left(-1 \cdot \frac{y-scale}{angle \cdot \left({x-scale}^{2} \cdot \pi\right)}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}\\
\end{array}
if b < 2.5000000000000001e151Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites11.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f6437.6%
Applied rewrites37.6%
if 2.5000000000000001e151 < b Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.9%
Applied rewrites37.9%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180 (/ (atan (* -1/2 (* 360 (/ y-scale (* angle (* x-scale PI)))))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI))))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * Math.PI)))))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * math.pi)))))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(360.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi)))))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-0.5 * (360.0 * (y_45_scale / (angle * (x_45_scale * pi)))))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180 * N[(N[ArcTan[N[(-1/2 * N[(360 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(360 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)\right)}{\pi}
Initial program 13.6%
Taylor expanded in x-scale around 0
Applied rewrites24.3%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.1%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.9%
Applied rewrites37.9%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180 (/ (atan (* -90 (/ y-scale (* angle (* x-scale PI))))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-90.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180 * N[(N[ArcTan[N[(-90 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}
Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites11.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6434.6%
Applied rewrites34.6%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180 (/ (atan (* -90 (/ x-scale (* angle (* y-scale PI))))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-90.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-90.0 * (x_45_scale / (angle * (y_45_scale * Math.PI))))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-90.0 * (x_45_scale / (angle * (y_45_scale * math.pi))))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi))))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-90.0 * (x_45_scale / (angle * (y_45_scale * pi))))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180 * N[(N[ArcTan[N[(-90 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi}
Initial program 13.6%
Taylor expanded in angle around 0
Applied rewrites11.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites12.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6411.9%
Applied rewrites11.9%
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (a b angle x-scale y-scale)
:name "raw-angle from scale-rotated-ellipse"
:precision binary64
(* 180 (/ (atan (/ (- (- (/ (/ (+ (pow (* a (cos (* (/ angle 180) PI))) 2) (pow (* b (sin (* (/ angle 180) PI))) 2)) y-scale) y-scale) (/ (/ (+ (pow (* a (sin (* (/ angle 180) PI))) 2) (pow (* b (cos (* (/ angle 180) PI))) 2)) x-scale) x-scale)) (sqrt (+ (pow (- (/ (/ (+ (pow (* a (sin (* (/ angle 180) PI))) 2) (pow (* b (cos (* (/ angle 180) PI))) 2)) x-scale) x-scale) (/ (/ (+ (pow (* a (cos (* (/ angle 180) PI))) 2) (pow (* b (sin (* (/ angle 180) PI))) 2)) y-scale) y-scale)) 2) (pow (/ (/ (* (* (* 2 (- (pow b 2) (pow a 2))) (sin (* (/ angle 180) PI))) (cos (* (/ angle 180) PI))) x-scale) y-scale) 2)))) (/ (/ (* (* (* 2 (- (pow b 2) (pow a 2))) (sin (* (/ angle 180) PI))) (cos (* (/ angle 180) PI))) x-scale) y-scale))) PI)))