
(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 31 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 -1e+64)
(- t_0 t_1)
(if (<= F 110000000.0)
(fma
(* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (- F))
t_0
(/ (- x) (tan B)))
(- (/ 1.0 (sin B)) 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 <= -1e+64) {
tmp = t_0 - t_1;
} else if (F <= 110000000.0) {
tmp = fma((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * -F), t_0, (-x / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+64) tmp = Float64(t_0 - t_1); elseif (F <= 110000000.0) tmp = fma(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(-F)), t_0, Float64(Float64(-x) / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - 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, -1e+64], N[(t$95$0 - t$95$1), $MachinePrecision], If[LessEqual[F, 110000000.0], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * (-F)), $MachinePrecision] * t$95$0 + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - 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 \cdot 10^{+64}:\\
\;\;\;\;t\_0 - t\_1\\
\mathbf{elif}\;F \leq 110000000:\\
\;\;\;\;\mathsf{fma}\left({\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \left(-F\right), t\_0, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.00000000000000002e64Initial program 41.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
if -1.00000000000000002e64 < F < 1.1e8Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
if 1.1e8 < F Initial program 58.8%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Applied rewrites99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+77)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 360000000.0)
(fma
(/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))
F
(/ (- x) (tan B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+77) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 360000000.0) {
tmp = fma((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B)), F, (-x / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+77) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 360000000.0) tmp = fma(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B)), F, Float64(Float64(-x) / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+77], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 360000000.0], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] * F + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+77}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 360000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, F, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.99999999999999997e77Initial program 41.3%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
if -1.99999999999999997e77 < F < 3.6e8Initial program 97.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
if 3.6e8 < F Initial program 58.2%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Applied rewrites99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+84)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 82000000.0)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (* (cos B) x)) (sin B))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+84) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 82000000.0) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - (cos(B) * x)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+84) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 82000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - Float64(cos(B) * x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+84], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 82000000.0], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 82000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \cos B \cdot x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.00000000000000012e84Initial program 40.0%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
if -2.00000000000000012e84 < F < 8.2e7Initial program 96.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Applied rewrites99.5%
if 8.2e7 < F Initial program 58.8%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Applied rewrites99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+84)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 82000000.0)
(/ (- (/ F (sqrt (fma F F 2.0))) (* (cos B) x)) (sin B))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+84) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 82000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) - (cos(B) * x)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+84) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 82000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) - Float64(cos(B) * x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+84], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 82000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 82000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \cos B \cdot x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.00000000000000012e84Initial program 40.0%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
if -2.00000000000000012e84 < F < 8.2e7Initial program 96.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Applied rewrites99.5%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.1
Applied rewrites99.1%
if 8.2e7 < F Initial program 58.8%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Applied rewrites99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.8)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(/ (- (/ F (sqrt (fma 2.0 x 2.0))) (* (cos B) x)) (sin B))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.8) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F / sqrt(fma(2.0, x, 2.0))) - (cos(B) * x)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.8) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, 2.0))) - Float64(cos(B) * x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.8:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - \cos B \cdot x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.7999999999999998Initial program 48.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6498.1
Applied rewrites98.1%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6498.1
Applied rewrites98.3%
if -2.7999999999999998 < F < 1.3999999999999999Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Applied rewrites99.4%
Taylor expanded in F around 0
lower-sqrt.f64N/A
+-commutativeN/A
lower-fma.f6499.4
Applied rewrites99.4%
if 1.3999999999999999 < F Initial program 59.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6499.5
Applied rewrites99.5%
Applied rewrites99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0))))))
(if (<= F -3e+231)
(-
(/ -1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B))
(/ 1.0 (/ (tan B) x)))
(if (<= F -1.25e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.9e-144)
(fma (/ t_0 B) F (/ (- x) (tan B)))
(if (<= F 8.2e-6)
(/ (fma t_0 F (- x)) (sin B))
(/ (- 1.0 (* (cos B) x)) (sin B))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0))));
double tmp;
if (F <= -3e+231) {
tmp = (-1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (1.0 / (tan(B) / x));
} else if (F <= -1.25e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.9e-144) {
tmp = fma((t_0 / B), F, (-x / tan(B)));
} else if (F <= 8.2e-6) {
tmp = fma(t_0, F, -x) / sin(B);
} else {
tmp = (1.0 - (cos(B) * x)) / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) tmp = 0.0 if (F <= -3e+231) tmp = Float64(Float64(-1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= -1.25e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.9e-144) tmp = fma(Float64(t_0 / B), F, Float64(Float64(-x) / tan(B))); elseif (F <= 8.2e-6) tmp = Float64(fma(t_0, F, Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 - Float64(cos(B) * x)) / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -3e+231], N[(N[(-1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-144], N[(N[(t$95$0 / B), $MachinePrecision] * F + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(t$95$0 * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-144}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t\_0}{B}, F, \frac{-x}{\tan B}\right)\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0, F, -x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \cos B \cdot x}{\sin B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231Initial program 35.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Taylor expanded in B around 0
Applied rewrites80.7%
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-neg.f64N/A
lift-/.f64N/A
div-invN/A
clear-numN/A
lower-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
remove-double-negN/A
lower-/.f64N/A
lower-neg.f6480.9
Applied rewrites80.9%
if -3.0000000000000002e231 < F < -1.24999999999999997e37Initial program 50.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6486.5
Applied rewrites86.5%
if -1.24999999999999997e37 < F < 2.9000000000000002e-144Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6484.4
Applied rewrites84.4%
if 2.9000000000000002e-144 < F < 8.1999999999999994e-6Initial program 99.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.4%
Applied rewrites99.3%
Taylor expanded in B around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6487.4
Applied rewrites87.4%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Applied rewrites98.5%
Final simplification88.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0))))) (t_1 (/ x (tan B))))
(if (<= F -48.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 2.9e-144)
(fma (/ t_0 B) F (/ (- x) (tan B)))
(if (<= F 8.2e-6)
(/ (fma t_0 F (- x)) (sin B))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0))));
double t_1 = x / tan(B);
double tmp;
if (F <= -48.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 2.9e-144) {
tmp = fma((t_0 / B), F, (-x / tan(B)));
} else if (F <= 8.2e-6) {
tmp = fma(t_0, F, -x) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -48.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 2.9e-144) tmp = fma(Float64(t_0 / B), F, Float64(Float64(-x) / tan(B))); elseif (F <= 8.2e-6) tmp = Float64(fma(t_0, F, Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -48.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.9e-144], N[(N[(t$95$0 / B), $MachinePrecision] * F + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(t$95$0 * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -48:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-144}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t\_0}{B}, F, \frac{-x}{\tan B}\right)\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0, F, -x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -48Initial program 48.2%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.0
Applied rewrites99.0%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.0
Applied rewrites99.2%
if -48 < F < 2.9000000000000002e-144Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6485.1
Applied rewrites85.1%
if 2.9000000000000002e-144 < F < 8.1999999999999994e-6Initial program 99.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.4%
Applied rewrites99.3%
Taylor expanded in B around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6487.4
Applied rewrites87.4%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Applied rewrites98.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0))))))
(if (<= F -48.0)
(/ (- -1.0 (* (cos B) x)) (sin B))
(if (<= F 2.9e-144)
(fma (/ t_0 B) F (/ (- x) (tan B)))
(if (<= F 8.2e-6)
(/ (fma t_0 F (- x)) (sin B))
(- (/ 1.0 (sin B)) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0))));
double tmp;
if (F <= -48.0) {
tmp = (-1.0 - (cos(B) * x)) / sin(B);
} else if (F <= 2.9e-144) {
tmp = fma((t_0 / B), F, (-x / tan(B)));
} else if (F <= 8.2e-6) {
tmp = fma(t_0, F, -x) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) tmp = 0.0 if (F <= -48.0) tmp = Float64(Float64(-1.0 - Float64(cos(B) * x)) / sin(B)); elseif (F <= 2.9e-144) tmp = fma(Float64(t_0 / B), F, Float64(Float64(-x) / tan(B))); elseif (F <= 8.2e-6) tmp = Float64(fma(t_0, F, Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -48.0], N[(N[(-1.0 - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-144], N[(N[(t$95$0 / B), $MachinePrecision] * F + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(t$95$0 * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\
\mathbf{if}\;F \leq -48:\\
\;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-144}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t\_0}{B}, F, \frac{-x}{\tan B}\right)\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0, F, -x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -48Initial program 48.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites64.1%
Applied rewrites64.1%
Taylor expanded in F around -inf
Applied rewrites99.1%
if -48 < F < 2.9000000000000002e-144Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6485.1
Applied rewrites85.1%
if 2.9000000000000002e-144 < F < 8.1999999999999994e-6Initial program 99.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.4%
Applied rewrites99.3%
Taylor expanded in B around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6487.4
Applied rewrites87.4%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Applied rewrites98.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0))))) (t_1 (* (cos B) x)))
(if (<= F -48.0)
(/ (- -1.0 t_1) (sin B))
(if (<= F 2.9e-144)
(fma (/ t_0 B) F (/ (- x) (tan B)))
(if (<= F 8.2e-6)
(/ (fma t_0 F (- x)) (sin B))
(/ (- 1.0 t_1) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0))));
double t_1 = cos(B) * x;
double tmp;
if (F <= -48.0) {
tmp = (-1.0 - t_1) / sin(B);
} else if (F <= 2.9e-144) {
tmp = fma((t_0 / B), F, (-x / tan(B)));
} else if (F <= 8.2e-6) {
tmp = fma(t_0, F, -x) / sin(B);
} else {
tmp = (1.0 - t_1) / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) t_1 = Float64(cos(B) * x) tmp = 0.0 if (F <= -48.0) tmp = Float64(Float64(-1.0 - t_1) / sin(B)); elseif (F <= 2.9e-144) tmp = fma(Float64(t_0 / B), F, Float64(Float64(-x) / tan(B))); elseif (F <= 8.2e-6) tmp = Float64(fma(t_0, F, Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 - t_1) / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[F, -48.0], N[(N[(-1.0 - t$95$1), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-144], N[(N[(t$95$0 / B), $MachinePrecision] * F + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(t$95$0 * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t$95$1), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\
t_1 := \cos B \cdot x\\
\mathbf{if}\;F \leq -48:\\
\;\;\;\;\frac{-1 - t\_1}{\sin B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-144}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t\_0}{B}, F, \frac{-x}{\tan B}\right)\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0, F, -x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - t\_1}{\sin B}\\
\end{array}
\end{array}
if F < -48Initial program 48.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites64.1%
Applied rewrites64.1%
Taylor expanded in F around -inf
Applied rewrites99.1%
if -48 < F < 2.9000000000000002e-144Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6485.1
Applied rewrites85.1%
if 2.9000000000000002e-144 < F < 8.1999999999999994e-6Initial program 99.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.4%
Applied rewrites99.3%
Taylor expanded in B around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6487.4
Applied rewrites87.4%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Applied rewrites98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(/ (fma (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) F (- x)) (sin B))))
(if (<= F -3e+231)
(-
(/ -1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B))
(/ 1.0 (/ (tan B) x)))
(if (<= F -2.5e+82)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.8e-219)
t_0
(if (<= F 8.5e-182)
(-
(/
-1.0
(*
(fma
(fma 0.008333333333333333 (* B B) -0.16666666666666666)
(* B B)
1.0)
B))
(/ x (tan B)))
(if (<= F 8.2e-6) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = fma(sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))), F, -x) / sin(B);
double tmp;
if (F <= -3e+231) {
tmp = (-1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (1.0 / (tan(B) / x));
} else if (F <= -2.5e+82) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.8e-219) {
tmp = t_0;
} else if (F <= 8.5e-182) {
tmp = (-1.0 / (fma(fma(0.008333333333333333, (B * B), -0.16666666666666666), (B * B), 1.0) * B)) - (x / tan(B));
} else if (F <= 8.2e-6) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(fma(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))), F, Float64(-x)) / sin(B)) tmp = 0.0 if (F <= -3e+231) tmp = Float64(Float64(-1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= -2.5e+82) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.8e-219) tmp = t_0; elseif (F <= 8.5e-182) tmp = Float64(Float64(-1.0 / Float64(fma(fma(0.008333333333333333, Float64(B * B), -0.16666666666666666), Float64(B * B), 1.0) * B)) - Float64(x / tan(B))); elseif (F <= 8.2e-6) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+231], N[(N[(-1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.5e+82], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.8e-219], t$95$0, If[LessEqual[F, 8.5e-182], N[(N[(-1.0 / N[(N[(N[(0.008333333333333333 * N[(B * B), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{\sin B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq -2.5 \cdot 10^{+82}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-219}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-182}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, B \cdot B, -0.16666666666666666\right), B \cdot B, 1\right) \cdot B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231Initial program 35.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Taylor expanded in B around 0
Applied rewrites80.7%
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-neg.f64N/A
lift-/.f64N/A
div-invN/A
clear-numN/A
lower-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
remove-double-negN/A
lower-/.f64N/A
lower-neg.f6480.9
Applied rewrites80.9%
if -3.0000000000000002e231 < F < -2.50000000000000008e82Initial program 45.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6485.0
Applied rewrites85.0%
if -2.50000000000000008e82 < F < -3.80000000000000025e-219 or 8.5000000000000001e-182 < F < 8.1999999999999994e-6Initial program 94.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Applied rewrites99.5%
Taylor expanded in B around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6483.2
Applied rewrites83.2%
if -3.80000000000000025e-219 < F < 8.5000000000000001e-182Initial program 99.3%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6440.1
Applied rewrites40.1%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6440.1
Applied rewrites40.2%
Taylor expanded in B around 0
Applied rewrites74.6%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites78.9%
Final simplification80.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1
(/ (fma (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) F (- x)) (sin B))))
(if (<= F -3e+231)
(- (/ -1.0 (* (fma (* B B) -0.16666666666666666 1.0) B)) t_0)
(if (<= F -2.5e+82)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.8e-219)
t_1
(if (<= F 8.5e-182)
(-
(/
-1.0
(*
(fma
(fma 0.008333333333333333 (* B B) -0.16666666666666666)
(* B B)
1.0)
B))
t_0)
(if (<= F 8.2e-6) t_1 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = fma(sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))), F, -x) / sin(B);
double tmp;
if (F <= -3e+231) {
tmp = (-1.0 / (fma((B * B), -0.16666666666666666, 1.0) * B)) - t_0;
} else if (F <= -2.5e+82) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.8e-219) {
tmp = t_1;
} else if (F <= 8.5e-182) {
tmp = (-1.0 / (fma(fma(0.008333333333333333, (B * B), -0.16666666666666666), (B * B), 1.0) * B)) - t_0;
} else if (F <= 8.2e-6) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(fma(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))), F, Float64(-x)) / sin(B)) tmp = 0.0 if (F <= -3e+231) tmp = Float64(Float64(-1.0 / Float64(fma(Float64(B * B), -0.16666666666666666, 1.0) * B)) - t_0); elseif (F <= -2.5e+82) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.8e-219) tmp = t_1; elseif (F <= 8.5e-182) tmp = Float64(Float64(-1.0 / Float64(fma(fma(0.008333333333333333, Float64(B * B), -0.16666666666666666), Float64(B * B), 1.0) * B)) - t_0); elseif (F <= 8.2e-6) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+231], N[(N[(-1.0 / N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.5e+82], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.8e-219], t$95$1, If[LessEqual[F, 8.5e-182], N[(N[(-1.0 / N[(N[(N[(0.008333333333333333 * N[(B * B), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.2e-6], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, F, -x\right)}{\sin B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - t\_0\\
\mathbf{elif}\;F \leq -2.5 \cdot 10^{+82}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-182}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, B \cdot B, -0.16666666666666666\right), B \cdot B, 1\right) \cdot B} - t\_0\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231Initial program 35.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Taylor expanded in B around 0
Applied rewrites80.7%
lift-+.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-neg.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites80.8%
if -3.0000000000000002e231 < F < -2.50000000000000008e82Initial program 45.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6485.0
Applied rewrites85.0%
if -2.50000000000000008e82 < F < -3.80000000000000025e-219 or 8.5000000000000001e-182 < F < 8.1999999999999994e-6Initial program 94.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.6%
Applied rewrites99.5%
Taylor expanded in B around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6483.2
Applied rewrites83.2%
if -3.80000000000000025e-219 < F < 8.5000000000000001e-182Initial program 99.3%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6440.1
Applied rewrites40.1%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6440.1
Applied rewrites40.2%
Taylor expanded in B around 0
Applied rewrites74.6%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites78.9%
(FPCore (F B x)
:precision binary64
(if (<= F -3e+231)
(-
(/ -1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B))
(/ 1.0 (/ (tan B) x)))
(if (<= F -1.25e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.5e+19)
(fma (/ (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) B) F (/ (- x) (tan B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e+231) {
tmp = (-1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (1.0 / (tan(B) / x));
} else if (F <= -1.25e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.5e+19) {
tmp = fma((sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))) / B), F, (-x / tan(B)));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3e+231) tmp = Float64(Float64(-1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= -1.25e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.5e+19) tmp = fma(Float64(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) / B), F, Float64(Float64(-x) / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3e+231], N[(N[(-1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e+19], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision] * F + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}{B}, F, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231Initial program 35.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Taylor expanded in B around 0
Applied rewrites80.7%
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-neg.f64N/A
lift-/.f64N/A
div-invN/A
clear-numN/A
lower-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
remove-double-negN/A
lower-/.f64N/A
lower-neg.f6480.9
Applied rewrites80.9%
if -3.0000000000000002e231 < F < -1.24999999999999997e37Initial program 50.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6486.5
Applied rewrites86.5%
if -1.24999999999999997e37 < F < 2.5e19Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
lower-fma.f64N/A
Applied rewrites99.5%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
unpow2N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6480.7
Applied rewrites80.7%
if 2.5e19 < F Initial program 56.9%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Taylor expanded in B around 0
Applied rewrites81.2%
Final simplification81.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e+231)
(- (/ -1.0 (* (fma (* B B) -0.16666666666666666 1.0) B)) t_0)
(if (<= F -1.25e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.3e-127)
(-
(/
-1.0
(*
(fma
(fma 0.008333333333333333 (* B B) -0.16666666666666666)
(* B B)
1.0)
B))
t_0)
(if (<= F 8.2e-6)
(* (/ F (sin B)) (sqrt (/ 1.0 (fma F F 2.0))))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3e+231) {
tmp = (-1.0 / (fma((B * B), -0.16666666666666666, 1.0) * B)) - t_0;
} else if (F <= -1.25e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.3e-127) {
tmp = (-1.0 / (fma(fma(0.008333333333333333, (B * B), -0.16666666666666666), (B * B), 1.0) * B)) - t_0;
} else if (F <= 8.2e-6) {
tmp = (F / sin(B)) * sqrt((1.0 / fma(F, F, 2.0)));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3e+231) tmp = Float64(Float64(-1.0 / Float64(fma(Float64(B * B), -0.16666666666666666, 1.0) * B)) - t_0); elseif (F <= -1.25e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.3e-127) tmp = Float64(Float64(-1.0 / Float64(fma(fma(0.008333333333333333, Float64(B * B), -0.16666666666666666), Float64(B * B), 1.0) * B)) - t_0); elseif (F <= 8.2e-6) tmp = Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / fma(F, F, 2.0)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+231], N[(N[(-1.0 / N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.25e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-127], N[(N[(-1.0 / N[(N[(N[(0.008333333333333333 * N[(B * B), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - t\_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-127}:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, B \cdot B, -0.16666666666666666\right), B \cdot B, 1\right) \cdot B} - t\_0\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231Initial program 35.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
Taylor expanded in B around 0
Applied rewrites80.7%
lift-+.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-neg.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites80.8%
if -3.0000000000000002e231 < F < -1.24999999999999997e37Initial program 50.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6486.5
Applied rewrites86.5%
if -1.24999999999999997e37 < F < 1.29999999999999995e-127Initial program 99.4%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6442.6
Applied rewrites42.6%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6442.6
Applied rewrites42.7%
Taylor expanded in B around 0
Applied rewrites60.0%
if 1.29999999999999995e-127 < F < 8.1999999999999994e-6Initial program 99.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-sin.f6472.6
Applied rewrites72.6%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites78.9%
Final simplification72.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(/ -1.0 (* (fma (* B B) -0.16666666666666666 1.0) B))
(/ x (tan B)))))
(if (<= F -3e+231)
t_0
(if (<= F -1.25e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.3e-127)
t_0
(if (<= F 8.2e-6)
(* (/ F (sin B)) (sqrt (/ 1.0 (fma F F 2.0))))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / (fma((B * B), -0.16666666666666666, 1.0) * B)) - (x / tan(B));
double tmp;
if (F <= -3e+231) {
tmp = t_0;
} else if (F <= -1.25e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.3e-127) {
tmp = t_0;
} else if (F <= 8.2e-6) {
tmp = (F / sin(B)) * sqrt((1.0 / fma(F, F, 2.0)));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(-1.0 / Float64(fma(Float64(B * B), -0.16666666666666666, 1.0) * B)) - Float64(x / tan(B))) tmp = 0.0 if (F <= -3e+231) tmp = t_0; elseif (F <= -1.25e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.3e-127) tmp = t_0; elseif (F <= 8.2e-6) tmp = Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / fma(F, F, 2.0)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+231], t$95$0, If[LessEqual[F, -1.25e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-127], t$95$0, If[LessEqual[F, 8.2e-6], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231 or -1.24999999999999997e37 < F < 1.29999999999999995e-127Initial program 84.7%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6455.9
Applied rewrites55.9%
Taylor expanded in B around 0
Applied rewrites63.8%
lift-+.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-neg.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites63.9%
if -3.0000000000000002e231 < F < -1.24999999999999997e37Initial program 50.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6486.5
Applied rewrites86.5%
if 1.29999999999999995e-127 < F < 8.1999999999999994e-6Initial program 99.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-sin.f6472.6
Applied rewrites72.6%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites78.9%
Final simplification72.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))))
(t_1
(-
(/ -1.0 (* (fma (* B B) -0.16666666666666666 1.0) B))
(/ x (tan B)))))
(if (<= F -3e+231)
t_1
(if (<= F -1.25e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.8e-180)
t_1
(if (<= F 0.0155)
(/
(fma
(fma
t_0
(fma
(* (* B B) F)
0.019444444444444445
(* 0.16666666666666666 F))
(* (fma 0.022222222222222223 (* B B) 0.3333333333333333) x))
(* B B)
(fma t_0 F (- x)))
B)
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0))));
double t_1 = (-1.0 / (fma((B * B), -0.16666666666666666, 1.0) * B)) - (x / tan(B));
double tmp;
if (F <= -3e+231) {
tmp = t_1;
} else if (F <= -1.25e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.8e-180) {
tmp = t_1;
} else if (F <= 0.0155) {
tmp = fma(fma(t_0, fma(((B * B) * F), 0.019444444444444445, (0.16666666666666666 * F)), (fma(0.022222222222222223, (B * B), 0.3333333333333333) * x)), (B * B), fma(t_0, F, -x)) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) t_1 = Float64(Float64(-1.0 / Float64(fma(Float64(B * B), -0.16666666666666666, 1.0) * B)) - Float64(x / tan(B))) tmp = 0.0 if (F <= -3e+231) tmp = t_1; elseif (F <= -1.25e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.8e-180) tmp = t_1; elseif (F <= 0.0155) tmp = Float64(fma(fma(t_0, fma(Float64(Float64(B * B) * F), 0.019444444444444445, Float64(0.16666666666666666 * F)), Float64(fma(0.022222222222222223, Float64(B * B), 0.3333333333333333) * x)), Float64(B * B), fma(t_0, F, Float64(-x))) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+231], t$95$1, If[LessEqual[F, -1.25e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-180], t$95$1, If[LessEqual[F, 0.0155], N[(N[(N[(t$95$0 * N[(N[(N[(B * B), $MachinePrecision] * F), $MachinePrecision] * 0.019444444444444445 + N[(0.16666666666666666 * F), $MachinePrecision]), $MachinePrecision] + N[(N[(0.022222222222222223 * N[(B * B), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * N[(B * B), $MachinePrecision] + N[(t$95$0 * F + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\
t_1 := \frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 0.0155:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_0, \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.019444444444444445, 0.16666666666666666 \cdot F\right), \mathsf{fma}\left(0.022222222222222223, B \cdot B, 0.3333333333333333\right) \cdot x\right), B \cdot B, \mathsf{fma}\left(t\_0, F, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231 or -1.24999999999999997e37 < F < 2.79999999999999997e-180Initial program 83.8%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6456.6
Applied rewrites56.6%
Taylor expanded in B around 0
Applied rewrites65.0%
lift-+.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-neg.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites65.1%
if -3.0000000000000002e231 < F < -1.24999999999999997e37Initial program 50.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6486.5
Applied rewrites86.5%
if 2.79999999999999997e-180 < F < 0.0155Initial program 99.1%
Taylor expanded in B around 0
Applied rewrites60.1%
if 0.0155 < F Initial program 60.0%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites79.3%
Final simplification72.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B))))
(t_1 (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0))))))
(if (<= F -3e+231)
t_0
(if (<= F -1.25e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.8e-180)
t_0
(if (<= F 0.0155)
(/
(fma
(fma
t_1
(fma
(* (* B B) F)
0.019444444444444445
(* 0.16666666666666666 F))
(* (fma 0.022222222222222223 (* B B) 0.3333333333333333) x))
(* B B)
(fma t_1 F (- x)))
B)
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0))));
double tmp;
if (F <= -3e+231) {
tmp = t_0;
} else if (F <= -1.25e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.8e-180) {
tmp = t_0;
} else if (F <= 0.0155) {
tmp = fma(fma(t_1, fma(((B * B) * F), 0.019444444444444445, (0.16666666666666666 * F)), (fma(0.022222222222222223, (B * B), 0.3333333333333333) * x)), (B * B), fma(t_1, F, -x)) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) tmp = 0.0 if (F <= -3e+231) tmp = t_0; elseif (F <= -1.25e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.8e-180) tmp = t_0; elseif (F <= 0.0155) tmp = Float64(fma(fma(t_1, fma(Float64(Float64(B * B) * F), 0.019444444444444445, Float64(0.16666666666666666 * F)), Float64(fma(0.022222222222222223, Float64(B * B), 0.3333333333333333) * x)), Float64(B * B), fma(t_1, F, Float64(-x))) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -3e+231], t$95$0, If[LessEqual[F, -1.25e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-180], t$95$0, If[LessEqual[F, 0.0155], N[(N[(N[(t$95$1 * N[(N[(N[(B * B), $MachinePrecision] * F), $MachinePrecision] * 0.019444444444444445 + N[(0.16666666666666666 * F), $MachinePrecision]), $MachinePrecision] + N[(N[(0.022222222222222223 * N[(B * B), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * N[(B * B), $MachinePrecision] + N[(t$95$1 * F + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-180}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 0.0155:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_1, \mathsf{fma}\left(\left(B \cdot B\right) \cdot F, 0.019444444444444445, 0.16666666666666666 \cdot F\right), \mathsf{fma}\left(0.022222222222222223, B \cdot B, 0.3333333333333333\right) \cdot x\right), B \cdot B, \mathsf{fma}\left(t\_1, F, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231 or -1.24999999999999997e37 < F < 2.79999999999999997e-180Initial program 83.8%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6456.6
Applied rewrites56.6%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6456.6
Applied rewrites56.7%
Taylor expanded in B around 0
Applied rewrites61.6%
if -3.0000000000000002e231 < F < -1.24999999999999997e37Initial program 50.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6486.5
Applied rewrites86.5%
if 2.79999999999999997e-180 < F < 0.0155Initial program 99.1%
Taylor expanded in B around 0
Applied rewrites60.1%
if 0.0155 < F Initial program 60.0%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites79.3%
Final simplification70.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(/ -1.0 (* (fma (* B B) -0.16666666666666666 1.0) B))
(/ x (tan B)))))
(if (<= x -8.2e-13)
t_0
(if (<= x 2.55e-74) (/ (* (sqrt (/ 1.0 (fma F F 2.0))) F) (sin B)) t_0))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / (fma((B * B), -0.16666666666666666, 1.0) * B)) - (x / tan(B));
double tmp;
if (x <= -8.2e-13) {
tmp = t_0;
} else if (x <= 2.55e-74) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * F) / sin(B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(-1.0 / Float64(fma(Float64(B * B), -0.16666666666666666, 1.0) * B)) - Float64(x / tan(B))) tmp = 0.0 if (x <= -8.2e-13) tmp = t_0; elseif (x <= 2.55e-74) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * F) / sin(B)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e-13], t$95$0, If[LessEqual[x, 2.55e-74], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{-74}:\\
\;\;\;\;\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot F}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -8.2000000000000004e-13 or 2.5499999999999998e-74 < x Initial program 81.1%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6486.7
Applied rewrites86.7%
Taylor expanded in B around 0
Applied rewrites88.6%
lift-+.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-neg.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites88.8%
if -8.2000000000000004e-13 < x < 2.5499999999999998e-74Initial program 66.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
frac-2negN/A
div-invN/A
lower-fma.f64N/A
Applied rewrites71.0%
Applied rewrites71.1%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6453.4
Applied rewrites53.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -3e+231)
t_0
(if (<= F -1.25e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.8e-180)
t_0
(if (<= F 0.0155)
(/
(fma
(sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0))))
(fma (* B B) (* 0.16666666666666666 F) F)
(fma 0.3333333333333333 (* (* B B) x) (- x)))
B)
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -3e+231) {
tmp = t_0;
} else if (F <= -1.25e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.8e-180) {
tmp = t_0;
} else if (F <= 0.0155) {
tmp = fma(sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))), fma((B * B), (0.16666666666666666 * F), F), fma(0.3333333333333333, ((B * B) * x), -x)) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -3e+231) tmp = t_0; elseif (F <= -1.25e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.8e-180) tmp = t_0; elseif (F <= 0.0155) tmp = Float64(fma(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))), fma(Float64(B * B), Float64(0.16666666666666666 * F), F), fma(0.3333333333333333, Float64(Float64(B * B) * x), Float64(-x))) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+231], t$95$0, If[LessEqual[F, -1.25e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-180], t$95$0, If[LessEqual[F, 0.0155], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(0.16666666666666666 * F), $MachinePrecision] + F), $MachinePrecision] + N[(0.3333333333333333 * N[(N[(B * B), $MachinePrecision] * x), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+231}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-180}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 0.0155:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right), \mathsf{fma}\left(0.3333333333333333, \left(B \cdot B\right) \cdot x, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e231 or -1.24999999999999997e37 < F < 2.79999999999999997e-180Initial program 83.8%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6456.6
Applied rewrites56.6%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6456.6
Applied rewrites56.7%
Taylor expanded in B around 0
Applied rewrites61.6%
if -3.0000000000000002e231 < F < -1.24999999999999997e37Initial program 50.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Applied rewrites99.7%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6499.7
Applied rewrites99.9%
Taylor expanded in B around 0
lower-/.f6486.5
Applied rewrites86.5%
if 2.79999999999999997e-180 < F < 0.0155Initial program 99.1%
Taylor expanded in B around 0
lower-/.f64N/A
Applied rewrites60.1%
if 0.0155 < F Initial program 60.0%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites79.3%
(FPCore (F B x)
:precision binary64
(if (<= F 2.8e-180)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 0.0155)
(/
(fma
(sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0))))
(fma (* B B) (* 0.16666666666666666 F) F)
(fma 0.3333333333333333 (* (* B B) x) (- x)))
B)
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= 2.8e-180) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 0.0155) {
tmp = fma(sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))), fma((B * B), (0.16666666666666666 * F), F), fma(0.3333333333333333, ((B * B) * x), -x)) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= 2.8e-180) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 0.0155) tmp = Float64(fma(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))), fma(Float64(B * B), Float64(0.16666666666666666 * F), F), fma(0.3333333333333333, Float64(Float64(B * B) * x), Float64(-x))) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, 2.8e-180], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0155], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(0.16666666666666666 * F), $MachinePrecision] + F), $MachinePrecision] + N[(0.3333333333333333 * N[(N[(B * B), $MachinePrecision] * x), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.8 \cdot 10^{-180}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.0155:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}, \mathsf{fma}\left(B \cdot B, 0.16666666666666666 \cdot F, F\right), \mathsf{fma}\left(0.3333333333333333, \left(B \cdot B\right) \cdot x, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < 2.79999999999999997e-180Initial program 75.0%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6468.1
Applied rewrites68.1%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6468.1
Applied rewrites68.2%
Taylor expanded in B around 0
Applied rewrites62.0%
if 2.79999999999999997e-180 < F < 0.0155Initial program 99.1%
Taylor expanded in B around 0
lower-/.f64N/A
Applied rewrites60.1%
if 0.0155 < F Initial program 60.0%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites79.3%
(FPCore (F B x)
:precision binary64
(if (<= F -680.0)
(- (/ -1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)) (/ x B))
(if (<= F 9e-26)
(- (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) B) (/ x B))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -680.0) {
tmp = (-1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (x / B);
} else if (F <= 9e-26) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -680.0) tmp = Float64(Float64(-1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(x / B)); elseif (F <= 9e-26) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -680.0], N[(N[(-1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-26], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -680:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -680Initial program 48.2%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.0
Applied rewrites99.0%
Taylor expanded in B around 0
Applied rewrites70.4%
Taylor expanded in B around 0
lower-/.f6446.2
Applied rewrites46.2%
if -680 < F < 8.9999999999999998e-26Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6446.8
Applied rewrites46.8%
Applied rewrites46.9%
if 8.9999999999999998e-26 < F Initial program 61.1%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6497.4
Applied rewrites97.4%
Taylor expanded in B around 0
Applied rewrites78.0%
Final simplification55.4%
(FPCore (F B x)
:precision binary64
(if (<= F -680.0)
(- (/ -1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)) (/ x B))
(if (<= F 0.0155)
(- (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) B) (/ x B))
(/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -680.0) {
tmp = (-1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (x / B);
} else if (F <= 0.0155) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - (x / B);
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -680.0) tmp = Float64(Float64(-1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(x / B)); elseif (F <= 0.0155) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - Float64(x / B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -680.0], N[(N[(-1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0155], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -680:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.0155:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -680Initial program 48.2%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.0
Applied rewrites99.0%
Taylor expanded in B around 0
Applied rewrites70.4%
Taylor expanded in B around 0
lower-/.f6446.2
Applied rewrites46.2%
if -680 < F < 0.0155Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6446.5
Applied rewrites46.5%
Applied rewrites46.5%
if 0.0155 < F Initial program 60.0%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in x around 0
Applied rewrites59.7%
Final simplification50.0%
(FPCore (F B x)
:precision binary64
(if (<= F -680.0)
(- (/ -1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)) (/ x B))
(if (<= F 8.2e-6)
(- (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) B) (/ x B))
(/
(- (fma (+ (* 0.3333333333333333 x) 0.16666666666666666) (* B B) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -680.0) {
tmp = (-1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (x / B);
} else if (F <= 8.2e-6) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - (x / B);
} else {
tmp = (fma(((0.3333333333333333 * x) + 0.16666666666666666), (B * B), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -680.0) tmp = Float64(Float64(-1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(x / B)); elseif (F <= 8.2e-6) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / B) - Float64(x / B)); else tmp = Float64(Float64(fma(Float64(Float64(0.3333333333333333 * x) + 0.16666666666666666), Float64(B * B), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -680.0], N[(N[(-1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(0.3333333333333333 * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -680:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.3333333333333333 \cdot x + 0.16666666666666666, B \cdot B, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -680Initial program 48.2%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.0
Applied rewrites99.0%
Taylor expanded in B around 0
Applied rewrites70.4%
Taylor expanded in B around 0
lower-/.f6446.2
Applied rewrites46.2%
if -680 < F < 8.1999999999999994e-6Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6446.4
Applied rewrites46.4%
Applied rewrites46.5%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites46.9%
Final simplification46.5%
(FPCore (F B x)
:precision binary64
(if (<= F -680.0)
(- (/ -1.0 (* (fma -0.16666666666666666 (* B B) 1.0) B)) (/ x B))
(if (<= F 8.2e-6)
(/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
(/
(- (fma (+ (* 0.3333333333333333 x) 0.16666666666666666) (* B B) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -680.0) {
tmp = (-1.0 / (fma(-0.16666666666666666, (B * B), 1.0) * B)) - (x / B);
} else if (F <= 8.2e-6) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
} else {
tmp = (fma(((0.3333333333333333 * x) + 0.16666666666666666), (B * B), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -680.0) tmp = Float64(Float64(-1.0 / Float64(fma(-0.16666666666666666, Float64(B * B), 1.0) * B)) - Float64(x / B)); elseif (F <= 8.2e-6) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B); else tmp = Float64(Float64(fma(Float64(Float64(0.3333333333333333 * x) + 0.16666666666666666), Float64(B * B), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -680.0], N[(N[(-1.0 / N[(N[(-0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], 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[(N[(N[(N[(0.3333333333333333 * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -680:\\
\;\;\;\;\frac{-1}{\mathsf{fma}\left(-0.16666666666666666, B \cdot B, 1\right) \cdot B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.3333333333333333 \cdot x + 0.16666666666666666, B \cdot B, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -680Initial program 48.2%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.0
Applied rewrites99.0%
Taylor expanded in B around 0
Applied rewrites70.4%
Taylor expanded in B around 0
lower-/.f6446.2
Applied rewrites46.2%
if -680 < F < 8.1999999999999994e-6Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6446.4
Applied rewrites46.4%
Applied rewrites46.5%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites46.9%
Final simplification46.5%
(FPCore (F B x)
:precision binary64
(if (<= F -7.0)
(- (/ (+ 1.0 x) (* (* F F) B)) (/ (+ 1.0 x) B))
(if (<= F 8.2e-6)
(/ (fma (sqrt (/ 1.0 (fma 2.0 x 2.0))) F (- x)) B)
(/
(- (fma (+ (* 0.3333333333333333 x) 0.16666666666666666) (* B B) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.0) {
tmp = ((1.0 + x) / ((F * F) * B)) - ((1.0 + x) / B);
} else if (F <= 8.2e-6) {
tmp = fma(sqrt((1.0 / fma(2.0, x, 2.0))), F, -x) / B;
} else {
tmp = (fma(((0.3333333333333333 * x) + 0.16666666666666666), (B * B), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -7.0) tmp = Float64(Float64(Float64(1.0 + x) / Float64(Float64(F * F) * B)) - Float64(Float64(1.0 + x) / B)); elseif (F <= 8.2e-6) tmp = Float64(fma(sqrt(Float64(1.0 / fma(2.0, x, 2.0))), F, Float64(-x)) / B); else tmp = Float64(Float64(fma(Float64(Float64(0.3333333333333333 * x) + 0.16666666666666666), Float64(B * B), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -7.0], N[(N[(N[(1.0 + x), $MachinePrecision] / N[(N[(F * F), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(0.3333333333333333 * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7:\\
\;\;\;\;\frac{1 + x}{\left(F \cdot F\right) \cdot B} - \frac{1 + x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, F, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.3333333333333333 \cdot x + 0.16666666666666666, B \cdot B, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -7Initial program 48.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6427.1
Applied rewrites27.1%
Taylor expanded in F around 0
Applied rewrites17.2%
Taylor expanded in F around -inf
Applied rewrites46.0%
if -7 < F < 8.1999999999999994e-6Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6445.9
Applied rewrites45.9%
Taylor expanded in F around 0
Applied rewrites45.9%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites46.9%
Final simplification46.2%
(FPCore (F B x)
:precision binary64
(if (<= F -7.0)
(- (/ (+ 1.0 x) (* (* F F) B)) (/ (+ 1.0 x) B))
(if (<= F 8.2e-6)
(/ (fma (sqrt 0.5) F (- x)) B)
(/
(- (fma (+ (* 0.3333333333333333 x) 0.16666666666666666) (* B B) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.0) {
tmp = ((1.0 + x) / ((F * F) * B)) - ((1.0 + x) / B);
} else if (F <= 8.2e-6) {
tmp = fma(sqrt(0.5), F, -x) / B;
} else {
tmp = (fma(((0.3333333333333333 * x) + 0.16666666666666666), (B * B), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -7.0) tmp = Float64(Float64(Float64(1.0 + x) / Float64(Float64(F * F) * B)) - Float64(Float64(1.0 + x) / B)); elseif (F <= 8.2e-6) tmp = Float64(fma(sqrt(0.5), F, Float64(-x)) / B); else tmp = Float64(Float64(fma(Float64(Float64(0.3333333333333333 * x) + 0.16666666666666666), Float64(B * B), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -7.0], N[(N[(N[(1.0 + x), $MachinePrecision] / N[(N[(F * F), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(N[Sqrt[0.5], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(0.3333333333333333 * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7:\\
\;\;\;\;\frac{1 + x}{\left(F \cdot F\right) \cdot B} - \frac{1 + x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{0.5}, F, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.3333333333333333 \cdot x + 0.16666666666666666, B \cdot B, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -7Initial program 48.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6427.1
Applied rewrites27.1%
Taylor expanded in F around 0
Applied rewrites17.2%
Taylor expanded in F around -inf
Applied rewrites46.0%
if -7 < F < 8.1999999999999994e-6Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6445.9
Applied rewrites45.9%
Taylor expanded in F around 0
Applied rewrites45.9%
Taylor expanded in x around 0
Applied rewrites45.9%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites46.9%
Final simplification46.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4)
(/ (- -1.0 x) B)
(if (<= F 8.2e-6)
(/ (fma (sqrt 0.5) F (- x)) B)
(/
(- (fma (+ (* 0.3333333333333333 x) 0.16666666666666666) (* B B) 1.0) x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-6) {
tmp = fma(sqrt(0.5), F, -x) / B;
} else {
tmp = (fma(((0.3333333333333333 * x) + 0.16666666666666666), (B * B), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.2e-6) tmp = Float64(fma(sqrt(0.5), F, Float64(-x)) / B); else tmp = Float64(Float64(fma(Float64(Float64(0.3333333333333333 * x) + 0.16666666666666666), Float64(B * B), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(N[Sqrt[0.5], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(0.3333333333333333 * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{0.5}, F, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.3333333333333333 \cdot x + 0.16666666666666666, B \cdot B, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 48.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6427.1
Applied rewrites27.1%
Taylor expanded in F around -inf
Applied rewrites45.8%
if -1.3999999999999999 < F < 8.1999999999999994e-6Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6445.9
Applied rewrites45.9%
Taylor expanded in F around 0
Applied rewrites45.9%
Taylor expanded in x around 0
Applied rewrites45.9%
if 8.1999999999999994e-6 < F Initial program 60.5%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6498.7
Applied rewrites98.7%
Taylor expanded in B around 0
Applied rewrites46.9%
Final simplification46.2%
(FPCore (F B x) :precision binary64 (if (<= F -1.4) (/ (- -1.0 x) B) (if (<= F 4200000.0) (/ (fma (sqrt 0.5) F (- x)) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 - x) / B;
} else if (F <= 4200000.0) {
tmp = fma(sqrt(0.5), F, -x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4200000.0) tmp = Float64(fma(sqrt(0.5), F, Float64(-x)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4200000.0], N[(N[(N[Sqrt[0.5], $MachinePrecision] * F + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4200000:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{0.5}, F, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 48.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6427.1
Applied rewrites27.1%
Taylor expanded in F around -inf
Applied rewrites45.8%
if -1.3999999999999999 < F < 4.2e6Initial program 99.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6445.2
Applied rewrites45.2%
Taylor expanded in F around 0
Applied rewrites45.2%
Taylor expanded in x around 0
Applied rewrites45.2%
if 4.2e6 < F Initial program 58.8%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6438.2
Applied rewrites38.2%
Taylor expanded in F around inf
Applied rewrites47.5%
(FPCore (F B x) :precision binary64 (if (<= F -6.1e-43) (/ (- -1.0 x) B) (if (<= F 0.19) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.1e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.19) {
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 <= (-6.1d-43)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 0.19d0) 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 <= -6.1e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.19) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.1e-43: tmp = (-1.0 - x) / B elif F <= 0.19: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.1e-43) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 0.19) 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 <= -6.1e-43) tmp = (-1.0 - x) / B; elseif (F <= 0.19) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.1e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.19], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.1 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 0.19:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.10000000000000037e-43Initial program 52.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6431.2
Applied rewrites31.2%
Taylor expanded in F around -inf
Applied rewrites47.4%
if -6.10000000000000037e-43 < F < 0.19Initial program 99.3%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6443.4
Applied rewrites43.4%
Taylor expanded in F around 0
Applied rewrites28.4%
if 0.19 < F Initial program 59.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6437.7
Applied rewrites37.7%
Taylor expanded in F around inf
Applied rewrites46.9%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ (- x) B))) (if (<= x -4e-141) t_0 (if (<= x 1.4e-30) (/ -1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (x <= -4e-141) {
tmp = t_0;
} else if (x <= 1.4e-30) {
tmp = -1.0 / B;
} else {
tmp = t_0;
}
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) :: t_0
real(8) :: tmp
t_0 = -x / b
if (x <= (-4d-141)) then
tmp = t_0
else if (x <= 1.4d-30) then
tmp = (-1.0d0) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (x <= -4e-141) {
tmp = t_0;
} else if (x <= 1.4e-30) {
tmp = -1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if x <= -4e-141: tmp = t_0 elif x <= 1.4e-30: tmp = -1.0 / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / B) tmp = 0.0 if (x <= -4e-141) tmp = t_0; elseif (x <= 1.4e-30) tmp = Float64(-1.0 / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / B; tmp = 0.0; if (x <= -4e-141) tmp = t_0; elseif (x <= 1.4e-30) tmp = -1.0 / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[x, -4e-141], t$95$0, If[LessEqual[x, 1.4e-30], N[(-1.0 / B), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;x \leq -4 \cdot 10^{-141}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -4.0000000000000002e-141 or 1.39999999999999994e-30 < x Initial program 82.6%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6446.5
Applied rewrites46.5%
Taylor expanded in F around 0
Applied rewrites39.1%
if -4.0000000000000002e-141 < x < 1.39999999999999994e-30Initial program 61.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6427.4
Applied rewrites27.4%
Taylor expanded in F around -inf
Applied rewrites20.6%
Taylor expanded in x around 0
Applied rewrites20.6%
(FPCore (F B x) :precision binary64 (if (<= F -6.1e-43) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.1e-43) {
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 <= (-6.1d-43)) 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 <= -6.1e-43) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.1e-43: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.1e-43) 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 <= -6.1e-43) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.1e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.1 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -6.10000000000000037e-43Initial program 52.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6431.2
Applied rewrites31.2%
Taylor expanded in F around -inf
Applied rewrites47.4%
if -6.10000000000000037e-43 < F Initial program 83.3%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6441.1
Applied rewrites41.1%
Taylor expanded in F around 0
Applied rewrites25.6%
(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 73.2%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f6437.9
Applied rewrites37.9%
Taylor expanded in F around -inf
Applied rewrites28.2%
Taylor expanded in x around 0
Applied rewrites12.1%
herbie shell --seed 2024277
(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))))))