
(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 30 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 -5e+77)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 100000000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) (/ x (tan 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 <= -5e+77) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 100000000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - (x / tan(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 <= -5e+77) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 100000000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - Float64(x / tan(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, -5e+77], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[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 -5 \cdot 10^{+77}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.00000000000000004e77Initial program 56.4%
Taylor expanded in F around -inf 99.8%
if -5.00000000000000004e77 < F < 1e8Initial program 98.8%
+-commutative98.8%
unsub-neg98.8%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
if 1e8 < F Initial program 61.1%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -6e+37)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 200000000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(+ 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 <= -6e+37) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 200000000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} 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 <= (-6d+37)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 200000000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
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 <= -6e+37) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 200000000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} 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 <= -6e+37: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 200000000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) 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 <= -6e+37) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 200000000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); 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 <= -6e+37) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 200000000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); 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, -6e+37], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $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 -6 \cdot 10^{+37}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -6.00000000000000043e37Initial program 62.9%
Taylor expanded in F around -inf 99.7%
if -6.00000000000000043e37 < F < 2e8Initial program 99.6%
if 2e8 < F Initial program 61.1%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.42)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 0.62)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x (tan 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.42) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 0.62) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / tan(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.42d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 0.62d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / tan(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.42) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 0.62) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / Math.tan(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.42: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 0.62: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / math.tan(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.42) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 0.62) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / tan(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.42) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 0.62) tmp = (F * (sqrt(0.5) / sin(B))) - (x / tan(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.42], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.62], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[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.42:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 65.6%
Taylor expanded in F around -inf 98.6%
if -1.4199999999999999 < F < 0.619999999999999996Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.0%
if 0.619999999999999996 < F Initial program 62.1%
Taylor expanded in F around inf 99.2%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.42)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 0.62)
(- (/ (sqrt 0.5) (/ (sin B) F)) (/ x (tan 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.42) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 0.62) {
tmp = (sqrt(0.5) / (sin(B) / F)) - (x / tan(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.42d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 0.62d0) then
tmp = (sqrt(0.5d0) / (sin(b) / f)) - (x / tan(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.42) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 0.62) {
tmp = (Math.sqrt(0.5) / (Math.sin(B) / F)) - (x / Math.tan(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.42: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 0.62: tmp = (math.sqrt(0.5) / (math.sin(B) / F)) - (x / math.tan(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.42) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 0.62) tmp = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - Float64(x / tan(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.42) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 0.62) tmp = (sqrt(0.5) / (sin(B) / F)) - (x / tan(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.42], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.62], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[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.42:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 65.6%
Taylor expanded in F around -inf 98.6%
if -1.4199999999999999 < F < 0.619999999999999996Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.2%
associate-/l*99.0%
Simplified99.0%
if 0.619999999999999996 < F Initial program 62.1%
Taylor expanded in F around inf 99.2%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.42)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 0.62)
(- (/ (* F (sqrt 0.5)) (sin B)) (/ x (tan 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.42) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 0.62) {
tmp = ((F * sqrt(0.5)) / sin(B)) - (x / tan(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.42d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 0.62d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - (x / tan(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.42) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 0.62) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - (x / Math.tan(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.42: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 0.62: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - (x / math.tan(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.42) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 0.62) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - Float64(x / tan(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.42) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 0.62) tmp = ((F * sqrt(0.5)) / sin(B)) - (x / tan(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.42], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.62], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[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.42:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 65.6%
Taylor expanded in F around -inf 98.6%
if -1.4199999999999999 < F < 0.619999999999999996Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.2%
if 0.619999999999999996 < F Initial program 62.1%
Taylor expanded in F around inf 99.2%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B)))
(t_1 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(t_2 (* x (/ -1.0 (tan B)))))
(if (<= F -1.02e-23)
(+ t_2 (/ -1.0 (sin B)))
(if (<= F -2.5e-165)
(- (* t_0 t_1) (/ x B))
(if (<= F 4.1e-109)
(- (* t_1 (/ F B)) (/ x (tan B)))
(if (<= F 950000.0)
(- (* t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(+ t_2 (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_2 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.02e-23) {
tmp = t_2 + (-1.0 / sin(B));
} else if (F <= -2.5e-165) {
tmp = (t_0 * t_1) - (x / B);
} else if (F <= 4.1e-109) {
tmp = (t_1 * (F / B)) - (x / tan(B));
} else if (F <= 950000.0) {
tmp = (t_0 * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = t_2 + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = f / sin(b)
t_1 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_2 = x * ((-1.0d0) / tan(b))
if (f <= (-1.02d-23)) then
tmp = t_2 + ((-1.0d0) / sin(b))
else if (f <= (-2.5d-165)) then
tmp = (t_0 * t_1) - (x / b)
else if (f <= 4.1d-109) then
tmp = (t_1 * (f / b)) - (x / tan(b))
else if (f <= 950000.0d0) then
tmp = (t_0 * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = t_2 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_2 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.02e-23) {
tmp = t_2 + (-1.0 / Math.sin(B));
} else if (F <= -2.5e-165) {
tmp = (t_0 * t_1) - (x / B);
} else if (F <= 4.1e-109) {
tmp = (t_1 * (F / B)) - (x / Math.tan(B));
} else if (F <= 950000.0) {
tmp = (t_0 * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = t_2 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_2 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.02e-23: tmp = t_2 + (-1.0 / math.sin(B)) elif F <= -2.5e-165: tmp = (t_0 * t_1) - (x / B) elif F <= 4.1e-109: tmp = (t_1 * (F / B)) - (x / math.tan(B)) elif F <= 950000.0: tmp = (t_0 * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) else: tmp = t_2 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_2 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.02e-23) tmp = Float64(t_2 + Float64(-1.0 / sin(B))); elseif (F <= -2.5e-165) tmp = Float64(Float64(t_0 * t_1) - Float64(x / B)); elseif (F <= 4.1e-109) tmp = Float64(Float64(t_1 * Float64(F / B)) - Float64(x / tan(B))); elseif (F <= 950000.0) tmp = Float64(Float64(t_0 * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(t_2 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_2 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.02e-23) tmp = t_2 + (-1.0 / sin(B)); elseif (F <= -2.5e-165) tmp = (t_0 * t_1) - (x / B); elseif (F <= 4.1e-109) tmp = (t_1 * (F / B)) - (x / tan(B)); elseif (F <= 950000.0) tmp = (t_0 * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = t_2 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.02e-23], N[(t$95$2 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.5e-165], N[(N[(t$95$0 * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e-109], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 950000.0], N[(N[(t$95$0 * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_2 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.02 \cdot 10^{-23}:\\
\;\;\;\;t_2 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -2.5 \cdot 10^{-165}:\\
\;\;\;\;t_0 \cdot t_1 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{-109}:\\
\;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 950000:\\
\;\;\;\;t_0 \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_2 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.02000000000000005e-23Initial program 67.0%
Taylor expanded in F around -inf 97.4%
if -1.02000000000000005e-23 < F < -2.4999999999999999e-165Initial program 99.4%
Taylor expanded in B around 0 89.9%
Taylor expanded in F around 0 89.9%
if -2.4999999999999999e-165 < F < 4.1000000000000002e-109Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 87.4%
if 4.1000000000000002e-109 < F < 9.5e5Initial program 99.6%
Taylor expanded in B around 0 76.8%
if 9.5e5 < F Initial program 61.1%
Taylor expanded in F around inf 99.8%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.02e-23)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F -2.1e-165)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 0.62)
(+ t_0 (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F 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.02e-23) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= -2.1e-165) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.62) {
tmp = t_0 + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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.02d-23)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= (-2.1d-165)) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 0.62d0) then
tmp = t_0 + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / 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.02e-23) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= -2.1e-165) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 0.62) {
tmp = t_0 + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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.02e-23: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= -2.1e-165: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 0.62: tmp = t_0 + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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.02e-23) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= -2.1e-165) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 0.62) tmp = Float64(t_0 + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / 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.02e-23) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= -2.1e-165) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 0.62) tmp = t_0 + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / 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.02e-23], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-165], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.62], N[(t$95$0 + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / 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.02 \cdot 10^{-23}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-165}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;t_0 + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.02000000000000005e-23Initial program 67.0%
Taylor expanded in F around -inf 97.4%
if -1.02000000000000005e-23 < F < -2.09999999999999995e-165Initial program 99.4%
Taylor expanded in B around 0 89.9%
Taylor expanded in F around 0 89.9%
if -2.09999999999999995e-165 < F < 0.619999999999999996Initial program 99.6%
Taylor expanded in B around 0 78.8%
if 0.619999999999999996 < F Initial program 62.1%
Taylor expanded in F around inf 99.2%
Final simplification91.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -1.02e-23)
(+ t_1 (/ -1.0 (sin B)))
(if (<= F -3.4e-165)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 0.12)
(- (* t_0 (/ F B)) (/ x (tan B)))
(+ t_1 (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.02e-23) {
tmp = t_1 + (-1.0 / sin(B));
} else if (F <= -3.4e-165) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 0.12) {
tmp = (t_0 * (F / B)) - (x / tan(B));
} else {
tmp = t_1 + (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) :: t_1
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-1.02d-23)) then
tmp = t_1 + ((-1.0d0) / sin(b))
else if (f <= (-3.4d-165)) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 0.12d0) then
tmp = (t_0 * (f / b)) - (x / tan(b))
else
tmp = t_1 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.02e-23) {
tmp = t_1 + (-1.0 / Math.sin(B));
} else if (F <= -3.4e-165) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 0.12) {
tmp = (t_0 * (F / B)) - (x / Math.tan(B));
} else {
tmp = t_1 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.02e-23: tmp = t_1 + (-1.0 / math.sin(B)) elif F <= -3.4e-165: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 0.12: tmp = (t_0 * (F / B)) - (x / math.tan(B)) else: tmp = t_1 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.02e-23) tmp = Float64(t_1 + Float64(-1.0 / sin(B))); elseif (F <= -3.4e-165) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 0.12) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / tan(B))); else tmp = Float64(t_1 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.02e-23) tmp = t_1 + (-1.0 / sin(B)); elseif (F <= -3.4e-165) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 0.12) tmp = (t_0 * (F / B)) - (x / tan(B)); else tmp = t_1 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.02e-23], N[(t$95$1 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.4e-165], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.12], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.02 \cdot 10^{-23}:\\
\;\;\;\;t_1 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -3.4 \cdot 10^{-165}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.12:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.02000000000000005e-23Initial program 67.0%
Taylor expanded in F around -inf 97.4%
if -1.02000000000000005e-23 < F < -3.4e-165Initial program 99.4%
Taylor expanded in B around 0 89.9%
Taylor expanded in F around 0 89.9%
if -3.4e-165 < F < 0.12Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.7%
Taylor expanded in F around 0 98.9%
Taylor expanded in B around 0 78.2%
if 0.12 < F Initial program 62.1%
Taylor expanded in F around inf 99.2%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.1e-40)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 0.062)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x (tan 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.1e-40) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 0.062) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / tan(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.1d-40)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 0.062d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / tan(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.1e-40) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 0.062) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / Math.tan(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.1e-40: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 0.062: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / math.tan(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.1e-40) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 0.062) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / tan(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.1e-40) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 0.062) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / tan(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.1e-40], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.062], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[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.1 \cdot 10^{-40}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.062:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.10000000000000004e-40Initial program 67.9%
Taylor expanded in F around -inf 95.0%
if -1.10000000000000004e-40 < F < 0.062Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 72.9%
if 0.062 < F Initial program 62.1%
Taylor expanded in F around inf 99.2%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(if (<= F -8e-41)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F -1.15e-108)
(-
(*
(pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))
(if (<= F 2.75e-58)
(* (cos B) (/ (- x) (sin B)))
(- (/ F (* F (sin B))) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8e-41) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= -1.15e-108) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.75e-58) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (F / (F * sin(B))) - (x / tan(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 <= (-8d-41)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= (-1.15d-108)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 2.75d-58) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (f / (f * sin(b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8e-41) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= -1.15e-108) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.75e-58) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (F / (F * Math.sin(B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8e-41: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= -1.15e-108: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 2.75e-58: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (F / (F * math.sin(B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8e-41) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= -1.15e-108) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 2.75e-58) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8e-41) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= -1.15e-108) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 2.75e-58) tmp = cos(B) * (-x / sin(B)); else tmp = (F / (F * sin(B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8e-41], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-108], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.75e-58], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8 \cdot 10^{-41}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-108}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.75 \cdot 10^{-58}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -8.00000000000000005e-41Initial program 67.9%
Taylor expanded in F around -inf 95.0%
if -8.00000000000000005e-41 < F < -1.14999999999999998e-108Initial program 99.6%
Taylor expanded in B around 0 99.7%
Taylor expanded in B around 0 63.9%
if -1.14999999999999998e-108 < F < 2.74999999999999998e-58Initial program 99.5%
+-commutative99.5%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 67.6%
mul-1-neg67.6%
*-commutative67.6%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
if 2.74999999999999998e-58 < F Initial program 67.5%
+-commutative67.5%
unsub-neg67.5%
associate-*l/77.0%
associate-*r/77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in F around inf 91.2%
un-div-inv91.3%
*-commutative91.3%
Applied egg-rr91.3%
Final simplification83.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.1e-40)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F -1.05e-106)
(-
(*
(pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))
(if (<= F 2.75e-58)
(* (cos B) (/ (- x) (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.1e-40) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= -1.05e-106) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.75e-58) {
tmp = cos(B) * (-x / 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.1d-40)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= (-1.05d-106)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 2.75d-58) then
tmp = cos(b) * (-x / 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.1e-40) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= -1.05e-106) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.75e-58) {
tmp = Math.cos(B) * (-x / 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.1e-40: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= -1.05e-106: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 2.75e-58: tmp = math.cos(B) * (-x / 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.1e-40) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= -1.05e-106) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 2.75e-58) tmp = Float64(cos(B) * Float64(Float64(-x) / 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.1e-40) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= -1.05e-106) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 2.75e-58) tmp = cos(B) * (-x / 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.1e-40], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.05e-106], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.75e-58], N[(N[Cos[B], $MachinePrecision] * N[((-x) / 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.1 \cdot 10^{-40}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-106}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.75 \cdot 10^{-58}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.10000000000000004e-40Initial program 67.9%
Taylor expanded in F around -inf 95.0%
if -1.10000000000000004e-40 < F < -1.05000000000000002e-106Initial program 99.6%
Taylor expanded in B around 0 99.7%
Taylor expanded in B around 0 63.9%
if -1.05000000000000002e-106 < F < 2.74999999999999998e-58Initial program 99.5%
+-commutative99.5%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 67.6%
mul-1-neg67.6%
*-commutative67.6%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
if 2.74999999999999998e-58 < F Initial program 67.5%
Taylor expanded in F around inf 91.3%
Final simplification83.7%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.4e-59)
(* (cos B) (/ (- x) (sin B)))
(- (/ F (* F (sin B))) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.4e-59) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (F / (F * sin(B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.4d-59) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (f / (f * sin(b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.4e-59) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (F / (F * Math.sin(B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.4e-59: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (F / (F * math.sin(B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.4e-59) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.4e-59) tmp = cos(B) * (-x / sin(B)); else tmp = (F / (F * sin(B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.4e-59], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-59}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e28Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -7.1999999999999999e28 < F < 5.3999999999999998e-59Initial program 99.5%
+-commutative99.5%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 61.7%
mul-1-neg61.7%
*-commutative61.7%
associate-*l/61.8%
*-commutative61.8%
Simplified61.8%
if 5.3999999999999998e-59 < F Initial program 67.5%
+-commutative67.5%
unsub-neg67.5%
associate-*l/77.0%
associate-*r/77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in F around inf 91.2%
un-div-inv91.3%
*-commutative91.3%
Applied egg-rr91.3%
Final simplification76.7%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.3e-14)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 1e+181)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.3e-14) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 1e+181) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.3d-14) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 1d+181) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.3e-14) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 1e+181) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.3e-14: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 1e+181: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.3e-14) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 1e+181) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.3e-14) tmp = cos(B) * (-x / sin(B)); elseif (F <= 1e+181) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-14], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+181], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-14}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 10^{+181}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e28Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -7.1999999999999999e28 < F < 4.29999999999999998e-14Initial program 99.5%
+-commutative99.5%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 61.0%
mul-1-neg61.0%
*-commutative61.0%
associate-*l/61.0%
*-commutative61.0%
Simplified61.0%
if 4.29999999999999998e-14 < F < 9.9999999999999992e180Initial program 80.7%
Taylor expanded in B around 0 65.6%
Taylor expanded in F around inf 77.6%
if 9.9999999999999992e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification72.7%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.62)
(-
(*
(pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))
(if (<= F 9.5e+180)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.62) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 9.5e+180) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.62d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 9.5d+180) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.62) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 9.5e+180) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.62: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 9.5e+180: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.62) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 9.5e+180) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.62) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 9.5e+180) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.62], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e+180], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e28Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -7.1999999999999999e28 < F < 0.619999999999999996Initial program 99.5%
Taylor expanded in B around 0 72.1%
Taylor expanded in B around 0 46.6%
if 0.619999999999999996 < F < 9.5000000000000003e180Initial program 78.8%
Taylor expanded in B around 0 62.1%
Taylor expanded in F around inf 82.5%
if 9.5000000000000003e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.9%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.62)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ 1.0 (/ B F))) (/ x B))
(if (<= F 5.2e+180)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.62) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (B / F))) - (x / B);
} else if (F <= 5.2e+180) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.62d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (1.0d0 / (b / f))) - (x / b)
else if (f <= 5.2d+180) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.62) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (B / F))) - (x / B);
} else if (F <= 5.2e+180) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.62: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (B / F))) - (x / B) elif F <= 5.2e+180: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.62) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(1.0 / Float64(B / F))) - Float64(x / B)); elseif (F <= 5.2e+180) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.62) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (1.0 / (B / F))) - (x / B); elseif (F <= 5.2e+180) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.62], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(1.0 / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e+180], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{1}{\frac{B}{F}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e28Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -7.1999999999999999e28 < F < 0.619999999999999996Initial program 99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in B around 0 72.0%
Taylor expanded in B around 0 46.4%
if 0.619999999999999996 < F < 5.20000000000000042e180Initial program 78.8%
Taylor expanded in B around 0 62.1%
Taylor expanded in F around inf 82.5%
if 5.20000000000000042e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.8%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.62)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 5.6e+180)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.62) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 5.6e+180) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.62d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 5.6d+180) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.62) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 5.6e+180) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.62: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 5.6e+180: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.62) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 5.6e+180) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.62) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 5.6e+180) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.62], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e+180], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e28Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -7.1999999999999999e28 < F < 0.619999999999999996Initial program 99.5%
Taylor expanded in B around 0 72.1%
Taylor expanded in B around 0 46.4%
if 0.619999999999999996 < F < 5.60000000000000024e180Initial program 78.8%
Taylor expanded in B around 0 62.1%
Taylor expanded in F around inf 82.5%
if 5.60000000000000024e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.2e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.1e-241)
(- (* (/ F B) (/ -1.0 F)) t_0)
(if (<= F 5.6e-175)
(* (cos B) (- (* 0.16666666666666666 (- (* x B))) (/ x B)))
(if (<= F 4.3e-14)
(+ (* x (/ -1.0 (tan B))) (/ (/ F B) (- F)))
(if (<= F 1.65e+180)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.1e-241) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 5.6e-175) {
tmp = cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B));
} else if (F <= 4.3e-14) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) / -F);
} else if (F <= 1.65e+180) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - 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 / tan(b)
if (f <= (-7.2d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.1d-241)) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_0
else if (f <= 5.6d-175) then
tmp = cos(b) * ((0.16666666666666666d0 * -(x * b)) - (x / b))
else if (f <= 4.3d-14) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) / -f)
else if (f <= 1.65d+180) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7.2e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.1e-241) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 5.6e-175) {
tmp = Math.cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B));
} else if (F <= 4.3e-14) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) / -F);
} else if (F <= 1.65e+180) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.2e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.1e-241: tmp = ((F / B) * (-1.0 / F)) - t_0 elif F <= 5.6e-175: tmp = math.cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B)) elif F <= 4.3e-14: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) / -F) elif F <= 1.65e+180: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.2e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.1e-241) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_0); elseif (F <= 5.6e-175) tmp = Float64(cos(B) * Float64(Float64(0.16666666666666666 * Float64(-Float64(x * B))) - Float64(x / B))); elseif (F <= 4.3e-14) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) / Float64(-F))); elseif (F <= 1.65e+180) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.2e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.1e-241) tmp = ((F / B) * (-1.0 / F)) - t_0; elseif (F <= 5.6e-175) tmp = cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B)); elseif (F <= 4.3e-14) tmp = (x * (-1.0 / tan(B))) + ((F / B) / -F); elseif (F <= 1.65e+180) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.2e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.1e-241], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.6e-175], N[(N[Cos[B], $MachinePrecision] * N[(N[(0.16666666666666666 * (-N[(x * B), $MachinePrecision])), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-14], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] / (-F)), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.65e+180], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.1 \cdot 10^{-241}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-175}:\\
\;\;\;\;\cos B \cdot \left(0.16666666666666666 \cdot \left(-x \cdot B\right) - \frac{x}{B}\right)\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{B}}{-F}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -7.1999999999999999e28Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -7.1999999999999999e28 < F < -5.0999999999999998e-241Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 40.4%
div-inv40.4%
expm1-log1p-u26.4%
expm1-udef20.1%
Applied egg-rr20.1%
expm1-def26.4%
expm1-log1p40.4%
Simplified40.4%
if -5.0999999999999998e-241 < F < 5.6e-175Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.5%
if 5.6e-175 < F < 4.29999999999999998e-14Initial program 99.5%
Taylor expanded in F around -inf 32.6%
expm1-log1p-u18.9%
expm1-udef18.9%
*-commutative18.9%
frac-2neg18.9%
metadata-eval18.9%
frac-times18.9%
*-un-lft-identity18.9%
Applied egg-rr18.9%
expm1-def18.9%
expm1-log1p32.6%
*-commutative32.6%
associate-/r*32.6%
Simplified32.6%
Taylor expanded in B around 0 44.7%
if 4.29999999999999998e-14 < F < 1.64999999999999995e180Initial program 80.7%
Taylor expanded in B around 0 65.6%
Taylor expanded in F around inf 77.6%
if 1.64999999999999995e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.7%
(FPCore (F B x)
:precision binary64
(if (<= F -8e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.7e-241)
(- (* (/ F B) (/ -1.0 F)) (/ 1.0 (/ (tan B) x)))
(if (<= F 6.5e-176)
(* (cos B) (- (* 0.16666666666666666 (- (* x B))) (/ x B)))
(if (<= F 3.5e-14)
(+ (* x (/ -1.0 (tan B))) (/ (/ F B) (- F)))
(if (<= F 1e+181)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.7e-241) {
tmp = ((F / B) * (-1.0 / F)) - (1.0 / (tan(B) / x));
} else if (F <= 6.5e-176) {
tmp = cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B));
} else if (F <= 3.5e-14) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) / -F);
} else if (F <= 1e+181) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(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 <= (-8d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.7d-241)) then
tmp = ((f / b) * ((-1.0d0) / f)) - (1.0d0 / (tan(b) / x))
else if (f <= 6.5d-176) then
tmp = cos(b) * ((0.16666666666666666d0 * -(x * b)) - (x / b))
else if (f <= 3.5d-14) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) / -f)
else if (f <= 1d+181) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.7e-241) {
tmp = ((F / B) * (-1.0 / F)) - (1.0 / (Math.tan(B) / x));
} else if (F <= 6.5e-176) {
tmp = Math.cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B));
} else if (F <= 3.5e-14) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) / -F);
} else if (F <= 1e+181) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.7e-241: tmp = ((F / B) * (-1.0 / F)) - (1.0 / (math.tan(B) / x)) elif F <= 6.5e-176: tmp = math.cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B)) elif F <= 3.5e-14: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) / -F) elif F <= 1e+181: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.7e-241) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 6.5e-176) tmp = Float64(cos(B) * Float64(Float64(0.16666666666666666 * Float64(-Float64(x * B))) - Float64(x / B))); elseif (F <= 3.5e-14) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) / Float64(-F))); elseif (F <= 1e+181) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.7e-241) tmp = ((F / B) * (-1.0 / F)) - (1.0 / (tan(B) / x)); elseif (F <= 6.5e-176) tmp = cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B)); elseif (F <= 3.5e-14) tmp = (x * (-1.0 / tan(B))) + ((F / B) / -F); elseif (F <= 1e+181) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.7e-241], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-176], N[(N[Cos[B], $MachinePrecision] * N[(N[(0.16666666666666666 * (-N[(x * B), $MachinePrecision])), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e-14], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] / (-F)), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+181], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-241}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-176}:\\
\;\;\;\;\cos B \cdot \left(0.16666666666666666 \cdot \left(-x \cdot B\right) - \frac{x}{B}\right)\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{B}}{-F}\\
\mathbf{elif}\;F \leq 10^{+181}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7.99999999999999967e28Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -7.99999999999999967e28 < F < -3.6999999999999999e-241Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 40.4%
div-inv40.4%
clear-num40.4%
Applied egg-rr40.4%
if -3.6999999999999999e-241 < F < 6.5e-176Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.5%
if 6.5e-176 < F < 3.5000000000000002e-14Initial program 99.5%
Taylor expanded in F around -inf 32.6%
expm1-log1p-u18.9%
expm1-udef18.9%
*-commutative18.9%
frac-2neg18.9%
metadata-eval18.9%
frac-times18.9%
*-un-lft-identity18.9%
Applied egg-rr18.9%
expm1-def18.9%
expm1-log1p32.6%
*-commutative32.6%
associate-/r*32.6%
Simplified32.6%
Taylor expanded in B around 0 44.7%
if 3.5000000000000002e-14 < F < 9.9999999999999992e180Initial program 80.7%
Taylor expanded in B around 0 65.6%
Taylor expanded in F around inf 77.6%
if 9.9999999999999992e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4e+31)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.2e-241)
(- (/ -1.0 B) t_0)
(if (<= F 1.7e-174)
(* (cos B) (- (* 0.16666666666666666 (- (* x B))) (/ x B)))
(if (<= F 4.3e-14)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 1.45e+180)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4e+31) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.2e-241) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.7e-174) {
tmp = cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B));
} else if (F <= 4.3e-14) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 1.45e+180) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - 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 / tan(b)
if (f <= (-1.4d+31)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.2d-241)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.7d-174) then
tmp = cos(b) * ((0.16666666666666666d0 * -(x * b)) - (x / b))
else if (f <= 4.3d-14) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 1.45d+180) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4e+31) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.2e-241) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.7e-174) {
tmp = Math.cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B));
} else if (F <= 4.3e-14) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 1.45e+180) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4e+31: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.2e-241: tmp = (-1.0 / B) - t_0 elif F <= 1.7e-174: tmp = math.cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B)) elif F <= 4.3e-14: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 1.45e+180: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.2e-241) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.7e-174) tmp = Float64(cos(B) * Float64(Float64(0.16666666666666666 * Float64(-Float64(x * B))) - Float64(x / B))); elseif (F <= 4.3e-14) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 1.45e+180) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4e+31) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.2e-241) tmp = (-1.0 / B) - t_0; elseif (F <= 1.7e-174) tmp = cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B)); elseif (F <= 4.3e-14) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 1.45e+180) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.2e-241], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.7e-174], N[(N[Cos[B], $MachinePrecision] * N[(N[(0.16666666666666666 * (-N[(x * B), $MachinePrecision])), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-14], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45e+180], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-241}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-174}:\\
\;\;\;\;\cos B \cdot \left(0.16666666666666666 \cdot \left(-x \cdot B\right) - \frac{x}{B}\right)\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.40000000000000008e31Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -1.40000000000000008e31 < F < -2.1999999999999999e-241Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 40.4%
expm1-log1p-u21.1%
expm1-udef14.4%
+-commutative14.4%
fma-def14.4%
un-div-inv14.4%
Applied egg-rr14.4%
expm1-def21.1%
expm1-log1p40.4%
fma-neg40.4%
times-frac38.3%
*-commutative38.3%
times-frac38.4%
*-inverses38.4%
associate-*r/38.4%
metadata-eval38.4%
Simplified38.4%
if -2.1999999999999999e-241 < F < 1.7000000000000001e-174Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.5%
if 1.7000000000000001e-174 < F < 4.29999999999999998e-14Initial program 99.5%
Taylor expanded in F around -inf 32.6%
Taylor expanded in B around 0 44.7%
if 4.29999999999999998e-14 < F < 1.45000000000000004e180Initial program 80.7%
Taylor expanded in B around 0 65.6%
Taylor expanded in F around inf 77.6%
if 1.45000000000000004e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8.5e+29)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.1e-241)
(- (* (/ F B) (/ -1.0 F)) t_0)
(if (<= F 1.75e-174)
(* (cos B) (- (* 0.16666666666666666 (- (* x B))) (/ x B)))
(if (<= F 3.5e-14)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 7.2e+180)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8.5e+29) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.1e-241) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 1.75e-174) {
tmp = cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B));
} else if (F <= 3.5e-14) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 7.2e+180) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - 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 / tan(b)
if (f <= (-8.5d+29)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.1d-241)) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_0
else if (f <= 1.75d-174) then
tmp = cos(b) * ((0.16666666666666666d0 * -(x * b)) - (x / b))
else if (f <= 3.5d-14) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 7.2d+180) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8.5e+29) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.1e-241) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 1.75e-174) {
tmp = Math.cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B));
} else if (F <= 3.5e-14) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 7.2e+180) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8.5e+29: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.1e-241: tmp = ((F / B) * (-1.0 / F)) - t_0 elif F <= 1.75e-174: tmp = math.cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B)) elif F <= 3.5e-14: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 7.2e+180: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8.5e+29) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.1e-241) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_0); elseif (F <= 1.75e-174) tmp = Float64(cos(B) * Float64(Float64(0.16666666666666666 * Float64(-Float64(x * B))) - Float64(x / B))); elseif (F <= 3.5e-14) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 7.2e+180) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8.5e+29) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.1e-241) tmp = ((F / B) * (-1.0 / F)) - t_0; elseif (F <= 1.75e-174) tmp = cos(B) * ((0.16666666666666666 * -(x * B)) - (x / B)); elseif (F <= 3.5e-14) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 7.2e+180) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.5e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-241], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.75e-174], N[(N[Cos[B], $MachinePrecision] * N[(N[(0.16666666666666666 * (-N[(x * B), $MachinePrecision])), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e-14], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e+180], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.5 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-241}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-174}:\\
\;\;\;\;\cos B \cdot \left(0.16666666666666666 \cdot \left(-x \cdot B\right) - \frac{x}{B}\right)\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -8.5000000000000006e29Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -8.5000000000000006e29 < F < -2.0999999999999999e-241Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 40.4%
div-inv40.4%
expm1-log1p-u26.4%
expm1-udef20.1%
Applied egg-rr20.1%
expm1-def26.4%
expm1-log1p40.4%
Simplified40.4%
if -2.0999999999999999e-241 < F < 1.74999999999999994e-174Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.5%
if 1.74999999999999994e-174 < F < 3.5000000000000002e-14Initial program 99.5%
Taylor expanded in F around -inf 32.6%
Taylor expanded in B around 0 44.7%
if 3.5000000000000002e-14 < F < 7.2000000000000004e180Initial program 80.7%
Taylor expanded in B around 0 65.6%
Taylor expanded in F around inf 77.6%
if 7.2000000000000004e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= F -9.6e+30)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.95e-241)
t_1
(if (<= F 6.5e-176)
(- (/ (- x) B) (* (* x B) -0.3333333333333333))
(if (<= F 4.3e-14)
t_1
(if (<= F 6.8e+180)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -9.6e+30) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.95e-241) {
tmp = t_1;
} else if (F <= 6.5e-176) {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
} else if (F <= 4.3e-14) {
tmp = t_1;
} else if (F <= 6.8e+180) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
if (f <= (-9.6d+30)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.95d-241)) then
tmp = t_1
else if (f <= 6.5d-176) then
tmp = (-x / b) - ((x * b) * (-0.3333333333333333d0))
else if (f <= 4.3d-14) then
tmp = t_1
else if (f <= 6.8d+180) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -9.6e+30) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.95e-241) {
tmp = t_1;
} else if (F <= 6.5e-176) {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
} else if (F <= 4.3e-14) {
tmp = t_1;
} else if (F <= 6.8e+180) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 tmp = 0 if F <= -9.6e+30: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.95e-241: tmp = t_1 elif F <= 6.5e-176: tmp = (-x / B) - ((x * B) * -0.3333333333333333) elif F <= 4.3e-14: tmp = t_1 elif F <= 6.8e+180: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (F <= -9.6e+30) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.95e-241) tmp = t_1; elseif (F <= 6.5e-176) tmp = Float64(Float64(Float64(-x) / B) - Float64(Float64(x * B) * -0.3333333333333333)); elseif (F <= 4.3e-14) tmp = t_1; elseif (F <= 6.8e+180) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / B) - t_0; tmp = 0.0; if (F <= -9.6e+30) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.95e-241) tmp = t_1; elseif (F <= 6.5e-176) tmp = (-x / B) - ((x * B) * -0.3333333333333333); elseif (F <= 4.3e-14) tmp = t_1; elseif (F <= 6.8e+180) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -9.6e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.95e-241], t$95$1, If[LessEqual[F, 6.5e-176], N[(N[((-x) / B), $MachinePrecision] - N[(N[(x * B), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-14], t$95$1, If[LessEqual[F, 6.8e+180], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
\mathbf{if}\;F \leq -9.6 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-176}:\\
\;\;\;\;\frac{-x}{B} - \left(x \cdot B\right) \cdot -0.3333333333333333\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -9.5999999999999997e30Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -9.5999999999999997e30 < F < -1.9499999999999999e-241 or 6.5e-176 < F < 4.29999999999999998e-14Initial program 99.5%
Taylor expanded in F around -inf 33.6%
Taylor expanded in B around 0 42.1%
expm1-log1p-u23.4%
expm1-udef15.3%
+-commutative15.3%
fma-def15.3%
un-div-inv15.3%
Applied egg-rr15.3%
expm1-def23.4%
expm1-log1p42.1%
fma-neg42.1%
times-frac40.8%
*-commutative40.8%
times-frac40.9%
*-inverses40.9%
associate-*r/40.9%
metadata-eval40.9%
Simplified40.9%
if -1.9499999999999999e-241 < F < 6.5e-176Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.0%
*-commutative59.0%
distribute-rgt-out--59.0%
metadata-eval59.0%
Simplified59.0%
Taylor expanded in x around 0 59.0%
if 4.29999999999999998e-14 < F < 6.79999999999999969e180Initial program 80.7%
Taylor expanded in B around 0 65.6%
Taylor expanded in F around inf 77.6%
if 6.79999999999999969e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.52e+29)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9.5e-241)
(- (/ -1.0 B) t_0)
(if (<= F 1.4e-174)
(- (/ (- x) B) (* (* x B) -0.3333333333333333))
(if (<= F 4.3e-14)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 1e+181)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.52e+29) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9.5e-241) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.4e-174) {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
} else if (F <= 4.3e-14) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 1e+181) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - 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 / tan(b)
if (f <= (-1.52d+29)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9.5d-241)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.4d-174) then
tmp = (-x / b) - ((x * b) * (-0.3333333333333333d0))
else if (f <= 4.3d-14) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 1d+181) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.52e+29) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9.5e-241) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.4e-174) {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
} else if (F <= 4.3e-14) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 1e+181) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.52e+29: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9.5e-241: tmp = (-1.0 / B) - t_0 elif F <= 1.4e-174: tmp = (-x / B) - ((x * B) * -0.3333333333333333) elif F <= 4.3e-14: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 1e+181: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.52e+29) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9.5e-241) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.4e-174) tmp = Float64(Float64(Float64(-x) / B) - Float64(Float64(x * B) * -0.3333333333333333)); elseif (F <= 4.3e-14) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 1e+181) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.52e+29) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9.5e-241) tmp = (-1.0 / B) - t_0; elseif (F <= 1.4e-174) tmp = (-x / B) - ((x * B) * -0.3333333333333333); elseif (F <= 4.3e-14) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 1e+181) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.52e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-241], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-174], N[(N[((-x) / B), $MachinePrecision] - N[(N[(x * B), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-14], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+181], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.52 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-241}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-174}:\\
\;\;\;\;\frac{-x}{B} - \left(x \cdot B\right) \cdot -0.3333333333333333\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 10^{+181}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.52e29Initial program 63.5%
Taylor expanded in B around 0 43.3%
Taylor expanded in F around -inf 79.1%
if -1.52e29 < F < -9.49999999999999971e-241Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 40.4%
expm1-log1p-u21.1%
expm1-udef14.4%
+-commutative14.4%
fma-def14.4%
un-div-inv14.4%
Applied egg-rr14.4%
expm1-def21.1%
expm1-log1p40.4%
fma-neg40.4%
times-frac38.3%
*-commutative38.3%
times-frac38.4%
*-inverses38.4%
associate-*r/38.4%
metadata-eval38.4%
Simplified38.4%
if -9.49999999999999971e-241 < F < 1.39999999999999999e-174Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.0%
*-commutative59.0%
distribute-rgt-out--59.0%
metadata-eval59.0%
Simplified59.0%
Taylor expanded in x around 0 59.0%
if 1.39999999999999999e-174 < F < 4.29999999999999998e-14Initial program 99.5%
Taylor expanded in F around -inf 32.6%
Taylor expanded in B around 0 44.7%
if 4.29999999999999998e-14 < F < 9.9999999999999992e180Initial program 80.7%
Taylor expanded in B around 0 65.6%
Taylor expanded in F around inf 77.6%
if 9.9999999999999992e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification66.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= F -1.8e-241)
t_1
(if (<= F 1.3e-173)
(- (/ (- x) B) (* (* x B) -0.3333333333333333))
(if (<= F 4.3e-14)
t_1
(if (<= F 1e+181) (- (/ 1.0 (sin B)) (/ x B)) (- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -1.8e-241) {
tmp = t_1;
} else if (F <= 1.3e-173) {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
} else if (F <= 4.3e-14) {
tmp = t_1;
} else if (F <= 1e+181) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
if (f <= (-1.8d-241)) then
tmp = t_1
else if (f <= 1.3d-173) then
tmp = (-x / b) - ((x * b) * (-0.3333333333333333d0))
else if (f <= 4.3d-14) then
tmp = t_1
else if (f <= 1d+181) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -1.8e-241) {
tmp = t_1;
} else if (F <= 1.3e-173) {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
} else if (F <= 4.3e-14) {
tmp = t_1;
} else if (F <= 1e+181) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 tmp = 0 if F <= -1.8e-241: tmp = t_1 elif F <= 1.3e-173: tmp = (-x / B) - ((x * B) * -0.3333333333333333) elif F <= 4.3e-14: tmp = t_1 elif F <= 1e+181: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (F <= -1.8e-241) tmp = t_1; elseif (F <= 1.3e-173) tmp = Float64(Float64(Float64(-x) / B) - Float64(Float64(x * B) * -0.3333333333333333)); elseif (F <= 4.3e-14) tmp = t_1; elseif (F <= 1e+181) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / B) - t_0; tmp = 0.0; if (F <= -1.8e-241) tmp = t_1; elseif (F <= 1.3e-173) tmp = (-x / B) - ((x * B) * -0.3333333333333333); elseif (F <= 4.3e-14) tmp = t_1; elseif (F <= 1e+181) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -1.8e-241], t$95$1, If[LessEqual[F, 1.3e-173], N[(N[((-x) / B), $MachinePrecision] - N[(N[(x * B), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-14], t$95$1, If[LessEqual[F, 1e+181], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-173}:\\
\;\;\;\;\frac{-x}{B} - \left(x \cdot B\right) \cdot -0.3333333333333333\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 10^{+181}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.7999999999999999e-241 or 1.30000000000000002e-173 < F < 4.29999999999999998e-14Initial program 83.1%
Taylor expanded in F around -inf 54.2%
Taylor expanded in B around 0 43.3%
expm1-log1p-u24.5%
expm1-udef19.9%
+-commutative19.9%
fma-def19.9%
un-div-inv19.9%
Applied egg-rr19.9%
expm1-def24.5%
expm1-log1p43.3%
fma-neg43.3%
times-frac52.0%
*-commutative52.0%
times-frac52.1%
*-inverses52.1%
associate-*r/52.1%
metadata-eval52.1%
Simplified52.1%
if -1.7999999999999999e-241 < F < 1.30000000000000002e-173Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.0%
*-commutative59.0%
distribute-rgt-out--59.0%
metadata-eval59.0%
Simplified59.0%
Taylor expanded in x around 0 59.0%
if 4.29999999999999998e-14 < F < 9.9999999999999992e180Initial program 80.7%
Taylor expanded in B around 0 65.6%
Taylor expanded in F around inf 77.6%
if 9.9999999999999992e180 < F Initial program 32.4%
+-commutative32.4%
unsub-neg32.4%
associate-*l/50.1%
associate-*r/50.1%
*-commutative50.1%
Simplified50.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 93.0%
Final simplification62.8%
(FPCore (F B x) :precision binary64 (if (or (<= F -2e-241) (not (<= F 2.5e-176))) (- (/ -1.0 B) (/ x (tan B))) (- (/ (- x) B) (* (* x B) -0.3333333333333333))))
double code(double F, double B, double x) {
double tmp;
if ((F <= -2e-241) || !(F <= 2.5e-176)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
}
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-241)) .or. (.not. (f <= 2.5d-176))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = (-x / b) - ((x * b) * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((F <= -2e-241) || !(F <= 2.5e-176)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= -2e-241) or not (F <= 2.5e-176): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (-x / B) - ((x * B) * -0.3333333333333333) return tmp
function code(F, B, x) tmp = 0.0 if ((F <= -2e-241) || !(F <= 2.5e-176)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(-x) / B) - Float64(Float64(x * B) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= -2e-241) || ~((F <= 2.5e-176))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (-x / B) - ((x * B) * -0.3333333333333333); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, -2e-241], N[Not[LessEqual[F, 2.5e-176]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / B), $MachinePrecision] - N[(N[(x * B), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-241} \lor \neg \left(F \leq 2.5 \cdot 10^{-176}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B} - \left(x \cdot B\right) \cdot -0.3333333333333333\\
\end{array}
\end{array}
if F < -1.9999999999999999e-241 or 2.5e-176 < F Initial program 76.2%
Taylor expanded in F around -inf 46.9%
Taylor expanded in B around 0 40.2%
expm1-log1p-u22.6%
expm1-udef19.6%
+-commutative19.6%
fma-def19.6%
un-div-inv19.6%
Applied egg-rr19.6%
expm1-def22.6%
expm1-log1p40.3%
fma-neg40.3%
times-frac48.2%
*-commutative48.2%
times-frac48.2%
*-inverses48.2%
associate-*r/48.2%
metadata-eval48.2%
Simplified48.2%
if -1.9999999999999999e-241 < F < 2.5e-176Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.0%
*-commutative59.0%
distribute-rgt-out--59.0%
metadata-eval59.0%
Simplified59.0%
Taylor expanded in x around 0 59.0%
Final simplification49.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8.2e-241)
(- (/ -1.0 B) t_0)
(if (<= F 4.2e-174)
(- (/ (- x) B) (* (* x B) -0.3333333333333333))
(- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8.2e-241) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 4.2e-174) {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
} else {
tmp = (1.0 / B) - 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 / tan(b)
if (f <= (-8.2d-241)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 4.2d-174) then
tmp = (-x / b) - ((x * b) * (-0.3333333333333333d0))
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8.2e-241) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 4.2e-174) {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8.2e-241: tmp = (-1.0 / B) - t_0 elif F <= 4.2e-174: tmp = (-x / B) - ((x * B) * -0.3333333333333333) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8.2e-241) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 4.2e-174) tmp = Float64(Float64(Float64(-x) / B) - Float64(Float64(x * B) * -0.3333333333333333)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8.2e-241) tmp = (-1.0 / B) - t_0; elseif (F <= 4.2e-174) tmp = (-x / B) - ((x * B) * -0.3333333333333333); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.2e-241], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.2e-174], N[(N[((-x) / B), $MachinePrecision] - N[(N[(x * B), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.2 \cdot 10^{-241}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-174}:\\
\;\;\;\;\frac{-x}{B} - \left(x \cdot B\right) \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -8.1999999999999997e-241Initial program 78.6%
Taylor expanded in F around -inf 60.2%
Taylor expanded in B around 0 42.9%
expm1-log1p-u23.8%
expm1-udef20.7%
+-commutative20.7%
fma-def20.7%
un-div-inv20.7%
Applied egg-rr20.7%
expm1-def23.8%
expm1-log1p42.9%
fma-neg42.9%
times-frac54.0%
*-commutative54.0%
times-frac54.1%
*-inverses54.1%
associate-*r/54.1%
metadata-eval54.1%
Simplified54.1%
if -8.1999999999999997e-241 < F < 4.20000000000000021e-174Initial program 99.7%
+-commutative99.7%
fma-def99.7%
+-commutative99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.5%
mul-1-neg90.5%
*-commutative90.5%
associate-*l/90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in B around 0 59.0%
*-commutative59.0%
distribute-rgt-out--59.0%
metadata-eval59.0%
Simplified59.0%
Taylor expanded in x around 0 59.0%
if 4.20000000000000021e-174 < F Initial program 74.0%
+-commutative74.0%
unsub-neg74.0%
associate-*l/81.6%
associate-*r/81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in F around inf 77.8%
Taylor expanded in B around 0 64.1%
Final simplification59.1%
(FPCore (F B x) :precision binary64 (if (<= F -1.4e-34) (- (* (* x B) 0.3333333333333333) (/ (+ x 1.0) B)) (- (/ (- x) B) (* (* x B) -0.3333333333333333))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-34) {
tmp = ((x * B) * 0.3333333333333333) - ((x + 1.0) / B);
} else {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.4d-34)) then
tmp = ((x * b) * 0.3333333333333333d0) - ((x + 1.0d0) / b)
else
tmp = (-x / b) - ((x * b) * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-34) {
tmp = ((x * B) * 0.3333333333333333) - ((x + 1.0) / B);
} else {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e-34: tmp = ((x * B) * 0.3333333333333333) - ((x + 1.0) / B) else: tmp = (-x / B) - ((x * B) * -0.3333333333333333) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e-34) tmp = Float64(Float64(Float64(x * B) * 0.3333333333333333) - Float64(Float64(x + 1.0) / B)); else tmp = Float64(Float64(Float64(-x) / B) - Float64(Float64(x * B) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4e-34) tmp = ((x * B) * 0.3333333333333333) - ((x + 1.0) / B); else tmp = (-x / B) - ((x * B) * -0.3333333333333333); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e-34], N[(N[(N[(x * B), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / B), $MachinePrecision] - N[(N[(x * B), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-34}:\\
\;\;\;\;\left(x \cdot B\right) \cdot 0.3333333333333333 - \frac{x + 1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B} - \left(x \cdot B\right) \cdot -0.3333333333333333\\
\end{array}
\end{array}
if F < -1.39999999999999998e-34Initial program 67.0%
Taylor expanded in F around -inf 78.6%
Taylor expanded in B around 0 47.8%
Taylor expanded in B around 0 44.5%
if -1.39999999999999998e-34 < F Initial program 83.7%
+-commutative83.7%
fma-def83.7%
+-commutative83.7%
*-commutative83.7%
fma-def83.7%
fma-def83.7%
metadata-eval83.7%
metadata-eval83.7%
distribute-lft-neg-in83.7%
associate-*r/83.8%
*-rgt-identity83.8%
Simplified83.8%
Taylor expanded in F around 0 52.1%
mul-1-neg52.1%
*-commutative52.1%
associate-*l/52.2%
*-commutative52.2%
Simplified52.2%
Taylor expanded in B around 0 29.6%
*-commutative29.6%
distribute-rgt-out--29.6%
metadata-eval29.6%
Simplified29.6%
Taylor expanded in x around 0 29.6%
Final simplification33.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-21) (/ (- -1.0 x) B) (- (/ (- x) B) (* (* x B) -0.3333333333333333))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-21) {
tmp = (-1.0 - x) / B;
} else {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.3d-21)) then
tmp = ((-1.0d0) - x) / b
else
tmp = (-x / b) - ((x * b) * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-21) {
tmp = (-1.0 - x) / B;
} else {
tmp = (-x / B) - ((x * B) * -0.3333333333333333);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-21: tmp = (-1.0 - x) / B else: tmp = (-x / B) - ((x * B) * -0.3333333333333333) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-21) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(Float64(-x) / B) - Float64(Float64(x * B) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-21) tmp = (-1.0 - x) / B; else tmp = (-x / B) - ((x * B) * -0.3333333333333333); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-21], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[((-x) / B), $MachinePrecision] - N[(N[(x * B), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B} - \left(x \cdot B\right) \cdot -0.3333333333333333\\
\end{array}
\end{array}
if F < -1.30000000000000009e-21Initial program 66.6%
Taylor expanded in F around -inf 78.3%
Taylor expanded in B around 0 47.1%
Taylor expanded in B around 0 45.0%
associate-*r/45.0%
distribute-lft-in45.0%
metadata-eval45.0%
neg-mul-145.0%
Simplified45.0%
if -1.30000000000000009e-21 < F Initial program 83.8%
+-commutative83.8%
fma-def83.8%
+-commutative83.8%
*-commutative83.8%
fma-def83.8%
fma-def83.8%
metadata-eval83.8%
metadata-eval83.8%
distribute-lft-neg-in83.8%
associate-*r/83.8%
*-rgt-identity83.8%
Simplified83.8%
Taylor expanded in F around 0 52.4%
mul-1-neg52.4%
*-commutative52.4%
associate-*l/52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in B around 0 29.4%
*-commutative29.4%
distribute-rgt-out--29.4%
metadata-eval29.4%
Simplified29.4%
Taylor expanded in x around 0 29.4%
Final simplification33.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.5e-20) (/ (- -1.0 x) B) (* x (- (/ -1.0 B) (* B -0.3333333333333333)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-20) {
tmp = (-1.0 - x) / B;
} else {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
}
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 <= (-2.5d-20)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-20) {
tmp = (-1.0 - x) / B;
} else {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.5e-20: tmp = (-1.0 - x) / B else: tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.5e-20) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.5e-20) tmp = (-1.0 - x) / B; else tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.5e-20], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -2.4999999999999999e-20Initial program 66.6%
Taylor expanded in F around -inf 78.3%
Taylor expanded in B around 0 47.1%
Taylor expanded in B around 0 45.0%
associate-*r/45.0%
distribute-lft-in45.0%
metadata-eval45.0%
neg-mul-145.0%
Simplified45.0%
if -2.4999999999999999e-20 < F Initial program 83.8%
+-commutative83.8%
fma-def83.8%
+-commutative83.8%
*-commutative83.8%
fma-def83.8%
fma-def83.8%
metadata-eval83.8%
metadata-eval83.8%
distribute-lft-neg-in83.8%
associate-*r/83.8%
*-rgt-identity83.8%
Simplified83.8%
Taylor expanded in F around 0 52.4%
mul-1-neg52.4%
*-commutative52.4%
associate-*l/52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in B around 0 29.4%
*-commutative29.4%
distribute-rgt-out--29.4%
metadata-eval29.4%
Simplified29.4%
Taylor expanded in x around 0 29.4%
Final simplification33.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.35e-40) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-40) {
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 <= (-1.35d-40)) 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 <= -1.35e-40) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-40: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-40) 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 <= -1.35e-40) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-40], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.35e-40Initial program 67.4%
Taylor expanded in F around -inf 77.7%
Taylor expanded in B around 0 47.2%
Taylor expanded in B around 0 43.8%
associate-*r/43.8%
distribute-lft-in43.8%
metadata-eval43.8%
neg-mul-143.8%
Simplified43.8%
if -1.35e-40 < F Initial program 83.6%
+-commutative83.6%
fma-def83.6%
+-commutative83.6%
*-commutative83.6%
fma-def83.6%
fma-def83.6%
metadata-eval83.6%
metadata-eval83.6%
distribute-lft-neg-in83.6%
associate-*r/83.7%
*-rgt-identity83.7%
Simplified83.7%
Taylor expanded in F around 0 52.4%
mul-1-neg52.4%
*-commutative52.4%
associate-*l/52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in B around 0 29.5%
Final simplification33.6%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 79.0%
+-commutative79.0%
fma-def79.0%
+-commutative79.0%
*-commutative79.0%
fma-def79.0%
fma-def79.0%
metadata-eval79.0%
metadata-eval79.0%
distribute-lft-neg-in79.0%
associate-*r/79.1%
*-rgt-identity79.1%
Simplified79.1%
Taylor expanded in F around 0 51.1%
mul-1-neg51.1%
*-commutative51.1%
associate-*l/51.2%
*-commutative51.2%
Simplified51.2%
Taylor expanded in B around 0 28.6%
Final simplification28.6%
herbie shell --seed 2023238
(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))))))