
(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 12 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 (cos (* t_0 2.0)))
(t_2
(fma
(* (- 0.5 (* t_1 0.5)) a)
a
(* (* (fma t_1 0.5 0.5) (fabs b)) (fabs b)))))
(if (<= (fabs b) 580000000.0)
(*
180.0
(/
(atan
(*
90.0
(/
(*
angle
(*
x-scale
(*
y-scale
(+
(sqrt
(* 9.525986892242036e-10 (/ (pow PI 4.0) (pow x-scale 4.0))))
(* 3.08641975308642e-5 (/ (pow PI 2.0) (pow x-scale 2.0)))))))
PI)))
PI))
(if (<= (fabs b) 1.45e+82)
(*
180.0
(/
(atan
(*
-0.5
(*
(/
(+ (fabs t_2) t_2)
(* (* (* (- (fabs b) a) (+ (fabs b) a)) (sin t_0)) (cos t_0)))
(/ y-scale x-scale))))
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 t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = cos((t_0 * 2.0));
double t_2 = fma(((0.5 - (t_1 * 0.5)) * a), a, ((fma(t_1, 0.5, 0.5) * fabs(b)) * fabs(b)));
double tmp;
if (fabs(b) <= 580000000.0) {
tmp = 180.0 * (atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (sqrt((9.525986892242036e-10 * (pow(((double) M_PI), 4.0) / pow(x_45_scale, 4.0)))) + (3.08641975308642e-5 * (pow(((double) M_PI), 2.0) / pow(x_45_scale, 2.0))))))) / ((double) M_PI)))) / ((double) M_PI));
} else if (fabs(b) <= 1.45e+82) {
tmp = 180.0 * (atan((-0.5 * (((fabs(t_2) + t_2) / ((((fabs(b) - a) * (fabs(b) + a)) * sin(t_0)) * cos(t_0))) * (y_45_scale / x_45_scale)))) / ((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;
}
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = cos(Float64(t_0 * 2.0)) t_2 = fma(Float64(Float64(0.5 - Float64(t_1 * 0.5)) * a), a, Float64(Float64(fma(t_1, 0.5, 0.5) * abs(b)) * abs(b))) tmp = 0.0 if (abs(b) <= 580000000.0) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(Float64(angle * Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(9.525986892242036e-10 * Float64((pi ^ 4.0) / (x_45_scale ^ 4.0)))) + Float64(3.08641975308642e-5 * Float64((pi ^ 2.0) / (x_45_scale ^ 2.0))))))) / pi))) / pi)); elseif (abs(b) <= 1.45e+82) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(Float64(abs(t_2) + t_2) / Float64(Float64(Float64(Float64(abs(b) - a) * Float64(abs(b) + a)) * sin(t_0)) * cos(t_0))) * Float64(y_45_scale / x_45_scale)))) / 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
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[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(0.5 - N[(t$95$1 * 0.5), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] * a + N[(N[(N[(t$95$1 * 0.5 + 0.5), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[b], $MachinePrecision], 580000000.0], N[(180.0 * N[(N[ArcTan[N[(90.0 * N[(N[(angle * N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(9.525986892242036e-10 * N[(N[Power[Pi, 4.0], $MachinePrecision] / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(3.08641975308642e-5 * N[(N[Power[Pi, 2.0], $MachinePrecision] / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.45e+82], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(N[(N[Abs[t$95$2], $MachinePrecision] + t$95$2), $MachinePrecision] / N[(N[(N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := \cos \left(t\_0 \cdot 2\right)\\
t_2 := \mathsf{fma}\left(\left(0.5 - t\_1 \cdot 0.5\right) \cdot a, a, \left(\mathsf{fma}\left(t\_1, 0.5, 0.5\right) \cdot \left|b\right|\right) \cdot \left|b\right|\right)\\
\mathbf{if}\;\left|b\right| \leq 580000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \frac{angle \cdot \left(x-scale \cdot \left(y-scale \cdot \left(\sqrt{9.525986892242036 \cdot 10^{-10} \cdot \frac{{\pi}^{4}}{{x-scale}^{4}}} + 3.08641975308642 \cdot 10^{-5} \cdot \frac{{\pi}^{2}}{{x-scale}^{2}}\right)\right)\right)}{\pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.45 \cdot 10^{+82}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{\left|t\_2\right| + t\_2}{\left(\left(\left(\left|b\right| - a\right) \cdot \left(\left|b\right| + a\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0} \cdot \frac{y-scale}{x-scale}\right)\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 b < 5.8e8Initial program 13.7%
Taylor expanded in y-scale around inf
Applied rewrites20.2%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites33.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.3%
if 5.8e8 < b < 1.4500000000000001e82Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Applied rewrites29.2%
if 1.4500000000000001e82 < b Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
(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) 9.12e-70)
(*
180.0
(/
(atan
(*
-0.5
(/
(* y-scale (+ (sqrt (pow t_1 4.0)) (pow t_1 2.0)))
(* x-scale (* t_1 (sin t_0))))))
PI))
(*
180.0
(/
(atan
(*
90.0
(/
(*
angle
(*
x-scale
(*
y-scale
(+
(sqrt
(* 9.525986892242036e-10 (/ (pow PI 4.0) (pow x-scale 4.0))))
(* 3.08641975308642e-5 (/ (pow PI 2.0) (pow x-scale 2.0)))))))
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) <= 9.12e-70) {
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(t_0)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (sqrt((9.525986892242036e-10 * (pow(((double) M_PI), 4.0) / pow(x_45_scale, 4.0)))) + (3.08641975308642e-5 * (pow(((double) M_PI), 2.0) / pow(x_45_scale, 2.0))))))) / ((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) <= 9.12e-70) {
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(t_0)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (Math.sqrt((9.525986892242036e-10 * (Math.pow(Math.PI, 4.0) / Math.pow(x_45_scale, 4.0)))) + (3.08641975308642e-5 * (Math.pow(Math.PI, 2.0) / Math.pow(x_45_scale, 2.0))))))) / 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) <= 9.12e-70: 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(t_0)))))) / math.pi) else: tmp = 180.0 * (math.atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (math.sqrt((9.525986892242036e-10 * (math.pow(math.pi, 4.0) / math.pow(x_45_scale, 4.0)))) + (3.08641975308642e-5 * (math.pow(math.pi, 2.0) / math.pow(x_45_scale, 2.0))))))) / 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) tmp = 0.0 if (abs(a) <= 9.12e-70) 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(t_0)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(Float64(angle * Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(9.525986892242036e-10 * Float64((pi ^ 4.0) / (x_45_scale ^ 4.0)))) + Float64(3.08641975308642e-5 * Float64((pi ^ 2.0) / (x_45_scale ^ 2.0))))))) / 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) <= 9.12e-70) tmp = 180.0 * (atan((-0.5 * ((y_45_scale * (sqrt((t_1 ^ 4.0)) + (t_1 ^ 2.0))) / (x_45_scale * (t_1 * sin(t_0)))))) / pi); else tmp = 180.0 * (atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (sqrt((9.525986892242036e-10 * ((pi ^ 4.0) / (x_45_scale ^ 4.0)))) + (3.08641975308642e-5 * ((pi ^ 2.0) / (x_45_scale ^ 2.0))))))) / 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]}, If[LessEqual[N[Abs[a], $MachinePrecision], 9.12e-70], 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[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(90.0 * N[(N[(angle * N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(9.525986892242036e-10 * N[(N[Power[Pi, 4.0], $MachinePrecision] / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(3.08641975308642e-5 * N[(N[Power[Pi, 2.0], $MachinePrecision] / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
\mathbf{if}\;\left|a\right| \leq 9.12 \cdot 10^{-70}:\\
\;\;\;\;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 t\_0\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \frac{angle \cdot \left(x-scale \cdot \left(y-scale \cdot \left(\sqrt{9.525986892242036 \cdot 10^{-10} \cdot \frac{{\pi}^{4}}{{x-scale}^{4}}} + 3.08641975308642 \cdot 10^{-5} \cdot \frac{{\pi}^{2}}{{x-scale}^{2}}\right)\right)\right)}{\pi}\right)}{\pi}\\
\end{array}
if a < 9.1200000000000004e-70Initial program 13.7%
Taylor expanded in x-scale around 0
Applied rewrites24.7%
Taylor expanded in b around inf
lower-/.f64N/A
Applied rewrites44.0%
if 9.1200000000000004e-70 < a Initial program 13.7%
Taylor expanded in y-scale around inf
Applied rewrites20.2%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites33.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.3%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs b) 3.6e+87)
(*
180.0
(/
(atan
(*
90.0
(/
(*
angle
(*
x-scale
(*
y-scale
(+
(sqrt (* 9.525986892242036e-10 (/ (pow PI 4.0) (pow x-scale 4.0))))
(* 3.08641975308642e-5 (/ (pow PI 2.0) (pow x-scale 2.0)))))))
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 (fabs(b) <= 3.6e+87) {
tmp = 180.0 * (atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (sqrt((9.525986892242036e-10 * (pow(((double) M_PI), 4.0) / pow(x_45_scale, 4.0)))) + (3.08641975308642e-5 * (pow(((double) M_PI), 2.0) / pow(x_45_scale, 2.0))))))) / ((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 (Math.abs(b) <= 3.6e+87) {
tmp = 180.0 * (Math.atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (Math.sqrt((9.525986892242036e-10 * (Math.pow(Math.PI, 4.0) / Math.pow(x_45_scale, 4.0)))) + (3.08641975308642e-5 * (Math.pow(Math.PI, 2.0) / Math.pow(x_45_scale, 2.0))))))) / 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 math.fabs(b) <= 3.6e+87: tmp = 180.0 * (math.atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (math.sqrt((9.525986892242036e-10 * (math.pow(math.pi, 4.0) / math.pow(x_45_scale, 4.0)))) + (3.08641975308642e-5 * (math.pow(math.pi, 2.0) / math.pow(x_45_scale, 2.0))))))) / 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 (abs(b) <= 3.6e+87) tmp = Float64(180.0 * Float64(atan(Float64(90.0 * Float64(Float64(angle * Float64(x_45_scale * Float64(y_45_scale * Float64(sqrt(Float64(9.525986892242036e-10 * Float64((pi ^ 4.0) / (x_45_scale ^ 4.0)))) + Float64(3.08641975308642e-5 * Float64((pi ^ 2.0) / (x_45_scale ^ 2.0))))))) / 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 (abs(b) <= 3.6e+87) tmp = 180.0 * (atan((90.0 * ((angle * (x_45_scale * (y_45_scale * (sqrt((9.525986892242036e-10 * ((pi ^ 4.0) / (x_45_scale ^ 4.0)))) + (3.08641975308642e-5 * ((pi ^ 2.0) / (x_45_scale ^ 2.0))))))) / 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[N[Abs[b], $MachinePrecision], 3.6e+87], N[(180.0 * N[(N[ArcTan[N[(90.0 * N[(N[(angle * N[(x$45$scale * N[(y$45$scale * N[(N[Sqrt[N[(9.525986892242036e-10 * N[(N[Power[Pi, 4.0], $MachinePrecision] / N[Power[x$45$scale, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(3.08641975308642e-5 * N[(N[Power[Pi, 2.0], $MachinePrecision] / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Pi), $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}\;\left|b\right| \leq 3.6 \cdot 10^{+87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(90 \cdot \frac{angle \cdot \left(x-scale \cdot \left(y-scale \cdot \left(\sqrt{9.525986892242036 \cdot 10^{-10} \cdot \frac{{\pi}^{4}}{{x-scale}^{4}}} + 3.08641975308642 \cdot 10^{-5} \cdot \frac{{\pi}^{2}}{{x-scale}^{2}}\right)\right)\right)}{\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 b < 3.59999999999999994e87Initial program 13.7%
Taylor expanded in y-scale around inf
Applied rewrites20.2%
Taylor expanded in a around inf
lower-*.f64N/A
Applied rewrites33.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites39.3%
if 3.59999999999999994e87 < b Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs b) 2.5e-72)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
(* (+ (/ 1.0 (* x-scale x-scale)) (sqrt (pow x-scale -4.0))) y-scale)
x-scale)
(* angle PI))))
PI))
(if (<= (fabs b) 1.3e+82)
(/
(*
180.0
(atan
(/
(* -90.0 (/ (* (pow (fabs b) 2.0) y-scale) x-scale))
(* (* PI angle) (* (- (fabs b) a) (+ (fabs b) a))))))
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) <= 2.5e-72) {
tmp = 180.0 * (atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt(pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (fabs(b) <= 1.3e+82) {
tmp = (180.0 * atan(((-90.0 * ((pow(fabs(b), 2.0) * y_45_scale) / x_45_scale)) / ((((double) M_PI) * angle) * ((fabs(b) - a) * (fabs(b) + a)))))) / ((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) <= 2.5e-72) {
tmp = 180.0 * (Math.atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + Math.sqrt(Math.pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (angle * Math.PI)))) / Math.PI);
} else if (Math.abs(b) <= 1.3e+82) {
tmp = (180.0 * Math.atan(((-90.0 * ((Math.pow(Math.abs(b), 2.0) * y_45_scale) / x_45_scale)) / ((Math.PI * angle) * ((Math.abs(b) - a) * (Math.abs(b) + a)))))) / 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) <= 2.5e-72: tmp = 180.0 * (math.atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + math.sqrt(math.pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (angle * math.pi)))) / math.pi) elif math.fabs(b) <= 1.3e+82: tmp = (180.0 * math.atan(((-90.0 * ((math.pow(math.fabs(b), 2.0) * y_45_scale) / x_45_scale)) / ((math.pi * angle) * ((math.fabs(b) - a) * (math.fabs(b) + a)))))) / 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) <= 2.5e-72) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(Float64(Float64(Float64(1.0 / Float64(x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) * x_45_scale) / Float64(angle * pi)))) / pi)); elseif (abs(b) <= 1.3e+82) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-90.0 * Float64(Float64((abs(b) ^ 2.0) * y_45_scale) / x_45_scale)) / Float64(Float64(pi * angle) * Float64(Float64(abs(b) - a) * Float64(abs(b) + a)))))) / 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) <= 2.5e-72) tmp = 180.0 * (atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) * x_45_scale) / (angle * pi)))) / pi); elseif (abs(b) <= 1.3e+82) tmp = (180.0 * atan(((-90.0 * (((abs(b) ^ 2.0) * y_45_scale) / x_45_scale)) / ((pi * angle) * ((abs(b) - a) * (abs(b) + a)))))) / 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], 2.5e-72], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(N[(N[(N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 1.3e+82], N[(N[(180.0 * N[ArcTan[N[(N[(-90.0 * N[(N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] * y$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(Pi * angle), $MachinePrecision] * N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 2.5 \cdot 10^{-72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{\left(\left(\frac{1}{x-scale \cdot x-scale} + \sqrt{{x-scale}^{-4}}\right) \cdot y-scale\right) \cdot x-scale}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 1.3 \cdot 10^{+82}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-90 \cdot \frac{{\left(\left|b\right|\right)}^{2} \cdot y-scale}{x-scale}}{\left(\pi \cdot angle\right) \cdot \left(\left(\left|b\right| - a\right) \cdot \left(\left|b\right| + a\right)\right)}\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 b < 2.4999999999999998e-72Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6440.4
lift-pow.f64N/A
pow2N/A
lift-*.f6440.4
lift-/.f64N/A
lift-pow.f64N/A
pow-flipN/A
lower-pow.f64N/A
metadata-eval40.4
Applied rewrites40.4%
if 2.4999999999999998e-72 < b < 1.2999999999999999e82Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Applied rewrites14.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f6423.5
Applied rewrites23.5%
if 1.2999999999999999e82 < b Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs b) 1.12e-174)
(*
180.0
(/
(atan
(*
-90.0
(/
(*
(* (+ (/ 1.0 (* x-scale x-scale)) (sqrt (pow x-scale -4.0))) y-scale)
x-scale)
(* angle PI))))
PI))
(if (<= (fabs b) 2.1e+76)
(/
(*
180.0
(atan
(*
-90.0
(/
(* (pow (fabs b) 2.0) y-scale)
(* angle (* x-scale (* PI (* (+ a (fabs b)) (- (fabs b) a)))))))))
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) <= 1.12e-174) {
tmp = 180.0 * (atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt(pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (angle * ((double) M_PI))))) / ((double) M_PI));
} else if (fabs(b) <= 2.1e+76) {
tmp = (180.0 * atan((-90.0 * ((pow(fabs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (((double) M_PI) * ((a + fabs(b)) * (fabs(b) - a))))))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-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) <= 1.12e-174) {
tmp = 180.0 * (Math.atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + Math.sqrt(Math.pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (angle * Math.PI)))) / Math.PI);
} else if (Math.abs(b) <= 2.1e+76) {
tmp = (180.0 * Math.atan((-90.0 * ((Math.pow(Math.abs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (Math.PI * ((a + Math.abs(b)) * (Math.abs(b) - a))))))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-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) <= 1.12e-174: tmp = 180.0 * (math.atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + math.sqrt(math.pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (angle * math.pi)))) / math.pi) elif math.fabs(b) <= 2.1e+76: tmp = (180.0 * math.atan((-90.0 * ((math.pow(math.fabs(b), 2.0) * y_45_scale) / (angle * (x_45_scale * (math.pi * ((a + math.fabs(b)) * (math.fabs(b) - a))))))))) / math.pi else: tmp = 180.0 * (math.atan((-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) <= 1.12e-174) tmp = Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(Float64(Float64(Float64(1.0 / Float64(x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) * x_45_scale) / Float64(angle * pi)))) / pi)); elseif (abs(b) <= 2.1e+76) tmp = Float64(Float64(180.0 * atan(Float64(-90.0 * Float64(Float64((abs(b) ^ 2.0) * y_45_scale) / Float64(angle * Float64(x_45_scale * Float64(pi * Float64(Float64(a + abs(b)) * Float64(abs(b) - a))))))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-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) <= 1.12e-174) tmp = 180.0 * (atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) * x_45_scale) / (angle * pi)))) / pi); elseif (abs(b) <= 2.1e+76) tmp = (180.0 * atan((-90.0 * (((abs(b) ^ 2.0) * y_45_scale) / (angle * (x_45_scale * (pi * ((a + abs(b)) * (abs(b) - a))))))))) / pi; else tmp = 180.0 * (atan((-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], 1.12e-174], N[(180.0 * N[(N[ArcTan[N[(-90.0 * N[(N[(N[(N[(N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[b], $MachinePrecision], 2.1e+76], N[(N[(180.0 * N[ArcTan[N[(-90.0 * N[(N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] * y$45$scale), $MachinePrecision] / N[(angle * N[(x$45$scale * N[(Pi * N[(N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 1.12 \cdot 10^{-174}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{\left(\left(\frac{1}{x-scale \cdot x-scale} + \sqrt{{x-scale}^{-4}}\right) \cdot y-scale\right) \cdot x-scale}{angle \cdot \pi}\right)}{\pi}\\
\mathbf{elif}\;\left|b\right| \leq 2.1 \cdot 10^{+76}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-90 \cdot \frac{{\left(\left|b\right|\right)}^{2} \cdot y-scale}{angle \cdot \left(x-scale \cdot \left(\pi \cdot \left(\left(a + \left|b\right|\right) \cdot \left(\left|b\right| - a\right)\right)\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\end{array}
if b < 1.12e-174Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6440.4
lift-pow.f64N/A
pow2N/A
lift-*.f6440.4
lift-/.f64N/A
lift-pow.f64N/A
pow-flipN/A
lower-pow.f64N/A
metadata-eval40.4
Applied rewrites40.4%
if 1.12e-174 < b < 2.10000000000000007e76Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Applied rewrites14.0%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6423.9
Applied rewrites23.9%
if 2.10000000000000007e76 < b Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 9.5e-83)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))
(*
180.0
(/
(atan
(*
-90.0
(/
(*
(* (+ (/ 1.0 (* x-scale x-scale)) (sqrt (pow x-scale -4.0))) y-scale)
x-scale)
(* angle PI))))
PI))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double tmp;
if (fabs(a) <= 9.5e-83) {
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 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt(pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (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) <= 9.5e-83) {
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 * (((((1.0 / (x_45_scale * x_45_scale)) + Math.sqrt(Math.pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (angle * Math.PI)))) / Math.PI);
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): tmp = 0 if math.fabs(a) <= 9.5e-83: 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 * (((((1.0 / (x_45_scale * x_45_scale)) + math.sqrt(math.pow(x_45_scale, -4.0))) * y_45_scale) * x_45_scale) / (angle * math.pi)))) / math.pi) return tmp
function code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0 if (abs(a) <= 9.5e-83) 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(Float64(Float64(Float64(1.0 / Float64(x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) * x_45_scale) / 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) <= 9.5e-83) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * pi))))) / pi); else tmp = 180.0 * (atan((-90.0 * (((((1.0 / (x_45_scale * x_45_scale)) + sqrt((x_45_scale ^ -4.0))) * y_45_scale) * x_45_scale) / (angle * pi)))) / pi); end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[N[Abs[a], $MachinePrecision], 9.5e-83], 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[(N[(N[(N[(1.0 / N[(x$45$scale * x$45$scale), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[Power[x$45$scale, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 9.5 \cdot 10^{-83}:\\
\;\;\;\;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{\left(\left(\frac{1}{x-scale \cdot x-scale} + \sqrt{{x-scale}^{-4}}\right) \cdot y-scale\right) \cdot x-scale}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
if a < 9.50000000000000051e-83Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
if 9.50000000000000051e-83 < a Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6440.4
lift-pow.f64N/A
pow2N/A
lift-*.f6440.4
lift-/.f64N/A
lift-pow.f64N/A
pow-flipN/A
lower-pow.f64N/A
metadata-eval40.4
Applied rewrites40.4%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(if (<= (fabs a) 1.8e-82)
(* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale PI))))) PI))
(*
180.0
(/
(atan
(*
-90.0
(/ (* x-scale (* 2.0 (/ y-scale (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) <= 1.8e-82) {
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 * (2.0 * (y_45_scale / 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) <= 1.8e-82) {
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 * (2.0 * (y_45_scale / 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) <= 1.8e-82: 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 * (2.0 * (y_45_scale / 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) <= 1.8e-82) 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(2.0 * Float64(y_45_scale / (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) <= 1.8e-82) 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 * (2.0 * (y_45_scale / (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], 1.8e-82], 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[(2.0 * N[(y$45$scale / N[Power[x$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 1.8 \cdot 10^{-82}:\\
\;\;\;\;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(2 \cdot \frac{y-scale}{{x-scale}^{2}}\right)}{angle \cdot \pi}\right)}{\pi}\\
\end{array}
if a < 1.79999999999999999e-82Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
if 1.79999999999999999e-82 < a Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6440.4
Applied rewrites40.4%
(FPCore (a b angle x-scale y-scale) :precision binary64 (* 180.0 (/ (atan (* -90.0 (/ (* 2.0 (/ y-scale x-scale)) (* angle PI)))) PI)))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * ((double) M_PI))))) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
return 180.0 * (Math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * Math.PI)))) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale): return 180.0 * (math.atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * math.pi)))) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale) return Float64(180.0 * Float64(atan(Float64(-90.0 * Float64(Float64(2.0 * Float64(y_45_scale / x_45_scale)) / Float64(angle * pi)))) / pi)) end
function tmp = code(a, b, angle, x_45_scale, y_45_scale) tmp = 180.0 * (atan((-90.0 * ((2.0 * (y_45_scale / x_45_scale)) / (angle * pi)))) / pi); end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := 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]
180 \cdot \frac{\tan^{-1} \left(-90 \cdot \frac{2 \cdot \frac{y-scale}{x-scale}}{angle \cdot \pi}\right)}{\pi}
Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f6439.5
Applied rewrites39.5%
(FPCore (a b angle x-scale y-scale) :precision binary64 (if (<= x-scale 3.5e+116) (* 180.0 (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale 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 (x_45_scale <= 3.5e+116) {
tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * ((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 (x_45_scale <= 3.5e+116) {
tmp = 180.0 * (Math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * 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 x_45_scale <= 3.5e+116: tmp = 180.0 * (math.atan((-180.0 * (y_45_scale / (angle * (x_45_scale * 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 (x_45_scale <= 3.5e+116) 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(0.0) / pi)); end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) tmp = 0.0; if (x_45_scale <= 3.5e+116) tmp = 180.0 * (atan((-180.0 * (y_45_scale / (angle * (x_45_scale * 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[x$45$scale, 3.5e+116], 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[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x-scale \leq 3.5 \cdot 10^{+116}:\\
\;\;\;\;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} 0}{\pi}\\
\end{array}
if x-scale < 3.49999999999999997e116Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites40.4%
Taylor expanded in x-scale around 0
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
if 3.49999999999999997e116 < x-scale Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.2%
Taylor expanded in y-scale around 0
Applied rewrites18.9%
(FPCore (a b angle x-scale y-scale) :precision binary64 (if (<= x-scale 3.5e+116) (/ (* 180.0 (atan (* -90.0 (/ y-scale (* angle (* x-scale 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 (x_45_scale <= 3.5e+116) {
tmp = (180.0 * atan((-90.0 * (y_45_scale / (angle * (x_45_scale * ((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 (x_45_scale <= 3.5e+116) {
tmp = (180.0 * Math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * 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 x_45_scale <= 3.5e+116: tmp = (180.0 * math.atan((-90.0 * (y_45_scale / (angle * (x_45_scale * 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 (x_45_scale <= 3.5e+116) tmp = Float64(Float64(180.0 * atan(Float64(-90.0 * Float64(y_45_scale / Float64(angle * Float64(x_45_scale * 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 (x_45_scale <= 3.5e+116) tmp = (180.0 * atan((-90.0 * (y_45_scale / (angle * (x_45_scale * 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[x$45$scale, 3.5e+116], N[(N[(180.0 * N[ArcTan[N[(-90.0 * N[(y$45$scale / N[(angle * N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x-scale \leq 3.5 \cdot 10^{+116}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-90 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\end{array}
if x-scale < 3.49999999999999997e116Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Applied rewrites14.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6434.8
Applied rewrites34.8%
if 3.49999999999999997e116 < x-scale Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.2%
Taylor expanded in y-scale around 0
Applied rewrites18.9%
(FPCore (a b angle x-scale y-scale)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 0.0) PI))))
(if (<= x-scale -4.3e+89)
t_0
(if (<= x-scale 7.1e+49)
(/ (* 180.0 (atan (* -90.0 (/ x-scale (* angle (* y-scale PI)))))) PI)
t_0))))double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (atan(0.0) / ((double) M_PI));
double tmp;
if (x_45_scale <= -4.3e+89) {
tmp = t_0;
} else if (x_45_scale <= 7.1e+49) {
tmp = (180.0 * atan((-90.0 * (x_45_scale / (angle * (y_45_scale * ((double) M_PI))))))) / ((double) M_PI);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
double t_0 = 180.0 * (Math.atan(0.0) / Math.PI);
double tmp;
if (x_45_scale <= -4.3e+89) {
tmp = t_0;
} else if (x_45_scale <= 7.1e+49) {
tmp = (180.0 * Math.atan((-90.0 * (x_45_scale / (angle * (y_45_scale * Math.PI)))))) / Math.PI;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale): t_0 = 180.0 * (math.atan(0.0) / math.pi) tmp = 0 if x_45_scale <= -4.3e+89: tmp = t_0 elif x_45_scale <= 7.1e+49: tmp = (180.0 * math.atan((-90.0 * (x_45_scale / (angle * (y_45_scale * math.pi)))))) / math.pi else: tmp = t_0 return tmp
function code(a, b, angle, x_45_scale, y_45_scale) t_0 = Float64(180.0 * Float64(atan(0.0) / pi)) tmp = 0.0 if (x_45_scale <= -4.3e+89) tmp = t_0; elseif (x_45_scale <= 7.1e+49) tmp = Float64(Float64(180.0 * atan(Float64(-90.0 * Float64(x_45_scale / Float64(angle * Float64(y_45_scale * pi)))))) / pi); else tmp = t_0; end return tmp end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale) t_0 = 180.0 * (atan(0.0) / pi); tmp = 0.0; if (x_45_scale <= -4.3e+89) tmp = t_0; elseif (x_45_scale <= 7.1e+49) tmp = (180.0 * atan((-90.0 * (x_45_scale / (angle * (y_45_scale * pi)))))) / pi; else tmp = t_0; end tmp_2 = tmp; end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale, -4.3e+89], t$95$0, If[LessEqual[x$45$scale, 7.1e+49], N[(N[(180.0 * N[ArcTan[N[(-90.0 * N[(x$45$scale / N[(angle * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], t$95$0]]]
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{if}\;x-scale \leq -4.3 \cdot 10^{+89}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x-scale \leq 7.1 \cdot 10^{+49}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-90 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \pi\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if x-scale < -4.3000000000000002e89 or 7.09999999999999971e49 < x-scale Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.2%
Taylor expanded in y-scale around 0
Applied rewrites18.9%
if -4.3000000000000002e89 < x-scale < 7.09999999999999971e49Initial program 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Applied rewrites14.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6412.3
Applied rewrites12.3%
(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 13.7%
Taylor expanded in angle around 0
Applied rewrites12.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites7.2%
Taylor expanded in y-scale around 0
Applied rewrites18.9%
herbie shell --seed 2025178
(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)))