
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -8e+153)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 2000000000.0)
(+ t_0 (/ F (* (sin B) (sqrt (fma F F 2.0)))))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -8e+153) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 2000000000.0) {
tmp = t_0 + (F / (sin(B) * sqrt(fma(F, F, 2.0))));
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -8e+153) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 2000000000.0) tmp = Float64(t_0 + Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0))))); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e+153], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2000000000.0], N[(t$95$0 + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -8 \cdot 10^{+153}:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2000000000:\\
\;\;\;\;t\_0 + \frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -8e153Initial program 35.3%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
if -8e153 < F < 2e9Initial program 97.5%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.6%
Applied egg-rr99.7%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.7
Simplified99.7%
if 2e9 < F Initial program 61.9%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
clear-numN/A
lower-/.f64N/A
lower-/.f6461.9
Applied egg-rr61.9%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.7
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.42)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 1.36)
(+ t_0 (/ F (* (sin B) (sqrt 2.0))))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.42) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 1.36) {
tmp = t_0 + (F / (sin(B) * sqrt(2.0)));
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / 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 * ((-1.0d0) / tan(b))
if (f <= (-1.42d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 1.36d0) then
tmp = t_0 + (f / (sin(b) * sqrt(2.0d0)))
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.42) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 1.36) {
tmp = t_0 + (F / (Math.sin(B) * Math.sqrt(2.0)));
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.42: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 1.36: tmp = t_0 + (F / (math.sin(B) * math.sqrt(2.0))) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.42) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 1.36) tmp = Float64(t_0 + Float64(F / Float64(sin(B) * sqrt(2.0)))); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.42) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 1.36) tmp = t_0 + (F / (sin(B) * sqrt(2.0))); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.36], N[(t$95$0 + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.36:\\
\;\;\;\;t\_0 + \frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 53.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6498.9
Simplified98.9%
if -1.4199999999999999 < F < 1.3600000000000001Initial program 99.5%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.5%
Applied egg-rr99.6%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.6
Simplified99.6%
Taylor expanded in F around 0
lower-sqrt.f6498.9
Simplified98.9%
if 1.3600000000000001 < F Initial program 62.4%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
clear-numN/A
lower-/.f64N/A
lower-/.f6462.4
Applied egg-rr62.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.4
Simplified99.4%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (fma F F (fma 2.0 x 2.0)))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -1.18e-33)
(+ t_1 (/ -1.0 (sin B)))
(if (<= F -2e-80)
(- (/ (/ F (sin B)) t_0) (/ x B))
(if (<= F 3.55e-50)
(+ t_1 (/ (/ F B) t_0))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 (sin 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 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.18e-33) {
tmp = t_1 + (-1.0 / sin(B));
} else if (F <= -2e-80) {
tmp = ((F / sin(B)) / t_0) - (x / B);
} else if (F <= 3.55e-50) {
tmp = t_1 + ((F / B) / t_0);
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0))) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.18e-33) tmp = Float64(t_1 + Float64(-1.0 / sin(B))); elseif (F <= -2e-80) tmp = Float64(Float64(Float64(F / sin(B)) / t_0) - Float64(x / B)); elseif (F <= 3.55e-50) tmp = Float64(t_1 + Float64(Float64(F / B) / t_0)); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / sin(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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e-33], N[(t$95$1 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-80], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.55e-50], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $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 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\
\;\;\;\;t\_1 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.55 \cdot 10^{-50}:\\
\;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.18e-33Initial program 58.7%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6497.8
Simplified97.8%
if -1.18e-33 < F < -1.99999999999999992e-80Initial program 99.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.2%
Taylor expanded in B around 0
lower-/.f6489.3
Simplified89.3%
lift-fma.f64N/A
lift-fma.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
*-commutativeN/A
Applied egg-rr89.6%
if -1.99999999999999992e-80 < F < 3.5499999999999999e-50Initial program 99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6485.1
Simplified85.1%
lift-fma.f64N/A
lift-fma.f64N/A
frac-2negN/A
metadata-evalN/A
metadata-evalN/A
frac-2negN/A
sqrt-divN/A
metadata-evalN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6485.1
lift-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
associate-+l+N/A
+-commutativeN/A
Applied egg-rr85.1%
if 3.5499999999999999e-50 < F Initial program 64.6%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
clear-numN/A
lower-/.f64N/A
lower-/.f6464.6
Applied egg-rr64.6%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6495.2
Simplified95.2%
Final simplification92.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (fma F F (fma 2.0 x 2.0)))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -1.18e-33)
(+ t_1 (/ -1.0 (sin B)))
(if (<= F -2e-80)
(- (/ (/ F (sin B)) t_0) (/ x B))
(if (<= F 1.82e-63) (+ t_1 (/ (/ F B) t_0)) (+ t_1 (/ 1.0 (sin 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 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.18e-33) {
tmp = t_1 + (-1.0 / sin(B));
} else if (F <= -2e-80) {
tmp = ((F / sin(B)) / t_0) - (x / B);
} else if (F <= 1.82e-63) {
tmp = t_1 + ((F / B) / t_0);
} else {
tmp = t_1 + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0))) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.18e-33) tmp = Float64(t_1 + Float64(-1.0 / sin(B))); elseif (F <= -2e-80) tmp = Float64(Float64(Float64(F / sin(B)) / t_0) - Float64(x / B)); elseif (F <= 1.82e-63) tmp = Float64(t_1 + Float64(Float64(F / B) / t_0)); else tmp = Float64(t_1 + Float64(1.0 / sin(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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e-33], N[(t$95$1 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-80], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.82e-63], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $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 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\
\;\;\;\;t\_1 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\
\;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.18e-33Initial program 58.7%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6497.8
Simplified97.8%
if -1.18e-33 < F < -1.99999999999999992e-80Initial program 99.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.2%
Taylor expanded in B around 0
lower-/.f6489.3
Simplified89.3%
lift-fma.f64N/A
lift-fma.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
*-commutativeN/A
Applied egg-rr89.6%
if -1.99999999999999992e-80 < F < 1.81999999999999994e-63Initial program 99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6484.9
Simplified84.9%
lift-fma.f64N/A
lift-fma.f64N/A
frac-2negN/A
metadata-evalN/A
metadata-evalN/A
frac-2negN/A
sqrt-divN/A
metadata-evalN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6485.0
lift-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
associate-+l+N/A
+-commutativeN/A
Applied egg-rr85.0%
if 1.81999999999999994e-63 < F Initial program 65.0%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6494.0
Simplified94.0%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (fma F F (fma 2.0 x 2.0)))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -1.18e-33)
(+ t_1 (/ -1.0 (sin B)))
(if (<= F -2e-80)
(- (/ (/ F (sin B)) t_0) (/ x B))
(if (<= F 2.9e-58)
(+ t_1 (/ (/ F B) t_0))
(if (<= F 7.6e+153)
(- (/ (* F (sqrt (/ 1.0 (fma F F 2.0)))) (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan 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 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.18e-33) {
tmp = t_1 + (-1.0 / sin(B));
} else if (F <= -2e-80) {
tmp = ((F / sin(B)) / t_0) - (x / B);
} else if (F <= 2.9e-58) {
tmp = t_1 + ((F / B) / t_0);
} else if (F <= 7.6e+153) {
tmp = ((F * sqrt((1.0 / fma(F, F, 2.0)))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(fma(F, F, fma(2.0, x, 2.0))) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.18e-33) tmp = Float64(t_1 + Float64(-1.0 / sin(B))); elseif (F <= -2e-80) tmp = Float64(Float64(Float64(F / sin(B)) / t_0) - Float64(x / B)); elseif (F <= 2.9e-58) tmp = Float64(t_1 + Float64(Float64(F / B) / t_0)); elseif (F <= 7.6e+153) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) / sin(B)) - Float64(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[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e-33], N[(t$95$1 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-80], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-58], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e+153], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $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 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{-33}:\\
\;\;\;\;t\_1 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{t\_0} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\
\;\;\;\;t\_1 + \frac{\frac{F}{B}}{t\_0}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.18e-33Initial program 58.7%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6497.8
Simplified97.8%
if -1.18e-33 < F < -1.99999999999999992e-80Initial program 99.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.2%
Taylor expanded in B around 0
lower-/.f6489.3
Simplified89.3%
lift-fma.f64N/A
lift-fma.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
*-commutativeN/A
Applied egg-rr89.6%
if -1.99999999999999992e-80 < F < 2.8999999999999999e-58Initial program 99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6485.1
Simplified85.1%
lift-fma.f64N/A
lift-fma.f64N/A
frac-2negN/A
metadata-evalN/A
metadata-evalN/A
frac-2negN/A
sqrt-divN/A
metadata-evalN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6485.1
lift-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
associate-+l+N/A
+-commutativeN/A
Applied egg-rr85.1%
if 2.8999999999999999e-58 < F < 7.59999999999999933e153Initial program 92.9%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
lower-/.f6479.2
Simplified79.2%
Taylor expanded in x around 0
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6479.3
Simplified79.3%
if 7.59999999999999933e153 < F Initial program 32.7%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6432.7
Simplified32.7%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
lower-/.f6432.8
Applied egg-rr32.8%
Taylor expanded in F around inf
lower-/.f6482.7
Simplified82.7%
Final simplification87.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.9e+200)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.9e-58)
(- (/ F (* B (sqrt (fma F F (fma 2.0 x 2.0))))) t_0)
(if (<= F 7.6e+153)
(- (/ (* F (sqrt (/ 1.0 (fma F F 2.0)))) (sin B)) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.9e+200) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.9e-58) {
tmp = (F / (B * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - t_0;
} else if (F <= 7.6e+153) {
tmp = ((F * sqrt((1.0 / fma(F, F, 2.0)))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.9e+200) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.9e-58) tmp = Float64(Float64(F / Float64(B * sqrt(fma(F, F, fma(2.0, x, 2.0))))) - t_0); elseif (F <= 7.6e+153) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.9e+200], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-58], N[(N[(F / N[(B * N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.6e+153], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - t\_0\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -4.89999999999999982e200Initial program 30.8%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr42.2%
Taylor expanded in B around 0
lower-/.f6416.3
Simplified16.3%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
lower--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6472.5
Simplified72.5%
if -4.89999999999999982e200 < F < 2.8999999999999999e-58Initial program 94.0%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6477.8
Simplified77.8%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
lower-/.f6477.8
Applied egg-rr77.8%
lift-fma.f64N/A
lift-fma.f64N/A
sqrt-divN/A
metadata-evalN/A
frac-timesN/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sqrt.f6481.3
lift-fma.f64N/A
+-commutativeN/A
lift-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
lift-fma.f64N/A
lift-fma.f6481.3
Applied egg-rr81.3%
if 2.8999999999999999e-58 < F < 7.59999999999999933e153Initial program 92.9%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
lower-/.f6479.2
Simplified79.2%
Taylor expanded in x around 0
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6479.3
Simplified79.3%
if 7.59999999999999933e153 < F Initial program 32.7%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6432.7
Simplified32.7%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
lower-/.f6432.8
Applied egg-rr32.8%
Taylor expanded in F around inf
lower-/.f6482.7
Simplified82.7%
Final simplification80.0%
(FPCore (F B x)
:precision binary64
(if (<= F -4.9e+200)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 6e-63)
(+ (* x (/ -1.0 (tan B))) (/ F (* B (sqrt (fma F F 2.0)))))
(if (<= F 7.6e+153)
(- (/ (* F (sqrt (/ 1.0 (fma F F 2.0)))) (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.9e+200) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6e-63) {
tmp = (x * (-1.0 / tan(B))) + (F / (B * sqrt(fma(F, F, 2.0))));
} else if (F <= 7.6e+153) {
tmp = ((F * sqrt((1.0 / fma(F, F, 2.0)))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -4.9e+200) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6e-63) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * sqrt(fma(F, F, 2.0))))); elseif (F <= 7.6e+153) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -4.9e+200], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-63], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e+153], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-63}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4.89999999999999982e200Initial program 30.8%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr42.2%
Taylor expanded in B around 0
lower-/.f6416.3
Simplified16.3%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
lower--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6472.5
Simplified72.5%
if -4.89999999999999982e200 < F < 5.99999999999999959e-63Initial program 94.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr97.5%
Applied egg-rr97.6%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6497.6
Simplified97.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6481.3
Simplified81.3%
if 5.99999999999999959e-63 < F < 7.59999999999999933e153Initial program 92.9%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
lower-/.f6479.2
Simplified79.2%
Taylor expanded in x around 0
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6479.3
Simplified79.3%
if 7.59999999999999933e153 < F Initial program 32.7%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6432.7
Simplified32.7%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
lower-/.f6432.8
Applied egg-rr32.8%
Taylor expanded in F around inf
lower-/.f6482.7
Simplified82.7%
Final simplification80.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (fma F F 2.0))))
(if (<= F -4.9e+200)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.9e-58)
(+ (* x (/ -1.0 (tan B))) (/ F (* B t_0)))
(if (<= F 7.6e+153)
(- (/ F (* (sin B) t_0)) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(fma(F, F, 2.0));
double tmp;
if (F <= -4.9e+200) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.9e-58) {
tmp = (x * (-1.0 / tan(B))) + (F / (B * t_0));
} else if (F <= 7.6e+153) {
tmp = (F / (sin(B) * t_0)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(fma(F, F, 2.0)) tmp = 0.0 if (F <= -4.9e+200) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.9e-58) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * t_0))); elseif (F <= 7.6e+153) tmp = Float64(Float64(F / Float64(sin(B) * t_0)) - Float64(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[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -4.9e+200], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-58], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e+153], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{fma}\left(F, F, 2\right)}\\
\mathbf{if}\;F \leq -4.9 \cdot 10^{+200}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-58}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot t\_0}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{F}{\sin B \cdot t\_0} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4.89999999999999982e200Initial program 30.8%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr42.2%
Taylor expanded in B around 0
lower-/.f6416.3
Simplified16.3%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
lower--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6472.5
Simplified72.5%
if -4.89999999999999982e200 < F < 2.8999999999999999e-58Initial program 94.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr97.5%
Applied egg-rr97.6%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6497.6
Simplified97.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6481.3
Simplified81.3%
if 2.8999999999999999e-58 < F < 7.59999999999999933e153Initial program 92.9%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr99.6%
Applied egg-rr99.5%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.5
Simplified99.5%
Taylor expanded in B around 0
lower-/.f6479.1
Simplified79.1%
if 7.59999999999999933e153 < F Initial program 32.7%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6432.7
Simplified32.7%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
lower-/.f6432.8
Applied egg-rr32.8%
Taylor expanded in F around inf
lower-/.f6482.7
Simplified82.7%
Final simplification80.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= x -5.8e-56)
t_0
(if (<= x 2.2e-24)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) (/ 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 <= -5.8e-56) {
tmp = t_0;
} else if (x <= 2.2e-24) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - (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 <= -5.8e-56) tmp = t_0; elseif (x <= 2.2e-24) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - 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, -5.8e-56], t$95$0, If[LessEqual[x, 2.2e-24], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $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 -5.8 \cdot 10^{-56}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -5.79999999999999982e-56 or 2.20000000000000002e-24 < x Initial program 81.1%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6478.8
Simplified78.8%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
lower-/.f6478.8
Applied egg-rr78.8%
Taylor expanded in F around inf
lower-/.f6492.8
Simplified92.8%
if -5.79999999999999982e-56 < x < 2.20000000000000002e-24Initial program 71.8%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr73.4%
Applied egg-rr73.5%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6473.5
Simplified73.5%
Taylor expanded in B around 0
lower-/.f6461.8
Simplified61.8%
Final simplification76.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= x -2.9e-82)
t_0
(if (<= x 3.2e-133)
(* (/ F (sin B)) (sqrt (/ 1.0 (fma F F 2.0))))
(if (<= x 2.4e-97)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= x 7.5e-25) (- (/ 1.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 <= -2.9e-82) {
tmp = t_0;
} else if (x <= 3.2e-133) {
tmp = (F / sin(B)) * sqrt((1.0 / fma(F, F, 2.0)));
} else if (x <= 2.4e-97) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (x <= 7.5e-25) {
tmp = (1.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 <= -2.9e-82) tmp = t_0; elseif (x <= 3.2e-133) tmp = Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / fma(F, F, 2.0)))); elseif (x <= 2.4e-97) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (x <= 7.5e-25) tmp = Float64(Float64(1.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, -2.9e-82], t$95$0, If[LessEqual[x, 3.2e-133], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e-97], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e-25], N[(N[(1.0 / 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 -2.9 \cdot 10^{-82}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-133}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-97}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.89999999999999977e-82 or 7.49999999999999989e-25 < x Initial program 81.3%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6478.4
Simplified78.4%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
lower-/.f6478.4
Applied egg-rr78.4%
Taylor expanded in F around inf
lower-/.f6489.4
Simplified89.4%
if -2.89999999999999977e-82 < x < 3.20000000000000013e-133Initial program 75.4%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr76.7%
Taylor expanded in B around 0
lower-/.f6469.2
Simplified69.2%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-sin.f6462.0
Simplified62.0%
if 3.20000000000000013e-133 < x < 2.4e-97Initial program 34.8%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr35.7%
Taylor expanded in B around 0
lower-/.f6419.8
Simplified19.8%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
lower--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6467.2
Simplified67.2%
if 2.4e-97 < x < 7.49999999999999989e-25Initial program 71.3%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr75.8%
Taylor expanded in B around 0
lower-/.f6451.3
Simplified51.3%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6446.6
Simplified46.6%
Final simplification74.5%
(FPCore (F B x)
:precision binary64
(if (<= F -2.35e-161)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 1.82e-63)
(/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.35e-161) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 1.82e-63) {
tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2.35e-161) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 1.82e-63) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2.35e-161], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.82e-63], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.35 \cdot 10^{-161}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.3500000000000002e-161Initial program 68.1%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6455.2
Simplified55.2%
Taylor expanded in F around -inf
lower-/.f6469.6
Simplified69.6%
if -2.3500000000000002e-161 < F < 1.81999999999999994e-63Initial program 99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6486.2
Simplified86.2%
Taylor expanded in B around 0
lower-/.f6455.5
Simplified55.5%
Applied egg-rr55.6%
if 1.81999999999999994e-63 < F Initial program 65.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr78.7%
Taylor expanded in B around 0
lower-/.f6456.3
Simplified56.3%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6472.9
Simplified72.9%
Final simplification66.7%
(FPCore (F B x)
:precision binary64
(if (<= F -7.4e+25)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.82e-63)
(- (/ (/ F B) (sqrt (fma F F (fma 2.0 x 2.0)))) (/ x B))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.4e+25) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.82e-63) {
tmp = ((F / B) / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -7.4e+25) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.82e-63) tmp = Float64(Float64(Float64(F / B) / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -7.4e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.82e-63], N[(N[(N[(F / B), $MachinePrecision] / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.4 \cdot 10^{+25}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.82 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.3999999999999998e25Initial program 51.8%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr65.2%
Taylor expanded in B around 0
lower-/.f6434.1
Simplified34.1%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
lower--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6467.9
Simplified67.9%
if -7.3999999999999998e25 < F < 1.81999999999999994e-63Initial program 99.5%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6481.0
Simplified81.0%
Taylor expanded in B around 0
lower-/.f6447.0
Simplified47.0%
lift-/.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6447.1
lift-fma.f64N/A
+-commutativeN/A
lift-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
lift-fma.f64N/A
lift-fma.f6447.1
Applied egg-rr47.1%
if 1.81999999999999994e-63 < F Initial program 65.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr78.7%
Taylor expanded in B around 0
lower-/.f6456.3
Simplified56.3%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6472.9
Simplified72.9%
Final simplification60.9%
(FPCore (F B x) :precision binary64 (if (<= B 1.3e-12) (/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 1.3e-12) {
tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (B <= 1.3e-12) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[B, 1.3e-12], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.3 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 1.29999999999999991e-12Initial program 73.3%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6462.1
Simplified62.1%
Taylor expanded in B around 0
lower-/.f6442.1
Simplified42.1%
Applied egg-rr53.1%
if 1.29999999999999991e-12 < B Initial program 83.2%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6457.2
Simplified57.2%
lift-tan.f64N/A
remove-double-negN/A
un-div-invN/A
remove-double-negN/A
lower-/.f6457.3
Applied egg-rr57.3%
Taylor expanded in F around inf
lower-/.f6449.4
Simplified49.4%
Final simplification52.1%
(FPCore (F B x)
:precision binary64
(if (<= F -7.4e+25)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.4e+144)
(/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
(-
(/ (fma B (* B 0.16666666666666666) 1.0) B)
(/ (fma -0.3333333333333333 (* x (* B B)) x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.4e+25) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.4e+144) {
tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
} else {
tmp = (fma(B, (B * 0.16666666666666666), 1.0) / B) - (fma(-0.3333333333333333, (x * (B * B)), x) / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -7.4e+25) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.4e+144) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B); else tmp = Float64(Float64(fma(B, Float64(B * 0.16666666666666666), 1.0) / B) - Float64(fma(-0.3333333333333333, Float64(x * Float64(B * B)), x) / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -7.4e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e+144], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(B * N[(B * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] - N[(N[(-0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.4 \cdot 10^{+25}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{+144}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}\\
\end{array}
\end{array}
if F < -7.3999999999999998e25Initial program 51.8%
lift-sin.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-pow.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied egg-rr65.2%
Taylor expanded in B around 0
lower-/.f6434.1
Simplified34.1%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
lower--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-sin.f64N/A
lower-/.f6467.9
Simplified67.9%
if -7.3999999999999998e25 < F < 3.3999999999999999e144Initial program 97.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6473.9
Simplified73.9%
Taylor expanded in B around 0
lower-/.f6443.5
Simplified43.5%
Applied egg-rr45.6%
if 3.3999999999999999e144 < F Initial program 35.9%
Taylor expanded in F around inf
lower-/.f6466.5
Simplified66.5%
Taylor expanded in B around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6466.5
Simplified66.5%
Taylor expanded in B around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6459.6
Simplified59.6%
Final simplification53.5%
(FPCore (F B x)
:precision binary64
(if (<= F -3.8e+159)
(/ (- (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) -1.0) x) B)
(if (<= F 3.4e+144)
(/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
(-
(/ (fma B (* B 0.16666666666666666) 1.0) B)
(/ (fma -0.3333333333333333 (* x (* B B)) x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e+159) {
tmp = (fma(0.5, (fma(2.0, x, 2.0) / (F * F)), -1.0) - x) / B;
} else if (F <= 3.4e+144) {
tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
} else {
tmp = (fma(B, (B * 0.16666666666666666), 1.0) / B) - (fma(-0.3333333333333333, (x * (B * B)), x) / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3.8e+159) tmp = Float64(Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), -1.0) - x) / B); elseif (F <= 3.4e+144) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B); else tmp = Float64(Float64(fma(B, Float64(B * 0.16666666666666666), 1.0) / B) - Float64(fma(-0.3333333333333333, Float64(x * Float64(B * B)), x) / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3.8e+159], N[(N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.4e+144], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(B * N[(B * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision] - N[(N[(-0.3333333333333333 * N[(x * N[(B * B), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{+159}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{+144}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B, B \cdot 0.16666666666666666, 1\right)}{B} - \frac{\mathsf{fma}\left(-0.3333333333333333, x \cdot \left(B \cdot B\right), x\right)}{B}\\
\end{array}
\end{array}
if F < -3.79999999999999965e159Initial program 35.4%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6435.4
Simplified35.4%
Taylor expanded in B around 0
lower-/.f646.9
Simplified6.9%
Taylor expanded in F around -inf
associate--r+N/A
lower--.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6443.1
Simplified43.1%
Taylor expanded in F around inf
associate--r+N/A
*-commutativeN/A
associate-/r*N/A
associate-/l*N/A
div-subN/A
div-subN/A
associate--r+N/A
lower-/.f64N/A
Simplified43.2%
if -3.79999999999999965e159 < F < 3.3999999999999999e144Initial program 95.1%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6473.1
Simplified73.1%
Taylor expanded in B around 0
lower-/.f6442.5
Simplified42.5%
Applied egg-rr46.4%
if 3.3999999999999999e144 < F Initial program 35.9%
Taylor expanded in F around inf
lower-/.f6466.5
Simplified66.5%
Taylor expanded in B around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6466.5
Simplified66.5%
Taylor expanded in B around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6459.6
Simplified59.6%
Final simplification48.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.8e+159)
(/ (- (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) -1.0) x) B)
(if (<= F 100000000.0)
(/ (- (/ F (sqrt (fma F F (fma 2.0 x 2.0)))) x) B)
(- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e+159) {
tmp = (fma(0.5, (fma(2.0, x, 2.0) / (F * F)), -1.0) - x) / B;
} else if (F <= 100000000.0) {
tmp = ((F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -3.8e+159) tmp = Float64(Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), -1.0) - x) / B); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -3.8e+159], N[(N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{+159}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.79999999999999965e159Initial program 35.4%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6435.4
Simplified35.4%
Taylor expanded in B around 0
lower-/.f646.9
Simplified6.9%
Taylor expanded in F around -inf
associate--r+N/A
lower--.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6443.1
Simplified43.1%
Taylor expanded in F around inf
associate--r+N/A
*-commutativeN/A
associate-/r*N/A
associate-/l*N/A
div-subN/A
div-subN/A
associate--r+N/A
lower-/.f64N/A
Simplified43.2%
if -3.79999999999999965e159 < F < 1e8Initial program 96.1%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6476.9
Simplified76.9%
Taylor expanded in B around 0
lower-/.f6443.6
Simplified43.6%
Applied egg-rr46.4%
if 1e8 < F Initial program 61.9%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6445.2
Simplified45.2%
Taylor expanded in B around 0
lower-/.f6424.2
Simplified24.2%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-/.f6453.2
Simplified53.2%
(FPCore (F B x) :precision binary64 (if (<= F -0.115) (/ (- (fma 0.5 (/ (fma 2.0 x 2.0) (* F F)) -1.0) x) B) (if (<= F 7.4e-64) (- (/ x B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.115) {
tmp = (fma(0.5, (fma(2.0, x, 2.0) / (F * F)), -1.0) - x) / B;
} else if (F <= 7.4e-64) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -0.115) tmp = Float64(Float64(fma(0.5, Float64(fma(2.0, x, 2.0) / Float64(F * F)), -1.0) - x) / B); elseif (F <= 7.4e-64) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -0.115], N[(N[(N[(0.5 * N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.4e-64], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.115:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.5, \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -1\right) - x}{B}\\
\mathbf{elif}\;F \leq 7.4 \cdot 10^{-64}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.115000000000000005Initial program 54.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6449.8
Simplified49.8%
Taylor expanded in B around 0
lower-/.f6419.5
Simplified19.5%
Taylor expanded in F around -inf
associate--r+N/A
lower--.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6446.2
Simplified46.2%
Taylor expanded in F around inf
associate--r+N/A
*-commutativeN/A
associate-/r*N/A
associate-/l*N/A
div-subN/A
div-subN/A
associate--r+N/A
lower-/.f64N/A
Simplified46.2%
if -0.115000000000000005 < F < 7.39999999999999998e-64Initial program 99.5%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6480.8
Simplified80.8%
Taylor expanded in B around 0
lower-/.f6446.9
Simplified46.9%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6430.0
Simplified30.0%
if 7.39999999999999998e-64 < F Initial program 65.0%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6445.2
Simplified45.2%
Taylor expanded in B around 0
lower-/.f6423.7
Simplified23.7%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-/.f6450.0
Simplified50.0%
(FPCore (F B x) :precision binary64 (if (<= F -4.6e-173) (- (/ -1.0 B) (/ x B)) (if (<= F 7.4e-64) (- (/ x B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e-173) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 7.4e-64) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (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 <= (-4.6d-173)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 7.4d-64) then
tmp = -(x / b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e-173) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 7.4e-64) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.6e-173: tmp = (-1.0 / B) - (x / B) elif F <= 7.4e-64: tmp = -(x / B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.6e-173) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 7.4e-64) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.6e-173) tmp = (-1.0 / B) - (x / B); elseif (F <= 7.4e-64) tmp = -(x / B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.6e-173], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.4e-64], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.6 \cdot 10^{-173}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.4 \cdot 10^{-64}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.59999999999999976e-173Initial program 69.9%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6455.9
Simplified55.9%
Taylor expanded in B around 0
lower-/.f6423.1
Simplified23.1%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
lower--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6436.0
Simplified36.0%
if -4.59999999999999976e-173 < F < 7.39999999999999998e-64Initial program 99.6%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6487.9
Simplified87.9%
Taylor expanded in B around 0
lower-/.f6455.9
Simplified55.9%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6437.0
Simplified37.0%
if 7.39999999999999998e-64 < F Initial program 65.0%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6445.2
Simplified45.2%
Taylor expanded in B around 0
lower-/.f6423.7
Simplified23.7%
Taylor expanded in F around inf
lower--.f64N/A
lower-/.f64N/A
lower-/.f6450.0
Simplified50.0%
(FPCore (F B x) :precision binary64 (if (<= F -4.6e-173) (- (/ -1.0 B) (/ x B)) (- (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e-173) {
tmp = (-1.0 / B) - (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 <= (-4.6d-173)) then
tmp = ((-1.0d0) / b) - (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 <= -4.6e-173) {
tmp = (-1.0 / B) - (x / B);
} else {
tmp = -(x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.6e-173: tmp = (-1.0 / B) - (x / B) else: tmp = -(x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.6e-173) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); else tmp = Float64(-Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.6e-173) tmp = (-1.0 / B) - (x / B); else tmp = -(x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.6e-173], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.6 \cdot 10^{-173}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\end{array}
if F < -4.59999999999999976e-173Initial program 69.9%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6455.9
Simplified55.9%
Taylor expanded in B around 0
lower-/.f6423.1
Simplified23.1%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
lower--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6436.0
Simplified36.0%
if -4.59999999999999976e-173 < F Initial program 80.4%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6464.1
Simplified64.1%
Taylor expanded in B around 0
lower-/.f6438.0
Simplified38.0%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6430.2
Simplified30.2%
(FPCore (F B x) :precision binary64 (- (/ x B)))
double code(double F, double B, double x) {
return -(x / B);
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x / b)
end function
public static double code(double F, double B, double x) {
return -(x / B);
}
def code(F, B, x): return -(x / B)
function code(F, B, x) return Float64(-Float64(x / B)) end
function tmp = code(F, B, x) tmp = -(x / B); end
code[F_, B_, x_] := (-N[(x / B), $MachinePrecision])
\begin{array}{l}
\\
-\frac{x}{B}
\end{array}
Initial program 76.1%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6460.7
Simplified60.7%
Taylor expanded in B around 0
lower-/.f6431.9
Simplified31.9%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6426.1
Simplified26.1%
herbie shell --seed 2024219
(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))))))