
(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 27 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 -2.05e+97)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 2.7e+38)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) (/ -1.0 2.0)))
(/ (* x (cos B)) (sin B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.05e+97) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 2.7e+38) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), (-1.0 / 2.0))) - ((x * cos(B)) / sin(B));
} else {
tmp = t_0 + (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 <= (-2.05d+97)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 2.7d+38) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** ((-1.0d0) / 2.0d0))) - ((x * cos(b)) / sin(b))
else
tmp = t_0 + (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 <= -2.05e+97) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 2.7e+38) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), (-1.0 / 2.0))) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.05e+97: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 2.7e+38: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), (-1.0 / 2.0))) - ((x * math.cos(B)) / math.sin(B)) else: tmp = t_0 + (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 <= -2.05e+97) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 2.7e+38) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ Float64(-1.0 / 2.0))) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(t_0 + 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 <= -2.05e+97) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 2.7e+38) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ (-1.0 / 2.0))) - ((x * cos(B)) / sin(B)); else tmp = t_0 + (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, -2.05e+97], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e+38], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(-1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + 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 -2.05 \cdot 10^{+97}:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{+38}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{\left(\frac{-1}{2}\right)} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.04999999999999994e97Initial program 42.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
if -2.04999999999999994e97 < F < 2.69999999999999996e38Initial program 99.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6499.5
Simplified99.5%
if 2.69999999999999996e38 < F Initial program 63.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.7
Simplified99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -2.3e+97)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 1.25e+38)
(-
(* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B)))
(/ (* x (cos B)) (sin B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.3e+97) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 1.25e+38) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - ((x * cos(B)) / sin(B));
} else {
tmp = t_0 + (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 <= -2.3e+97) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 1.25e+38) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(t_0 + 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, -2.3e+97], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e+38], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + 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 -2.3 \cdot 10^{+97}:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{+38}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.30000000000000006e97Initial program 42.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
if -2.30000000000000006e97 < F < 1.24999999999999992e38Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-sin.f6499.5
Simplified99.5%
if 1.24999999999999992e38 < F Initial program 63.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.7
Simplified99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -250000000.0)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 20000000.0)
(+ t_0 (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -250000000.0) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 20000000.0) {
tmp = t_0 + (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B)));
} else {
tmp = t_0 + (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 <= -250000000.0) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 20000000.0) tmp = Float64(t_0 + Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B)))); else tmp = Float64(t_0 + 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, -250000000.0], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(t$95$0 + N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + 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 -250000000:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;t\_0 + F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.5e8Initial program 54.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
if -2.5e8 < F < 2e7Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
if 2e7 < F Initial program 67.5%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.7
Simplified99.7%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.4)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 1.4)
(+ t_0 (/ (* F (sqrt 0.5)) (sin B)))
(+ t_0 (/ 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.4) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 1.4) {
tmp = t_0 + ((F * sqrt(0.5)) / sin(B));
} else {
tmp = t_0 + (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.4d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 1.4d0) then
tmp = t_0 + ((f * sqrt(0.5d0)) / sin(b))
else
tmp = t_0 + (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.4) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 1.4) {
tmp = t_0 + ((F * Math.sqrt(0.5)) / Math.sin(B));
} else {
tmp = t_0 + (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.4: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 1.4: tmp = t_0 + ((F * math.sqrt(0.5)) / math.sin(B)) else: tmp = t_0 + (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.4) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 1.4) tmp = Float64(t_0 + Float64(Float64(F * sqrt(0.5)) / sin(B))); else tmp = Float64(t_0 + 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.4) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 1.4) tmp = t_0 + ((F * sqrt(0.5)) / sin(B)); else tmp = t_0 + (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.4], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(t$95$0 + N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + 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.4:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;t\_0 + \frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 56.1%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6498.7
Simplified98.7%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in F around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sin.f6499.4
Simplified99.4%
if 1.3999999999999999 < F Initial program 68.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.95e+22)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F -8.5e-156)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) (/ x B))
(if (<= F 9e-151)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0))))))
(if (<= F 0.0195)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x B))
(+ t_0 (/ 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.95e+22) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= -8.5e-156) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - (x / B);
} else if (F <= 9e-151) {
tmp = t_0 + ((F / B) * sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))));
} else if (F <= 0.0195) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / B);
} else {
tmp = t_0 + (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 <= -1.95e+22) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= -8.5e-156) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - Float64(x / B)); elseif (F <= 9e-151) tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))))); elseif (F <= 0.0195) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)); else tmp = Float64(t_0 + 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, -1.95e+22], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.5e-156], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-151], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0195], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + 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.95 \cdot 10^{+22}:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-156}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-151}:\\
\;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
\mathbf{elif}\;F \leq 0.0195:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.9500000000000001e22Initial program 51.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
if -1.9500000000000001e22 < F < -8.5e-156Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.3
Simplified99.3%
Taylor expanded in B around 0
lower-/.f6491.8
Simplified91.8%
if -8.5e-156 < F < 9.0000000000000005e-151Initial program 99.4%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6491.4
Simplified91.4%
if 9.0000000000000005e-151 < F < 0.0195Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-/.f6493.3
Simplified93.3%
Taylor expanded in F around 0
lower-sqrt.f6493.3
Simplified93.3%
if 0.0195 < F Initial program 68.4%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
Final simplification96.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) (/ x B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -1.95e+22)
(+ t_1 (/ -1.0 (sin B)))
(if (<= F -8.5e-156)
t_0
(if (<= F 9e-151)
(+ t_1 (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0))))))
(if (<= F 1.32e+154) t_0 (+ t_1 (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.95e+22) {
tmp = t_1 + (-1.0 / sin(B));
} else if (F <= -8.5e-156) {
tmp = t_0;
} else if (F <= 9e-151) {
tmp = t_1 + ((F / B) * sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))));
} else if (F <= 1.32e+154) {
tmp = t_0;
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.95e+22) tmp = Float64(t_1 + Float64(-1.0 / sin(B))); elseif (F <= -8.5e-156) tmp = t_0; elseif (F <= 9e-151) tmp = Float64(t_1 + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))))); elseif (F <= 1.32e+154) tmp = t_0; else tmp = Float64(t_1 + Float64(1.0 / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.95e+22], N[(t$95$1 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.5e-156], t$95$0, If[LessEqual[F, 9e-151], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.32e+154], t$95$0, N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.95 \cdot 10^{+22}:\\
\;\;\;\;t\_1 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-151}:\\
\;\;\;\;t\_1 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.9500000000000001e22Initial program 51.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
if -1.9500000000000001e22 < F < -8.5e-156 or 9.0000000000000005e-151 < F < 1.31999999999999998e154Initial program 97.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6489.4
Simplified89.4%
if -8.5e-156 < F < 9.0000000000000005e-151Initial program 99.4%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6491.4
Simplified91.4%
if 1.31999999999999998e154 < F Initial program 43.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.f6443.5
Simplified43.5%
Taylor expanded in F around inf
lower-/.f6484.3
Simplified84.3%
Final simplification91.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1e+99)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 9e-151)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0))))))
(if (<= F 1.32e+154)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) (/ x B))
(+ t_0 (/ 1.0 B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1e+99) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 9e-151) {
tmp = t_0 + ((F / B) * sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0)))));
} else if (F <= 1.32e+154) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1e+99) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 9e-151) tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))))); elseif (F <= 1.32e+154) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / 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, -1e+99], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-151], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.32e+154], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+99}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-151}:\\
\;\;\;\;t\_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -9.9999999999999997e98Initial program 40.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-/.f6477.0
Simplified77.0%
if -9.9999999999999997e98 < F < 9.0000000000000005e-151Initial program 99.4%
Taylor expanded in B around 0
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
associate-+r+N/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6485.1
Simplified85.1%
if 9.0000000000000005e-151 < F < 1.31999999999999998e154Initial program 96.5%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.5
Simplified99.5%
Taylor expanded in B around 0
lower-/.f6488.3
Simplified88.3%
if 1.31999999999999998e154 < F Initial program 43.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.f6443.5
Simplified43.5%
Taylor expanded in F around inf
lower-/.f6484.3
Simplified84.3%
Final simplification84.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))
(if (<= x -2.8e-30)
t_0
(if (<= x 420000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) (/ x B))
t_0))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (1.0 / B);
double tmp;
if (x <= -2.8e-30) {
tmp = t_0;
} else if (x <= 420000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)) tmp = 0.0 if (x <= -2.8e-30) tmp = t_0; elseif (x <= 420000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / 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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e-30], t$95$0, If[LessEqual[x, 420000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{-30}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 420000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.79999999999999988e-30 or 4.2e5 < x Initial program 79.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.f6479.8
Simplified79.8%
Taylor expanded in F around inf
lower-/.f6495.9
Simplified95.9%
if -2.79999999999999988e-30 < x < 4.2e5Initial program 77.5%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6478.5
Simplified78.5%
Taylor expanded in B around 0
lower-/.f6469.7
Simplified69.7%
Final simplification81.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.65e-284)
(- (/ (* F (sqrt 0.5)) (sin B)) (/ x B))
(if (<= F 5.4e-254)
(+ t_0 (* (/ F B) (/ 1.0 F)))
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x B))
(if (<= F 6e+154)
(- (/ 1.0 (sin B)) (/ x B))
(+ t_0 (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.65e-284) {
tmp = ((F * sqrt(0.5)) / sin(B)) - (x / B);
} else if (F <= 5.4e-254) {
tmp = t_0 + ((F / B) * (1.0 / F));
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / B);
} else if (F <= 6e+154) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = t_0 + (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) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.65d-284)) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - (x / b)
else if (f <= 5.4d-254) then
tmp = t_0 + ((f / b) * (1.0d0 / f))
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
else if (f <= 6d+154) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = t_0 + (1.0d0 / 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.4) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.65e-284) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - (x / B);
} else if (F <= 5.4e-254) {
tmp = t_0 + ((F / B) * (1.0 / F));
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
} else if (F <= 6e+154) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.65e-284: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - (x / B) elif F <= 5.4e-254: tmp = t_0 + ((F / B) * (1.0 / F)) elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) elif F <= 6e+154: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.65e-284) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - Float64(x / B)); elseif (F <= 5.4e-254) tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)); elseif (F <= 6e+154) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / 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.4) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.65e-284) tmp = ((F * sqrt(0.5)) / sin(B)) - (x / B); elseif (F <= 5.4e-254) tmp = t_0 + ((F / B) * (1.0 / F)); elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - (x / B); elseif (F <= 6e+154) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_0 + (1.0 / 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.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.65e-284], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.4e-254], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e+154], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-284}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-254}:\\
\;\;\;\;t\_0 + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 56.1%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6498.7
Simplified98.7%
Taylor expanded in B around 0
lower-/.f6475.3
Simplified75.3%
if -1.3999999999999999 < F < -1.65000000000000004e-284Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6480.3
Simplified80.3%
Taylor expanded in F around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sin.f6480.4
Simplified80.4%
if -1.65000000000000004e-284 < F < 5.40000000000000013e-254Initial program 99.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.f6499.1
Simplified99.1%
Taylor expanded in F around inf
lower-/.f6493.6
Simplified93.6%
if 5.40000000000000013e-254 < F < 1.3999999999999999Initial program 99.5%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.6
Simplified99.6%
Taylor expanded in B around 0
lower-/.f6484.2
Simplified84.2%
Taylor expanded in F around 0
lower-sqrt.f6484.2
Simplified84.2%
if 1.3999999999999999 < F < 6.00000000000000052e154Initial program 94.0%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6484.1
Simplified84.1%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6484.2
Simplified84.2%
if 6.00000000000000052e154 < F Initial program 43.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.f6443.5
Simplified43.5%
Taylor expanded in F around inf
lower-/.f6484.3
Simplified84.3%
Final simplification81.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.5e-294)
(- (/ (* F (sqrt 0.5)) (sin B)) (/ x B))
(if (<= F 3.6e-278)
t_0
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x B))
(if (<= F 6e+154) (- (/ 1.0 (sin B)) (/ x B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (1.0 / B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.5e-294) {
tmp = ((F * sqrt(0.5)) / sin(B)) - (x / B);
} else if (F <= 3.6e-278) {
tmp = t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / B);
} else if (F <= 6e+154) {
tmp = (1.0 / sin(B)) - (x / 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 * ((-1.0d0) / tan(b))) + (1.0d0 / b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.5d-294)) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - (x / b)
else if (f <= 3.6d-278) then
tmp = t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
else if (f <= 6d+154) then
tmp = (1.0d0 / sin(b)) - (x / 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 * (-1.0 / Math.tan(B))) + (1.0 / B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.5e-294) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - (x / B);
} else if (F <= 3.6e-278) {
tmp = t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
} else if (F <= 6e+154) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (1.0 / B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.5e-294: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - (x / B) elif F <= 3.6e-278: tmp = t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) elif F <= 6e+154: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.5e-294) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - Float64(x / B)); elseif (F <= 3.6e-278) tmp = t_0; elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)); elseif (F <= 6e+154) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (1.0 / B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.5e-294) tmp = ((F * sqrt(0.5)) / sin(B)) - (x / B); elseif (F <= 3.6e-278) tmp = t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - (x / B); elseif (F <= 6e+154) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.5e-294], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.6e-278], t$95$0, If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e+154], 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 := x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.5 \cdot 10^{-294}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-278}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 56.1%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6498.7
Simplified98.7%
Taylor expanded in B around 0
lower-/.f6475.3
Simplified75.3%
if -1.3999999999999999 < F < -2.5000000000000001e-294Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6480.3
Simplified80.3%
Taylor expanded in F around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sin.f6480.4
Simplified80.4%
if -2.5000000000000001e-294 < F < 3.59999999999999996e-278 or 6.00000000000000052e154 < F Initial program 58.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.f6458.0
Simplified58.0%
Taylor expanded in F around inf
lower-/.f6484.4
Simplified84.4%
if 3.59999999999999996e-278 < F < 1.3999999999999999Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.5
Simplified99.5%
Taylor expanded in B around 0
lower-/.f6480.7
Simplified80.7%
Taylor expanded in F around 0
lower-sqrt.f6480.7
Simplified80.7%
if 1.3999999999999999 < F < 6.00000000000000052e154Initial program 94.0%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6484.1
Simplified84.1%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6484.2
Simplified84.2%
Final simplification80.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* F (/ (sqrt 0.5) (sin B))) (/ x B)))
(t_1 (+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.5e-294)
t_0
(if (<= F 3.6e-278)
t_1
(if (<= F 1.4)
t_0
(if (<= F 6e+154) (- (/ 1.0 (sin B)) (/ x B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F * (sqrt(0.5) / sin(B))) - (x / B);
double t_1 = (x * (-1.0 / tan(B))) + (1.0 / B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.5e-294) {
tmp = t_0;
} else if (F <= 3.6e-278) {
tmp = t_1;
} else if (F <= 1.4) {
tmp = t_0;
} else if (F <= 6e+154) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_0 = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
t_1 = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.5d-294)) then
tmp = t_0
else if (f <= 3.6d-278) then
tmp = t_1
else if (f <= 1.4d0) then
tmp = t_0
else if (f <= 6d+154) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
double t_1 = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.5e-294) {
tmp = t_0;
} else if (F <= 3.6e-278) {
tmp = t_1;
} else if (F <= 1.4) {
tmp = t_0;
} else if (F <= 6e+154) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) t_1 = (x * (-1.0 / math.tan(B))) + (1.0 / B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.5e-294: tmp = t_0 elif F <= 3.6e-278: tmp = t_1 elif F <= 1.4: tmp = t_0 elif F <= 6e+154: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.5e-294) tmp = t_0; elseif (F <= 3.6e-278) tmp = t_1; elseif (F <= 1.4) tmp = t_0; elseif (F <= 6e+154) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F * (sqrt(0.5) / sin(B))) - (x / B); t_1 = (x * (-1.0 / tan(B))) + (1.0 / B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.5e-294) tmp = t_0; elseif (F <= 3.6e-278) tmp = t_1; elseif (F <= 1.4) tmp = t_0; elseif (F <= 6e+154) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.5e-294], t$95$0, If[LessEqual[F, 3.6e-278], t$95$1, If[LessEqual[F, 1.4], t$95$0, If[LessEqual[F, 6e+154], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.5 \cdot 10^{-294}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 56.1%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6498.7
Simplified98.7%
Taylor expanded in B around 0
lower-/.f6475.3
Simplified75.3%
if -1.3999999999999999 < F < -2.5000000000000001e-294 or 3.59999999999999996e-278 < F < 1.3999999999999999Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6480.5
Simplified80.5%
Taylor expanded in F around 0
lower-sqrt.f6480.5
Simplified80.5%
if -2.5000000000000001e-294 < F < 3.59999999999999996e-278 or 6.00000000000000052e154 < F Initial program 58.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.f6458.0
Simplified58.0%
Taylor expanded in F around inf
lower-/.f6484.4
Simplified84.4%
if 1.3999999999999999 < F < 6.00000000000000052e154Initial program 94.0%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6484.1
Simplified84.1%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6484.2
Simplified84.2%
Final simplification80.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma F F 2.0)))))
(if (<= B 0.106)
(-
(*
F
(/
(fma
t_0
(fma 0.16666666666666666 (* B B) 1.0)
(*
(* t_0 (fma (* B B) 0.00205026455026455 0.019444444444444445))
(* (* B B) (* B B))))
B))
(/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(F, F, 2.0)));
double tmp;
if (B <= 0.106) {
tmp = (F * (fma(t_0, fma(0.16666666666666666, (B * B), 1.0), ((t_0 * fma((B * B), 0.00205026455026455, 0.019444444444444445)) * ((B * B) * (B * B)))) / B)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(F, F, 2.0))) tmp = 0.0 if (B <= 0.106) tmp = Float64(Float64(F * Float64(fma(t_0, fma(0.16666666666666666, Float64(B * B), 1.0), Float64(Float64(t_0 * fma(Float64(B * B), 0.00205026455026455, 0.019444444444444445)) * Float64(Float64(B * B) * Float64(B * B)))) / B)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 0.106], N[(N[(F * N[(N[(t$95$0 * N[(0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(B * B), $MachinePrecision] * 0.00205026455026455 + 0.019444444444444445), $MachinePrecision]), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\
\mathbf{if}\;B \leq 0.106:\\
\;\;\;\;F \cdot \frac{\mathsf{fma}\left(t\_0, \mathsf{fma}\left(0.16666666666666666, B \cdot B, 1\right), \left(t\_0 \cdot \mathsf{fma}\left(B \cdot B, 0.00205026455026455, 0.019444444444444445\right)\right) \cdot \left(\left(B \cdot B\right) \cdot \left(B \cdot B\right)\right)\right)}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if B < 0.105999999999999997Initial program 76.1%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6486.9
Simplified86.9%
Taylor expanded in B around 0
lower-/.f6467.8
Simplified67.8%
Taylor expanded in B around 0
lower-/.f64N/A
Simplified57.0%
if 0.105999999999999997 < B Initial program 84.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.f6444.5
Simplified44.5%
Taylor expanded in F around inf
lower-/.f6443.3
Simplified43.3%
Final simplification53.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma 2.0 x (fma F F 2.0))))))
(if (<= B 0.076)
(-
(/
(fma
F
t_0
(*
(* t_0 (* B B))
(fma (* B B) (* F 0.019444444444444445) (* F 0.16666666666666666))))
B)
(/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(2.0, x, fma(F, F, 2.0))));
double tmp;
if (B <= 0.076) {
tmp = (fma(F, t_0, ((t_0 * (B * B)) * fma((B * B), (F * 0.019444444444444445), (F * 0.16666666666666666)))) / B) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(2.0, x, fma(F, F, 2.0)))) tmp = 0.0 if (B <= 0.076) tmp = Float64(Float64(fma(F, t_0, Float64(Float64(t_0 * Float64(B * B)) * fma(Float64(B * B), Float64(F * 0.019444444444444445), Float64(F * 0.16666666666666666)))) / B) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 0.076], N[(N[(N[(F * t$95$0 + N[(N[(t$95$0 * N[(B * B), $MachinePrecision]), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(F * 0.019444444444444445), $MachinePrecision] + N[(F * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
\mathbf{if}\;B \leq 0.076:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, t\_0, \left(t\_0 \cdot \left(B \cdot B\right)\right) \cdot \mathsf{fma}\left(B \cdot B, F \cdot 0.019444444444444445, F \cdot 0.16666666666666666\right)\right)}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if B < 0.0759999999999999981Initial program 76.1%
Taylor expanded in B around 0
lower-/.f64N/A
Simplified61.2%
Taylor expanded in B around 0
lower-/.f6457.0
Simplified57.0%
if 0.0759999999999999981 < B Initial program 84.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.f6444.5
Simplified44.5%
Taylor expanded in F around inf
lower-/.f6443.3
Simplified43.3%
Final simplification53.4%
(FPCore (F B x)
:precision binary64
(if (<= F -90.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7.4e-10)
(-
(*
F
(/
(* (sqrt (/ 1.0 (fma F F 2.0))) (fma 0.16666666666666666 (* B B) 1.0))
B))
(/ x B))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -90.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7.4e-10) {
tmp = (F * ((sqrt((1.0 / fma(F, F, 2.0))) * fma(0.16666666666666666, (B * B), 1.0)) / B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -90.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7.4e-10) tmp = Float64(Float64(F * Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * fma(0.16666666666666666, Float64(B * B), 1.0)) / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -90.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.4e-10], N[(N[(F * N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.16666666666666666 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / B), $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 -90:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.4 \cdot 10^{-10}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \mathsf{fma}\left(0.16666666666666666, B \cdot B, 1\right)}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -90Initial program 55.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.5
Simplified99.5%
Taylor expanded in B around 0
lower-/.f6475.9
Simplified75.9%
if -90 < F < 7.4000000000000003e-10Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6472.4
Simplified72.4%
Taylor expanded in B around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-/.f64N/A
Simplified51.9%
if 7.4000000000000003e-10 < F Initial program 68.8%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6480.0
Simplified80.0%
Taylor expanded in B around 0
lower-/.f6454.6
Simplified54.6%
Taylor expanded in F around inf
lower-/.f64N/A
lower-sin.f6471.5
Simplified71.5%
Final simplification64.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (fma F F 2.0)))))
(if (<= B 0.076)
(-
(*
F
(/
(fma
(* B B)
(* t_0 (fma (* B B) 0.019444444444444445 0.16666666666666666))
t_0)
B))
(/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / fma(F, F, 2.0)));
double tmp;
if (B <= 0.076) {
tmp = (F * (fma((B * B), (t_0 * fma((B * B), 0.019444444444444445, 0.16666666666666666)), t_0) / B)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
function code(F, B, x) t_0 = sqrt(Float64(1.0 / fma(F, F, 2.0))) tmp = 0.0 if (B <= 0.076) tmp = Float64(Float64(F * Float64(fma(Float64(B * B), Float64(t_0 * fma(Float64(B * B), 0.019444444444444445, 0.16666666666666666)), t_0) / B)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, 0.076], N[(N[(F * N[(N[(N[(B * B), $MachinePrecision] * N[(t$95$0 * N[(N[(B * B), $MachinePrecision] * 0.019444444444444445 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}\\
\mathbf{if}\;B \leq 0.076:\\
\;\;\;\;F \cdot \frac{\mathsf{fma}\left(B \cdot B, t\_0 \cdot \mathsf{fma}\left(B \cdot B, 0.019444444444444445, 0.16666666666666666\right), t\_0\right)}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if B < 0.0759999999999999981Initial program 76.1%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6486.9
Simplified86.9%
Taylor expanded in B around 0
lower-/.f6467.8
Simplified67.8%
Taylor expanded in B around 0
lower-/.f64N/A
Simplified57.0%
if 0.0759999999999999981 < B Initial program 84.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.f6444.5
Simplified44.5%
Taylor expanded in F around inf
lower-/.f6443.3
Simplified43.3%
Final simplification53.4%
(FPCore (F B x)
:precision binary64
(if (<= F -90.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 9.5e+35)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) (/ x B))
(/
(fma
(* B B)
(fma
(* B B)
(fma
(* B B)
(fma x 0.009523809523809525 (* x -0.007407407407407408))
(* x 0.022222222222222223))
(* x 0.3333333333333333))
(- 1.0 x))
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -90.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 9.5e+35) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - (x / B);
} else {
tmp = fma((B * B), fma((B * B), fma((B * B), fma(x, 0.009523809523809525, (x * -0.007407407407407408)), (x * 0.022222222222222223)), (x * 0.3333333333333333)), (1.0 - x)) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -90.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 9.5e+35) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(fma(Float64(B * B), fma(Float64(B * B), fma(Float64(B * B), fma(x, 0.009523809523809525, Float64(x * -0.007407407407407408)), Float64(x * 0.022222222222222223)), Float64(x * 0.3333333333333333)), Float64(1.0 - x)) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -90.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e+35], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(x * 0.009523809523809525 + N[(x * -0.007407407407407408), $MachinePrecision]), $MachinePrecision] + N[(x * 0.022222222222222223), $MachinePrecision]), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -90:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+35}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.009523809523809525, x \cdot -0.007407407407407408\right), x \cdot 0.022222222222222223\right), x \cdot 0.3333333333333333\right), 1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -90Initial program 55.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.5
Simplified99.5%
Taylor expanded in B around 0
lower-/.f6475.9
Simplified75.9%
if -90 < F < 9.50000000000000062e35Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6473.8
Simplified73.8%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6451.1
Simplified51.1%
if 9.50000000000000062e35 < F Initial program 64.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.f6444.5
Simplified44.5%
Taylor expanded in F around inf
lower-/.f6451.8
Simplified51.8%
Taylor expanded in B around 0
lower-/.f64N/A
Simplified44.5%
Final simplification56.4%
(FPCore (F B x)
:precision binary64
(if (<= F -100000000.0)
(/ (- -1.0 x) B)
(if (<= F 9.5e+35)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) (/ x B))
(/
(fma
(* B B)
(fma
(* B B)
(fma
(* B B)
(fma x 0.009523809523809525 (* x -0.007407407407407408))
(* x 0.022222222222222223))
(* x 0.3333333333333333))
(- 1.0 x))
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -100000000.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.5e+35) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - (x / B);
} else {
tmp = fma((B * B), fma((B * B), fma((B * B), fma(x, 0.009523809523809525, (x * -0.007407407407407408)), (x * 0.022222222222222223)), (x * 0.3333333333333333)), (1.0 - x)) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -100000000.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9.5e+35) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(fma(Float64(B * B), fma(Float64(B * B), fma(Float64(B * B), fma(x, 0.009523809523809525, Float64(x * -0.007407407407407408)), Float64(x * 0.022222222222222223)), Float64(x * 0.3333333333333333)), Float64(1.0 - x)) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -100000000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.5e+35], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(x * 0.009523809523809525 + N[(x * -0.007407407407407408), $MachinePrecision]), $MachinePrecision] + N[(x * 0.022222222222222223), $MachinePrecision]), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -100000000:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+35}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(x, 0.009523809523809525, x \cdot -0.007407407407407408\right), x \cdot 0.022222222222222223\right), x \cdot 0.3333333333333333\right), 1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -1e8Initial program 55.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.5
Simplified99.5%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6455.9
Simplified55.9%
Taylor expanded in x around 0
associate-*r/N/A
mul-1-negN/A
div-subN/A
sub-negN/A
distribute-neg-inN/A
+-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
lower--.f6455.9
Simplified55.9%
if -1e8 < F < 9.50000000000000062e35Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6473.8
Simplified73.8%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6451.1
Simplified51.1%
if 9.50000000000000062e35 < F Initial program 64.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.f6444.5
Simplified44.5%
Taylor expanded in F around inf
lower-/.f6451.8
Simplified51.8%
Taylor expanded in B around 0
lower-/.f64N/A
Simplified44.5%
Final simplification50.8%
(FPCore (F B x)
:precision binary64
(if (<= F -100000000.0)
(/ (- -1.0 x) B)
(if (<= F 9.5e+35)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) (/ x B))
(-
(/ 1.0 B)
(*
x
(/
(fma
(* B B)
(fma
(* B B)
(fma (* B B) -0.0021164021164021165 -0.022222222222222223)
-0.3333333333333333)
1.0)
B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -100000000.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.5e+35) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (fma((B * B), fma((B * B), fma((B * B), -0.0021164021164021165, -0.022222222222222223), -0.3333333333333333), 1.0) / B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -100000000.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9.5e+35) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(fma(Float64(B * B), fma(Float64(B * B), fma(Float64(B * B), -0.0021164021164021165, -0.022222222222222223), -0.3333333333333333), 1.0) / B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -100000000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.5e+35], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * -0.0021164021164021165 + -0.022222222222222223), $MachinePrecision] + -0.3333333333333333), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -100000000:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+35}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(B \cdot B, -0.0021164021164021165, -0.022222222222222223\right), -0.3333333333333333\right), 1\right)}{B}\\
\end{array}
\end{array}
if F < -1e8Initial program 55.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.5
Simplified99.5%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6455.9
Simplified55.9%
Taylor expanded in x around 0
associate-*r/N/A
mul-1-negN/A
div-subN/A
sub-negN/A
distribute-neg-inN/A
+-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
lower--.f6455.9
Simplified55.9%
if -1e8 < F < 9.50000000000000062e35Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6473.8
Simplified73.8%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6451.1
Simplified51.1%
if 9.50000000000000062e35 < F Initial program 64.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.f6444.5
Simplified44.5%
Taylor expanded in F around inf
lower-/.f6451.8
Simplified51.8%
Taylor expanded in B around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
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.f64N/A
unpow2N/A
lower-*.f6425.1
Simplified25.1%
Taylor expanded in F around 0
lower-/.f6444.4
Simplified44.4%
Final simplification50.8%
(FPCore (F B x)
:precision binary64
(if (<= F -100000000.0)
(/ (- -1.0 x) B)
(if (<= F 9.5e+35)
(- (* (sqrt (/ 1.0 (fma F F 2.0))) (/ F B)) (/ x B))
(/
(fma
(* B (fma B (* B (* x 0.022222222222222223)) (* x 0.3333333333333333)))
B
(- 1.0 x))
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -100000000.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.5e+35) {
tmp = (sqrt((1.0 / fma(F, F, 2.0))) * (F / B)) - (x / B);
} else {
tmp = fma((B * fma(B, (B * (x * 0.022222222222222223)), (x * 0.3333333333333333))), B, (1.0 - x)) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -100000000.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9.5e+35) tmp = Float64(Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(fma(Float64(B * fma(B, Float64(B * Float64(x * 0.022222222222222223)), Float64(x * 0.3333333333333333))), B, Float64(1.0 - x)) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -100000000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.5e+35], N[(N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(B * N[(B * N[(B * N[(x * 0.022222222222222223), $MachinePrecision]), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * B + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -100000000:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+35}:\\
\;\;\;\;\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot \mathsf{fma}\left(B, B \cdot \left(x \cdot 0.022222222222222223\right), x \cdot 0.3333333333333333\right), B, 1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -1e8Initial program 55.5%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.5
Simplified99.5%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6455.9
Simplified55.9%
Taylor expanded in x around 0
associate-*r/N/A
mul-1-negN/A
div-subN/A
sub-negN/A
distribute-neg-inN/A
+-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
lower--.f6455.9
Simplified55.9%
if -1e8 < F < 9.50000000000000062e35Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6473.8
Simplified73.8%
Taylor expanded in B around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-/.f6451.1
Simplified51.1%
if 9.50000000000000062e35 < F Initial program 64.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.f6444.5
Simplified44.5%
Taylor expanded in F around inf
lower-/.f6451.8
Simplified51.8%
Taylor expanded in B around 0
lower-/.f64N/A
Simplified44.3%
Final simplification50.7%
(FPCore (F B x)
:precision binary64
(if (<= F -300000000.0)
(/ (- -1.0 x) B)
(if (<= F 2.4e+36)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) B)) (/ x B))
(/
(fma
(* B (fma B (* B (* x 0.022222222222222223)) (* x 0.3333333333333333)))
B
(- 1.0 x))
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -300000000.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.4e+36) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / B)) - (x / B);
} else {
tmp = fma((B * fma(B, (B * (x * 0.022222222222222223)), (x * 0.3333333333333333))), B, (1.0 - x)) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -300000000.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.4e+36) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / B)) - Float64(x / B)); else tmp = Float64(fma(Float64(B * fma(B, Float64(B * Float64(x * 0.022222222222222223)), Float64(x * 0.3333333333333333))), B, Float64(1.0 - x)) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -300000000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.4e+36], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(B * N[(B * N[(B * N[(x * 0.022222222222222223), $MachinePrecision]), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * B + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -300000000:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{+36}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot \mathsf{fma}\left(B, B \cdot \left(x \cdot 0.022222222222222223\right), x \cdot 0.3333333333333333\right), B, 1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -3e8Initial program 54.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6499.6
Simplified99.6%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6456.6
Simplified56.6%
Taylor expanded in x around 0
associate-*r/N/A
mul-1-negN/A
div-subN/A
sub-negN/A
distribute-neg-inN/A
+-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
lower--.f6456.6
Simplified56.6%
if -3e8 < F < 2.39999999999999992e36Initial program 99.4%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
lower-sin.f6499.4
Simplified99.4%
Taylor expanded in B around 0
lower-/.f6474.0
Simplified74.0%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6450.7
Simplified50.7%
if 2.39999999999999992e36 < F Initial program 64.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.f6444.5
Simplified44.5%
Taylor expanded in F around inf
lower-/.f6451.8
Simplified51.8%
Taylor expanded in B around 0
lower-/.f64N/A
Simplified44.3%
Final simplification50.7%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e-121)
(/ (- -1.0 x) B)
(if (<= F 1.26e-21)
(- (/ x B))
(/
(fma
(* B (fma B (* B (* x 0.022222222222222223)) (* x 0.3333333333333333)))
B
(- 1.0 x))
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-121) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.26e-21) {
tmp = -(x / B);
} else {
tmp = fma((B * fma(B, (B * (x * 0.022222222222222223)), (x * 0.3333333333333333))), B, (1.0 - x)) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-121) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.26e-21) tmp = Float64(-Float64(x / B)); else tmp = Float64(fma(Float64(B * fma(B, Float64(B * Float64(x * 0.022222222222222223)), Float64(x * 0.3333333333333333))), B, Float64(1.0 - x)) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-121], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.26e-21], (-N[(x / B), $MachinePrecision]), N[(N[(N[(B * N[(B * N[(B * N[(x * 0.022222222222222223), $MachinePrecision]), $MachinePrecision] + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * B + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.26 \cdot 10^{-21}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot \mathsf{fma}\left(B, B \cdot \left(x \cdot 0.022222222222222223\right), x \cdot 0.3333333333333333\right), B, 1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -9.4999999999999994e-121Initial program 63.4%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6488.3
Simplified88.3%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6452.4
Simplified52.4%
Taylor expanded in x around 0
associate-*r/N/A
mul-1-negN/A
div-subN/A
sub-negN/A
distribute-neg-inN/A
+-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
lower--.f6452.4
Simplified52.4%
if -9.4999999999999994e-121 < F < 1.26e-21Initial program 99.4%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6432.3
Simplified32.3%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6416.2
Simplified16.2%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6429.1
Simplified29.1%
if 1.26e-21 < F Initial program 69.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.f6445.7
Simplified45.7%
Taylor expanded in F around inf
lower-/.f6450.5
Simplified50.5%
Taylor expanded in B around 0
lower-/.f64N/A
Simplified42.8%
Final simplification41.2%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e-121)
(/ (- -1.0 x) B)
(if (<= F 3.3e-111)
(- (/ x B))
(/ (- (fma (* B B) (* x 0.3333333333333333) 1.0) x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-121) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.3e-111) {
tmp = -(x / B);
} else {
tmp = (fma((B * B), (x * 0.3333333333333333), 1.0) - x) / B;
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-121) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.3e-111) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(fma(Float64(B * B), Float64(x * 0.3333333333333333), 1.0) - x) / B); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-121], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.3e-111], (-N[(x / B), $MachinePrecision]), N[(N[(N[(N[(B * B), $MachinePrecision] * N[(x * 0.3333333333333333), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-111}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, x \cdot 0.3333333333333333, 1\right) - x}{B}\\
\end{array}
\end{array}
if F < -9.4999999999999994e-121Initial program 63.4%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6488.3
Simplified88.3%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6452.4
Simplified52.4%
Taylor expanded in x around 0
associate-*r/N/A
mul-1-negN/A
div-subN/A
sub-negN/A
distribute-neg-inN/A
+-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
lower--.f6452.4
Simplified52.4%
if -9.4999999999999994e-121 < F < 3.3e-111Initial program 99.4%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6439.0
Simplified39.0%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6419.8
Simplified19.8%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6435.9
Simplified35.9%
if 3.3e-111 < F Initial program 76.8%
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.f6451.2
Simplified51.2%
Taylor expanded in F around inf
lower-/.f6442.8
Simplified42.8%
Taylor expanded in B around 0
lower-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6434.7
Simplified34.7%
Final simplification41.1%
(FPCore (F B x) :precision binary64 (if (<= F -9.5e-121) (/ (- -1.0 x) B) (if (<= F 3.3e-111) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-121) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.3e-111) {
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 <= (-9.5d-121)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.3d-111) 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 <= -9.5e-121) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.3e-111) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-121: tmp = (-1.0 - x) / B elif F <= 3.3e-111: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-121) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.3e-111) 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 <= -9.5e-121) tmp = (-1.0 - x) / B; elseif (F <= 3.3e-111) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-121], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.3e-111], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-111}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.4999999999999994e-121Initial program 63.4%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6488.3
Simplified88.3%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6452.4
Simplified52.4%
Taylor expanded in x around 0
associate-*r/N/A
mul-1-negN/A
div-subN/A
sub-negN/A
distribute-neg-inN/A
+-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
lower--.f6452.4
Simplified52.4%
if -9.4999999999999994e-121 < F < 3.3e-111Initial program 99.4%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6439.0
Simplified39.0%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6419.8
Simplified19.8%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6435.9
Simplified35.9%
if 3.3e-111 < F Initial program 76.8%
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.f6451.2
Simplified51.2%
Taylor expanded in F around inf
lower-/.f6442.8
Simplified42.8%
Taylor expanded in B around 0
lower-/.f64N/A
lower--.f6434.3
Simplified34.3%
Final simplification40.9%
(FPCore (F B x) :precision binary64 (let* ((t_0 (- (/ x B)))) (if (<= x -1e-259) t_0 (if (<= x 3.1e-21) (/ -1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = -(x / B);
double tmp;
if (x <= -1e-259) {
tmp = t_0;
} else if (x <= 3.1e-21) {
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 <= (-1d-259)) then
tmp = t_0
else if (x <= 3.1d-21) 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 <= -1e-259) {
tmp = t_0;
} else if (x <= 3.1e-21) {
tmp = -1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -(x / B) tmp = 0 if x <= -1e-259: tmp = t_0 elif x <= 3.1e-21: 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 <= -1e-259) tmp = t_0; elseif (x <= 3.1e-21) 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 <= -1e-259) tmp = t_0; elseif (x <= 3.1e-21) 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, -1e-259], t$95$0, If[LessEqual[x, 3.1e-21], N[(-1.0 / B), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\frac{x}{B}\\
\mathbf{if}\;x \leq -1 \cdot 10^{-259}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.0000000000000001e-259 or 3.0999999999999998e-21 < x Initial program 80.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6469.8
Simplified69.8%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6435.7
Simplified35.7%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6437.5
Simplified37.5%
if -1.0000000000000001e-259 < x < 3.0999999999999998e-21Initial program 73.6%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6429.6
Simplified29.6%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6421.6
Simplified21.6%
Taylor expanded in x around 0
lower-/.f6421.6
Simplified21.6%
Final simplification32.1%
(FPCore (F B x) :precision binary64 (if (<= F -9.5e-121) (/ (- -1.0 x) B) (- (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-121) {
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 <= (-9.5d-121)) 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 <= -9.5e-121) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-121: tmp = (-1.0 - x) / B else: tmp = -(x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-121) 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 <= -9.5e-121) tmp = (-1.0 - x) / B; else tmp = -(x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-121], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\end{array}
if F < -9.4999999999999994e-121Initial program 63.4%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6488.3
Simplified88.3%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6452.4
Simplified52.4%
Taylor expanded in x around 0
associate-*r/N/A
mul-1-negN/A
div-subN/A
sub-negN/A
distribute-neg-inN/A
+-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
mul-1-negN/A
unsub-negN/A
lower--.f6452.4
Simplified52.4%
if -9.4999999999999994e-121 < F Initial program 85.9%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6439.2
Simplified39.2%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6419.6
Simplified19.6%
Taylor expanded in x around inf
mul-1-negN/A
lower-neg.f6426.9
Simplified26.9%
Final simplification35.6%
(FPCore (F B x) :precision binary64 (if (<= F 2e-108) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 2e-108) {
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 <= 2d-108) 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 <= 2e-108) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 2e-108: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 2e-108) 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 <= 2e-108) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 2e-108], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2 \cdot 10^{-108}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 2.00000000000000008e-108Initial program 79.3%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6467.0
Simplified67.0%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6438.6
Simplified38.6%
Taylor expanded in x around 0
lower-/.f6415.9
Simplified15.9%
if 2.00000000000000008e-108 < F Initial program 76.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.f6450.7
Simplified50.7%
Taylor expanded in F around inf
lower-/.f6442.2
Simplified42.2%
Taylor expanded in x around 0
lower-/.f6417.3
Simplified17.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 78.2%
Taylor expanded in F around -inf
lower-/.f64N/A
lower-sin.f6456.1
Simplified56.1%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6430.9
Simplified30.9%
Taylor expanded in x around 0
lower-/.f6410.8
Simplified10.8%
herbie shell --seed 2024215
(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))))))