
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI))
(t_1 (cos t_0))
(t_2 (sin t_0))
(t_3
(/
(/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
y-scale))
(t_4
(/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
(t_5
(/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
(*
180.0
(/
(atan
(/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = (angle / 180.0) * Math.PI;
double t_1 = Math.cos(t_0);
double t_2 = Math.sin(t_0);
double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (angle / 180.0) * math.pi t_1 = math.cos(t_0) t_2 = math.sin(t_0) t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(angle / 180.0) * pi) t_1 = cos(t_0) t_2 = sin(t_0) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale) t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale) t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale) return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) t_0 = (angle / 180.0) * pi; t_1 = cos(t_0); t_2 = sin(t_0); t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale; t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale; t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale; tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
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 (* (* 0.005555555555555556 angle) PI))
(t_1 (pow (fabs b) 2.0))
(t_2 (sin (fma (* 0.005555555555555556 angle) PI (/ PI 2.0))))
(t_3 (cos (* t_0 2.0)))
(t_4
(fma
(* (fma t_3 0.5 0.5) (fabs b))
(fabs b)
(* (* (- 0.5 (* t_3 0.5)) a) a)))
(t_5 (* 0.005555555555555556 (* angle PI)))
(t_6 (cos t_5))
(t_7 (sin t_5))
(t_8 (* t_6 t_7))
(t_9
(*
180.0
(/
(atan
(*
-0.5
(/
(*
-1.0
(/ (* y-scale (+ (sqrt (pow t_7 4.0)) (pow t_7 2.0))) x-scale))
t_8)))
PI))))
(if (<= (fabs b) 1.2e-104)
t_9
(if (<= (fabs b) 1.3e+47)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+
(sqrt (* (pow (fabs b) 4.0) (pow t_6 4.0)))
(* t_1 (pow t_6 2.0))))
(* t_1 (* x-scale t_8)))))
PI))
(if (<= (fabs b) 2.15e+79)
t_9
(if (<= (fabs b) 1.45e+144)
(/
(*
180.0
(atan
(*
(*
y-scale
(/
(+ (fabs t_4) t_4)
(*
(* x-scale (cos t_0))
(* (- (fabs b) a) (* (+ (fabs b) a) (sin t_0))))))
-0.5)))
PI)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_2 t_7)))))
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 = pow(fabs(b), 2.0);
double t_2 = sin(fma((0.005555555555555556 * angle), ((double) M_PI), (((double) M_PI) / 2.0)));
double t_3 = cos((t_0 * 2.0));
double t_4 = fma((fma(t_3, 0.5, 0.5) * fabs(b)), fabs(b), (((0.5 - (t_3 * 0.5)) * a) * a));
double t_5 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_6 = cos(t_5);
double t_7 = sin(t_5);
double t_8 = t_6 * t_7;
double t_9 = 180.0 * (atan((-0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_7, 4.0)) + pow(t_7, 2.0))) / x_45_scale)) / t_8))) / ((double) M_PI));
double tmp;
if (fabs(b) <= 1.2e-104) {
tmp = t_9;
} else if (fabs(b) <= 1.3e+47) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((pow(fabs(b), 4.0) * pow(t_6, 4.0))) + (t_1 * pow(t_6, 2.0)))) / (t_1 * (x_45_scale * t_8))))) / ((double) M_PI));
} else if (fabs(b) <= 2.15e+79) {
tmp = t_9;
} else if (fabs(b) <= 1.45e+144) {
tmp = (180.0 * atan(((y_45_scale * ((fabs(t_4) + t_4) / ((x_45_scale * cos(t_0)) * ((fabs(b) - a) * ((fabs(b) + a) * sin(t_0)))))) * -0.5))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_2 * t_7))))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = abs(b) ^ 2.0 t_2 = sin(fma(Float64(0.005555555555555556 * angle), pi, Float64(pi / 2.0))) t_3 = cos(Float64(t_0 * 2.0)) t_4 = fma(Float64(fma(t_3, 0.5, 0.5) * abs(b)), abs(b), Float64(Float64(Float64(0.5 - Float64(t_3 * 0.5)) * a) * a)) t_5 = Float64(0.005555555555555556 * Float64(angle * pi)) t_6 = cos(t_5) t_7 = sin(t_5) t_8 = Float64(t_6 * t_7) t_9 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_7 ^ 4.0)) + (t_7 ^ 2.0))) / x_45_scale)) / t_8))) / pi)) tmp = 0.0 if (abs(b) <= 1.2e-104) tmp = t_9; elseif (abs(b) <= 1.3e+47) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt(Float64((abs(b) ^ 4.0) * (t_6 ^ 4.0))) + Float64(t_1 * (t_6 ^ 2.0)))) / Float64(t_1 * Float64(x_45_scale * t_8))))) / pi)); elseif (abs(b) <= 2.15e+79) tmp = t_9; elseif (abs(b) <= 1.45e+144) tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * Float64(Float64(abs(t_4) + t_4) / Float64(Float64(x_45_scale * cos(t_0)) * Float64(Float64(abs(b) - a) * Float64(Float64(abs(b) + a) * sin(t_0)))))) * -0.5))) / pi); else 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(t_2 * t_7))))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 * 0.5 + 0.5), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision] + N[(N[(N[(0.5 - N[(t$95$3 * 0.5), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Cos[t$95$5], $MachinePrecision]}, Block[{t$95$7 = N[Sin[t$95$5], $MachinePrecision]}, Block[{t$95$8 = N[(t$95$6 * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$7, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$7, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$8), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 1.2e-104], t$95$9, If[LessEqual[N[Abs[b], $MachinePrecision], 1.3e+47], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[(N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision] * N[Power[t$95$6, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 * N[Power[t$95$6, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[(x$45$scale * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 2.15e+79], t$95$9, If[LessEqual[N[Abs[b], $MachinePrecision], 1.45e+144], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[(N[(N[Abs[t$95$4], $MachinePrecision] + t$95$4), $MachinePrecision] / N[(N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[(N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := {\left(\left|b\right|\right)}^{2}\\
t_2 := \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\\
t_3 := \cos \left(t\_0 \cdot 2\right)\\
t_4 := \mathsf{fma}\left(\mathsf{fma}\left(t\_3, 0.5, 0.5\right) \cdot \left|b\right|, \left|b\right|, \left(\left(0.5 - t\_3 \cdot 0.5\right) \cdot a\right) \cdot a\right)\\
t_5 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_6 := \cos t\_5\\
t_7 := \sin t\_5\\
t_8 := t\_6 \cdot t\_7\\
t_9 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_7}^{4}} + {t\_7}^{2}\right)}{x-scale}}{t\_8}\right)}{\pi}\\
\mathbf{if}\;\left|b\right| \leq 1.2 \cdot 10^{-104}:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;\left|b\right| \leq 1.3 \cdot 10^{+47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4} \cdot {t\_6}^{4}} + t\_1 \cdot {t\_6}^{2}\right)}{t\_1 \cdot \left(x-scale \cdot t\_8\right)}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 2.15 \cdot 10^{+79}:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;\left|b\right| \leq 1.45 \cdot 10^{+144}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\left(y-scale \cdot \frac{\left|t\_4\right| + t\_4}{\left(x-scale \cdot \cos t\_0\right) \cdot \left(\left(\left|b\right| - a\right) \cdot \left(\left(\left|b\right| + a\right) \cdot \sin t\_0\right)\right)}\right) \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_2 \cdot t\_7\right)}\right)}{\pi}\\
\end{array}
if b < 1.2e-104 or 1.30000000000000002e47 < b < 2.1500000000000002e79Initial program 14.1%
Taylor expanded in a around inf
Applied rewrites18.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites38.3%
if 1.2e-104 < b < 1.30000000000000002e47Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in a around 0
lower-/.f64N/A
Applied rewrites18.9%
if 2.1500000000000002e79 < b < 1.44999999999999999e144Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites28.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
lower-*.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sin.f6431.4%
Applied rewrites31.4%
if 1.44999999999999999e144 < b Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f6442.8%
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f6442.8%
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f6443.4%
Applied rewrites43.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (sin (fma (fabs (* PI angle)) 0.005555555555555556 (/ PI 2.0))))
(t_1 (* 0.005555555555555556 (* angle PI)))
(t_2 (sin t_1))
(t_3 (cos t_1))
(t_4 (* t_3 t_2))
(t_5 (pow (fabs b) 2.0)))
(if (<= (fabs b) 1.2e-104)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
-1.0
(/ (* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0))) x-scale))
t_4)))
PI))
(if (<= (fabs b) 1.15e+44)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+
(sqrt (* (pow (fabs b) 4.0) (pow t_3 4.0)))
(* t_5 (pow t_3 2.0))))
(* t_5 (* x-scale t_4)))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_0 4.0)) (pow t_0 2.0)))
(* 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(fma(fabs((((double) M_PI) * angle)), 0.005555555555555556, (((double) M_PI) / 2.0)));
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_2 = sin(t_1);
double t_3 = cos(t_1);
double t_4 = t_3 * t_2;
double t_5 = pow(fabs(b), 2.0);
double tmp;
if (fabs(b) <= 1.2e-104) {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / x_45_scale)) / t_4))) / ((double) M_PI));
} else if (fabs(b) <= 1.15e+44) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((pow(fabs(b), 4.0) * pow(t_3, 4.0))) + (t_5 * pow(t_3, 2.0)))) / (t_5 * (x_45_scale * t_4))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_0, 4.0)) + pow(t_0, 2.0))) / (x_45_scale * (t_0 * t_2))))) / ((double) M_PI));
}
return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = sin(fma(abs(Float64(pi * angle)), 0.005555555555555556, Float64(pi / 2.0))) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) t_2 = sin(t_1) t_3 = cos(t_1) t_4 = Float64(t_3 * t_2) t_5 = abs(b) ^ 2.0 tmp = 0.0 if (abs(b) <= 1.2e-104) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / x_45_scale)) / t_4))) / pi)); elseif (abs(b) <= 1.15e+44) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt(Float64((abs(b) ^ 4.0) * (t_3 ^ 4.0))) + Float64(t_5 * (t_3 ^ 2.0)))) / Float64(t_5 * Float64(x_45_scale * t_4))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(sqrt((t_0 ^ 4.0)) + (t_0 ^ 2.0))) / Float64(x_45_scale * Float64(t_0 * t_2))))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Sin[N[(N[Abs[N[(Pi * angle), $MachinePrecision]], $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 1.2e-104], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.15e+44], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[(N[Power[N[Abs[b], $MachinePrecision], 4.0], $MachinePrecision] * N[Power[t$95$3, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(t$95$5 * N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$5 * N[(x$45$scale * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$0, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$0, 2.0], $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(\mathsf{fma}\left(\left|\pi \cdot angle\right|, 0.005555555555555556, \frac{\pi}{2}\right)\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \sin t\_1\\
t_3 := \cos t\_1\\
t_4 := t\_3 \cdot t\_2\\
t_5 := {\left(\left|b\right|\right)}^{2}\\
\mathbf{if}\;\left|b\right| \leq 1.2 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale}}{t\_4}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.15 \cdot 10^{+44}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{\left(\left|b\right|\right)}^{4} \cdot {t\_3}^{4}} + t\_5 \cdot {t\_3}^{2}\right)}{t\_5 \cdot \left(x-scale \cdot t\_4\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_0}^{4}} + {t\_0}^{2}\right)}{x-scale \cdot \left(t\_0 \cdot t\_2\right)}\right)}{\pi}\\
\end{array}
if b < 1.2e-104Initial program 14.1%
Taylor expanded in a around inf
Applied rewrites18.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites38.3%
if 1.2e-104 < b < 1.15000000000000002e44Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in a around 0
lower-/.f64N/A
Applied rewrites18.9%
if 1.15000000000000002e44 < b Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
fabs-mulN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fabs.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
fabs-mulN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fabs.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
fabs-mulN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fabs.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (* (* 0.005555555555555556 angle) PI))
(t_3 (cos t_2)))
(if (<= (fabs a) 1.65e-73)
(/
(*
180.0
(atan
(*
(/
(*
(+ (+ 0.5 (* (cos (* t_2 2.0)) 0.5)) (sqrt (pow t_3 4.0)))
y-scale)
(* (* t_3 x-scale) (sin t_2)))
-0.5)))
PI)
(if (<= (fabs a) 4.2e-55)
(*
180.0
(/
(atan
(*
-90.0
(/
(* y-scale (+ (sqrt (pow b 4.0)) (pow b 2.0)))
(* angle (* x-scale (* PI (- (pow b 2.0) (pow (fabs a) 2.0))))))))
PI))
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(* x-scale (* (cos t_0) 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 = cos(t_2);
double tmp;
if (fabs(a) <= 1.65e-73) {
tmp = (180.0 * atan((((((0.5 + (cos((t_2 * 2.0)) * 0.5)) + sqrt(pow(t_3, 4.0))) * y_45_scale) / ((t_3 * x_45_scale) * sin(t_2))) * -0.5))) / ((double) M_PI);
} else if (fabs(a) <= 4.2e-55) {
tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt(pow(b, 4.0)) + pow(b, 2.0))) / (angle * (x_45_scale * (((double) M_PI) * (pow(b, 2.0) - pow(fabs(a), 2.0)))))))) / ((double) M_PI));
} else {
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));
}
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.65e-73) {
tmp = (180.0 * Math.atan((((((0.5 + (Math.cos((t_2 * 2.0)) * 0.5)) + Math.sqrt(Math.pow(t_3, 4.0))) * y_45_scale) / ((t_3 * x_45_scale) * Math.sin(t_2))) * -0.5))) / Math.PI;
} else if (Math.abs(a) <= 4.2e-55) {
tmp = 180.0 * (Math.atan((-90.0 * ((y_45_scale * (Math.sqrt(Math.pow(b, 4.0)) + Math.pow(b, 2.0))) / (angle * (x_45_scale * (Math.PI * (Math.pow(b, 2.0) - Math.pow(Math.abs(a), 2.0)))))))) / Math.PI);
} else {
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);
}
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.65e-73: tmp = (180.0 * math.atan((((((0.5 + (math.cos((t_2 * 2.0)) * 0.5)) + math.sqrt(math.pow(t_3, 4.0))) * y_45_scale) / ((t_3 * x_45_scale) * math.sin(t_2))) * -0.5))) / math.pi elif math.fabs(a) <= 4.2e-55: tmp = 180.0 * (math.atan((-90.0 * ((y_45_scale * (math.sqrt(math.pow(b, 4.0)) + math.pow(b, 2.0))) / (angle * (x_45_scale * (math.pi * (math.pow(b, 2.0) - math.pow(math.fabs(a), 2.0)))))))) / math.pi) else: 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) 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.65e-73) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(Float64(Float64(0.5 + Float64(cos(Float64(t_2 * 2.0)) * 0.5)) + sqrt((t_3 ^ 4.0))) * y_45_scale) / Float64(Float64(t_3 * x_45_scale) * sin(t_2))) * -0.5))) / pi); elseif (abs(a) <= 4.2e-55) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(y_45_scale * Float64(sqrt((b ^ 4.0)) + (b ^ 2.0))) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64((b ^ 2.0) - (abs(a) ^ 2.0)))))))) / pi)); else 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)); 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.65e-73) tmp = (180.0 * atan((((((0.5 + (cos((t_2 * 2.0)) * 0.5)) + sqrt((t_3 ^ 4.0))) * y_45_scale) / ((t_3 * x_45_scale) * sin(t_2))) * -0.5))) / pi; elseif (abs(a) <= 4.2e-55) tmp = 180.0 * (atan((-90.0 * ((y_45_scale * (sqrt((b ^ 4.0)) + (b ^ 2.0))) / (angle * (x_45_scale * (pi * ((b ^ 2.0) - (abs(a) ^ 2.0)))))))) / pi); else 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); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 1.65e-73], N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[(N[(0.5 + N[(N[Cos[N[(t$95$2 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$3, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(N[(t$95$3 * x$45$scale), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 4.2e-55], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[b, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $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]]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_3 := \cos t\_2\\
\mathbf{if}\;\left|a\right| \leq 1.65 \cdot 10^{-73}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(\left(0.5 + \cos \left(t\_2 \cdot 2\right) \cdot 0.5\right) + \sqrt{{t\_3}^{4}}\right) \cdot y-scale}{\left(t\_3 \cdot x-scale\right) \cdot \sin t\_2} \cdot -0.5\right)}{\pi}\\
\mathbf{elif}\;\left|a\right| \leq 4.2 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{y-scale \cdot \left(\sqrt{{b}^{4}} + {b}^{2}\right)}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left({b}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \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}\\
\end{array}
if a < 1.65000000000000002e-73Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Applied rewrites43.2%
if 1.65000000000000002e-73 < a < 4.2000000000000003e-55Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites22.9%
if 4.2000000000000003e-55 < a Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (sin (fma (fabs (* PI angle)) 0.005555555555555556 (/ PI 2.0)))))
(if (<= (fabs b) 1.2e-104)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
-1.0
(/ (* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0))) x-scale))
(* (cos t_0) t_1))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_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 = sin(t_0);
double t_2 = sin(fma(fabs((((double) M_PI) * angle)), 0.005555555555555556, (((double) M_PI) / 2.0)));
double tmp;
if (fabs(b) <= 1.2e-104) {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((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 {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_2 * t_1))))) / ((double) M_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 = sin(fma(abs(Float64(pi * angle)), 0.005555555555555556, Float64(pi / 2.0))) tmp = 0.0 if (abs(b) <= 1.2e-104) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / x_45_scale)) / Float64(cos(t_0) * t_1)))) / pi)); else 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(t_2 * t_1))))) / pi)); end return tmp end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(N[Abs[N[(Pi * angle), $MachinePrecision]], $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 1.2e-104], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \sin \left(\mathsf{fma}\left(\left|\pi \cdot angle\right|, 0.005555555555555556, \frac{\pi}{2}\right)\right)\\
\mathbf{if}\;\left|b\right| \leq 1.2 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale}}{\cos t\_0 \cdot t\_1}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_2 \cdot t\_1\right)}\right)}{\pi}\\
\end{array}
if b < 1.2e-104Initial program 14.1%
Taylor expanded in a around inf
Applied rewrites18.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites38.3%
if 1.2e-104 < b Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
fabs-mulN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fabs.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
fabs-mulN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fabs.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.8%
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
cos-fabs-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
fabs-mulN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fabs.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.8%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0)))
(if (<= (fabs b) 1.2e-104)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
-1.0
(/ (* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0))) x-scale))
(* t_1 t_2))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(* x-scale (* t_1 (sin (* (* 0.005555555555555556 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 = cos(t_0);
double t_2 = sin(t_0);
double tmp;
if (fabs(b) <= 1.2e-104) {
tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / x_45_scale)) / (t_1 * t_2)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (t_1 * sin(((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.cos(t_0);
double t_2 = Math.sin(t_0);
double tmp;
if (Math.abs(b) <= 1.2e-104) {
tmp = 180.0 * (Math.atan((-0.5 * ((-1.0 * ((y_45_scale * (Math.sqrt(Math.pow(t_2, 4.0)) + Math.pow(t_2, 2.0))) / x_45_scale)) / (t_1 * t_2)))) / Math.PI);
} else {
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 * (t_1 * Math.sin(((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.cos(t_0) t_2 = math.sin(t_0) tmp = 0 if math.fabs(b) <= 1.2e-104: tmp = 180.0 * (math.atan((-0.5 * ((-1.0 * ((y_45_scale * (math.sqrt(math.pow(t_2, 4.0)) + math.pow(t_2, 2.0))) / x_45_scale)) / (t_1 * t_2)))) / math.pi) else: 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 * (t_1 * math.sin(((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 = cos(t_0) t_2 = sin(t_0) tmp = 0.0 if (abs(b) <= 1.2e-104) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(-1.0 * Float64(Float64(y_45_scale * Float64(sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / x_45_scale)) / Float64(t_1 * t_2)))) / pi)); else 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(t_1 * sin(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 = cos(t_0); t_2 = sin(t_0); tmp = 0.0; if (abs(b) <= 1.2e-104) tmp = 180.0 * (atan((-0.5 * ((-1.0 * ((y_45_scale * (sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / x_45_scale)) / (t_1 * t_2)))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / (x_45_scale * (t_1 * sin(((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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 1.2e-104], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(-1.0 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
\mathbf{if}\;\left|b\right| \leq 1.2 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{-1 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale}}{t\_1 \cdot t\_2}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}\right)}{\pi}\\
\end{array}
if b < 1.2e-104Initial program 14.1%
Taylor expanded in a around inf
Applied rewrites18.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites38.3%
if 1.2e-104 < b Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f6443.0%
Applied rewrites43.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0)))
(if (<= (fabs b) 7.8e-105)
(*
180.0
(/
(atan
(*
0.5
(/
(* y-scale (+ (sqrt (pow t_2 4.0)) (pow t_2 2.0)))
(* x-scale (* t_1 t_2)))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(* x-scale (* t_1 (sin (* (* 0.005555555555555556 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 = cos(t_0);
double t_2 = sin(t_0);
double tmp;
if (fabs(b) <= 7.8e-105) {
tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt(pow(t_2, 4.0)) + pow(t_2, 2.0))) / (x_45_scale * (t_1 * t_2))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + pow(t_1, 2.0))) / (x_45_scale * (t_1 * sin(((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.cos(t_0);
double t_2 = Math.sin(t_0);
double tmp;
if (Math.abs(b) <= 7.8e-105) {
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 * (t_1 * t_2))))) / Math.PI);
} else {
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 * (t_1 * Math.sin(((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.cos(t_0) t_2 = math.sin(t_0) tmp = 0 if math.fabs(b) <= 7.8e-105: 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 * (t_1 * t_2))))) / math.pi) else: 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 * (t_1 * math.sin(((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 = cos(t_0) t_2 = sin(t_0) tmp = 0.0 if (abs(b) <= 7.8e-105) 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(t_1 * t_2))))) / pi)); else 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(t_1 * sin(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 = cos(t_0); t_2 = sin(t_0); tmp = 0.0; if (abs(b) <= 7.8e-105) tmp = 180.0 * (atan((0.5 * ((y_45_scale * (sqrt((t_2 ^ 4.0)) + (t_2 ^ 2.0))) / (x_45_scale * (t_1 * t_2))))) / pi); else tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / (x_45_scale * (t_1 * sin(((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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 7.8e-105], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$2, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[(t$95$1 * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
\mathbf{if}\;\left|b\right| \leq 7.8 \cdot 10^{-105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_2}^{4}} + {t\_2}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot t\_2\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + {t\_1}^{2}\right)}{x-scale \cdot \left(t\_1 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)}\right)}{\pi}\\
\end{array}
if b < 7.8e-105Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites37.8%
if 7.8e-105 < b Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f6443.0%
Applied rewrites43.0%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (* x-scale (* t_1 (sin t_0)))))
(if (<= y-scale -1.05e+73)
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+
(sqrt (pow t_1 4.0))
(+
0.5
(* (cos (* (* (* 0.005555555555555556 angle) PI) 2.0)) 0.5))))
t_2)))
PI))
(if (<= y-scale 3e+77)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+ 2.0 (* -6.17283950617284e-5 (* (pow angle 2.0) (pow PI 2.0)))))
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 = cos(t_0);
double t_2 = x_45_scale * (t_1 * sin(t_0));
double tmp;
if (y_45_scale <= -1.05e+73) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt(pow(t_1, 4.0)) + (0.5 + (cos((((0.005555555555555556 * angle) * ((double) M_PI)) * 2.0)) * 0.5)))) / t_2))) / ((double) M_PI));
} else if (y_45_scale <= 3e+77) {
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 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.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 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double t_2 = x_45_scale * (t_1 * Math.sin(t_0));
double tmp;
if (y_45_scale <= -1.05e+73) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (Math.sqrt(Math.pow(t_1, 4.0)) + (0.5 + (Math.cos((((0.005555555555555556 * angle) * Math.PI) * 2.0)) * 0.5)))) / t_2))) / Math.PI);
} else if (y_45_scale <= 3e+77) {
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 + (-6.17283950617284e-5 * (Math.pow(angle, 2.0) * Math.pow(Math.PI, 2.0))))) / 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.cos(t_0) t_2 = x_45_scale * (t_1 * math.sin(t_0)) tmp = 0 if y_45_scale <= -1.05e+73: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (math.sqrt(math.pow(t_1, 4.0)) + (0.5 + (math.cos((((0.005555555555555556 * angle) * math.pi) * 2.0)) * 0.5)))) / t_2))) / math.pi) elif y_45_scale <= 3e+77: 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 + (-6.17283950617284e-5 * (math.pow(angle, 2.0) * math.pow(math.pi, 2.0))))) / 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 = cos(t_0) t_2 = Float64(x_45_scale * Float64(t_1 * sin(t_0))) tmp = 0.0 if (y_45_scale <= -1.05e+73) 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(Float64(0.005555555555555556 * angle) * pi) * 2.0)) * 0.5)))) / t_2))) / pi)); elseif (y_45_scale <= 3e+77) 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 * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / 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 = cos(t_0); t_2 = x_45_scale * (t_1 * sin(t_0)); tmp = 0.0; if (y_45_scale <= -1.05e+73) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (0.5 + (cos((((0.005555555555555556 * angle) * pi) * 2.0)) * 0.5)))) / t_2))) / pi); elseif (y_45_scale <= 3e+77) 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 + (-6.17283950617284e-5 * ((angle ^ 2.0) * (pi ^ 2.0))))) / t_2))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(x$45$scale * N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -1.05e+73], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision] + N[(0.5 + N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 3e+77], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := x-scale \cdot \left(t\_1 \cdot \sin t\_0\right)\\
\mathbf{if}\;y-scale \leq -1.05 \cdot 10^{+73}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(\sqrt{{t\_1}^{4}} + \left(0.5 + \cos \left(\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 2\right) \cdot 0.5\right)\right)}{t\_2}\right)}{\pi}\\
\mathbf{elif}\;y-scale \leq 3 \cdot 10^{+77}:\\
\;\;\;\;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(-0.5 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{t\_2}\right)}{\pi}\\
\end{array}
if y-scale < -1.0500000000000001e73Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
lift-pow.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
sqr-cos-a-revN/A
*-commutativeN/A
lift-*.f64N/A
lift-cos.f64N/A
Applied rewrites42.8%
if -1.0500000000000001e73 < y-scale < 2.9999999999999998e77Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
if 2.9999999999999998e77 < y-scale Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
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.f6437.4%
Applied rewrites37.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (* x-scale (* t_1 (sin t_0)))))
(if (<= y-scale -1.05e+73)
(* 180.0 (/ (atan (* -0.5 (/ (* y-scale (+ 1.0 (pow t_1 2.0))) t_2))) PI))
(if (<= y-scale 3e+77)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+ 2.0 (* -6.17283950617284e-5 (* (pow angle 2.0) (pow PI 2.0)))))
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 = cos(t_0);
double t_2 = x_45_scale * (t_1 * sin(t_0));
double tmp;
if (y_45_scale <= -1.05e+73) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (1.0 + pow(t_1, 2.0))) / t_2))) / ((double) M_PI));
} else if (y_45_scale <= 3e+77) {
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 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 2.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 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.cos(t_0);
double t_2 = x_45_scale * (t_1 * Math.sin(t_0));
double tmp;
if (y_45_scale <= -1.05e+73) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * (1.0 + Math.pow(t_1, 2.0))) / t_2))) / Math.PI);
} else if (y_45_scale <= 3e+77) {
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 + (-6.17283950617284e-5 * (Math.pow(angle, 2.0) * Math.pow(Math.PI, 2.0))))) / 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.cos(t_0) t_2 = x_45_scale * (t_1 * math.sin(t_0)) tmp = 0 if y_45_scale <= -1.05e+73: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * (1.0 + math.pow(t_1, 2.0))) / t_2))) / math.pi) elif y_45_scale <= 3e+77: 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 + (-6.17283950617284e-5 * (math.pow(angle, 2.0) * math.pow(math.pi, 2.0))))) / 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 = cos(t_0) t_2 = Float64(x_45_scale * Float64(t_1 * sin(t_0))) tmp = 0.0 if (y_45_scale <= -1.05e+73) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * Float64(1.0 + (t_1 ^ 2.0))) / t_2))) / pi)); elseif (y_45_scale <= 3e+77) 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 * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 2.0))))) / 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 = cos(t_0); t_2 = x_45_scale * (t_1 * sin(t_0)); tmp = 0.0; if (y_45_scale <= -1.05e+73) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (1.0 + (t_1 ^ 2.0))) / t_2))) / pi); elseif (y_45_scale <= 3e+77) 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 + (-6.17283950617284e-5 * ((angle ^ 2.0) * (pi ^ 2.0))))) / t_2))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(x$45$scale * N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -1.05e+73], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(1.0 + N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 3e+77], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := x-scale \cdot \left(t\_1 \cdot \sin t\_0\right)\\
\mathbf{if}\;y-scale \leq -1.05 \cdot 10^{+73}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(1 + {t\_1}^{2}\right)}{t\_2}\right)}{\pi}\\
\mathbf{elif}\;y-scale \leq 3 \cdot 10^{+77}:\\
\;\;\;\;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(-0.5 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{t\_2}\right)}{\pi}\\
\end{array}
if y-scale < -1.0500000000000001e73Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
if -1.0500000000000001e73 < y-scale < 2.9999999999999998e77Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
if 2.9999999999999998e77 < y-scale Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
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.f6437.4%
Applied rewrites37.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (* x-scale (* (cos t_0) (sin t_0)))))
(if (<= y-scale -1.9e+66)
(* 180.0 (/ (atan (* -0.5 (/ (* y-scale 2.0) t_1))) PI))
(if (<= y-scale 3e+77)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))
(*
180.0
(/
(atan
(*
-0.5
(/
(*
y-scale
(+ 2.0 (* -6.17283950617284e-5 (* (pow angle 2.0) (pow PI 2.0)))))
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 (y_45_scale <= -1.9e+66) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / ((double) M_PI));
} else if (y_45_scale <= 3e+77) {
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 + (-6.17283950617284e-5 * (pow(angle, 2.0) * pow(((double) M_PI), 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 (y_45_scale <= -1.9e+66) {
tmp = 180.0 * (Math.atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / Math.PI);
} else if (y_45_scale <= 3e+77) {
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 + (-6.17283950617284e-5 * (Math.pow(angle, 2.0) * Math.pow(Math.PI, 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 y_45_scale <= -1.9e+66: tmp = 180.0 * (math.atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / math.pi) elif y_45_scale <= 3e+77: 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 + (-6.17283950617284e-5 * (math.pow(angle, 2.0) * math.pow(math.pi, 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 (y_45_scale <= -1.9e+66) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale * 2.0) / t_1))) / pi)); elseif (y_45_scale <= 3e+77) 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 * Float64(2.0 + Float64(-6.17283950617284e-5 * Float64((angle ^ 2.0) * (pi ^ 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 (y_45_scale <= -1.9e+66) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / t_1))) / pi); elseif (y_45_scale <= 3e+77) 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 + (-6.17283950617284e-5 * ((angle ^ 2.0) * (pi ^ 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[(0.005555555555555556 * 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[y$45$scale, -1.9e+66], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 3e+77], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * N[(2.0 + N[(-6.17283950617284e-5 * N[(N[Power[angle, 2.0], $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)\\
\mathbf{if}\;y-scale \leq -1.9 \cdot 10^{+66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{t\_1}\right)}{\pi}\\
\mathbf{elif}\;y-scale \leq 3 \cdot 10^{+77}:\\
\;\;\;\;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(-0.5 \cdot \frac{y-scale \cdot \left(2 + -6.17283950617284 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}{t\_1}\right)}{\pi}\\
\end{array}
if y-scale < -1.9000000000000001e66Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
if -1.9000000000000001e66 < y-scale < 2.9999999999999998e77Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
if 2.9999999999999998e77 < y-scale Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
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.f6437.4%
Applied rewrites37.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI)) (t_1 (cos t_0)))
(if (<= (fabs a) 8.5e-63)
(/
(*
180.0
(atan
(*
(/
(*
(+ (+ 0.5 (* (cos (* t_0 2.0)) 0.5)) (sqrt (pow t_1 4.0)))
y-scale)
(* (* t_1 x-scale) (sin t_0)))
-0.5)))
PI)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* 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 = cos(t_0);
double tmp;
if (fabs(a) <= 8.5e-63) {
tmp = (180.0 * atan((((((0.5 + (cos((t_0 * 2.0)) * 0.5)) + sqrt(pow(t_1, 4.0))) * y_45_scale) / ((t_1 * x_45_scale) * sin(t_0))) * -0.5))) / ((double) M_PI);
} else {
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));
}
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.cos(t_0);
double tmp;
if (Math.abs(a) <= 8.5e-63) {
tmp = (180.0 * Math.atan((((((0.5 + (Math.cos((t_0 * 2.0)) * 0.5)) + Math.sqrt(Math.pow(t_1, 4.0))) * y_45_scale) / ((t_1 * x_45_scale) * Math.sin(t_0))) * -0.5))) / Math.PI;
} else {
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);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = (0.005555555555555556 * angle) * math.pi t_1 = math.cos(t_0) tmp = 0 if math.fabs(a) <= 8.5e-63: tmp = (180.0 * math.atan((((((0.5 + (math.cos((t_0 * 2.0)) * 0.5)) + math.sqrt(math.pow(t_1, 4.0))) * y_45_scale) / ((t_1 * x_45_scale) * math.sin(t_0))) * -0.5))) / math.pi else: 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) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = cos(t_0) tmp = 0.0 if (abs(a) <= 8.5e-63) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(Float64(Float64(0.5 + Float64(cos(Float64(t_0 * 2.0)) * 0.5)) + sqrt((t_1 ^ 4.0))) * y_45_scale) / Float64(Float64(t_1 * x_45_scale) * sin(t_0))) * -0.5))) / pi); else 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)); 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 = cos(t_0); tmp = 0.0; if (abs(a) <= 8.5e-63) tmp = (180.0 * atan((((((0.5 + (cos((t_0 * 2.0)) * 0.5)) + sqrt((t_1 ^ 4.0))) * y_45_scale) / ((t_1 * x_45_scale) * sin(t_0))) * -0.5))) / pi; else 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); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 8.5e-63], N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[(N[(0.5 + N[(N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[t$95$1, 4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(N[(t$95$1 * x$45$scale), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := \cos t\_0\\
\mathbf{if}\;\left|a\right| \leq 8.5 \cdot 10^{-63}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(\left(0.5 + \cos \left(t\_0 \cdot 2\right) \cdot 0.5\right) + \sqrt{{t\_1}^{4}}\right) \cdot y-scale}{\left(t\_1 \cdot x-scale\right) \cdot \sin t\_0} \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;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}\\
\end{array}
if a < 8.49999999999999969e-63Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Applied rewrites43.2%
if 8.49999999999999969e-63 < a Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI))))
(if (<= (fabs a) 6.9e-77)
(*
180.0
(/
(atan (* -0.5 (/ (* y-scale 2.0) (* x-scale (* (cos t_0) (sin t_0))))))
PI))
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* 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 tmp;
if (fabs(a) <= 6.9e-77) {
tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / ((double) M_PI));
} else {
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));
}
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(a) <= 6.9e-77) {
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);
} else {
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);
}
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(a) <= 6.9e-77: 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) else: 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) 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(a) <= 6.9e-77) 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)); else 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)); 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(a) <= 6.9e-77) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * 2.0) / (x_45_scale * (cos(t_0) * sin(t_0)))))) / pi); else 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); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 6.9e-77], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale * 2.0), $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], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;\left|a\right| \leq 6.9 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot 2}{x-scale \cdot \left(\cos t\_0 \cdot \sin t\_0\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;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}\\
\end{array}
if a < 6.90000000000000034e-77Initial program 14.1%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites42.8%
Taylor expanded in angle around 0
Applied rewrites42.5%
if 6.90000000000000034e-77 < a Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 4.8e-77)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+ (sqrt (/ 1.0 (pow x-scale 4.0))) (/ 1.0 (pow x-scale 2.0)))))
(* angle PI))))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 4.8e-77) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
} else {
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));
}
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(a) <= 4.8e-77) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
} else {
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);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 4.8e-77: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) else: 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) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 4.8e-77) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); else 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)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 4.8e-77) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); else 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); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 4.8e-77], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(1.0 / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(1.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 4.8 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;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}\\
\end{array}
if a < 4.7999999999999998e-77Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.2%
Applied rewrites37.2%
if 4.7999999999999998e-77 < a Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 6.9e-77)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))
(*
180.0
(/
(atan
(*
-90.0
(/
(*
x-scale
(*
y-scale
(+
(sqrt (pow x-scale -4.0))
(exp (* (log (* x-scale x-scale)) -1.0)))))
(* angle PI))))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 6.9e-77) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt(pow(x_45_scale, -4.0)) + exp((log((x_45_scale * x_45_scale)) * -1.0))))) / (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 tmp;
if (Math.abs(a) <= 6.9e-77) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (Math.sqrt(Math.pow(x_45_scale, -4.0)) + Math.exp((Math.log((x_45_scale * x_45_scale)) * -1.0))))) / (angle * Math.PI)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 6.9e-77: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) else: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (math.sqrt(math.pow(x_45_scale, -4.0)) + math.exp((math.log((x_45_scale * x_45_scale)) * -1.0))))) / (angle * math.pi)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 6.9e-77) tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt((x_45_scale ^ -4.0)) + exp(Float64(log(Float64(x_45_scale * x_45_scale)) * -1.0))))) / Float64(angle * pi)))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 6.9e-77) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); else tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (sqrt((x_45_scale ^ -4.0)) + exp((log((x_45_scale * x_45_scale)) * -1.0))))) / (angle * pi)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 6.9e-77], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision] + N[Exp[N[(N[Log[N[(x$45$scale * x$45$scale), $MachinePrecision]], $MachinePrecision] * -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 6.9 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\sqrt{{x-scale}^{-4}} + e^{\log \left(x-scale \cdot x-scale\right) \cdot -1}\right)\right)}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
if a < 6.90000000000000034e-77Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.2%
Applied rewrites37.2%
if 6.90000000000000034e-77 < a Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
lift-/.f64N/A
inv-powN/A
pow-to-expN/A
lower-unsound-exp.f64N/A
lower-unsound-*.f64N/A
lower-unsound-log.f6439.5%
lift-pow.f64N/A
unpow2N/A
lower-*.f6439.5%
Applied rewrites39.5%
lift-/.f64N/A
lift-pow.f64N/A
pow-flipN/A
lower-pow.f64N/A
metadata-eval39.5%
Applied rewrites39.5%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= y-scale 2.15e-103)
(*
180.0
(/
(atan
(*
-90.0
(/ (* x-scale (* y-scale (/ 2.0 (pow x-scale 2.0)))) (* angle PI))))
PI))
(* 180.0 (/ (atan (* -180.0 (/ 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 (y_45_scale <= 2.15e-103) {
tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (2.0 / pow(x_45_scale, 2.0)))) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (y_45_scale <= 2.15e-103) {
tmp = 180.0 * (Math.atan((-90.0 * ((x_45_scale * (y_45_scale * (2.0 / Math.pow(x_45_scale, 2.0)))) / (angle * Math.PI)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * Math.PI))))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if y_45_scale <= 2.15e-103: tmp = 180.0 * (math.atan((-90.0 * ((x_45_scale * (y_45_scale * (2.0 / math.pow(x_45_scale, 2.0)))) / (angle * math.pi)))) / math.pi) else: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * math.pi))))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (y_45_scale <= 2.15e-103) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(x_45_scale * Float64(y_45_scale * Float64(2.0 / (x_45_scale ^ 2.0)))) / Float64(angle * pi)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (y_45_scale <= 2.15e-103) tmp = 180.0 * (atan((-90.0 * ((x_45_scale * (y_45_scale * (2.0 / (x_45_scale ^ 2.0)))) / (angle * pi)))) / pi); else tmp = 180.0 * (atan((-180.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[y$45$scale, 2.15e-103], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(x$45$scale * N[(y$45$scale * N[(2.0 / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;y-scale \leq 2.15 \cdot 10^{-103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \frac{2}{{x-scale}^{2}}\right)}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
if y-scale < 2.15000000000000011e-103Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
Taylor expanded in x-scale around 0
lower-/.f64N/A
lower-pow.f6439.4%
Applied rewrites39.4%
if 2.15000000000000011e-103 < y-scale Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.2%
Applied rewrites37.2%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 2.1e+223)
(*
180.0
(/ (atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI)))) PI))
(* 180.0 (/ (atan 0.0) PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 2.1e+223) {
tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(0.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 tmp;
if (Math.abs(a) <= 2.1e+223) {
tmp = 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 2.1e+223: tmp = 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / math.pi) else: tmp = 180.0 * (math.atan(0.0) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 2.1e+223) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * pi)))) / pi)); else tmp = Float64(180.0 * Float64(atan(0.0) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(a) <= 2.1e+223) tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / pi); else tmp = 180.0 * (atan(0.0) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 2.1e+223], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 2.1 \cdot 10^{+223}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\end{array}
if a < 2.09999999999999991e223Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6438.9%
Applied rewrites38.9%
if 2.09999999999999991e223 < a Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.6%
Taylor expanded in y-scale around 0
Applied rewrites18.4%
(FPCore (a b angle x-scale y-scale) :precision binary64 (if (<= (fabs b) 5.3e-92) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan (* -180.0 (/ 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) <= 5.3e-92) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((double) M_PI)))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (Math.abs(b) <= 5.3e-92) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-180.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) <= 5.3e-92: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan((-180.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) <= 5.3e-92) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * pi))))) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (abs(b) <= 5.3e-92) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan((-180.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], 5.3e-92], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 5.3 \cdot 10^{-92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
if b < 5.30000000000000029e-92Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.6%
Taylor expanded in y-scale around 0
Applied rewrites18.4%
if 5.30000000000000029e-92 < b Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.5%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6437.2%
Applied rewrites37.2%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan 0.0) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan(0.0) / ((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.0) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan(0.0) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(0.0) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan(0.0) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
180 \cdot \frac{\tan^{-1} 0}{\pi}
Initial program 14.1%
Taylor expanded in angle around 0
Applied rewrites12.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.6%
Taylor expanded in y-scale around 0
Applied rewrites18.4%
herbie shell --seed 2025188
(FPCore (a b angle x-scale y-scale)
:name "raw-angle from scale-rotated-ellipse"
:precision binary64
(* 180.0 (/ (atan (/ (- (- (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) PI))) 2.0) (pow (* b (sin (* (/ angle 180.0) PI))) 2.0)) y-scale) y-scale) (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)) x-scale) x-scale)) (sqrt (+ (pow (- (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)) x-scale) x-scale) (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) PI))) 2.0) (pow (* b (sin (* (/ angle 180.0) PI))) 2.0)) y-scale) y-scale)) 2.0) (pow (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI))) (cos (* (/ angle 180.0) PI))) x-scale) y-scale) 2.0)))) (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI))) (cos (* (/ angle 180.0) PI))) x-scale) y-scale))) PI)))