
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (- (/ x (tan B)))))
(if (<= F -2e+68)
(fma t_0 -1.0 t_1)
(if (<= F 2.1e+20)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (* x (cos B))) (sin B))
(fma t_0 1.0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = -(x / tan(B));
double tmp;
if (F <= -2e+68) {
tmp = fma(t_0, -1.0, t_1);
} else if (F <= 2.1e+20) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - (x * cos(B))) / sin(B);
} else {
tmp = fma(t_0, 1.0, t_1);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(-Float64(x / tan(B))) tmp = 0.0 if (F <= -2e+68) tmp = fma(t_0, -1.0, t_1); elseif (F <= 2.1e+20) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - Float64(x * cos(B))) / sin(B)); else tmp = fma(t_0, 1.0, t_1); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[F, -2e+68], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 2.1e+20], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.0 + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := -\frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{+20}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
\end{array}
\end{array}
if F < -1.99999999999999991e68Initial program 53.7%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr74.7%
Taylor expanded in F around -inf
Simplified99.9%
if -1.99999999999999991e68 < F < 2.1e20Initial program 98.7%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.5%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
if 2.1e20 < F Initial program 53.0%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.7%
Taylor expanded in F around inf
Simplified99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (- (/ x (tan B)))))
(if (<= F -1.45)
(fma t_0 -1.0 t_1)
(if (<= F 1.4)
(/ (- (/ F (sqrt (fma x 2.0 2.0))) (* x (cos B))) (sin B))
(fma t_0 1.0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = -(x / tan(B));
double tmp;
if (F <= -1.45) {
tmp = fma(t_0, -1.0, t_1);
} else if (F <= 1.4) {
tmp = ((F / sqrt(fma(x, 2.0, 2.0))) - (x * cos(B))) / sin(B);
} else {
tmp = fma(t_0, 1.0, t_1);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(-Float64(x / tan(B))) tmp = 0.0 if (F <= -1.45) tmp = fma(t_0, -1.0, t_1); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F / sqrt(fma(x, 2.0, 2.0))) - Float64(x * cos(B))) / sin(B)); else tmp = fma(t_0, 1.0, t_1); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[F, -1.45], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F / N[Sqrt[N[(x * 2.0 + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.0 + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := -\frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, 2\right)}} - x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 57.0%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr77.2%
Taylor expanded in F around -inf
Simplified99.9%
if -1.44999999999999996 < F < 1.3999999999999999Initial program 99.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.5%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6499.0
Simplified99.0%
if 1.3999999999999999 < F Initial program 56.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr73.1%
Taylor expanded in F around inf
Simplified99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (- (/ x (tan B)))))
(if (<= F -1.22e-23)
(fma t_0 -1.0 t_1)
(if (<= F 1.15e-137)
(+
(* x (/ -1.0 (tan B)))
(* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
(if (<= F 7500000.0)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
(fma t_0 1.0 t_1))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = -(x / tan(B));
double tmp;
if (F <= -1.22e-23) {
tmp = fma(t_0, -1.0, t_1);
} else if (F <= 1.15e-137) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
} else if (F <= 7500000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
} else {
tmp = fma(t_0, 1.0, t_1);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(-Float64(x / tan(B))) tmp = 0.0 if (F <= -1.22e-23) tmp = fma(t_0, -1.0, t_1); elseif (F <= 1.15e-137) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B))); elseif (F <= 7500000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B)); else tmp = fma(t_0, 1.0, t_1); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[F, -1.22e-23], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 1.15e-137], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7500000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 1.0 + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := -\frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-137}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 7500000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, 1, t\_1\right)\\
\end{array}
\end{array}
if F < -1.22000000000000007e-23Initial program 60.3%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr79.0%
Taylor expanded in F around -inf
Simplified96.3%
if -1.22000000000000007e-23 < F < 1.15000000000000004e-137Initial program 99.5%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6488.6
Simplified88.6%
if 1.15000000000000004e-137 < F < 7.5e6Initial program 99.2%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.4%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in B around 0
Simplified92.3%
if 7.5e6 < F Initial program 56.3%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.8%
Taylor expanded in F around inf
Simplified99.7%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))))
(if (<= F -8.8e+133)
(- (/ x (tan B)))
(if (<= F -1.65e-103)
t_0
(if (<= F 6.8e-138)
(+
(* x (/ -1.0 (tan B)))
(* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
(if (<= F 820000.0) t_0 (/ (- 1.0 (* x (cos B))) (sin B))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
double tmp;
if (F <= -8.8e+133) {
tmp = -(x / tan(B));
} else if (F <= -1.65e-103) {
tmp = t_0;
} else if (F <= 6.8e-138) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
} else if (F <= 820000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B)) tmp = 0.0 if (F <= -8.8e+133) tmp = Float64(-Float64(x / tan(B))); elseif (F <= -1.65e-103) tmp = t_0; elseif (F <= 6.8e-138) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B))); elseif (F <= 820000.0) tmp = t_0; else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e+133], (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, -1.65e-103], t$95$0, If[LessEqual[F, 6.8e-138], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 820000.0], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{+133}:\\
\;\;\;\;-\frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-103}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-138}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 820000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -8.8e133Initial program 37.8%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6462.6
Simplified62.6%
clear-numN/A
distribute-neg-frac2N/A
associate-/l/N/A
tan-quotN/A
distribute-neg-frac2N/A
clear-numN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6462.8
Applied egg-rr62.8%
if -8.8e133 < F < -1.64999999999999995e-103 or 6.8000000000000003e-138 < F < 8.2e5Initial program 96.9%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.6%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
Simplified82.7%
if -1.64999999999999995e-103 < F < 6.8000000000000003e-138Initial program 99.5%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6491.0
Simplified91.0%
if 8.2e5 < F Initial program 56.3%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.8%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr72.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.7
Simplified99.7%
Final simplification85.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1.22e-23)
(fma (/ 1.0 (sin B)) -1.0 (- (/ x (tan B))))
(if (<= F 3.3e-139)
(+
(* x (/ -1.0 (tan B)))
(* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
(if (<= F 3100000.0)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.22e-23) {
tmp = fma((1.0 / sin(B)), -1.0, -(x / tan(B)));
} else if (F <= 3.3e-139) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
} else if (F <= 3100000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.22e-23) tmp = fma(Float64(1.0 / sin(B)), -1.0, Float64(-Float64(x / tan(B)))); elseif (F <= 3.3e-139) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B))); elseif (F <= 3100000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B)); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.22e-23], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * -1.0 + (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 3.3e-139], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3100000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sin B}, -1, -\frac{x}{\tan B}\right)\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-139}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 3100000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.22000000000000007e-23Initial program 60.3%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr79.0%
Taylor expanded in F around -inf
Simplified96.3%
if -1.22000000000000007e-23 < F < 3.3e-139Initial program 99.5%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6488.6
Simplified88.6%
if 3.3e-139 < F < 3.1e6Initial program 99.2%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.4%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in B around 0
Simplified92.3%
if 3.1e6 < F Initial program 56.3%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.8%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr72.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.7
Simplified99.7%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(if (<= F -3.3e-25)
(/ (fma (cos B) (- x) -1.0) (sin B))
(if (<= F 4.3e-138)
(+
(* x (/ -1.0 (tan B)))
(* (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (/ F B)))
(if (<= F 860000.0)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.3e-25) {
tmp = fma(cos(B), -x, -1.0) / sin(B);
} else if (F <= 4.3e-138) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * (F / B));
} else if (F <= 860000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3.3e-25) tmp = Float64(fma(cos(B), Float64(-x), -1.0) / sin(B)); elseif (F <= 4.3e-138) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) * Float64(F / B))); elseif (F <= 860000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B)); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3.3e-25], N[(N[(N[Cos[B], $MachinePrecision] * (-x) + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-138], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 860000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.3 \cdot 10^{-25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\cos B, -x, -1\right)}{\sin B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-138}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 860000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -3.2999999999999998e-25Initial program 60.7%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr79.2%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr79.1%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
+-commutativeN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6496.2
Simplified96.2%
if -3.2999999999999998e-25 < F < 4.3e-138Initial program 99.5%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6488.5
Simplified88.5%
if 4.3e-138 < F < 8.6e5Initial program 99.2%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr99.4%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in B around 0
Simplified92.3%
if 8.6e5 < F Initial program 56.3%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr72.8%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr72.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.7
Simplified99.7%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(if (<= x -7.5e-43)
(* (cos B) (/ (- x) (sin B)))
(if (<= x 2e-82)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
(- (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -7.5e-43) {
tmp = cos(B) * (-x / sin(B));
} else if (x <= 2e-82) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
} else {
tmp = -(x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (x <= -7.5e-43) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (x <= 2e-82) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B)); else tmp = Float64(-Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[x, -7.5e-43], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-82], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-43}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{\tan B}\\
\end{array}
\end{array}
if x < -7.50000000000000068e-43Initial program 64.1%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6479.6
Simplified79.6%
clear-numN/A
distribute-neg-frac2N/A
associate-/l/N/A
tan-quotN/A
distribute-neg-frac2N/A
clear-numN/A
tan-quotN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f64N/A
cos-lowering-cos.f6479.7
Applied egg-rr79.7%
if -7.50000000000000068e-43 < x < 2e-82Initial program 73.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr77.1%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr77.2%
Taylor expanded in B around 0
Simplified68.8%
if 2e-82 < x Initial program 82.3%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6490.4
Simplified90.4%
clear-numN/A
distribute-neg-frac2N/A
associate-/l/N/A
tan-quotN/A
distribute-neg-frac2N/A
clear-numN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6490.5
Applied egg-rr90.5%
Final simplification80.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ x (tan B)))))
(if (<= x -3.5e-39)
t_0
(if (<= x 1.8e-82)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) (sin B))
t_0))))
double code(double F, double B, double x) {
double t_0 = -(x / tan(B));
double tmp;
if (x <= -3.5e-39) {
tmp = t_0;
} else if (x <= 1.8e-82) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(-Float64(x / tan(B))) tmp = 0.0 if (x <= -3.5e-39) tmp = t_0; elseif (x <= 1.8e-82) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / sin(B)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[x, -3.5e-39], t$95$0, If[LessEqual[x, 1.8e-82], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\frac{x}{\tan B}\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -3.5e-39 or 1.79999999999999999e-82 < x Initial program 77.9%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6487.8
Simplified87.8%
clear-numN/A
distribute-neg-frac2N/A
associate-/l/N/A
tan-quotN/A
distribute-neg-frac2N/A
clear-numN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6487.9
Applied egg-rr87.9%
if -3.5e-39 < x < 1.79999999999999999e-82Initial program 73.4%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr77.1%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr77.2%
Taylor expanded in B around 0
Simplified68.8%
Final simplification80.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ x (tan B)))))
(if (<= x -6.2e-70)
t_0
(if (<= x 6.5e-84) (/ (* F (sqrt (/ 1.0 (fma F F 2.0)))) (sin B)) t_0))))
double code(double F, double B, double x) {
double t_0 = -(x / tan(B));
double tmp;
if (x <= -6.2e-70) {
tmp = t_0;
} else if (x <= 6.5e-84) {
tmp = (F * sqrt((1.0 / fma(F, F, 2.0)))) / sin(B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(-Float64(x / tan(B))) tmp = 0.0 if (x <= -6.2e-70) tmp = t_0; elseif (x <= 6.5e-84) tmp = Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) / sin(B)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[x, -6.2e-70], t$95$0, If[LessEqual[x, 6.5e-84], N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\frac{x}{\tan B}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{-70}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-84}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -6.2e-70 or 6.50000000000000022e-84 < x Initial program 77.2%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6485.4
Simplified85.4%
clear-numN/A
distribute-neg-frac2N/A
associate-/l/N/A
tan-quotN/A
distribute-neg-frac2N/A
clear-numN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6485.5
Applied egg-rr85.5%
if -6.2e-70 < x < 6.50000000000000022e-84Initial program 74.1%
+-commutativeN/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
accelerator-lowering-fma.f64N/A
Applied egg-rr78.2%
unsub-negN/A
div-invN/A
associate-*l/N/A
tan-quotN/A
clear-numN/A
associate-/l*N/A
sub-divN/A
/-lowering-/.f64N/A
Applied egg-rr78.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6459.8
Simplified59.8%
Final simplification75.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ x (tan B)))))
(if (<= x -9.5e-67)
t_0
(if (<= x 5.2e-86) (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0))))
double code(double F, double B, double x) {
double t_0 = -(x / tan(B));
double tmp;
if (x <= -9.5e-67) {
tmp = t_0;
} else if (x <= 5.2e-86) {
tmp = F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B));
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(-Float64(x / tan(B))) tmp = 0.0 if (x <= -9.5e-67) tmp = t_0; elseif (x <= 5.2e-86) tmp = Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])}, If[LessEqual[x, -9.5e-67], t$95$0, If[LessEqual[x, 5.2e-86], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\frac{x}{\tan B}\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{-67}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-86}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -9.4999999999999994e-67 or 5.2000000000000002e-86 < x Initial program 77.2%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6485.4
Simplified85.4%
clear-numN/A
distribute-neg-frac2N/A
associate-/l/N/A
tan-quotN/A
distribute-neg-frac2N/A
clear-numN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6485.5
Applied egg-rr85.5%
if -9.4999999999999994e-67 < x < 5.2000000000000002e-86Initial program 74.1%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
sin-lowering-sin.f6459.8
Simplified59.8%
Final simplification75.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0))))))
(if (<= B 0.062)
(/
(fma
(* B B)
(fma
t_0
(fma (* F (* B B)) 0.019444444444444445 (* F 0.16666666666666666))
(* x (fma 0.022222222222222223 (* B B) 0.3333333333333333)))
(fma F t_0 (- x)))
B)
(- (/ x (tan B))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0))));
double tmp;
if (B <= 0.062) {
tmp = fma((B * B), fma(t_0, fma((F * (B * B)), 0.019444444444444445, (F * 0.16666666666666666)), (x * fma(0.022222222222222223, (B * B), 0.3333333333333333))), fma(F, t_0, -x)) / B;
} else {
tmp = -(x / tan(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))) tmp = 0.0 if (B <= 0.062) tmp = Float64(fma(Float64(B * B), fma(t_0, fma(Float64(F * Float64(B * B)), 0.019444444444444445, Float64(F * 0.16666666666666666)), Float64(x * fma(0.022222222222222223, Float64(B * B), 0.3333333333333333))), fma(F, t_0, Float64(-x))) / B); else tmp = Float64(-Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 0.062], N[(N[(N[(B * B), $MachinePrecision] * N[(t$95$0 * N[(N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] * 0.019444444444444445 + N[(F * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(x * N[(0.022222222222222223 * N[(B * B), $MachinePrecision] + 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F * t$95$0 + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
\mathbf{if}\;B \leq 0.062:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(t\_0, \mathsf{fma}\left(F \cdot \left(B \cdot B\right), 0.019444444444444445, F \cdot 0.16666666666666666\right), x \cdot \mathsf{fma}\left(0.022222222222222223, B \cdot B, 0.3333333333333333\right)\right), \mathsf{fma}\left(F, t\_0, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 0.062Initial program 70.5%
Taylor expanded in B around 0
Simplified56.9%
if 0.062 < B Initial program 91.1%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6465.6
Simplified65.6%
clear-numN/A
distribute-neg-frac2N/A
associate-/l/N/A
tan-quotN/A
distribute-neg-frac2N/A
clear-numN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6465.7
Applied egg-rr65.7%
Final simplification59.2%
(FPCore (F B x)
:precision binary64
(if (<= B 0.036)
(/
(fma
(sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0))))
(fma 0.16666666666666666 (* F (* B B)) F)
(- (* 0.3333333333333333 (* x (* B B))) x))
B)
(- (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.036) {
tmp = fma(sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), fma(0.16666666666666666, (F * (B * B)), F), ((0.3333333333333333 * (x * (B * B))) - x)) / B;
} else {
tmp = -(x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 0.036) tmp = Float64(fma(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), fma(0.16666666666666666, Float64(F * Float64(B * B)), F), Float64(Float64(0.3333333333333333 * Float64(x * Float64(B * B))) - x)) / B); else tmp = Float64(-Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 0.036], N[(N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.16666666666666666 * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] + F), $MachinePrecision] + N[(N[(0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.036:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{fma}\left(0.16666666666666666, F \cdot \left(B \cdot B\right), F\right), 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right) - x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 0.0359999999999999973Initial program 70.5%
Taylor expanded in B around 0
Simplified56.9%
if 0.0359999999999999973 < B Initial program 91.1%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6465.6
Simplified65.6%
clear-numN/A
distribute-neg-frac2N/A
associate-/l/N/A
tan-quotN/A
distribute-neg-frac2N/A
clear-numN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
tan-lowering-tan.f6465.7
Applied egg-rr65.7%
Final simplification59.2%
(FPCore (F B x)
:precision binary64
(if (<= F -3e-21)
(/ (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) (- -1.0 x)) B)
(if (<= F 50000000.0)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-21) {
tmp = fma(0.5, (fma(2.0, x, 2.0) / (F * F)), (-1.0 - x)) / B;
} else if (F <= 50000000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3e-21) tmp = Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), Float64(-1.0 - x)) / B); elseif (F <= 50000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3e-21], N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}{B}\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.99999999999999991e-21Initial program 59.8%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6436.2
Simplified36.2%
Taylor expanded in F around -inf
sub-negN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6450.0
Simplified50.0%
if -2.99999999999999991e-21 < F < 5e7Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6449.7
Simplified49.7%
/-lowering-/.f64N/A
Applied egg-rr49.8%
if 5e7 < F Initial program 56.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6439.5
Simplified39.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6454.0
Simplified54.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3e-21)
(/ (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) (- -1.0 x)) B)
(if (<= F 50000000.0)
(/ (- (/ F (sqrt (fma F F 2.0))) x) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-21) {
tmp = fma(0.5, (fma(2.0, x, 2.0) / (F * F)), (-1.0 - x)) / B;
} else if (F <= 50000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3e-21) tmp = Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), Float64(-1.0 - x)) / B); elseif (F <= 50000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) - x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3e-21], N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1 - x\right)}{B}\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.99999999999999991e-21Initial program 59.8%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6436.2
Simplified36.2%
Taylor expanded in F around -inf
sub-negN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6450.0
Simplified50.0%
if -2.99999999999999991e-21 < F < 5e7Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6449.7
Simplified49.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6449.2
Simplified49.2%
/-lowering-/.f64N/A
unsub-negN/A
--lowering--.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
accelerator-lowering-fma.f6449.2
Applied egg-rr49.2%
if 5e7 < F Initial program 56.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6439.5
Simplified39.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6454.0
Simplified54.0%
(FPCore (F B x) :precision binary64 (if (<= F -3e-21) (/ (+ (- -1.0 x) (/ 1.0 (* F F))) B) (if (<= F 2e+97) (/ (- (/ F (sqrt (fma F F 2.0))) x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-21) {
tmp = ((-1.0 - x) + (1.0 / (F * F))) / B;
} else if (F <= 2e+97) {
tmp = ((F / sqrt(fma(F, F, 2.0))) - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3e-21) tmp = Float64(Float64(Float64(-1.0 - x) + Float64(1.0 / Float64(F * F))) / B); elseif (F <= 2e+97) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) - x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3e-21], N[(N[(N[(-1.0 - x), $MachinePrecision] + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2e+97], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\
\;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+97}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.99999999999999991e-21Initial program 59.8%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6436.2
Simplified36.2%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6436.2
Simplified36.2%
Taylor expanded in F around -inf
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6449.9
Simplified49.9%
if -2.99999999999999991e-21 < F < 2.0000000000000001e97Initial program 97.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6450.8
Simplified50.8%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6450.4
Simplified50.4%
/-lowering-/.f64N/A
unsub-negN/A
--lowering--.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
accelerator-lowering-fma.f6450.4
Applied egg-rr50.4%
if 2.0000000000000001e97 < F Initial program 44.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6432.5
Simplified32.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6452.8
Simplified52.8%
Final simplification50.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.75e-20)
(/ (+ (- -1.0 x) (/ 1.0 (* F F))) B)
(if (<= F 1.3)
(/ (fma F (sqrt (fma (* F F) -0.25 0.5)) (- x)) B)
(/ (+ (- 1.0 x) (/ -1.0 (* F F))) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-20) {
tmp = ((-1.0 - x) + (1.0 / (F * F))) / B;
} else if (F <= 1.3) {
tmp = fma(F, sqrt(fma((F * F), -0.25, 0.5)), -x) / B;
} else {
tmp = ((1.0 - x) + (-1.0 / (F * F))) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.75e-20) tmp = Float64(Float64(Float64(-1.0 - x) + Float64(1.0 / Float64(F * F))) / B); elseif (F <= 1.3) tmp = Float64(fma(F, sqrt(fma(Float64(F * F), -0.25, 0.5)), Float64(-x)) / B); else tmp = Float64(Float64(Float64(1.0 - x) + Float64(-1.0 / Float64(F * F))) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.75e-20], N[(N[(N[(-1.0 - x), $MachinePrecision] + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.3], N[(N[(F * N[Sqrt[N[(N[(F * F), $MachinePrecision] * -0.25 + 0.5), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] + N[(-1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{-20}:\\
\;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\
\mathbf{elif}\;F \leq 1.3:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\mathsf{fma}\left(F \cdot F, -0.25, 0.5\right)}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\
\end{array}
\end{array}
if F < -1.75000000000000002e-20Initial program 59.2%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6436.7
Simplified36.7%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6436.7
Simplified36.7%
Taylor expanded in F around -inf
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6450.6
Simplified50.6%
if -1.75000000000000002e-20 < F < 1.30000000000000004Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6448.8
Simplified48.8%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6448.3
Simplified48.3%
Taylor expanded in F around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6448.3
Simplified48.3%
if 1.30000000000000004 < F Initial program 56.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.4
Simplified40.4%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6440.4
Simplified40.4%
Taylor expanded in F around inf
associate--r+N/A
sub-negN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.6
Simplified54.6%
Final simplification50.7%
(FPCore (F B x)
:precision binary64
(if (<= F -3e-21)
(/ (+ (- -1.0 x) (/ 1.0 (* F F))) B)
(if (<= F 1.45)
(/ (fma F (sqrt 0.5) (- x)) B)
(/ (+ (- 1.0 x) (/ -1.0 (* F F))) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-21) {
tmp = ((-1.0 - x) + (1.0 / (F * F))) / B;
} else if (F <= 1.45) {
tmp = fma(F, sqrt(0.5), -x) / B;
} else {
tmp = ((1.0 - x) + (-1.0 / (F * F))) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3e-21) tmp = Float64(Float64(Float64(-1.0 - x) + Float64(1.0 / Float64(F * F))) / B); elseif (F <= 1.45) tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B); else tmp = Float64(Float64(Float64(1.0 - x) + Float64(-1.0 / Float64(F * F))) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3e-21], N[(N[(N[(-1.0 - x), $MachinePrecision] + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] + N[(-1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-21}:\\
\;\;\;\;\frac{\left(-1 - x\right) + \frac{1}{F \cdot F}}{B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\
\end{array}
\end{array}
if F < -2.99999999999999991e-21Initial program 59.8%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6436.2
Simplified36.2%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6436.2
Simplified36.2%
Taylor expanded in F around -inf
sub-negN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6449.9
Simplified49.9%
if -2.99999999999999991e-21 < F < 1.44999999999999996Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6449.2
Simplified49.2%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6448.7
Simplified48.7%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f6448.7
Simplified48.7%
if 1.44999999999999996 < F Initial program 56.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.4
Simplified40.4%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6440.4
Simplified40.4%
Taylor expanded in F around inf
associate--r+N/A
sub-negN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.6
Simplified54.6%
Final simplification50.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.22e-23)
(/ (- -1.0 x) B)
(if (<= F 1.46)
(/ (fma F (sqrt 0.5) (- x)) B)
(/ (+ (- 1.0 x) (/ -1.0 (* F F))) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.22e-23) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.46) {
tmp = fma(F, sqrt(0.5), -x) / B;
} else {
tmp = ((1.0 - x) + (-1.0 / (F * F))) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.22e-23) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.46) tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B); else tmp = Float64(Float64(Float64(1.0 - x) + Float64(-1.0 / Float64(F * F))) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.22e-23], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.46], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] + N[(-1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.46:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 - x\right) + \frac{-1}{F \cdot F}}{B}\\
\end{array}
\end{array}
if F < -1.22000000000000007e-23Initial program 60.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6435.8
Simplified35.8%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6449.3
Simplified49.3%
if -1.22000000000000007e-23 < F < 1.46Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6449.6
Simplified49.6%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6449.1
Simplified49.1%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f6449.1
Simplified49.1%
if 1.46 < F Initial program 56.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.4
Simplified40.4%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6440.4
Simplified40.4%
Taylor expanded in F around inf
associate--r+N/A
sub-negN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.6
Simplified54.6%
(FPCore (F B x) :precision binary64 (if (<= F -1.22e-23) (/ (- -1.0 x) B) (if (<= F 1.45) (/ (fma F (sqrt 0.5) (- x)) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.22e-23) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.45) {
tmp = fma(F, sqrt(0.5), -x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.22e-23) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.45) tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.22e-23], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.22 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.22000000000000007e-23Initial program 60.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6435.8
Simplified35.8%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6449.3
Simplified49.3%
if -1.22000000000000007e-23 < F < 1.44999999999999996Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6449.6
Simplified49.6%
Taylor expanded in x around 0
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6449.1
Simplified49.1%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f6449.1
Simplified49.1%
if 1.44999999999999996 < F Initial program 56.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6440.4
Simplified40.4%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6454.3
Simplified54.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.2e-46)
(/ (- -1.0 x) B)
(if (<= F 3.1e-83)
(/ (* x (fma (* B B) 0.3333333333333333 -1.0)) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.1e-83) {
tmp = (x * fma((B * B), 0.3333333333333333, -1.0)) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.2e-46) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.1e-83) tmp = Float64(Float64(x * fma(Float64(B * B), 0.3333333333333333, -1.0)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.2e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.1e-83], N[(N[(x * N[(N[(B * B), $MachinePrecision] * 0.3333333333333333 + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-83}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.20000000000000007e-46Initial program 62.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6438.6
Simplified38.6%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6449.0
Simplified49.0%
if -1.20000000000000007e-46 < F < 3.09999999999999992e-83Initial program 99.5%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6477.9
Simplified77.9%
clear-numN/A
distribute-neg-fracN/A
associate-/l/N/A
tan-quotN/A
metadata-evalN/A
div-invN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
frac-2negN/A
/-lowering-/.f64N/A
tan-lowering-tan.f64N/A
/-lowering-/.f6477.7
Applied egg-rr77.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6437.4
Simplified37.4%
if 3.09999999999999992e-83 < F Initial program 64.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6443.8
Simplified43.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6449.7
Simplified49.7%
(FPCore (F B x)
:precision binary64
(if (<= F -2.15e-47)
(/ (- -1.0 x) B)
(if (<= F 4.5e-83)
(* x (/ (fma (* B B) 0.3333333333333333 -1.0) B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.15e-47) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.5e-83) {
tmp = x * (fma((B * B), 0.3333333333333333, -1.0) / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2.15e-47) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.5e-83) tmp = Float64(x * Float64(fma(Float64(B * B), 0.3333333333333333, -1.0) / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2.15e-47], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.5e-83], N[(x * N[(N[(N[(B * B), $MachinePrecision] * 0.3333333333333333 + -1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.15 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \frac{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.1499999999999999e-47Initial program 62.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6438.6
Simplified38.6%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6449.0
Simplified49.0%
if -2.1499999999999999e-47 < F < 4.49999999999999997e-83Initial program 99.5%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6477.9
Simplified77.9%
clear-numN/A
distribute-neg-fracN/A
associate-/l/N/A
tan-quotN/A
metadata-evalN/A
div-invN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
frac-2negN/A
/-lowering-/.f64N/A
tan-lowering-tan.f64N/A
/-lowering-/.f6477.7
Applied egg-rr77.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6437.2
Simplified37.2%
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6437.3
Applied egg-rr37.3%
if 4.49999999999999997e-83 < F Initial program 64.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6443.8
Simplified43.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6449.7
Simplified49.7%
Final simplification45.2%
(FPCore (F B x) :precision binary64 (if (<= F -1.55e-46) (/ (- -1.0 x) B) (if (<= F 6.2e-136) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.55e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.2e-136) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.55d-46)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6.2d-136) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.55e-46) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.2e-136) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.55e-46: tmp = (-1.0 - x) / B elif F <= 6.2e-136: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.55e-46) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6.2e-136) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.55e-46) tmp = (-1.0 - x) / B; elseif (F <= 6.2e-136) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.55e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.2e-136], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.55 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-136}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.55e-46Initial program 62.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6438.6
Simplified38.6%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6449.0
Simplified49.0%
if -1.55e-46 < F < 6.2e-136Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6446.3
Simplified46.3%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6437.1
Simplified37.1%
if 6.2e-136 < F Initial program 66.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6443.7
Simplified43.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6449.3
Simplified49.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.15e-46) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-46) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.15d-46)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-46) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-46: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-46) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-46) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.15e-46Initial program 62.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6438.6
Simplified38.6%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6449.0
Simplified49.0%
if -1.15e-46 < F Initial program 82.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6445.0
Simplified45.0%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6434.2
Simplified34.2%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 76.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6443.0
Simplified43.0%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f6432.5
Simplified32.5%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 76.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6443.0
Simplified43.0%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6432.5
Simplified32.5%
Taylor expanded in x around 0
/-lowering-/.f649.9
Simplified9.9%
(FPCore (F B x) :precision binary64 (* x (* B 0.3333333333333333)))
double code(double F, double B, double x) {
return x * (B * 0.3333333333333333);
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x * (b * 0.3333333333333333d0)
end function
public static double code(double F, double B, double x) {
return x * (B * 0.3333333333333333);
}
def code(F, B, x): return x * (B * 0.3333333333333333)
function code(F, B, x) return Float64(x * Float64(B * 0.3333333333333333)) end
function tmp = code(F, B, x) tmp = x * (B * 0.3333333333333333); end
code[F_, B_, x_] := N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(B \cdot 0.3333333333333333\right)
\end{array}
Initial program 76.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6461.2
Simplified61.2%
clear-numN/A
distribute-neg-fracN/A
associate-/l/N/A
tan-quotN/A
metadata-evalN/A
div-invN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
frac-2negN/A
/-lowering-/.f64N/A
tan-lowering-tan.f64N/A
/-lowering-/.f6461.1
Applied egg-rr61.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6432.5
Simplified32.5%
Taylor expanded in B around inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f642.8
Simplified2.8%
herbie shell --seed 2024198
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
:precision binary64
(+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))