
(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 18 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 (/ x (tan B))))
(if (<= F -5.5e+43)
(/ (- -1.0 (* (cos B) x)) (sin B))
(if (<= F 116000000.0)
(- (/ F (* (sqrt (fma F F (fma 2.0 x 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.5e+43) {
tmp = (-1.0 - (cos(B) * x)) / sin(B);
} else if (F <= 116000000.0) {
tmp = (F / (sqrt(fma(F, F, fma(2.0, x, 2.0))) * sin(B))) - t_0;
} 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 <= -5.5e+43) tmp = Float64(Float64(-1.0 - Float64(cos(B) * x)) / sin(B)); elseif (F <= 116000000.0) tmp = Float64(Float64(F / Float64(sqrt(fma(F, F, fma(2.0, x, 2.0))) * sin(B))) - t_0); 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, -5.5e+43], N[(N[(-1.0 - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 116000000.0], N[(N[(F / N[(N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -5.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\
\mathbf{elif}\;F \leq 116000000:\\
\;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)} \cdot \sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.49999999999999989e43Initial program 54.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites76.9%
Applied rewrites76.9%
Taylor expanded in F around -inf
Applied rewrites99.9%
if -5.49999999999999989e43 < F < 1.16e8Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites99.6%
Applied rewrites99.7%
if 1.16e8 < F Initial program 57.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites75.5%
Applied rewrites75.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.9
Applied rewrites99.9%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -105000.0)
(/ (- -1.0 (* (cos B) x)) (sin B))
(if (<= F 1.45)
(- (/ F (* (sqrt (fma x 2.0 2.0)) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -105000.0) {
tmp = (-1.0 - (cos(B) * x)) / sin(B);
} else if (F <= 1.45) {
tmp = (F / (sqrt(fma(x, 2.0, 2.0)) * sin(B))) - t_0;
} 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 <= -105000.0) tmp = Float64(Float64(-1.0 - Float64(cos(B) * x)) / sin(B)); elseif (F <= 1.45) tmp = Float64(Float64(F / Float64(sqrt(fma(x, 2.0, 2.0)) * sin(B))) - t_0); 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, -105000.0], N[(N[(-1.0 - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F / N[(N[Sqrt[N[(x * 2.0 + 2.0), $MachinePrecision]], $MachinePrecision] * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -105000:\\
\;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(x, 2, 2\right)} \cdot \sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -105000Initial program 58.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites79.0%
Applied rewrites79.0%
Taylor expanded in F around -inf
Applied rewrites99.8%
if -105000 < F < 1.44999999999999996Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites99.6%
Applied rewrites99.7%
Taylor expanded in F around 0
lower-sqrt.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6499.0
Applied rewrites99.0%
if 1.44999999999999996 < F Initial program 58.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites75.8%
Applied rewrites75.7%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.3
Applied rewrites99.3%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(if (<= F -112000.0)
(/ (- -1.0 (* (cos B) x)) (sin B))
(if (<= F 19000.0)
(+
(* (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) (/ F B))
(* (/ -1.0 (tan B)) x))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -112000.0) {
tmp = (-1.0 - (cos(B) * x)) / sin(B);
} else if (F <= 19000.0) {
tmp = (sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))) * (F / B)) + ((-1.0 / tan(B)) * x);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -112000.0) tmp = Float64(Float64(-1.0 - Float64(cos(B) * x)) / sin(B)); elseif (F <= 19000.0) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) * Float64(F / B)) + Float64(Float64(-1.0 / tan(B)) * x)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -112000.0], N[(N[(-1.0 - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 19000.0], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] * x), $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}
\mathbf{if}\;F \leq -112000:\\
\;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\
\mathbf{elif}\;F \leq 19000:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \frac{F}{B} + \frac{-1}{\tan B} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -112000Initial program 58.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites79.0%
Applied rewrites79.0%
Taylor expanded in F around -inf
Applied rewrites99.8%
if -112000 < F < 19000Initial program 99.4%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.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.f6482.7
Applied rewrites82.7%
if 19000 < F Initial program 57.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites75.5%
Applied rewrites75.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.9
Applied rewrites99.9%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (cos B) x)))
(if (<= F -112000.0)
(/ (- -1.0 t_0) (sin B))
(if (<= F 19000.0)
(+
(* (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) (/ F B))
(* (/ -1.0 (tan B)) x))
(/ (- 1.0 t_0) (sin B))))))
double code(double F, double B, double x) {
double t_0 = cos(B) * x;
double tmp;
if (F <= -112000.0) {
tmp = (-1.0 - t_0) / sin(B);
} else if (F <= 19000.0) {
tmp = (sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))) * (F / B)) + ((-1.0 / tan(B)) * x);
} else {
tmp = (1.0 - t_0) / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(cos(B) * x) tmp = 0.0 if (F <= -112000.0) tmp = Float64(Float64(-1.0 - t_0) / sin(B)); elseif (F <= 19000.0) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) * Float64(F / B)) + Float64(Float64(-1.0 / tan(B)) * x)); else tmp = Float64(Float64(1.0 - t_0) / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[F, -112000.0], N[(N[(-1.0 - t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 19000.0], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos B \cdot x\\
\mathbf{if}\;F \leq -112000:\\
\;\;\;\;\frac{-1 - t\_0}{\sin B}\\
\mathbf{elif}\;F \leq 19000:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \frac{F}{B} + \frac{-1}{\tan B} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - t\_0}{\sin B}\\
\end{array}
\end{array}
if F < -112000Initial program 58.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites79.0%
Applied rewrites79.0%
Taylor expanded in F around -inf
Applied rewrites99.8%
if -112000 < F < 19000Initial program 99.4%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.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.f6482.7
Applied rewrites82.7%
if 19000 < F Initial program 57.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites75.5%
Applied rewrites75.4%
Taylor expanded in F around inf
Applied rewrites99.8%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(if (<= F -112000.0)
(/ (- -1.0 (* (cos B) x)) (sin B))
(if (<= F 9e-136)
(+
(* (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) (/ F B))
(* (/ -1.0 (tan B)) x))
(if (<= F 1.32e+154)
(/ (fma (sqrt (/ 1.0 (+ (fma x 2.0 (* F F)) 2.0))) F (- x)) (sin B))
(/
(-
(+
(fma
0.3333333333333333
(* (* B B) x)
(* (* B B) 0.16666666666666666))
1.0)
x)
B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -112000.0) {
tmp = (-1.0 - (cos(B) * x)) / sin(B);
} else if (F <= 9e-136) {
tmp = (sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))) * (F / B)) + ((-1.0 / tan(B)) * x);
} else if (F <= 1.32e+154) {
tmp = fma(sqrt((1.0 / (fma(x, 2.0, (F * F)) + 2.0))), F, -x) / sin(B);
} else {
tmp = ((fma(0.3333333333333333, ((B * B) * x), ((B * B) * 0.16666666666666666)) + 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -112000.0) tmp = Float64(Float64(-1.0 - Float64(cos(B) * x)) / sin(B)); elseif (F <= 9e-136) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) * Float64(F / B)) + Float64(Float64(-1.0 / tan(B)) * x)); elseif (F <= 1.32e+154) tmp = Float64(fma(sqrt(Float64(1.0 / Float64(fma(x, 2.0, Float64(F * F)) + 2.0))), F, Float64(-x)) / sin(B)); else tmp = Float64(Float64(Float64(fma(0.3333333333333333, Float64(Float64(B * B) * x), Float64(Float64(B * B) * 0.16666666666666666)) + 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -112000.0], N[(N[(-1.0 - N[(N[Cos[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-136], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.32e+154], N[(N[(N[Sqrt[N[(1.0 / N[(N[(x * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(0.3333333333333333 * N[(N[(B * B), $MachinePrecision] * x), $MachinePrecision] + N[(N[(B * B), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -112000:\\
\;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-136}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} \cdot \frac{F}{B} + \frac{-1}{\tan B} \cdot x\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, F \cdot F\right) + 2}}, F, -x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\mathsf{fma}\left(0.3333333333333333, \left(B \cdot B\right) \cdot x, \left(B \cdot B\right) \cdot 0.16666666666666666\right) + 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -112000Initial program 58.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites79.0%
Applied rewrites79.0%
Taylor expanded in F around -inf
Applied rewrites99.8%
if -112000 < F < 8.99999999999999944e-136Initial program 99.5%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.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.f6486.8
Applied rewrites86.8%
if 8.99999999999999944e-136 < F < 1.31999999999999998e154Initial program 92.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites99.6%
Applied rewrites99.7%
Taylor expanded in B around 0
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-neg.f6480.7
Applied rewrites80.7%
if 1.31999999999999998e154 < F Initial program 26.4%
Taylor expanded in B around 0
lower-/.f64N/A
Applied rewrites28.8%
Taylor expanded in F around inf
Applied rewrites56.6%
Final simplification84.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= x -2.35e-8)
t_0
(if (<= x 5.1e-11)
(/ (fma (sqrt (/ 1.0 (+ (fma x 2.0 (* F F)) 2.0))) F (- x)) (sin B))
t_0))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (x <= -2.35e-8) {
tmp = t_0;
} else if (x <= 5.1e-11) {
tmp = fma(sqrt((1.0 / (fma(x, 2.0, (F * F)) + 2.0))), F, -x) / sin(B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (x <= -2.35e-8) tmp = t_0; elseif (x <= 5.1e-11) tmp = Float64(fma(sqrt(Float64(1.0 / Float64(fma(x, 2.0, Float64(F * F)) + 2.0))), F, Float64(-x)) / sin(B)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.35e-8], t$95$0, If[LessEqual[x, 5.1e-11], N[(N[(N[Sqrt[N[(1.0 / N[(N[(x * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * F + (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;x \leq -2.35 \cdot 10^{-8}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-11}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, F \cdot F\right) + 2}}, F, -x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.3499999999999999e-8 or 5.09999999999999984e-11 < x Initial program 80.5%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-sin.f6496.7
Applied rewrites96.7%
Applied rewrites96.9%
if -2.3499999999999999e-8 < x < 5.09999999999999984e-11Initial program 71.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites76.4%
Applied rewrites76.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
lower-+.f64N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-neg.f6469.4
Applied rewrites69.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= x -3.2e-10)
t_0
(if (<= x 5.1e-11)
(- (/ F (* (sqrt (fma F F (fma 2.0 x 2.0))) (sin B))) (/ x B))
t_0))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (x <= -3.2e-10) {
tmp = t_0;
} else if (x <= 5.1e-11) {
tmp = (F / (sqrt(fma(F, F, fma(2.0, x, 2.0))) * sin(B))) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (x <= -3.2e-10) tmp = t_0; elseif (x <= 5.1e-11) tmp = Float64(Float64(F / Float64(sqrt(fma(F, F, fma(2.0, x, 2.0))) * sin(B))) - Float64(x / B)); else tmp = t_0; end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e-10], t$95$0, If[LessEqual[x, 5.1e-11], N[(N[(F / N[(N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-11}:\\
\;\;\;\;\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)} \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -3.19999999999999981e-10 or 5.09999999999999984e-11 < x Initial program 80.5%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-sin.f6496.7
Applied rewrites96.7%
Applied rewrites96.9%
if -3.19999999999999981e-10 < x < 5.09999999999999984e-11Initial program 71.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites76.4%
Applied rewrites76.5%
Taylor expanded in B around 0
lower-/.f6468.5
Applied rewrites68.5%
Final simplification81.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= x -4.5e-11)
t_0
(if (<= x 1.28e-17) (/ (* (sqrt (/ 1.0 (fma F F 2.0))) F) (sin B)) t_0))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (x <= -4.5e-11) {
tmp = t_0;
} else if (x <= 1.28e-17) {
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(-x) / tan(B)) tmp = 0.0 if (x <= -4.5e-11) tmp = t_0; elseif (x <= 1.28e-17) 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[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e-11], t$95$0, If[LessEqual[x, 1.28e-17], 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{-x}{\tan B}\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{-11}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.28 \cdot 10^{-17}:\\
\;\;\;\;\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 < -4.5e-11 or 1.28e-17 < x Initial program 80.6%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-sin.f6496.7
Applied rewrites96.7%
Applied rewrites97.0%
if -4.5e-11 < x < 1.28e-17Initial program 71.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites76.3%
Applied rewrites76.4%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6458.8
Applied rewrites58.8%
(FPCore (F B x) :precision binary64 (if (<= B 6.8e-24) (/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (B <= 6.8e-24) {
tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
} else {
tmp = -x / tan(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 6.8e-24) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 6.8e-24], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 6.8 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if B < 6.79999999999999985e-24Initial program 70.0%
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.f6458.4
Applied rewrites58.4%
Applied rewrites58.4%
if 6.79999999999999985e-24 < B Initial program 92.9%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-sin.f6461.4
Applied rewrites61.4%
Applied rewrites61.5%
(FPCore (F B x)
:precision binary64
(if (<= F -285.0)
(/ (- -1.0 x) B)
(if (<= F -1.5e-82)
(/ (/ F (sqrt (fma F F 2.0))) B)
(if (<= F 2e-43)
(/ (- x) B)
(/ (fma (/ (fma 2.0 x 2.0) (* F F)) -0.5 (- 1.0 x)) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -285.0) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.5e-82) {
tmp = (F / sqrt(fma(F, F, 2.0))) / B;
} else if (F <= 2e-43) {
tmp = -x / B;
} else {
tmp = fma((fma(2.0, x, 2.0) / (F * F)), -0.5, (1.0 - x)) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -285.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -1.5e-82) tmp = Float64(Float64(F / sqrt(fma(F, F, 2.0))) / B); elseif (F <= 2e-43) tmp = Float64(Float64(-x) / B); else tmp = Float64(fma(Float64(fma(2.0, x, 2.0) / Float64(F * F)), -0.5, Float64(1.0 - x)) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -285.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.5e-82], N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2e-43], N[((-x) / B), $MachinePrecision], N[(N[(N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] * -0.5 + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -285:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-43}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -285Initial program 59.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.f6442.0
Applied rewrites42.0%
Taylor expanded in F around -inf
Applied rewrites51.8%
if -285 < F < -1.4999999999999999e-82Initial program 99.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.f6440.8
Applied rewrites40.8%
Taylor expanded in x around 0
Applied rewrites35.1%
Applied rewrites35.2%
if -1.4999999999999999e-82 < F < 2.00000000000000015e-43Initial 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.f6453.3
Applied rewrites53.3%
Taylor expanded in F around 0
Applied rewrites40.0%
if 2.00000000000000015e-43 < F Initial program 60.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.f6443.0
Applied rewrites43.0%
Taylor expanded in F around inf
Applied rewrites54.0%
(FPCore (F B x)
:precision binary64
(if (<= F -2e+138)
(/ (- -1.0 x) B)
(if (<= F 7.5e+117)
(/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
(/
(-
(+
(fma 0.3333333333333333 (* (* B B) x) (* (* B B) 0.16666666666666666))
1.0)
x)
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e+138) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.5e+117) {
tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
} else {
tmp = ((fma(0.3333333333333333, ((B * B) * x), ((B * B) * 0.16666666666666666)) + 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2e+138) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 7.5e+117) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B); else tmp = Float64(Float64(Float64(fma(0.3333333333333333, Float64(Float64(B * B) * x), Float64(Float64(B * B) * 0.16666666666666666)) + 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2e+138], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.5e+117], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(0.3333333333333333 * N[(N[(B * B), $MachinePrecision] * x), $MachinePrecision] + N[(N[(B * B), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{+138}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+117}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\mathsf{fma}\left(0.3333333333333333, \left(B \cdot B\right) \cdot x, \left(B \cdot B\right) \cdot 0.16666666666666666\right) + 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -2.0000000000000001e138Initial program 35.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.f6435.7
Applied rewrites35.7%
Taylor expanded in F around -inf
Applied rewrites53.1%
if -2.0000000000000001e138 < F < 7.5e117Initial program 96.1%
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.f6451.1
Applied rewrites51.1%
Applied rewrites51.1%
if 7.5e117 < F Initial program 35.5%
Taylor expanded in B around 0
lower-/.f64N/A
Applied rewrites35.0%
Taylor expanded in F around inf
Applied rewrites57.9%
Final simplification52.6%
(FPCore (F B x)
:precision binary64
(if (<= F -6.8e+21)
(/ (- -1.0 x) B)
(if (<= F 9.5e-14)
(/ (fma (sqrt (/ 1.0 (fma 2.0 x 2.0))) F (- x)) B)
(/ (fma (/ (fma 2.0 x 2.0) (* F F)) -0.5 (- 1.0 x)) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.8e+21) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.5e-14) {
tmp = fma(sqrt((1.0 / fma(2.0, x, 2.0))), F, -x) / B;
} else {
tmp = fma((fma(2.0, x, 2.0) / (F * F)), -0.5, (1.0 - x)) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -6.8e+21) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9.5e-14) tmp = Float64(fma(sqrt(Float64(1.0 / fma(2.0, x, 2.0))), F, Float64(-x)) / B); else tmp = Float64(fma(Float64(fma(2.0, x, 2.0) / Float64(F * F)), -0.5, Float64(1.0 - x)) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -6.8e+21], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.5e-14], 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[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] * -0.5 + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.8 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-14}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(2, x, 2\right)}}, F, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -6.8e21Initial program 58.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.f6441.6
Applied rewrites41.6%
Taylor expanded in F around -inf
Applied rewrites51.7%
if -6.8e21 < F < 9.4999999999999999e-14Initial 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.f6451.1
Applied rewrites51.1%
Taylor expanded in F around 0
Applied rewrites50.5%
if 9.4999999999999999e-14 < F Initial program 59.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.f6442.8
Applied rewrites42.8%
Taylor expanded in F around inf
Applied rewrites55.4%
(FPCore (F B x)
:precision binary64
(if (<= F -285.0)
(/ (- -1.0 x) B)
(if (<= F -1.5e-82)
(/ (/ F (sqrt (fma F F 2.0))) B)
(if (<= F 2.1e-55) (/ (- x) B) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -285.0) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.5e-82) {
tmp = (F / sqrt(fma(F, F, 2.0))) / B;
} else if (F <= 2.1e-55) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -285.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -1.5e-82) tmp = Float64(Float64(F / sqrt(fma(F, F, 2.0))) / B); elseif (F <= 2.1e-55) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -285.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.5e-82], N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-55], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -285:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -285Initial program 59.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.f6442.0
Applied rewrites42.0%
Taylor expanded in F around -inf
Applied rewrites51.8%
if -285 < F < -1.4999999999999999e-82Initial program 99.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.f6440.8
Applied rewrites40.8%
Taylor expanded in x around 0
Applied rewrites35.1%
Applied rewrites35.2%
if -1.4999999999999999e-82 < F < 2.1000000000000002e-55Initial 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.f6454.6
Applied rewrites54.6%
Taylor expanded in F around 0
Applied rewrites41.0%
if 2.1000000000000002e-55 < F Initial program 61.7%
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.f6442.0
Applied rewrites42.0%
Taylor expanded in F around inf
Applied rewrites52.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) B)))
(if (<= x -1.52e-15)
t_0
(if (<= x -7.5e-291) (/ 1.0 B) (if (<= x 3.7e-42) (/ -1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (x <= -1.52e-15) {
tmp = t_0;
} else if (x <= -7.5e-291) {
tmp = 1.0 / B;
} else if (x <= 3.7e-42) {
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 <= (-1.52d-15)) then
tmp = t_0
else if (x <= (-7.5d-291)) then
tmp = 1.0d0 / b
else if (x <= 3.7d-42) 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 <= -1.52e-15) {
tmp = t_0;
} else if (x <= -7.5e-291) {
tmp = 1.0 / B;
} else if (x <= 3.7e-42) {
tmp = -1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if x <= -1.52e-15: tmp = t_0 elif x <= -7.5e-291: tmp = 1.0 / B elif x <= 3.7e-42: 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 <= -1.52e-15) tmp = t_0; elseif (x <= -7.5e-291) tmp = Float64(1.0 / B); elseif (x <= 3.7e-42) 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 <= -1.52e-15) tmp = t_0; elseif (x <= -7.5e-291) tmp = 1.0 / B; elseif (x <= 3.7e-42) 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, -1.52e-15], t$95$0, If[LessEqual[x, -7.5e-291], N[(1.0 / B), $MachinePrecision], If[LessEqual[x, 3.7e-42], N[(-1.0 / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;x \leq -1.52 \cdot 10^{-15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-291}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-42}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.52000000000000005e-15 or 3.7000000000000002e-42 < x Initial program 81.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.f6448.0
Applied rewrites48.0%
Taylor expanded in F around 0
Applied rewrites46.8%
if -1.52000000000000005e-15 < x < -7.49999999999999981e-291Initial program 68.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.f6449.7
Applied rewrites49.7%
Taylor expanded in x around 0
Applied rewrites38.4%
Taylor expanded in F around inf
Applied rewrites26.2%
if -7.49999999999999981e-291 < x < 3.7000000000000002e-42Initial program 71.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.f6438.5
Applied rewrites38.5%
Taylor expanded in x around 0
Applied rewrites31.5%
Taylor expanded in F around -inf
Applied rewrites24.6%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-80) (/ (- -1.0 x) B) (if (<= F 2.1e-55) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-80) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.1e-55) {
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 <= (-3.8d-80)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.1d-55) 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 <= -3.8e-80) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.1e-55) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-80: tmp = (-1.0 - x) / B elif F <= 2.1e-55: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-80) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.1e-55) 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 <= -3.8e-80) tmp = (-1.0 - x) / B; elseif (F <= 2.1e-55) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-80], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-55], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-80}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.79999999999999967e-80Initial program 67.1%
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.7
Applied rewrites41.7%
Taylor expanded in F around -inf
Applied rewrites43.9%
if -3.79999999999999967e-80 < F < 2.1000000000000002e-55Initial 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.f6454.6
Applied rewrites54.6%
Taylor expanded in F around 0
Applied rewrites41.0%
if 2.1000000000000002e-55 < F Initial program 61.7%
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.f6442.0
Applied rewrites42.0%
Taylor expanded in F around inf
Applied rewrites52.4%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-80) (/ (- -1.0 x) B) (if (<= F 1.72e+47) (/ (- x) B) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-80) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.72e+47) {
tmp = -x / B;
} else {
tmp = 1.0 / 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 <= (-3.8d-80)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.72d+47) then
tmp = -x / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-80) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.72e+47) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-80: tmp = (-1.0 - x) / B elif F <= 1.72e+47: tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-80) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.72e+47) tmp = Float64(Float64(-x) / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.8e-80) tmp = (-1.0 - x) / B; elseif (F <= 1.72e+47) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-80], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.72e+47], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-80}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.72 \cdot 10^{+47}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -3.79999999999999967e-80Initial program 67.1%
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.7
Applied rewrites41.7%
Taylor expanded in F around -inf
Applied rewrites43.9%
if -3.79999999999999967e-80 < F < 1.72000000000000002e47Initial 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.f6451.6
Applied rewrites51.6%
Taylor expanded in F around 0
Applied rewrites37.1%
if 1.72000000000000002e47 < F Initial program 53.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 x around 0
Applied rewrites19.9%
Taylor expanded in F around inf
Applied rewrites35.0%
(FPCore (F B x) :precision binary64 (if (<= F 4.2e-87) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 4.2e-87) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / 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 <= 4.2d-87) then
tmp = (-1.0d0) / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 4.2e-87) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 4.2e-87: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 4.2e-87) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 4.2e-87) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 4.2e-87], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 4.20000000000000014e-87Initial program 81.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.f6446.7
Applied rewrites46.7%
Taylor expanded in x around 0
Applied rewrites17.9%
Taylor expanded in F around -inf
Applied rewrites14.9%
if 4.20000000000000014e-87 < F Initial program 63.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.f6444.2
Applied rewrites44.2%
Taylor expanded in x around 0
Applied rewrites22.5%
Taylor expanded in F around inf
Applied rewrites29.5%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 75.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.f6445.8
Applied rewrites45.8%
Taylor expanded in x around 0
Applied rewrites19.5%
Taylor expanded in F around -inf
Applied rewrites10.7%
herbie shell --seed 2024235
(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))))))