
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= b_m 1.52e+106)
(*
1.0
(*
(+ b_m a)
(*
(- b_m a)
(* 2.0 (sin (* (* 0.005555555555555556 PI) (/ 1.0 (/ 1.0 angle))))))))
(if (<= b_m 2e+246)
(*
1.0
(*
(+ b_m a)
(*
(- b_m a)
(*
2.0
(*
angle
(fma
(* -2.8577960676726107e-8 (* angle angle))
(* PI (* PI PI))
(* 0.005555555555555556 PI)))))))
(*
1.0
(*
(+ b_m a)
(*
(- b_m a)
(*
2.0
(sin
(* (* angle (sqrt PI)) (* 0.005555555555555556 (sqrt PI)))))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 1.52e+106) {
tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin(((0.005555555555555556 * ((double) M_PI)) * (1.0 / (1.0 / angle)))))));
} else if (b_m <= 2e+246) {
tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * (angle * fma((-2.8577960676726107e-8 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.005555555555555556 * ((double) M_PI)))))));
} else {
tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin(((angle * sqrt(((double) M_PI))) * (0.005555555555555556 * sqrt(((double) M_PI))))))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 1.52e+106) tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * sin(Float64(Float64(0.005555555555555556 * pi) * Float64(1.0 / Float64(1.0 / angle)))))))); elseif (b_m <= 2e+246) tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * Float64(angle * fma(Float64(-2.8577960676726107e-8 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.005555555555555556 * pi))))))); else tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * sin(Float64(Float64(angle * sqrt(pi)) * Float64(0.005555555555555556 * sqrt(pi)))))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 1.52e+106], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(1.0 / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2e+246], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[(angle * N[(N[(-2.8577960676726107e-8 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(0.005555555555555556 * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.52 \cdot 10^{+106}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \frac{1}{\frac{1}{angle}}\right)\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 2 \cdot 10^{+246}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin \left(\left(angle \cdot \sqrt{\pi}\right) \cdot \left(0.005555555555555556 \cdot \sqrt{\pi}\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.52e106Initial program 50.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6462.1
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval62.1
Applied rewrites62.1%
Taylor expanded in angle around 0
Applied rewrites65.1%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
div-invN/A
metadata-evalN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6464.8
Applied rewrites64.8%
if 1.52e106 < b < 2.00000000000000014e246Initial program 36.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6478.3
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval78.3
Applied rewrites78.3%
Taylor expanded in angle around 0
Applied rewrites70.1%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6478.5
Applied rewrites78.5%
if 2.00000000000000014e246 < b Initial program 54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6488.1
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval88.1
Applied rewrites88.1%
Taylor expanded in angle around 0
Applied rewrites88.1%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6499.8
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f6499.9
Applied rewrites99.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6499.9
Applied rewrites99.9%
Final simplification68.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0)))
(t_1
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
(if (<= t_1 -1e+212)
(*
1.0
(*
(+ b_m a)
(*
(- b_m a)
(*
2.0
(*
angle
(fma
(* -2.8577960676726107e-8 (* angle angle))
(* PI (* PI PI))
(* 0.005555555555555556 PI)))))))
(if (<= t_1 4e+289)
(* (sin (* (* angle PI) 0.011111111111111112)) (* (+ b_m a) (- b_m a)))
(*
1.0
(* (+ b_m a) (* 0.011111111111111112 (* angle (* (- b_m a) PI)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
double tmp;
if (t_1 <= -1e+212) {
tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * (angle * fma((-2.8577960676726107e-8 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.005555555555555556 * ((double) M_PI)))))));
} else if (t_1 <= 4e+289) {
tmp = sin(((angle * ((double) M_PI)) * 0.011111111111111112)) * ((b_m + a) * (b_m - a));
} else {
tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI)))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) tmp = 0.0 if (t_1 <= -1e+212) tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * Float64(angle * fma(Float64(-2.8577960676726107e-8 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.005555555555555556 * pi))))))); elseif (t_1 <= 4e+289) tmp = Float64(sin(Float64(Float64(angle * pi) * 0.011111111111111112)) * Float64(Float64(b_m + a) * Float64(b_m - a))); else tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+212], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[(angle * N[(N[(-2.8577960676726107e-8 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+289], N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+212}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -9.9999999999999991e211Initial program 44.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6473.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval73.6
Applied rewrites73.6%
Taylor expanded in angle around 0
Applied rewrites77.2%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6474.0
Applied rewrites74.0%
if -9.9999999999999991e211 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 4.0000000000000002e289Initial program 58.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f64N/A
Applied rewrites59.2%
if 4.0000000000000002e289 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 33.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6472.9
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval74.6
Applied rewrites74.6%
Taylor expanded in angle around 0
Applied rewrites78.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f6469.7
Applied rewrites69.7%
Final simplification65.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 -1e-187)
(* a (* (* angle PI) (* a -0.011111111111111112)))
(if (<= t_0 INFINITY)
(* b_m (* b_m (* (* angle PI) 0.011111111111111112)))
(* (* a -0.011111111111111112) (* a (* angle PI)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -1e-187) {
tmp = a * ((angle * ((double) M_PI)) * (a * -0.011111111111111112));
} else if (t_0 <= ((double) INFINITY)) {
tmp = b_m * (b_m * ((angle * ((double) M_PI)) * 0.011111111111111112));
} else {
tmp = (a * -0.011111111111111112) * (a * (angle * ((double) M_PI)));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double tmp;
if (t_0 <= -1e-187) {
tmp = a * ((angle * Math.PI) * (a * -0.011111111111111112));
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = b_m * (b_m * ((angle * Math.PI) * 0.011111111111111112));
} else {
tmp = (a * -0.011111111111111112) * (a * (angle * Math.PI));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) tmp = 0 if t_0 <= -1e-187: tmp = a * ((angle * math.pi) * (a * -0.011111111111111112)) elif t_0 <= math.inf: tmp = b_m * (b_m * ((angle * math.pi) * 0.011111111111111112)) else: tmp = (a * -0.011111111111111112) * (a * (angle * math.pi)) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= -1e-187) tmp = Float64(a * Float64(Float64(angle * pi) * Float64(a * -0.011111111111111112))); elseif (t_0 <= Inf) tmp = Float64(b_m * Float64(b_m * Float64(Float64(angle * pi) * 0.011111111111111112))); else tmp = Float64(Float64(a * -0.011111111111111112) * Float64(a * Float64(angle * pi))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); tmp = 0.0; if (t_0 <= -1e-187) tmp = a * ((angle * pi) * (a * -0.011111111111111112)); elseif (t_0 <= Inf) tmp = b_m * (b_m * ((angle * pi) * 0.011111111111111112)); else tmp = (a * -0.011111111111111112) * (a * (angle * pi)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-187], N[(a * N[(N[(angle * Pi), $MachinePrecision] * N[(a * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(b$95$m * N[(b$95$m * N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * -0.011111111111111112), $MachinePrecision] * N[(a * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-187}:\\
\;\;\;\;a \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot -0.011111111111111112\right)\right)\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;b\_m \cdot \left(b\_m \cdot \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot -0.011111111111111112\right) \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e-187Initial program 42.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6441.8
Applied rewrites41.8%
Taylor expanded in b around 0
Applied rewrites41.8%
Applied rewrites54.9%
if -1e-187 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 60.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.6
Applied rewrites55.6%
Taylor expanded in b around inf
Applied rewrites55.7%
Applied rewrites63.7%
if +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 0.0%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6457.6
Applied rewrites57.6%
Taylor expanded in b around 0
Applied rewrites56.9%
Applied rewrites68.7%
Final simplification60.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0)))
(t_1 (* (* a -0.011111111111111112) (* a (* angle PI)))))
(if (<= t_0 -1e-187)
t_1
(if (<= t_0 INFINITY)
(* b_m (* b_m (* (* angle PI) 0.011111111111111112)))
t_1))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double t_1 = (a * -0.011111111111111112) * (a * (angle * ((double) M_PI)));
double tmp;
if (t_0 <= -1e-187) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = b_m * (b_m * ((angle * ((double) M_PI)) * 0.011111111111111112));
} else {
tmp = t_1;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double t_1 = (a * -0.011111111111111112) * (a * (angle * Math.PI));
double tmp;
if (t_0 <= -1e-187) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = b_m * (b_m * ((angle * Math.PI) * 0.011111111111111112));
} else {
tmp = t_1;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) t_1 = (a * -0.011111111111111112) * (a * (angle * math.pi)) tmp = 0 if t_0 <= -1e-187: tmp = t_1 elif t_0 <= math.inf: tmp = b_m * (b_m * ((angle * math.pi) * 0.011111111111111112)) else: tmp = t_1 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) t_1 = Float64(Float64(a * -0.011111111111111112) * Float64(a * Float64(angle * pi))) tmp = 0.0 if (t_0 <= -1e-187) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(b_m * Float64(b_m * Float64(Float64(angle * pi) * 0.011111111111111112))); else tmp = t_1; end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); t_1 = (a * -0.011111111111111112) * (a * (angle * pi)); tmp = 0.0; if (t_0 <= -1e-187) tmp = t_1; elseif (t_0 <= Inf) tmp = b_m * (b_m * ((angle * pi) * 0.011111111111111112)); else tmp = t_1; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(a * -0.011111111111111112), $MachinePrecision] * N[(a * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-187], t$95$1, If[LessEqual[t$95$0, Infinity], N[(b$95$m * N[(b$95$m * N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \left(a \cdot -0.011111111111111112\right) \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;b\_m \cdot \left(b\_m \cdot \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e-187 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 36.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6443.9
Applied rewrites43.9%
Taylor expanded in b around 0
Applied rewrites43.8%
Applied rewrites56.7%
if -1e-187 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 60.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.6
Applied rewrites55.6%
Taylor expanded in b around inf
Applied rewrites55.7%
Applied rewrites63.7%
Final simplification60.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0)))
(t_1 (* (* a -0.011111111111111112) (* a (* angle PI)))))
(if (<= t_0 -1e-187)
t_1
(if (<= t_0 INFINITY)
(* (* b_m PI) (* b_m (* angle 0.011111111111111112)))
t_1))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double t_1 = (a * -0.011111111111111112) * (a * (angle * ((double) M_PI)));
double tmp;
if (t_0 <= -1e-187) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = (b_m * ((double) M_PI)) * (b_m * (angle * 0.011111111111111112));
} else {
tmp = t_1;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double t_1 = (a * -0.011111111111111112) * (a * (angle * Math.PI));
double tmp;
if (t_0 <= -1e-187) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = (b_m * Math.PI) * (b_m * (angle * 0.011111111111111112));
} else {
tmp = t_1;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) t_1 = (a * -0.011111111111111112) * (a * (angle * math.pi)) tmp = 0 if t_0 <= -1e-187: tmp = t_1 elif t_0 <= math.inf: tmp = (b_m * math.pi) * (b_m * (angle * 0.011111111111111112)) else: tmp = t_1 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) t_1 = Float64(Float64(a * -0.011111111111111112) * Float64(a * Float64(angle * pi))) tmp = 0.0 if (t_0 <= -1e-187) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(Float64(b_m * pi) * Float64(b_m * Float64(angle * 0.011111111111111112))); else tmp = t_1; end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); t_1 = (a * -0.011111111111111112) * (a * (angle * pi)); tmp = 0.0; if (t_0 <= -1e-187) tmp = t_1; elseif (t_0 <= Inf) tmp = (b_m * pi) * (b_m * (angle * 0.011111111111111112)); else tmp = t_1; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(a * -0.011111111111111112), $MachinePrecision] * N[(a * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-187], t$95$1, If[LessEqual[t$95$0, Infinity], N[(N[(b$95$m * Pi), $MachinePrecision] * N[(b$95$m * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \left(a \cdot -0.011111111111111112\right) \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\left(b\_m \cdot \pi\right) \cdot \left(b\_m \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e-187 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 36.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6443.9
Applied rewrites43.9%
Taylor expanded in b around 0
Applied rewrites43.8%
Applied rewrites56.7%
if -1e-187 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 60.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.6
Applied rewrites55.6%
Taylor expanded in b around inf
Applied rewrites55.7%
Applied rewrites63.7%
Final simplification60.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0)))
(t_1 (* (* a -0.011111111111111112) (* a (* angle PI)))))
(if (<= t_0 -1e-187)
t_1
(if (<= t_0 INFINITY)
(* (* b_m b_m) (* (* angle PI) 0.011111111111111112))
t_1))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double t_1 = (a * -0.011111111111111112) * (a * (angle * ((double) M_PI)));
double tmp;
if (t_0 <= -1e-187) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = (b_m * b_m) * ((angle * ((double) M_PI)) * 0.011111111111111112);
} else {
tmp = t_1;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double t_1 = (a * -0.011111111111111112) * (a * (angle * Math.PI));
double tmp;
if (t_0 <= -1e-187) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = (b_m * b_m) * ((angle * Math.PI) * 0.011111111111111112);
} else {
tmp = t_1;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) t_1 = (a * -0.011111111111111112) * (a * (angle * math.pi)) tmp = 0 if t_0 <= -1e-187: tmp = t_1 elif t_0 <= math.inf: tmp = (b_m * b_m) * ((angle * math.pi) * 0.011111111111111112) else: tmp = t_1 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) t_1 = Float64(Float64(a * -0.011111111111111112) * Float64(a * Float64(angle * pi))) tmp = 0.0 if (t_0 <= -1e-187) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(Float64(b_m * b_m) * Float64(Float64(angle * pi) * 0.011111111111111112)); else tmp = t_1; end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); t_1 = (a * -0.011111111111111112) * (a * (angle * pi)); tmp = 0.0; if (t_0 <= -1e-187) tmp = t_1; elseif (t_0 <= Inf) tmp = (b_m * b_m) * ((angle * pi) * 0.011111111111111112); else tmp = t_1; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(a * -0.011111111111111112), $MachinePrecision] * N[(a * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-187], t$95$1, If[LessEqual[t$95$0, Infinity], N[(N[(b$95$m * b$95$m), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \left(a \cdot -0.011111111111111112\right) \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e-187 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 36.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6443.9
Applied rewrites43.9%
Taylor expanded in b around 0
Applied rewrites43.8%
Applied rewrites56.7%
if -1e-187 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 60.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.6
Applied rewrites55.6%
Taylor expanded in b around inf
Applied rewrites55.7%
Applied rewrites55.7%
Final simplification56.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0)))
(t_1 (* (* a -0.011111111111111112) (* a (* angle PI)))))
(if (<= t_0 -1e-187)
t_1
(if (<= t_0 INFINITY)
(* (* angle 0.011111111111111112) (* PI (* b_m b_m)))
t_1))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double t_1 = (a * -0.011111111111111112) * (a * (angle * ((double) M_PI)));
double tmp;
if (t_0 <= -1e-187) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = (angle * 0.011111111111111112) * (((double) M_PI) * (b_m * b_m));
} else {
tmp = t_1;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double t_1 = (a * -0.011111111111111112) * (a * (angle * Math.PI));
double tmp;
if (t_0 <= -1e-187) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = (angle * 0.011111111111111112) * (Math.PI * (b_m * b_m));
} else {
tmp = t_1;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) t_1 = (a * -0.011111111111111112) * (a * (angle * math.pi)) tmp = 0 if t_0 <= -1e-187: tmp = t_1 elif t_0 <= math.inf: tmp = (angle * 0.011111111111111112) * (math.pi * (b_m * b_m)) else: tmp = t_1 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) t_1 = Float64(Float64(a * -0.011111111111111112) * Float64(a * Float64(angle * pi))) tmp = 0.0 if (t_0 <= -1e-187) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b_m * b_m))); else tmp = t_1; end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); t_1 = (a * -0.011111111111111112) * (a * (angle * pi)); tmp = 0.0; if (t_0 <= -1e-187) tmp = t_1; elseif (t_0 <= Inf) tmp = (angle * 0.011111111111111112) * (pi * (b_m * b_m)); else tmp = t_1; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(a * -0.011111111111111112), $MachinePrecision] * N[(a * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-187], t$95$1, If[LessEqual[t$95$0, Infinity], N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \left(a \cdot -0.011111111111111112\right) \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e-187 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 36.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6443.9
Applied rewrites43.9%
Taylor expanded in b around 0
Applied rewrites43.8%
Applied rewrites56.7%
if -1e-187 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 60.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.6
Applied rewrites55.6%
Taylor expanded in b around inf
Applied rewrites55.7%
Final simplification56.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0)))
(t_1 (* (* angle PI) (* -0.011111111111111112 (* a a)))))
(if (<= t_0 5e-286)
t_1
(if (<= t_0 INFINITY)
(* (* angle 0.011111111111111112) (* PI (* b_m b_m)))
t_1))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double t_1 = (angle * ((double) M_PI)) * (-0.011111111111111112 * (a * a));
double tmp;
if (t_0 <= 5e-286) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = (angle * 0.011111111111111112) * (((double) M_PI) * (b_m * b_m));
} else {
tmp = t_1;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double t_1 = (angle * Math.PI) * (-0.011111111111111112 * (a * a));
double tmp;
if (t_0 <= 5e-286) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = (angle * 0.011111111111111112) * (Math.PI * (b_m * b_m));
} else {
tmp = t_1;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) t_1 = (angle * math.pi) * (-0.011111111111111112 * (a * a)) tmp = 0 if t_0 <= 5e-286: tmp = t_1 elif t_0 <= math.inf: tmp = (angle * 0.011111111111111112) * (math.pi * (b_m * b_m)) else: tmp = t_1 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) t_1 = Float64(Float64(angle * pi) * Float64(-0.011111111111111112 * Float64(a * a))) tmp = 0.0 if (t_0 <= 5e-286) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b_m * b_m))); else tmp = t_1; end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); t_1 = (angle * pi) * (-0.011111111111111112 * (a * a)); tmp = 0.0; if (t_0 <= 5e-286) tmp = t_1; elseif (t_0 <= Inf) tmp = (angle * 0.011111111111111112) * (pi * (b_m * b_m)); else tmp = t_1; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle * Pi), $MachinePrecision] * N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-286], t$95$1, If[LessEqual[t$95$0, Infinity], N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \left(angle \cdot \pi\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right)\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-286}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 5.00000000000000037e-286 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 44.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6450.2
Applied rewrites50.2%
Taylor expanded in b around 0
Applied rewrites50.2%
if 5.00000000000000037e-286 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 55.8%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.9
Applied rewrites49.9%
Taylor expanded in b around inf
Applied rewrites49.8%
Final simplification50.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= (- (pow b_m 2.0) (pow a 2.0)) -2e+213)
(*
1.0
(* (+ b_m a) (* (* a -2.0) (sin (* 0.005555555555555556 (* angle PI))))))
(* (+ b_m a) (* (- b_m a) (sin (* (* angle PI) 0.011111111111111112))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((pow(b_m, 2.0) - pow(a, 2.0)) <= -2e+213) {
tmp = 1.0 * ((b_m + a) * ((a * -2.0) * sin((0.005555555555555556 * (angle * ((double) M_PI))))));
} else {
tmp = (b_m + a) * ((b_m - a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((Math.pow(b_m, 2.0) - Math.pow(a, 2.0)) <= -2e+213) {
tmp = 1.0 * ((b_m + a) * ((a * -2.0) * Math.sin((0.005555555555555556 * (angle * Math.PI)))));
} else {
tmp = (b_m + a) * ((b_m - a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (math.pow(b_m, 2.0) - math.pow(a, 2.0)) <= -2e+213: tmp = 1.0 * ((b_m + a) * ((a * -2.0) * math.sin((0.005555555555555556 * (angle * math.pi))))) else: tmp = (b_m + a) * ((b_m - a) * math.sin(((angle * math.pi) * 0.011111111111111112))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64((b_m ^ 2.0) - (a ^ 2.0)) <= -2e+213) tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(a * -2.0) * sin(Float64(0.005555555555555556 * Float64(angle * pi)))))); else tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (((b_m ^ 2.0) - (a ^ 2.0)) <= -2e+213) tmp = 1.0 * ((b_m + a) * ((a * -2.0) * sin((0.005555555555555556 * (angle * pi))))); else tmp = (b_m + a) * ((b_m - a) * sin(((angle * pi) * 0.011111111111111112))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], -2e+213], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(a * -2.0), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;{b\_m}^{2} - {a}^{2} \leq -2 \cdot 10^{+213}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(a \cdot -2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1.99999999999999997e213Initial program 38.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6460.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval62.3
Applied rewrites62.3%
Taylor expanded in angle around 0
Applied rewrites70.9%
Taylor expanded in b around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6469.4
Applied rewrites69.4%
if -1.99999999999999997e213 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 52.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites67.0%
Final simplification67.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= (pow a 2.0) 5e+54)
(* (+ b_m a) (* (- b_m a) (sin (* (* angle PI) 0.011111111111111112))))
(*
1.0
(*
(+ b_m a)
(*
(- b_m a)
(*
2.0
(*
angle
(fma
(* -2.8577960676726107e-8 (* angle angle))
(* PI (* PI PI))
(* 0.005555555555555556 PI)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (pow(a, 2.0) <= 5e+54) {
tmp = (b_m + a) * ((b_m - a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * (angle * fma((-2.8577960676726107e-8 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.005555555555555556 * ((double) M_PI)))))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if ((a ^ 2.0) <= 5e+54) tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))); else tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * Float64(angle * fma(Float64(-2.8577960676726107e-8 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.005555555555555556 * pi))))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 5e+54], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[(angle * N[(N[(-2.8577960676726107e-8 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{+54}:\\
\;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 5.00000000000000005e54Initial program 59.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites68.1%
if 5.00000000000000005e54 < (pow.f64 a #s(literal 2 binary64)) Initial program 36.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6463.8
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval64.3
Applied rewrites64.3%
Taylor expanded in angle around 0
Applied rewrites68.1%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6466.9
Applied rewrites66.9%
Final simplification67.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(*
(*
(+ b_m a)
(*
(- b_m a)
(* 2.0 (sin (* (sqrt PI) (* (* angle 0.005555555555555556) (sqrt PI)))))))
1.0))b_m = fabs(b);
double code(double a, double b_m, double angle) {
return ((b_m + a) * ((b_m - a) * (2.0 * sin((sqrt(((double) M_PI)) * ((angle * 0.005555555555555556) * sqrt(((double) M_PI)))))))) * 1.0;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return ((b_m + a) * ((b_m - a) * (2.0 * Math.sin((Math.sqrt(Math.PI) * ((angle * 0.005555555555555556) * Math.sqrt(Math.PI))))))) * 1.0;
}
b_m = math.fabs(b) def code(a, b_m, angle): return ((b_m + a) * ((b_m - a) * (2.0 * math.sin((math.sqrt(math.pi) * ((angle * 0.005555555555555556) * math.sqrt(math.pi))))))) * 1.0
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * sin(Float64(sqrt(pi) * Float64(Float64(angle * 0.005555555555555556) * sqrt(pi))))))) * 1.0) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = ((b_m + a) * ((b_m - a) * (2.0 * sin((sqrt(pi) * ((angle * 0.005555555555555556) * sqrt(pi))))))) * 1.0; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt{\pi}\right)\right)\right)\right)\right) \cdot 1
\end{array}
Initial program 49.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6465.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.6
Applied rewrites65.6%
Taylor expanded in angle around 0
Applied rewrites67.1%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6468.5
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f6468.4
Applied rewrites68.4%
Final simplification68.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(*
1.0
(*
(+ b_m a)
(*
(- b_m a)
(* 2.0 (sin (* (* 0.005555555555555556 PI) (/ 1.0 (/ 1.0 angle)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin(((0.005555555555555556 * ((double) M_PI)) * (1.0 / (1.0 / angle)))))));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * Math.sin(((0.005555555555555556 * Math.PI) * (1.0 / (1.0 / angle)))))));
}
b_m = math.fabs(b) def code(a, b_m, angle): return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * math.sin(((0.005555555555555556 * math.pi) * (1.0 / (1.0 / angle)))))))
b_m = abs(b) function code(a, b_m, angle) return Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * sin(Float64(Float64(0.005555555555555556 * pi) * Float64(1.0 / Float64(1.0 / angle)))))))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin(((0.005555555555555556 * pi) * (1.0 / (1.0 / angle))))))); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(1.0 / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \frac{1}{\frac{1}{angle}}\right)\right)\right)\right)
\end{array}
Initial program 49.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6465.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.6
Applied rewrites65.6%
Taylor expanded in angle around 0
Applied rewrites67.1%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
div-invN/A
metadata-evalN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6467.4
Applied rewrites67.4%
Final simplification67.4%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (/ angle 180.0) 1e+21) (* 1.0 (* (+ b_m a) (* 0.011111111111111112 (* angle (* (- b_m a) PI))))) (* (* (+ b_m a) (- b_m a)) (sin (* PI (* angle 0.011111111111111112))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 1e+21) {
tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI)))));
} else {
tmp = ((b_m + a) * (b_m - a)) * sin((((double) M_PI) * (angle * 0.011111111111111112)));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 1e+21) {
tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * Math.PI))));
} else {
tmp = ((b_m + a) * (b_m - a)) * Math.sin((Math.PI * (angle * 0.011111111111111112)));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (angle / 180.0) <= 1e+21: tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * math.pi)))) else: tmp = ((b_m + a) * (b_m - a)) * math.sin((math.pi * (angle * 0.011111111111111112))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 1e+21) tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))))); else tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * sin(Float64(pi * Float64(angle * 0.011111111111111112)))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((angle / 180.0) <= 1e+21) tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * pi)))); else tmp = ((b_m + a) * (b_m - a)) * sin((pi * (angle * 0.011111111111111112))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+21], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 10^{+21}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1e21Initial program 56.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6477.8
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval78.2
Applied rewrites78.2%
Taylor expanded in angle around 0
Applied rewrites79.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f6474.8
Applied rewrites74.8%
if 1e21 < (/.f64 angle #s(literal 180 binary64)) Initial program 25.5%
Applied rewrites3.1%
Applied rewrites24.6%
Final simplification62.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* 1.0 (* (+ b_m a) (* (- b_m a) (* 2.0 (sin (/ (* angle PI) 180.0)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin(((angle * ((double) M_PI)) / 180.0)))));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * Math.sin(((angle * Math.PI) / 180.0)))));
}
b_m = math.fabs(b) def code(a, b_m, angle): return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * math.sin(((angle * math.pi) / 180.0)))))
b_m = abs(b) function code(a, b_m, angle) return Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * sin(Float64(Float64(angle * pi) / 180.0)))))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin(((angle * pi) / 180.0))))); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)\right)\right)
\end{array}
Initial program 49.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6465.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.6
Applied rewrites65.6%
Taylor expanded in angle around 0
Applied rewrites67.1%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
associate-*r/N/A
lift-*.f64N/A
lower-/.f6467.3
Applied rewrites67.3%
Final simplification67.3%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* 1.0 (* (+ b_m a) (* (- b_m a) (* 2.0 (sin (* (* angle 0.005555555555555556) PI)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin(((angle * 0.005555555555555556) * ((double) M_PI))))));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * Math.sin(((angle * 0.005555555555555556) * Math.PI)))));
}
b_m = math.fabs(b) def code(a, b_m, angle): return 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * math.sin(((angle * 0.005555555555555556) * math.pi)))))
b_m = abs(b) function code(a, b_m, angle) return Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * sin(Float64(Float64(angle * 0.005555555555555556) * pi)))))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin(((angle * 0.005555555555555556) * pi))))); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)\right)\right)
\end{array}
Initial program 49.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6465.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.6
Applied rewrites65.6%
Taylor expanded in angle around 0
Applied rewrites67.1%
Final simplification67.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= a 7.2e-174)
(* (sin (* (* angle PI) 0.011111111111111112)) (* b_m b_m))
(*
1.0
(*
(+ b_m a)
(*
(- b_m a)
(*
2.0
(*
angle
(fma
(* -2.8577960676726107e-8 (* angle angle))
(* PI (* PI PI))
(* 0.005555555555555556 PI)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (a <= 7.2e-174) {
tmp = sin(((angle * ((double) M_PI)) * 0.011111111111111112)) * (b_m * b_m);
} else {
tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * (angle * fma((-2.8577960676726107e-8 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.005555555555555556 * ((double) M_PI)))))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (a <= 7.2e-174) tmp = Float64(sin(Float64(Float64(angle * pi) * 0.011111111111111112)) * Float64(b_m * b_m)); else tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * Float64(angle * fma(Float64(-2.8577960676726107e-8 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.005555555555555556 * pi))))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[a, 7.2e-174], N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[(angle * N[(N[(-2.8577960676726107e-8 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.2 \cdot 10^{-174}:\\
\;\;\;\;\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m \cdot b\_m\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 7.19999999999999997e-174Initial program 55.1%
Applied rewrites7.9%
Taylor expanded in b around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6441.9
Applied rewrites41.9%
if 7.19999999999999997e-174 < a Initial program 39.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6459.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval61.6
Applied rewrites61.6%
Taylor expanded in angle around 0
Applied rewrites67.8%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6463.8
Applied rewrites63.8%
Final simplification50.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= a 2.2e-176)
(* angle (* (* (+ b_m a) (- b_m a)) (* PI 0.011111111111111112)))
(*
1.0
(*
(+ b_m a)
(*
(- b_m a)
(*
2.0
(*
angle
(fma
(* -2.8577960676726107e-8 (* angle angle))
(* PI (* PI PI))
(* 0.005555555555555556 PI)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (a <= 2.2e-176) {
tmp = angle * (((b_m + a) * (b_m - a)) * (((double) M_PI) * 0.011111111111111112));
} else {
tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * (angle * fma((-2.8577960676726107e-8 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.005555555555555556 * ((double) M_PI)))))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (a <= 2.2e-176) tmp = Float64(angle * Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(pi * 0.011111111111111112))); else tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * Float64(angle * fma(Float64(-2.8577960676726107e-8 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.005555555555555556 * pi))))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[a, 2.2e-176], N[(angle * N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[(angle * N[(N[(-2.8577960676726107e-8 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.2 \cdot 10^{-176}:\\
\;\;\;\;angle \cdot \left(\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.1999999999999999e-176Initial program 55.5%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.5
Applied rewrites51.5%
Applied rewrites51.5%
if 2.1999999999999999e-176 < a Initial program 39.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6458.7
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval60.5
Applied rewrites60.5%
Taylor expanded in angle around 0
Applied rewrites66.6%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6462.6
Applied rewrites62.6%
Final simplification55.7%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (/ angle 180.0) 5e-43) (* 1.0 (* (+ b_m a) (* 0.011111111111111112 (* angle (* (- b_m a) PI))))) (* (* (+ b_m a) (- b_m a)) (* angle (* PI 0.011111111111111112)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-43) {
tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI)))));
} else {
tmp = ((b_m + a) * (b_m - a)) * (angle * (((double) M_PI) * 0.011111111111111112));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-43) {
tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * Math.PI))));
} else {
tmp = ((b_m + a) * (b_m - a)) * (angle * (Math.PI * 0.011111111111111112));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (angle / 180.0) <= 5e-43: tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * math.pi)))) else: tmp = ((b_m + a) * (b_m - a)) * (angle * (math.pi * 0.011111111111111112)) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 5e-43) tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))))); else tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(angle * Float64(pi * 0.011111111111111112))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((angle / 180.0) <= 5e-43) tmp = 1.0 * ((b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * pi)))); else tmp = ((b_m + a) * (b_m - a)) * (angle * (pi * 0.011111111111111112)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-43], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-43}:\\
\;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000019e-43Initial program 55.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6477.2
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval77.7
Applied rewrites77.7%
Taylor expanded in angle around 0
Applied rewrites79.0%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f6473.6
Applied rewrites73.6%
if 5.00000000000000019e-43 < (/.f64 angle #s(literal 180 binary64)) Initial program 35.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6430.1
Applied rewrites30.1%
Final simplification61.0%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (/ angle 180.0) 5e-43) (* (- b_m a) (* (+ b_m a) (* PI (* angle 0.011111111111111112)))) (* (* (+ b_m a) (- b_m a)) (* angle (* PI 0.011111111111111112)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-43) {
tmp = (b_m - a) * ((b_m + a) * (((double) M_PI) * (angle * 0.011111111111111112)));
} else {
tmp = ((b_m + a) * (b_m - a)) * (angle * (((double) M_PI) * 0.011111111111111112));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-43) {
tmp = (b_m - a) * ((b_m + a) * (Math.PI * (angle * 0.011111111111111112)));
} else {
tmp = ((b_m + a) * (b_m - a)) * (angle * (Math.PI * 0.011111111111111112));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (angle / 180.0) <= 5e-43: tmp = (b_m - a) * ((b_m + a) * (math.pi * (angle * 0.011111111111111112))) else: tmp = ((b_m + a) * (b_m - a)) * (angle * (math.pi * 0.011111111111111112)) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 5e-43) tmp = Float64(Float64(b_m - a) * Float64(Float64(b_m + a) * Float64(pi * Float64(angle * 0.011111111111111112)))); else tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(angle * Float64(pi * 0.011111111111111112))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((angle / 180.0) <= 5e-43) tmp = (b_m - a) * ((b_m + a) * (pi * (angle * 0.011111111111111112))); else tmp = ((b_m + a) * (b_m - a)) * (angle * (pi * 0.011111111111111112)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-43], N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-43}:\\
\;\;\;\;\left(b\_m - a\right) \cdot \left(\left(b\_m + a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000019e-43Initial program 55.0%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6458.2
Applied rewrites58.2%
Applied rewrites73.6%
if 5.00000000000000019e-43 < (/.f64 angle #s(literal 180 binary64)) Initial program 35.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6430.1
Applied rewrites30.1%
Final simplification61.0%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* angle PI) (* -0.011111111111111112 (* a a))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return (angle * ((double) M_PI)) * (-0.011111111111111112 * (a * a));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return (angle * Math.PI) * (-0.011111111111111112 * (a * a));
}
b_m = math.fabs(b) def code(a, b_m, angle): return (angle * math.pi) * (-0.011111111111111112 * (a * a))
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(angle * pi) * Float64(-0.011111111111111112 * Float64(a * a))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = (angle * pi) * (-0.011111111111111112 * (a * a)); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(angle * Pi), $MachinePrecision] * N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(angle \cdot \pi\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right)
\end{array}
Initial program 49.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6450.1
Applied rewrites50.1%
Taylor expanded in b around 0
Applied rewrites32.6%
Final simplification32.6%
herbie shell --seed 2024223
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))