
(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 32 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
(if (<= F -7.5e+50)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 5.5e+27)
(fma
F
(/ (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) (sin B))
(/ (- x) (tan B)))
(- (/ 1.0 (sin B)) (/ (* x (cos B)) (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e+50) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 5.5e+27) {
tmp = fma(F, (sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))) / sin(B)), (-x / tan(B)));
} else {
tmp = (1.0 / sin(B)) - ((x * cos(B)) / sin(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -7.5e+50) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 5.5e+27) tmp = fma(F, Float64(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) / sin(B)), Float64(Float64(-x) / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -7.5e+50], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e+27], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.5 \cdot 10^{+50}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(F, \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}{\sin B}, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -7.4999999999999999e50Initial program 59.7%
Applied egg-rr76.5%
Applied egg-rr76.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.8
Simplified99.8%
if -7.4999999999999999e50 < F < 5.49999999999999966e27Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Applied egg-rr99.6%
if 5.49999999999999966e27 < F Initial program 52.1%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6499.9
Simplified99.9%
(FPCore (F B x)
:precision binary64
(if (<= F -2.9e+51)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1e+28)
(fma
F
(/ (sqrt (/ 1.0 (fma F F (fma 2.0 x 2.0)))) (sin B))
(/ (- x) (tan B)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e+51) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1e+28) {
tmp = fma(F, (sqrt((1.0 / fma(F, F, fma(2.0, x, 2.0)))) / sin(B)), (-x / tan(B)));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2.9e+51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1e+28) tmp = fma(F, Float64(sqrt(Float64(1.0 / fma(F, F, fma(2.0, x, 2.0)))) / sin(B)), Float64(Float64(-x) / tan(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2.9e+51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+28], N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.9 \cdot 10^{+51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(F, \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}}{\sin B}, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2.8999999999999998e51Initial program 59.7%
Applied egg-rr76.5%
Applied egg-rr76.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.8
Simplified99.8%
if -2.8999999999999998e51 < F < 9.99999999999999958e27Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Applied egg-rr99.6%
if 9.99999999999999958e27 < F Initial program 52.1%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6499.9
Simplified99.9%
Applied egg-rr99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+52)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000.0)
(- (/ (* F (sqrt (/ 1.0 (fma F F 2.0)))) (sin B)) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+52) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = ((F * sqrt((1.0 / fma(F, F, 2.0)))) / sin(B)) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+52) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+52}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2e52Initial program 59.7%
Applied egg-rr76.5%
Applied egg-rr76.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.8
Simplified99.8%
if -2e52 < F < 2e8Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
if 2e8 < F Initial program 53.6%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6499.9
Simplified99.9%
Applied egg-rr99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e+96)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 110000000.0)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e+96) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 110000000.0) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.7e+96) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 110000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.7e+96], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 110000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{+96}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 110000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2.70000000000000022e96Initial program 57.5%
Applied egg-rr73.6%
Applied egg-rr73.7%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.8
Simplified99.8%
if -2.70000000000000022e96 < F < 1.1e8Initial program 98.1%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
lift-fma.f64N/A
lift-sqrt.f64N/A
lift-sin.f64N/A
associate-/l/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.6
Applied egg-rr99.6%
if 1.1e8 < F Initial program 53.6%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6499.9
Simplified99.9%
Applied egg-rr99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.26e-6)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.26e-6) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2d+21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.26d-6) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2e+21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.26e-6) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2e+21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.26e-6: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.26e-6) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2e+21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.26e-6) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.26e-6], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.26 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2e21Initial program 64.2%
Applied egg-rr79.1%
Applied egg-rr79.2%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Simplified99.7%
if -2e21 < F < 1.26000000000000001e-6Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
Taylor expanded in F around 0
lower-/.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sin.f6499.1
Simplified99.1%
if 1.26000000000000001e-6 < F Initial program 55.7%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6499.3
Simplified99.3%
Applied egg-rr99.3%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e+136)
(/ (* (- x) (cos B)) (sin B))
(if (<= F -3.6e+21)
(- (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (sin B)) (/ x B))
(if (<= F 1.55e-17)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) (/ x (tan B)))
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e+136) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= -3.6e+21) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)) - (x / B);
} else if (F <= 1.55e-17) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - (x / tan(B));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -9.5e+136) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= -3.6e+21) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)) - Float64(x / B)); elseif (F <= 1.55e-17) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -9.5e+136], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6e+21], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -9.49999999999999907e136Initial program 52.2%
Taylor expanded in x around inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-neg.f64N/A
lower-sin.f6462.9
Simplified62.9%
if -9.49999999999999907e136 < F < -3.6e21Initial program 86.4%
Applied egg-rr99.5%
Applied egg-rr99.7%
Taylor expanded in B around 0
lower-/.f6481.2
Simplified81.2%
if -3.6e21 < F < 1.5499999999999999e-17Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6482.9
Simplified82.9%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6498.0
Simplified98.0%
Applied egg-rr97.9%
Final simplification82.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.55e-17)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.55e-17) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.55e-17) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2e21Initial program 64.2%
Applied egg-rr79.1%
Applied egg-rr79.2%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.7
Simplified99.7%
if -2e21 < F < 1.5499999999999999e-17Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6482.9
Simplified82.9%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6498.0
Simplified98.0%
Applied egg-rr97.9%
Final simplification92.0%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e+136)
(/ (* (- x) (cos B)) (sin B))
(if (<= F -2.3e+21)
(- (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (sin B)) (/ x B))
(if (<= F 1.55e-17)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) (/ x (tan B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e+136) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= -2.3e+21) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)) - (x / B);
} else if (F <= 1.55e-17) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - (x / tan(B));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -9.5e+136) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= -2.3e+21) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)) - Float64(x / B)); elseif (F <= 1.55e-17) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - 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, -9.5e+136], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.3e+21], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - 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 -9.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.49999999999999907e136Initial program 52.2%
Taylor expanded in x around inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-neg.f64N/A
lower-sin.f6462.9
Simplified62.9%
if -9.49999999999999907e136 < F < -2.3e21Initial program 86.4%
Applied egg-rr99.5%
Applied egg-rr99.7%
Taylor expanded in B around 0
lower-/.f6481.2
Simplified81.2%
if -2.3e21 < F < 1.5499999999999999e-17Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6482.9
Simplified82.9%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6498.0
Simplified98.0%
Taylor expanded in B around 0
lower-/.f6484.1
Simplified84.1%
Final simplification78.9%
(FPCore (F B x)
:precision binary64
(if (<= F -2.7e+136)
(* x (/ (cos B) (- (sin B))))
(if (<= F -2.3e+21)
(- (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (sin B)) (/ x B))
(if (<= F 1.55e-17)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) (/ x (tan B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e+136) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= -2.3e+21) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)) - (x / B);
} else if (F <= 1.55e-17) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - (x / tan(B));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2.7e+136) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= -2.3e+21) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)) - Float64(x / B)); elseif (F <= 1.55e-17) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - 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, -2.7e+136], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.3e+21], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - 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 -2.7 \cdot 10^{+136}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.7000000000000002e136Initial program 52.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
cube-multN/A
lower-*.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-sin.f6444.9
Simplified44.9%
Taylor expanded in F around 0
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-sin.f6462.7
Simplified62.7%
if -2.7000000000000002e136 < F < -2.3e21Initial program 86.4%
Applied egg-rr99.5%
Applied egg-rr99.7%
Taylor expanded in B around 0
lower-/.f6481.2
Simplified81.2%
if -2.3e21 < F < 1.5499999999999999e-17Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6482.9
Simplified82.9%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6498.0
Simplified98.0%
Taylor expanded in B around 0
lower-/.f6484.1
Simplified84.1%
Final simplification78.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.5e+136)
(- (/ 1.0 B) t_0)
(if (<= F -2e+21)
(- (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (sin B)) (/ x B))
(if (<= F 1.55e-17)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) t_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 <= -9.5e+136) {
tmp = (1.0 / B) - t_0;
} else if (F <= -2e+21) {
tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)) - (x / B);
} else if (F <= 1.55e-17) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - t_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 <= -9.5e+136) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= -2e+21) tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)) - Float64(x / B)); elseif (F <= 1.55e-17) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - 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[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+136], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2e+21], N[(N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -9.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{elif}\;F \leq -2 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.49999999999999907e136Initial program 52.2%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6462.3
Simplified62.3%
lift-sin.f64N/A
lift-/.f64N/A
unpow1N/A
remove-double-negN/A
lift-neg.f64N/A
neg-mul-1N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
sqrt-pow1N/A
pow2N/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
neg-mul-1N/A
lift-cos.f64N/A
lift-neg.f64N/A
lift-sin.f64N/A
Applied egg-rr62.4%
Taylor expanded in B around 0
lower-/.f6462.6
Simplified62.6%
if -9.49999999999999907e136 < F < -2e21Initial program 86.4%
Applied egg-rr99.5%
Applied egg-rr99.7%
Taylor expanded in B around 0
lower-/.f6481.2
Simplified81.2%
if -2e21 < F < 1.5499999999999999e-17Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6482.9
Simplified82.9%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6498.0
Simplified98.0%
Taylor expanded in B around 0
lower-/.f6484.1
Simplified84.1%
Final simplification78.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.5e+136)
(- (/ 1.0 B) t_0)
(if (<= F -8.5e+21)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x B))
(if (<= F 1.55e-17)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) t_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 <= -9.5e+136) {
tmp = (1.0 / B) - t_0;
} else if (F <= -8.5e+21) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / B);
} else if (F <= 1.55e-17) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - t_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 <= -9.5e+136) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= -8.5e+21) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / B)); elseif (F <= 1.55e-17) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - 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[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+136], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.5e+21], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -9.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.49999999999999907e136Initial program 52.2%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6462.3
Simplified62.3%
lift-sin.f64N/A
lift-/.f64N/A
unpow1N/A
remove-double-negN/A
lift-neg.f64N/A
neg-mul-1N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
sqrt-pow1N/A
pow2N/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
neg-mul-1N/A
lift-cos.f64N/A
lift-neg.f64N/A
lift-sin.f64N/A
Applied egg-rr62.4%
Taylor expanded in B around 0
lower-/.f6462.6
Simplified62.6%
if -9.49999999999999907e136 < F < -8.5e21Initial program 86.4%
Applied egg-rr99.5%
Applied egg-rr99.7%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.7
Simplified99.7%
Taylor expanded in B around 0
lower-/.f6481.2
Simplified81.2%
if -8.5e21 < F < 1.5499999999999999e-17Initial program 99.5%
Applied egg-rr99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6482.9
Simplified82.9%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6498.0
Simplified98.0%
Taylor expanded in B around 0
lower-/.f6484.1
Simplified84.1%
Final simplification78.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= x -850.0)
t_0
(if (<= x 30.0) (- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x B)) t_0))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (x <= -850.0) {
tmp = t_0;
} else if (x <= 30.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -850.0) tmp = t_0; elseif (x <= 30.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / B)); else tmp = t_0; 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[x, -850.0], t$95$0, If[LessEqual[x, 30.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -850:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 30:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -850 or 30 < x Initial program 83.6%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6499.6
Simplified99.6%
lift-sin.f64N/A
lift-/.f64N/A
unpow1N/A
remove-double-negN/A
lift-neg.f64N/A
neg-mul-1N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
sqrt-pow1N/A
pow2N/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
neg-mul-1N/A
lift-cos.f64N/A
lift-neg.f64N/A
lift-sin.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
lower-/.f6498.9
Simplified98.9%
if -850 < x < 30Initial program 73.3%
Applied egg-rr77.1%
Applied egg-rr77.2%
Taylor expanded in x around 0
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6477.2
Simplified77.2%
Taylor expanded in B around 0
lower-/.f6463.1
Simplified63.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (fma x 2.0 (* F F)))))))
(if (<= B 80000000.0)
(/
(-
(fma
(* B B)
(fma (* F 0.16666666666666666) t_0 (* x 0.3333333333333333))
(* F t_0))
x)
B)
(-
(/
1.0
(fma
B
(* (* B B) (fma (* B B) 0.008333333333333333 -0.16666666666666666))
B))
(/ x (tan B))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + fma(x, 2.0, (F * F)))));
double tmp;
if (B <= 80000000.0) {
tmp = (fma((B * B), fma((F * 0.16666666666666666), t_0, (x * 0.3333333333333333)), (F * t_0)) - x) / B;
} else {
tmp = (1.0 / fma(B, ((B * B) * fma((B * B), 0.008333333333333333, -0.16666666666666666)), B)) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + fma(x, 2.0, Float64(F * F))))) tmp = 0.0 if (B <= 80000000.0) tmp = Float64(Float64(fma(Float64(B * B), fma(Float64(F * 0.16666666666666666), t_0, Float64(x * 0.3333333333333333)), Float64(F * t_0)) - x) / B); else tmp = Float64(Float64(1.0 / fma(B, Float64(Float64(B * B) * fma(Float64(B * B), 0.008333333333333333, -0.16666666666666666)), B)) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 80000000.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(F * 0.16666666666666666), $MachinePrecision] * t$95$0 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[(B * N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(x, 2, F \cdot F\right)}}\\
\mathbf{if}\;B \leq 80000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, t\_0, x \cdot 0.3333333333333333\right), F \cdot t\_0\right) - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(B, \left(B \cdot B\right) \cdot \mathsf{fma}\left(B \cdot B, 0.008333333333333333, -0.16666666666666666\right), B\right)} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 8e7Initial program 73.9%
Applied egg-rr85.5%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified59.6%
if 8e7 < B Initial program 87.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6454.6
Simplified54.6%
lift-sin.f64N/A
lift-/.f64N/A
unpow1N/A
remove-double-negN/A
lift-neg.f64N/A
neg-mul-1N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
sqrt-pow1N/A
pow2N/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
neg-mul-1N/A
lift-cos.f64N/A
lift-neg.f64N/A
lift-sin.f64N/A
Applied egg-rr54.7%
Taylor expanded in B around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6457.5
Simplified57.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (fma x 2.0 (* F F)))))))
(if (<= B 80000000.0)
(/
(-
(fma
(* B B)
(fma (* F 0.16666666666666666) t_0 (* x 0.3333333333333333))
(* F t_0))
x)
B)
(-
(/ 1.0 (fma B (* (* B B) (* (* B B) 0.008333333333333333)) B))
(/ x (tan B))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + fma(x, 2.0, (F * F)))));
double tmp;
if (B <= 80000000.0) {
tmp = (fma((B * B), fma((F * 0.16666666666666666), t_0, (x * 0.3333333333333333)), (F * t_0)) - x) / B;
} else {
tmp = (1.0 / fma(B, ((B * B) * ((B * B) * 0.008333333333333333)), B)) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + fma(x, 2.0, Float64(F * F))))) tmp = 0.0 if (B <= 80000000.0) tmp = Float64(Float64(fma(Float64(B * B), fma(Float64(F * 0.16666666666666666), t_0, Float64(x * 0.3333333333333333)), Float64(F * t_0)) - x) / B); else tmp = Float64(Float64(1.0 / fma(B, Float64(Float64(B * B) * Float64(Float64(B * B) * 0.008333333333333333)), B)) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 80000000.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(F * 0.16666666666666666), $MachinePrecision] * t$95$0 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[(B * N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(x, 2, F \cdot F\right)}}\\
\mathbf{if}\;B \leq 80000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, t\_0, x \cdot 0.3333333333333333\right), F \cdot t\_0\right) - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(B, \left(B \cdot B\right) \cdot \left(\left(B \cdot B\right) \cdot 0.008333333333333333\right), B\right)} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 8e7Initial program 73.9%
Applied egg-rr85.5%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified59.6%
if 8e7 < B Initial program 87.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6454.6
Simplified54.6%
lift-sin.f64N/A
lift-/.f64N/A
unpow1N/A
remove-double-negN/A
lift-neg.f64N/A
neg-mul-1N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
sqrt-pow1N/A
pow2N/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
neg-mul-1N/A
lift-cos.f64N/A
lift-neg.f64N/A
lift-sin.f64N/A
Applied egg-rr54.7%
Taylor expanded in B around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6457.5
Simplified57.5%
Taylor expanded in B around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.5
Simplified57.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (fma x 2.0 (* F F)))))))
(if (<= B 80000000.0)
(/
(-
(fma
(* B B)
(fma (* F 0.16666666666666666) t_0 (* x 0.3333333333333333))
(* F t_0))
x)
B)
(- (/ 1.0 (fma B (* (* B B) -0.16666666666666666) B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + fma(x, 2.0, (F * F)))));
double tmp;
if (B <= 80000000.0) {
tmp = (fma((B * B), fma((F * 0.16666666666666666), t_0, (x * 0.3333333333333333)), (F * t_0)) - x) / B;
} else {
tmp = (1.0 / fma(B, ((B * B) * -0.16666666666666666), B)) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + fma(x, 2.0, Float64(F * F))))) tmp = 0.0 if (B <= 80000000.0) tmp = Float64(Float64(fma(Float64(B * B), fma(Float64(F * 0.16666666666666666), t_0, Float64(x * 0.3333333333333333)), Float64(F * t_0)) - x) / B); else tmp = Float64(Float64(1.0 / fma(B, Float64(Float64(B * B) * -0.16666666666666666), B)) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 80000000.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(F * 0.16666666666666666), $MachinePrecision] * t$95$0 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[(B * N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(x, 2, F \cdot F\right)}}\\
\mathbf{if}\;B \leq 80000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, t\_0, x \cdot 0.3333333333333333\right), F \cdot t\_0\right) - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(B, \left(B \cdot B\right) \cdot -0.16666666666666666, B\right)} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 8e7Initial program 73.9%
Applied egg-rr85.5%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified59.6%
if 8e7 < B Initial program 87.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6454.6
Simplified54.6%
lift-sin.f64N/A
lift-/.f64N/A
unpow1N/A
remove-double-negN/A
lift-neg.f64N/A
neg-mul-1N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
sqrt-pow1N/A
pow2N/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
neg-mul-1N/A
lift-cos.f64N/A
lift-neg.f64N/A
lift-sin.f64N/A
Applied egg-rr54.7%
Taylor expanded in B around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.5
Simplified56.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (fma x 2.0 (* F F)))))))
(if (<= B 80000000.0)
(/
(-
(fma
(* B B)
(fma (* F 0.16666666666666666) t_0 (* x 0.3333333333333333))
(* F t_0))
x)
B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + fma(x, 2.0, (F * F)))));
double tmp;
if (B <= 80000000.0) {
tmp = (fma((B * B), fma((F * 0.16666666666666666), t_0, (x * 0.3333333333333333)), (F * t_0)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + fma(x, 2.0, Float64(F * F))))) tmp = 0.0 if (B <= 80000000.0) tmp = Float64(Float64(fma(Float64(B * B), fma(Float64(F * 0.16666666666666666), t_0, Float64(x * 0.3333333333333333)), Float64(F * t_0)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 80000000.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(F * 0.16666666666666666), $MachinePrecision] * t$95$0 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(x, 2, F \cdot F\right)}}\\
\mathbf{if}\;B \leq 80000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, t\_0, x \cdot 0.3333333333333333\right), F \cdot t\_0\right) - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 8e7Initial program 73.9%
Applied egg-rr85.5%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified59.6%
if 8e7 < B Initial program 87.4%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6454.6
Simplified54.6%
lift-sin.f64N/A
lift-/.f64N/A
unpow1N/A
remove-double-negN/A
lift-neg.f64N/A
neg-mul-1N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
sqrt-pow1N/A
pow2N/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
neg-mul-1N/A
lift-cos.f64N/A
lift-neg.f64N/A
lift-sin.f64N/A
Applied egg-rr54.7%
Taylor expanded in B around 0
lower-/.f6453.2
Simplified53.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (fma x 2.0 (* F F)))))))
(if (<= B 2.3e+38)
(/
(-
(fma
(* B B)
(fma (* F 0.16666666666666666) t_0 (* x 0.3333333333333333))
(* F t_0))
x)
B)
(/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + fma(x, 2.0, (F * F)))));
double tmp;
if (B <= 2.3e+38) {
tmp = (fma((B * B), fma((F * 0.16666666666666666), t_0, (x * 0.3333333333333333)), (F * t_0)) - x) / B;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + fma(x, 2.0, Float64(F * F))))) tmp = 0.0 if (B <= 2.3e+38) tmp = Float64(Float64(fma(Float64(B * B), fma(Float64(F * 0.16666666666666666), t_0, Float64(x * 0.3333333333333333)), Float64(F * t_0)) - x) / B); else tmp = Float64(1.0 / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 2.3e+38], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(F * 0.16666666666666666), $MachinePrecision] * t$95$0 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + \mathsf{fma}\left(x, 2, F \cdot F\right)}}\\
\mathbf{if}\;B \leq 2.3 \cdot 10^{+38}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(F \cdot 0.16666666666666666, t\_0, x \cdot 0.3333333333333333\right), F \cdot t\_0\right) - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if B < 2.3000000000000001e38Initial program 74.7%
Applied egg-rr85.9%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified58.1%
if 2.3000000000000001e38 < B Initial program 86.2%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6454.9
Simplified54.9%
Taylor expanded in x around 0
lower-/.f64N/A
lower-sin.f6419.2
Simplified19.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (fma F F (fma 2.0 x 2.0))))
(t_1
(* B (fma x 0.3333333333333333 (/ (* F 0.16666666666666666) t_0)))))
(if (<= F -5e+127)
(/ (fma t_1 B (- (/ F (- F)) x)) B)
(if (<= F 2.75e+159)
(* (/ 1.0 B) (- (fma B t_1 (/ F t_0)) x))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0)));
double t_1 = B * fma(x, 0.3333333333333333, ((F * 0.16666666666666666) / t_0));
double tmp;
if (F <= -5e+127) {
tmp = fma(t_1, B, ((F / -F) - x)) / B;
} else if (F <= 2.75e+159) {
tmp = (1.0 / B) * (fma(B, t_1, (F / t_0)) - x);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0))) t_1 = Float64(B * fma(x, 0.3333333333333333, Float64(Float64(F * 0.16666666666666666) / t_0))) tmp = 0.0 if (F <= -5e+127) tmp = Float64(fma(t_1, B, Float64(Float64(F / Float64(-F)) - x)) / B); elseif (F <= 2.75e+159) tmp = Float64(Float64(1.0 / B) * Float64(fma(B, t_1, Float64(F / t_0)) - x)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(B * N[(x * 0.3333333333333333 + N[(N[(F * 0.16666666666666666), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+127], N[(N[(t$95$1 * B + N[(N[(F / (-F)), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.75e+159], N[(N[(1.0 / B), $MachinePrecision] * N[(N[(B * t$95$1 + N[(F / t$95$0), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}\\
t_1 := B \cdot \mathsf{fma}\left(x, 0.3333333333333333, \frac{F \cdot 0.16666666666666666}{t\_0}\right)\\
\mathbf{if}\;F \leq -5 \cdot 10^{+127}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_1, B, \frac{F}{-F} - x\right)}{B}\\
\mathbf{elif}\;F \leq 2.75 \cdot 10^{+159}:\\
\;\;\;\;\frac{1}{B} \cdot \left(\mathsf{fma}\left(B, t\_1, \frac{F}{t\_0}\right) - x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.0000000000000004e127Initial program 53.9%
Applied egg-rr70.3%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified29.7%
Taylor expanded in F around -inf
lower-/.f6445.3
Simplified45.3%
Applied egg-rr45.4%
if -5.0000000000000004e127 < F < 2.7499999999999999e159Initial program 95.6%
Applied egg-rr99.6%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified53.9%
Applied egg-rr53.9%
if 2.7499999999999999e159 < F Initial program 24.8%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6429.9
Simplified29.9%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6456.6
Simplified56.6%
(FPCore (F B x)
:precision binary64
(if (<= B 1.25e+30)
(/
(fma
(sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0))))
(fma (* B B) (* F 0.16666666666666666) F)
(fma x (* (* B B) 0.3333333333333333) (- x)))
B)
(/ 1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if (B <= 1.25e+30) {
tmp = fma(sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), fma((B * B), (F * 0.16666666666666666), F), fma(x, ((B * B) * 0.3333333333333333), -x)) / B;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 1.25e+30) tmp = Float64(fma(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), fma(Float64(B * B), Float64(F * 0.16666666666666666), F), fma(x, Float64(Float64(B * B) * 0.3333333333333333), Float64(-x))) / B); else tmp = Float64(1.0 / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 1.25e+30], N[(N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(F * 0.16666666666666666), $MachinePrecision] + F), $MachinePrecision] + N[(x * N[(N[(B * B), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.25 \cdot 10^{+30}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{fma}\left(B \cdot B, F \cdot 0.16666666666666666, F\right), \mathsf{fma}\left(x, \left(B \cdot B\right) \cdot 0.3333333333333333, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if B < 1.25e30Initial program 74.4%
Taylor expanded in B around 0
Simplified58.1%
if 1.25e30 < B Initial program 86.7%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6454.8
Simplified54.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-sin.f6418.7
Simplified18.7%
Final simplification48.7%
(FPCore (F B x)
:precision binary64
(if (<= F -100000000000.0)
(/
(fma
(*
B
(fma
x
0.3333333333333333
(/ (* F 0.16666666666666666) (sqrt (fma F F (fma 2.0 x 2.0))))))
B
(- (/ F (- F)) x))
B)
(if (<= F 4.2e+40)
(/
(fma
(sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0))))
(fma (* B B) (* F 0.16666666666666666) F)
(fma x (* (* B B) 0.3333333333333333) (- x)))
B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -100000000000.0) {
tmp = fma((B * fma(x, 0.3333333333333333, ((F * 0.16666666666666666) / sqrt(fma(F, F, fma(2.0, x, 2.0)))))), B, ((F / -F) - x)) / B;
} else if (F <= 4.2e+40) {
tmp = fma(sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), fma((B * B), (F * 0.16666666666666666), F), fma(x, ((B * B) * 0.3333333333333333), -x)) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -100000000000.0) tmp = Float64(fma(Float64(B * fma(x, 0.3333333333333333, Float64(Float64(F * 0.16666666666666666) / sqrt(fma(F, F, fma(2.0, x, 2.0)))))), B, Float64(Float64(F / Float64(-F)) - x)) / B); elseif (F <= 4.2e+40) tmp = Float64(fma(sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), fma(Float64(B * B), Float64(F * 0.16666666666666666), F), fma(x, Float64(Float64(B * B) * 0.3333333333333333), Float64(-x))) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -100000000000.0], N[(N[(N[(B * N[(x * 0.3333333333333333 + N[(N[(F * 0.16666666666666666), $MachinePrecision] / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * B + N[(N[(F / (-F)), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.2e+40], N[(N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(F * 0.16666666666666666), $MachinePrecision] + F), $MachinePrecision] + N[(x * N[(N[(B * B), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + (-x)), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -100000000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot \mathsf{fma}\left(x, 0.3333333333333333, \frac{F \cdot 0.16666666666666666}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\right), B, \frac{F}{-F} - x\right)}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{+40}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, \mathsf{fma}\left(B \cdot B, F \cdot 0.16666666666666666, F\right), \mathsf{fma}\left(x, \left(B \cdot B\right) \cdot 0.3333333333333333, -x\right)\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1e11Initial program 64.6%
Applied egg-rr79.3%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified35.2%
Taylor expanded in F around -inf
lower-/.f6446.0
Simplified46.0%
Applied egg-rr46.1%
if -1e11 < F < 4.2000000000000002e40Initial program 99.5%
Taylor expanded in B around 0
Simplified51.5%
if 4.2000000000000002e40 < F Initial program 51.3%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.6
Simplified47.6%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6462.6
Simplified62.6%
Final simplification52.3%
(FPCore (F B x)
:precision binary64
(if (<= F -9600000.0)
(/
(fma
(*
B
(fma
x
0.3333333333333333
(/ (* F 0.16666666666666666) (sqrt (fma F F (fma 2.0 x 2.0))))))
B
(- (/ F (- F)) x))
B)
(if (<= F 1.55e-17)
(/ (fma F (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (- x)) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9600000.0) {
tmp = fma((B * fma(x, 0.3333333333333333, ((F * 0.16666666666666666) / sqrt(fma(F, F, fma(2.0, x, 2.0)))))), B, ((F / -F) - x)) / B;
} else if (F <= 1.55e-17) {
tmp = fma(F, sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), -x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -9600000.0) tmp = Float64(fma(Float64(B * fma(x, 0.3333333333333333, Float64(Float64(F * 0.16666666666666666) / sqrt(fma(F, F, fma(2.0, x, 2.0)))))), B, Float64(Float64(F / Float64(-F)) - x)) / B); elseif (F <= 1.55e-17) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), Float64(-x)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -9600000.0], N[(N[(N[(B * N[(x * 0.3333333333333333 + N[(N[(F * 0.16666666666666666), $MachinePrecision] / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * B + N[(N[(F / (-F)), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(F * N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9600000:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot \mathsf{fma}\left(x, 0.3333333333333333, \frac{F \cdot 0.16666666666666666}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}}\right), B, \frac{F}{-F} - x\right)}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.6e6Initial program 64.6%
Applied egg-rr79.3%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified35.2%
Taylor expanded in F around -inf
lower-/.f6446.0
Simplified46.0%
Applied egg-rr46.1%
if -9.6e6 < F < 1.5499999999999999e-17Initial program 99.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6451.4
Simplified51.4%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.4
Simplified47.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6460.7
Simplified60.7%
(FPCore (F B x)
:precision binary64
(if (<= F -85000000.0)
(/
(- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
B)
(if (<= F 1.55e-17)
(/ (fma F (sqrt (/ 1.0 (fma x 2.0 (fma F F 2.0)))) (- x)) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -85000000.0) {
tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
} else if (F <= 1.55e-17) {
tmp = fma(F, sqrt((1.0 / fma(x, 2.0, fma(F, F, 2.0)))), -x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -85000000.0) tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B); elseif (F <= 1.55e-17) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(x, 2.0, fma(F, F, 2.0)))), Float64(-x)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -85000000.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(F * N[Sqrt[N[(1.0 / N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -85000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)}}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.5e7Initial program 64.6%
Applied egg-rr79.3%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified35.2%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6446.0
Simplified46.0%
if -8.5e7 < F < 1.5499999999999999e-17Initial program 99.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6451.4
Simplified51.4%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.4
Simplified47.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6460.7
Simplified60.7%
(FPCore (F B x)
:precision binary64
(if (<= F -0.68)
(/
(- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
B)
(if (<= F 1.55e-17)
(/ (fma F (sqrt (/ 1.0 (fma x 2.0 2.0))) (- x)) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.68) {
tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
} else if (F <= 1.55e-17) {
tmp = fma(F, sqrt((1.0 / fma(x, 2.0, 2.0))), -x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -0.68) tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B); elseif (F <= 1.55e-17) tmp = Float64(fma(F, sqrt(Float64(1.0 / fma(x, 2.0, 2.0))), Float64(-x)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -0.68], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55e-17], N[(N[(F * N[Sqrt[N[(1.0 / N[(x * 2.0 + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.68:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{\frac{1}{\mathsf{fma}\left(x, 2, 2\right)}}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.680000000000000049Initial program 64.6%
Applied egg-rr79.3%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified35.2%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6446.0
Simplified46.0%
if -0.680000000000000049 < F < 1.5499999999999999e-17Initial program 99.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6451.4
Simplified51.4%
Taylor expanded in F around 0
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-neg.f6450.8
Simplified50.8%
if 1.5499999999999999e-17 < F Initial program 56.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.4
Simplified47.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6460.7
Simplified60.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.65e-66)
(/
(- (fma (* B B) (fma x 0.3333333333333333 -0.16666666666666666) -1.0) x)
B)
(if (<= F 3.9e-116)
(/ (* x (fma (* B B) 0.3333333333333333 -1.0)) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-66) {
tmp = (fma((B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B;
} else if (F <= 3.9e-116) {
tmp = (x * fma((B * B), 0.3333333333333333, -1.0)) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1.65e-66) tmp = Float64(Float64(fma(Float64(B * B), fma(x, 0.3333333333333333, -0.16666666666666666), -1.0) - x) / B); elseif (F <= 3.9e-116) tmp = Float64(Float64(x * fma(Float64(B * B), 0.3333333333333333, -1.0)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1.65e-66], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333 + -0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.9e-116], N[(N[(x * N[(N[(B * B), $MachinePrecision] * 0.3333333333333333 + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.65 \cdot 10^{-66}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.3333333333333333, -0.16666666666666666\right), -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-116}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.6499999999999999e-66Initial program 68.4%
Applied egg-rr81.6%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified38.0%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6442.7
Simplified42.7%
if -1.6499999999999999e-66 < F < 3.9000000000000001e-116Initial program 99.5%
Applied egg-rr99.7%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified52.4%
Taylor expanded in F around 0
sub-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6437.8
Simplified37.8%
if 3.9000000000000001e-116 < F Initial program 63.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.9
Simplified46.9%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6455.6
Simplified55.6%
(FPCore (F B x)
:precision binary64
(if (<= F -3.9e-67)
(/ (- (fma (* B B) (* x 0.3333333333333333) -1.0) x) B)
(if (<= F 1.95e-114)
(/ (* x (fma (* B B) 0.3333333333333333 -1.0)) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.9e-67) {
tmp = (fma((B * B), (x * 0.3333333333333333), -1.0) - x) / B;
} else if (F <= 1.95e-114) {
tmp = (x * fma((B * B), 0.3333333333333333, -1.0)) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3.9e-67) tmp = Float64(Float64(fma(Float64(B * B), Float64(x * 0.3333333333333333), -1.0) - x) / B); elseif (F <= 1.95e-114) tmp = Float64(Float64(x * fma(Float64(B * B), 0.3333333333333333, -1.0)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3.9e-67], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.95e-114], N[(N[(x * N[(N[(B * B), $MachinePrecision] * 0.3333333333333333 + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.9 \cdot 10^{-67}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, x \cdot 0.3333333333333333, -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{-114}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.8999999999999998e-67Initial program 68.4%
Applied egg-rr81.6%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified38.0%
Taylor expanded in F around -inf
lower-/.f6442.7
Simplified42.7%
Taylor expanded in F around 0
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6442.7
Simplified42.7%
if -3.8999999999999998e-67 < F < 1.95000000000000001e-114Initial program 99.5%
Applied egg-rr99.7%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified52.4%
Taylor expanded in F around 0
sub-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6437.8
Simplified37.8%
if 1.95000000000000001e-114 < F Initial program 63.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.9
Simplified46.9%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6455.6
Simplified55.6%
(FPCore (F B x)
:precision binary64
(if (<= F -8.2e-68)
(/ (- -1.0 x) B)
(if (<= F 2.8e-115)
(/ (* x (fma (* B B) 0.3333333333333333 -1.0)) B)
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.8e-115) {
tmp = (x * fma((B * B), 0.3333333333333333, -1.0)) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -8.2e-68) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.8e-115) tmp = Float64(Float64(x * fma(Float64(B * B), 0.3333333333333333, -1.0)) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -8.2e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.8e-115], N[(N[(x * N[(N[(B * B), $MachinePrecision] * 0.3333333333333333 + -1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.2 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-115}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.20000000000000042e-68Initial program 68.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6436.6
Simplified36.6%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6441.4
Simplified41.4%
if -8.20000000000000042e-68 < F < 2.79999999999999987e-115Initial program 99.5%
Applied egg-rr99.7%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified52.4%
Taylor expanded in F around 0
sub-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6437.8
Simplified37.8%
if 2.79999999999999987e-115 < F Initial program 63.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.9
Simplified46.9%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6455.6
Simplified55.6%
(FPCore (F B x)
:precision binary64
(if (<= F -7.3e-68)
(/ (- -1.0 x) B)
(if (<= F 1.95e-114)
(* x (/ (fma (* B B) 0.3333333333333333 -1.0) B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.3e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.95e-114) {
tmp = x * (fma((B * B), 0.3333333333333333, -1.0) / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -7.3e-68) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.95e-114) tmp = Float64(x * Float64(fma(Float64(B * B), 0.3333333333333333, -1.0) / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -7.3e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.95e-114], N[(x * N[(N[(N[(B * B), $MachinePrecision] * 0.3333333333333333 + -1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{-114}:\\
\;\;\;\;x \cdot \frac{\mathsf{fma}\left(B \cdot B, 0.3333333333333333, -1\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.30000000000000009e-68Initial program 68.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6436.6
Simplified36.6%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6441.4
Simplified41.4%
if -7.30000000000000009e-68 < F < 1.95000000000000001e-114Initial program 99.5%
Applied egg-rr99.7%
Taylor expanded in B around 0
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lower-/.f64N/A
Simplified52.4%
Taylor expanded in F around 0
sub-negN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6437.7
Simplified37.7%
if 1.95000000000000001e-114 < F Initial program 63.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.9
Simplified46.9%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6455.6
Simplified55.6%
(FPCore (F B x) :precision binary64 (if (<= F -8.5e-68) (/ (- -1.0 x) B) (if (<= F 5.5e-71) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.5e-71) {
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 <= (-8.5d-68)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5.5d-71) 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 <= -8.5e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.5e-71) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-68: tmp = (-1.0 - x) / B elif F <= 5.5e-71: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-68) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5.5e-71) 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 <= -8.5e-68) tmp = (-1.0 - x) / B; elseif (F <= 5.5e-71) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.5e-71], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-71}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.50000000000000026e-68Initial program 68.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6436.6
Simplified36.6%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6441.4
Simplified41.4%
if -8.50000000000000026e-68 < F < 5.4999999999999997e-71Initial program 99.5%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6450.3
Simplified50.3%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6437.2
Simplified37.2%
if 5.4999999999999997e-71 < F Initial program 61.1%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6447.8
Simplified47.8%
Taylor expanded in F around inf
lower-/.f64N/A
lower--.f6457.3
Simplified57.3%
Final simplification44.5%
(FPCore (F B x) :precision binary64 (let* ((t_0 (- (/ x B)))) (if (<= x -3.8e-119) t_0 (if (<= x 4.6e-208) (/ 1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = -(x / B);
double tmp;
if (x <= -3.8e-119) {
tmp = t_0;
} else if (x <= 4.6e-208) {
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 <= (-3.8d-119)) then
tmp = t_0
else if (x <= 4.6d-208) 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 <= -3.8e-119) {
tmp = t_0;
} else if (x <= 4.6e-208) {
tmp = 1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -(x / B) tmp = 0 if x <= -3.8e-119: tmp = t_0 elif x <= 4.6e-208: 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 <= -3.8e-119) tmp = t_0; elseif (x <= 4.6e-208) 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 <= -3.8e-119) tmp = t_0; elseif (x <= 4.6e-208) 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, -3.8e-119], t$95$0, If[LessEqual[x, 4.6e-208], N[(1.0 / B), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\frac{x}{B}\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{-119}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-208}:\\
\;\;\;\;\frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -3.79999999999999975e-119 or 4.59999999999999993e-208 < x Initial program 78.9%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6446.4
Simplified46.4%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6439.3
Simplified39.3%
if -3.79999999999999975e-119 < x < 4.59999999999999993e-208Initial program 73.7%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6440.7
Simplified40.7%
Taylor expanded in F around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6419.0
Simplified19.0%
Taylor expanded in x around 0
lower-/.f6417.8
Simplified17.8%
Final simplification33.0%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e-68) (/ (- -1.0 x) B) (- (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-68) {
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 <= (-7.2d-68)) 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 <= -7.2e-68) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-68: tmp = (-1.0 - x) / B else: tmp = -(x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-68) 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 <= -7.2e-68) tmp = (-1.0 - x) / B; else tmp = -(x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\end{array}
if F < -7.20000000000000015e-68Initial program 68.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6436.6
Simplified36.6%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6441.4
Simplified41.4%
if -7.20000000000000015e-68 < F Initial program 82.2%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6449.2
Simplified49.2%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
lower-neg.f6435.1
Simplified35.1%
Final simplification37.3%
(FPCore (F B x) :precision binary64 (if (<= F 1.9e-267) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.9e-267) {
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 <= 1.9d-267) 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 <= 1.9e-267) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.9e-267: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.9e-267) 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 <= 1.9e-267) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.9e-267], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.9 \cdot 10^{-267}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1.90000000000000001e-267Initial program 79.7%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6441.8
Simplified41.8%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6433.2
Simplified33.2%
Taylor expanded in x around 0
lower-/.f6416.7
Simplified16.7%
if 1.90000000000000001e-267 < F Initial program 74.4%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6448.4
Simplified48.4%
Taylor expanded in F around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6434.1
Simplified34.1%
Taylor expanded in x around 0
lower-/.f6418.3
Simplified18.3%
(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 77.3%
Taylor expanded in B around 0
lower-/.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-neg.f6444.7
Simplified44.7%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6430.4
Simplified30.4%
Taylor expanded in x around 0
lower-/.f6410.7
Simplified10.7%
herbie shell --seed 2024207
(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))))))