
(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 28 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.7e+31)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) (* x (pow (tan B) -1.0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.7e+31) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - (x * pow(tan(B), -1.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.7d+31)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - (x * (tan(b) ** (-1.0d0)))
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.7e+31) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x * Math.pow(Math.tan(B), -1.0));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.7e+31: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - (x * math.pow(math.tan(B), -1.0)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.7e+31) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * (tan(B) ^ -1.0))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.7e+31) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - (x * (tan(B) ^ -1.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.7e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[Power[N[Tan[B], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.7 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot {\tan B}^{-1}\\
\end{array}
\end{array}
if F < -7.69999999999999967e31Initial program 59.6%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -7.69999999999999967e31 < F < 1e8Initial program 99.4%
div-inv99.5%
expm1-log1p-u73.2%
expm1-udef53.4%
Applied egg-rr53.4%
expm1-def73.2%
expm1-log1p99.5%
Simplified99.5%
if 1e8 < F Initial program 49.1%
inv-pow49.1%
Applied egg-rr49.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.4)
(+
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) (* x (pow (tan B) -1.0))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.4) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - (x * pow(tan(B), -1.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) :: tmp
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.4d0) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - (x * (tan(b) ** (-1.0d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.4) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x * Math.pow(Math.tan(B), -1.0));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.4: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x * math.pow(math.tan(B), -1.0)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * (tan(B) ^ -1.0))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.4) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x * (tan(B) ^ -1.0)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], 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 * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[Power[N[Tan[B], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot {\tan B}^{-1}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.9%
Taylor expanded in F around -inf 97.7%
+-commutative97.7%
unsub-neg97.7%
un-div-inv97.7%
Applied egg-rr97.7%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Taylor expanded in F around 0 98.1%
if 1.3999999999999999 < F Initial program 49.1%
inv-pow49.1%
Applied egg-rr49.1%
Taylor expanded in F around inf 99.7%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.48)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (* x (pow (tan B) -1.0))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.48) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x * pow(tan(B), -1.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) :: tmp
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.48d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x * (tan(b) ** (-1.0d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.48) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x * Math.pow(Math.tan(B), -1.0));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.48: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x * math.pow(math.tan(B), -1.0)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.48) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * (tan(B) ^ -1.0))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.48) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x * (tan(B) ^ -1.0)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.48], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[Power[N[Tan[B], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.48:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot {\tan B}^{-1}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.9%
Taylor expanded in F around -inf 97.7%
+-commutative97.7%
unsub-neg97.7%
un-div-inv97.7%
Applied egg-rr97.7%
if -1.3999999999999999 < F < 1.48Initial program 99.4%
Taylor expanded in F around 0 98.1%
div-inv98.3%
clear-num98.2%
Applied egg-rr98.2%
if 1.48 < F Initial program 49.1%
inv-pow49.1%
Applied egg-rr49.1%
Taylor expanded in F around inf 99.7%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.1e+16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.22e-93)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.00285)
(- (/ (/ F B) (sqrt (fma 2.0 x 2.0))) t_0)
(- (/ 1.0 (sin B)) (* x (pow (tan B) -1.0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.1e+16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.22e-93) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.00285) {
tmp = ((F / B) / sqrt(fma(2.0, x, 2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - (x * pow(tan(B), -1.0));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.1e+16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.22e-93) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.00285) tmp = Float64(Float64(Float64(F / B) / sqrt(fma(2.0, x, 2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * (tan(B) ^ -1.0))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.1e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.22e-93], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(N[(N[(F / B), $MachinePrecision] / N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[Power[N[Tan[B], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -1.22 \cdot 10^{-93}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;\frac{\frac{F}{B}}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot {\tan B}^{-1}\\
\end{array}
\end{array}
if F < -3.1e16Initial program 60.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -3.1e16 < F < -1.21999999999999998e-93Initial program 99.5%
Taylor expanded in B around 0 90.6%
if -1.21999999999999998e-93 < F < 0.0028500000000000001Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 92.6%
+-commutative92.6%
unsub-neg92.6%
sqrt-div92.6%
metadata-eval92.6%
un-div-inv92.6%
+-commutative92.6%
fma-def92.6%
un-div-inv92.8%
Applied egg-rr92.8%
if 0.0028500000000000001 < F Initial program 49.8%
inv-pow49.8%
Applied egg-rr49.8%
Taylor expanded in F around inf 98.5%
Final simplification96.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.4)
(+ (* x (/ -1.0 (tan B))) (/ F (/ (sin B) (sqrt 0.5))))
(- (/ 1.0 (sin B)) (* x (pow (tan B) -1.0))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.4) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) / sqrt(0.5)));
} else {
tmp = (1.0 / sin(B)) - (x * pow(tan(B), -1.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) :: tmp
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.4d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) / sqrt(0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x * (tan(b) ** (-1.0d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.4) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) / Math.sqrt(0.5)));
} else {
tmp = (1.0 / Math.sin(B)) - (x * Math.pow(Math.tan(B), -1.0));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.4: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) / math.sqrt(0.5))) else: tmp = (1.0 / math.sin(B)) - (x * math.pow(math.tan(B), -1.0)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.4) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) / sqrt(0.5)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * (tan(B) ^ -1.0))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.4) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) / sqrt(0.5))); else tmp = (1.0 / sin(B)) - (x * (tan(B) ^ -1.0)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[Power[N[Tan[B], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot {\tan B}^{-1}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.9%
Taylor expanded in F around -inf 97.7%
+-commutative97.7%
unsub-neg97.7%
un-div-inv97.7%
Applied egg-rr97.7%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Taylor expanded in F around 0 98.1%
Taylor expanded in x around 0 98.2%
associate-/l*98.1%
Simplified98.1%
if 1.3999999999999999 < F Initial program 49.1%
inv-pow49.1%
Applied egg-rr49.1%
Taylor expanded in F around inf 99.7%
Final simplification98.4%
(FPCore (F B x)
:precision binary64
(if (<= F -7.7e+31)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 0.00285)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)))
(- (/ 1.0 (sin B)) (* x (pow (tan B) -1.0))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.7e+31) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 0.00285) {
tmp = (x * (-1.0 / tan(B))) + (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(B)) - (x * pow(tan(B), -1.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) :: tmp
if (f <= (-7.7d+31)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 0.00285d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x * (tan(b) ** (-1.0d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.7e+31) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 0.00285) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x * Math.pow(Math.tan(B), -1.0));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.7e+31: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 0.00285: tmp = (x * (-1.0 / math.tan(B))) + (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x * math.pow(math.tan(B), -1.0)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.7e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 0.00285) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * (tan(B) ^ -1.0))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.7e+31) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 0.00285) tmp = (x * (-1.0 / tan(B))) + (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) - (x * (tan(B) ^ -1.0)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.7e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[Power[N[Tan[B], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.7 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot {\tan B}^{-1}\\
\end{array}
\end{array}
if F < -7.69999999999999967e31Initial program 59.6%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -7.69999999999999967e31 < F < 0.0028500000000000001Initial program 99.4%
Taylor expanded in B around 0 89.1%
if 0.0028500000000000001 < F Initial program 49.8%
inv-pow49.8%
Applied egg-rr49.8%
Taylor expanded in F around inf 98.5%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -7.7e+31)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 0.00285)
(+ t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)))
(+ (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -7.7e+31) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 0.00285) {
tmp = t_0 + (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(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 * ((-1.0d0) / tan(b))
if (f <= (-7.7d+31)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 0.00285d0) then
tmp = t_0 + (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) + t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -7.7e+31) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 0.00285) {
tmp = t_0 + (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) + t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -7.7e+31: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 0.00285: tmp = t_0 + (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) + t_0 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -7.7e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 0.00285) tmp = Float64(t_0 + Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) + t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -7.7e+31) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 0.00285) tmp = t_0 + (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) + t_0; 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, -7.7e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(t$95$0 + N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -7.7 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;t_0 + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + t_0\\
\end{array}
\end{array}
if F < -7.69999999999999967e31Initial program 59.6%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -7.69999999999999967e31 < F < 0.0028500000000000001Initial program 99.4%
Taylor expanded in B around 0 89.1%
if 0.0028500000000000001 < F Initial program 49.8%
Taylor expanded in F around inf 98.5%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -3.1e+16)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.45e-93)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.00285)
(+ t_0 (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(+ (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -3.1e+16) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.45e-93) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.00285) {
tmp = t_0 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / sin(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 * ((-1.0d0) / tan(b))
if (f <= (-3.1d+16)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.45d-93)) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.00285d0) then
tmp = t_0 + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else
tmp = (1.0d0 / sin(b)) + t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -3.1e+16) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.45e-93) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.00285) {
tmp = t_0 + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) + t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -3.1e+16: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.45e-93: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.00285: tmp = t_0 + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) else: tmp = (1.0 / math.sin(B)) + t_0 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -3.1e+16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.45e-93) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.00285) tmp = Float64(t_0 + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) + t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -3.1e+16) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.45e-93) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.00285) tmp = t_0 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); else tmp = (1.0 / sin(B)) + t_0; 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, -3.1e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.45e-93], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(t$95$0 + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.45 \cdot 10^{-93}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;t_0 + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + t_0\\
\end{array}
\end{array}
if F < -3.1e16Initial program 60.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -3.1e16 < F < -1.4499999999999999e-93Initial program 99.5%
Taylor expanded in B around 0 90.6%
if -1.4499999999999999e-93 < F < 0.0028500000000000001Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 92.6%
if 0.0028500000000000001 < F Initial program 49.8%
Taylor expanded in F around inf 98.5%
Final simplification95.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.001)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 0.00285)
(+ t_0 (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(+ (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.001) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 0.00285) {
tmp = t_0 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / sin(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 * ((-1.0d0) / tan(b))
if (f <= (-0.001d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 0.00285d0) then
tmp = t_0 + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else
tmp = (1.0d0 / sin(b)) + t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.001) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 0.00285) {
tmp = t_0 + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) + t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.001: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 0.00285: tmp = t_0 + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) else: tmp = (1.0 / math.sin(B)) + t_0 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.001) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 0.00285) tmp = Float64(t_0 + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) + t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.001) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 0.00285) tmp = t_0 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); else tmp = (1.0 / sin(B)) + t_0; 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, -0.001], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(t$95$0 + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.001:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;t_0 + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + t_0\\
\end{array}
\end{array}
if F < -1e-3Initial program 62.4%
Taylor expanded in F around -inf 96.5%
+-commutative96.5%
unsub-neg96.5%
un-div-inv96.6%
Applied egg-rr96.6%
if -1e-3 < F < 0.0028500000000000001Initial program 99.4%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 89.2%
if 0.0028500000000000001 < F Initial program 49.8%
Taylor expanded in F around inf 98.5%
Final simplification93.7%
(FPCore (F B x)
:precision binary64
(if (<= F -3.1e+16)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.15e-251)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 1.1e-42)
(/ (- x) (tan B))
(if (<= F 9.8e-14)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e+16) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.15e-251) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.1e-42) {
tmp = -x / tan(B);
} else if (F <= 9.8e-14) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / 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 <= (-3.1d+16)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.15d-251)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 1.1d-42) then
tmp = -x / tan(b)
else if (f <= 9.8d-14) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e+16) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.15e-251) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.1e-42) {
tmp = -x / Math.tan(B);
} else if (F <= 9.8e-14) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e+16: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.15e-251: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 1.1e-42: tmp = -x / math.tan(B) elif F <= 9.8e-14: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e+16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.15e-251) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.1e-42) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 9.8e-14) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e+16) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.15e-251) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 1.1e-42) tmp = -x / tan(B); elseif (F <= 9.8e-14) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-251], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-42], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.8e-14], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-251}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-42}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 9.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -3.1e16Initial program 60.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -3.1e16 < F < -1.15000000000000009e-251Initial program 99.5%
Taylor expanded in B around 0 88.9%
Taylor expanded in B around 0 74.5%
if -1.15000000000000009e-251 < F < 1.10000000000000003e-42Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 81.7%
associate-/l*81.7%
tan-quot81.8%
expm1-log1p-u56.5%
expm1-udef27.0%
Applied egg-rr27.0%
expm1-def56.5%
expm1-log1p81.8%
Simplified81.8%
if 1.10000000000000003e-42 < F < 9.79999999999999989e-14Initial program 99.0%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 99.5%
if 9.79999999999999989e-14 < F Initial program 52.5%
Taylor expanded in F around inf 94.9%
Final simplification89.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ F (/ (sin B) (sqrt 0.5))) (/ x B))))
(if (<= F -0.0136)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -9.5e-252)
t_0
(if (<= F 9.2e-93)
(/ (- x) (tan B))
(if (<= F 0.042) t_0 (+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = (F / (sin(B) / sqrt(0.5))) - (x / B);
double tmp;
if (F <= -0.0136) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -9.5e-252) {
tmp = t_0;
} else if (F <= 9.2e-93) {
tmp = -x / tan(B);
} else if (F <= 0.042) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / 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) :: t_0
real(8) :: tmp
t_0 = (f / (sin(b) / sqrt(0.5d0))) - (x / b)
if (f <= (-0.0136d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-9.5d-252)) then
tmp = t_0
else if (f <= 9.2d-93) then
tmp = -x / tan(b)
else if (f <= 0.042d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / (Math.sin(B) / Math.sqrt(0.5))) - (x / B);
double tmp;
if (F <= -0.0136) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -9.5e-252) {
tmp = t_0;
} else if (F <= 9.2e-93) {
tmp = -x / Math.tan(B);
} else if (F <= 0.042) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = (F / (math.sin(B) / math.sqrt(0.5))) - (x / B) tmp = 0 if F <= -0.0136: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -9.5e-252: tmp = t_0 elif F <= 9.2e-93: tmp = -x / math.tan(B) elif F <= 0.042: tmp = t_0 else: tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - Float64(x / B)) tmp = 0.0 if (F <= -0.0136) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -9.5e-252) tmp = t_0; elseif (F <= 9.2e-93) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.042) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / (sin(B) / sqrt(0.5))) - (x / B); tmp = 0.0; if (F <= -0.0136) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -9.5e-252) tmp = t_0; elseif (F <= 9.2e-93) tmp = -x / tan(B); elseif (F <= 0.042) tmp = t_0; else tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0136], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-252], t$95$0, If[LessEqual[F, 9.2e-93], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.042], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.0136:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-252}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.042:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -0.0135999999999999992Initial program 61.9%
Taylor expanded in F around -inf 97.7%
+-commutative97.7%
unsub-neg97.7%
un-div-inv97.7%
Applied egg-rr97.7%
if -0.0135999999999999992 < F < -9.4999999999999993e-252 or 9.1999999999999993e-93 < F < 0.0420000000000000026Initial program 99.3%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in x around 0 99.4%
rem-square-sqrt99.3%
unpow299.3%
+-commutative99.3%
unpow299.3%
unpow299.3%
rem-square-sqrt99.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in B around 0 85.3%
Taylor expanded in F around 0 82.9%
associate-/l*82.7%
Simplified82.7%
if -9.4999999999999993e-252 < F < 9.1999999999999993e-93Initial program 99.5%
Taylor expanded in F around -inf 38.7%
Taylor expanded in x around inf 84.7%
associate-/l*84.7%
tan-quot84.8%
expm1-log1p-u60.0%
expm1-udef28.5%
Applied egg-rr28.5%
expm1-def60.0%
expm1-log1p84.8%
Simplified84.8%
if 0.0420000000000000026 < F Initial program 49.1%
Taylor expanded in F around inf 99.7%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (* F (sqrt 0.5)) (sin B)) (/ x B))))
(if (<= F -0.23)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.15e-251)
t_0
(if (<= F 9.5e-93)
(/ (- x) (tan B))
(if (<= F 0.066) t_0 (+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) / sin(B)) - (x / B);
double tmp;
if (F <= -0.23) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.15e-251) {
tmp = t_0;
} else if (F <= 9.5e-93) {
tmp = -x / tan(B);
} else if (F <= 0.066) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / 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) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) / sin(b)) - (x / b)
if (f <= (-0.23d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.15d-251)) then
tmp = t_0
else if (f <= 9.5d-93) then
tmp = -x / tan(b)
else if (f <= 0.066d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) / Math.sin(B)) - (x / B);
double tmp;
if (F <= -0.23) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.15e-251) {
tmp = t_0;
} else if (F <= 9.5e-93) {
tmp = -x / Math.tan(B);
} else if (F <= 0.066) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) / math.sin(B)) - (x / B) tmp = 0 if F <= -0.23: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.15e-251: tmp = t_0 elif F <= 9.5e-93: tmp = -x / math.tan(B) elif F <= 0.066: tmp = t_0 else: tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -0.23) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.15e-251) tmp = t_0; elseif (F <= 9.5e-93) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.066) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) / sin(B)) - (x / B); tmp = 0.0; if (F <= -0.23) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.15e-251) tmp = t_0; elseif (F <= 9.5e-93) tmp = -x / tan(B); elseif (F <= 0.066) tmp = t_0; else tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-251], t$95$0, If[LessEqual[F, 9.5e-93], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.066], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.23:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-251}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-93}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.066:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -0.23000000000000001Initial program 61.9%
Taylor expanded in F around -inf 97.7%
+-commutative97.7%
unsub-neg97.7%
un-div-inv97.7%
Applied egg-rr97.7%
if -0.23000000000000001 < F < -1.15000000000000009e-251 or 9.5000000000000001e-93 < F < 0.066000000000000003Initial program 99.3%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in x around 0 99.4%
rem-square-sqrt99.3%
unpow299.3%
+-commutative99.3%
unpow299.3%
unpow299.3%
rem-square-sqrt99.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in B around 0 85.3%
Taylor expanded in F around 0 82.9%
*-commutative82.9%
Simplified82.9%
if -1.15000000000000009e-251 < F < 9.5000000000000001e-93Initial program 99.5%
Taylor expanded in F around -inf 38.7%
Taylor expanded in x around inf 84.7%
associate-/l*84.7%
tan-quot84.8%
expm1-log1p-u60.0%
expm1-udef28.5%
Applied egg-rr28.5%
expm1-def60.0%
expm1-log1p84.8%
Simplified84.8%
if 0.066000000000000003 < F Initial program 49.1%
Taylor expanded in F around inf 99.7%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -3.1e+16)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.15e-251)
(- (* t_0 (/ F B)) (/ x B))
(if (<= F 1.25e-43)
(/ (- x) (tan B))
(if (<= F 0.00285)
(- (* t_0 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -3.1e+16) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.15e-251) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= 1.25e-43) {
tmp = -x / tan(B);
} else if (F <= 0.00285) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-3.1d+16)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.15d-251)) then
tmp = (t_0 * (f / b)) - (x / b)
else if (f <= 1.25d-43) then
tmp = -x / tan(b)
else if (f <= 0.00285d0) then
tmp = (t_0 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -3.1e+16) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.15e-251) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= 1.25e-43) {
tmp = -x / Math.tan(B);
} else if (F <= 0.00285) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -3.1e+16: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.15e-251: tmp = (t_0 * (F / B)) - (x / B) elif F <= 1.25e-43: tmp = -x / math.tan(B) elif F <= 0.00285: tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -3.1e+16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.15e-251) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.25e-43) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.00285) tmp = Float64(Float64(t_0 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -3.1e+16) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.15e-251) tmp = (t_0 * (F / B)) - (x / B); elseif (F <= 1.25e-43) tmp = -x / tan(B); elseif (F <= 0.00285) tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -3.1e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-251], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-43], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(N[(t$95$0 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-251}:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-43}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.1e16Initial program 60.2%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -3.1e16 < F < -1.15000000000000009e-251Initial program 99.5%
Taylor expanded in B around 0 88.9%
Taylor expanded in B around 0 74.5%
if -1.15000000000000009e-251 < F < 1.25000000000000005e-43Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 81.7%
associate-/l*81.7%
tan-quot81.8%
expm1-log1p-u56.5%
expm1-udef27.0%
Applied egg-rr27.0%
expm1-def56.5%
expm1-log1p81.8%
Simplified81.8%
if 1.25000000000000005e-43 < F < 0.0028500000000000001Initial program 98.8%
Taylor expanded in B around 0 89.0%
Taylor expanded in B around 0 70.8%
if 0.0028500000000000001 < F Initial program 49.8%
Taylor expanded in B around 0 30.5%
Taylor expanded in F around inf 78.2%
Final simplification83.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B)))
(t_1 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -1.35e+227)
t_0
(if (<= F -1.7e+144)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -3.1e+16)
t_0
(if (<= F -1.15e-251)
(- (* t_1 (/ F B)) (/ x B))
(if (<= F 5.5e-44)
(/ (- x) (tan B))
(if (<= F 0.00285)
(- (* t_1 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double t_1 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.35e+227) {
tmp = t_0;
} else if (F <= -1.7e+144) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -3.1e+16) {
tmp = t_0;
} else if (F <= -1.15e-251) {
tmp = (t_1 * (F / B)) - (x / B);
} else if (F <= 5.5e-44) {
tmp = -x / tan(B);
} else if (F <= 0.00285) {
tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
t_1 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-1.35d+227)) then
tmp = t_0
else if (f <= (-1.7d+144)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-3.1d+16)) then
tmp = t_0
else if (f <= (-1.15d-251)) then
tmp = (t_1 * (f / b)) - (x / b)
else if (f <= 5.5d-44) then
tmp = -x / tan(b)
else if (f <= 0.00285d0) then
tmp = (t_1 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double t_1 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.35e+227) {
tmp = t_0;
} else if (F <= -1.7e+144) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -3.1e+16) {
tmp = t_0;
} else if (F <= -1.15e-251) {
tmp = (t_1 * (F / B)) - (x / B);
} else if (F <= 5.5e-44) {
tmp = -x / Math.tan(B);
} else if (F <= 0.00285) {
tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) t_1 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -1.35e+227: tmp = t_0 elif F <= -1.7e+144: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -3.1e+16: tmp = t_0 elif F <= -1.15e-251: tmp = (t_1 * (F / B)) - (x / B) elif F <= 5.5e-44: tmp = -x / math.tan(B) elif F <= 0.00285: tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_1 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -1.35e+227) tmp = t_0; elseif (F <= -1.7e+144) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -3.1e+16) tmp = t_0; elseif (F <= -1.15e-251) tmp = Float64(Float64(t_1 * Float64(F / B)) - Float64(x / B)); elseif (F <= 5.5e-44) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.00285) tmp = Float64(Float64(t_1 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); t_1 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -1.35e+227) tmp = t_0; elseif (F <= -1.7e+144) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -3.1e+16) tmp = t_0; elseif (F <= -1.15e-251) tmp = (t_1 * (F / B)) - (x / B); elseif (F <= 5.5e-44) tmp = -x / tan(B); elseif (F <= 0.00285) tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -1.35e+227], t$95$0, If[LessEqual[F, -1.7e+144], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.1e+16], t$95$0, If[LessEqual[F, -1.15e-251], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-44], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(N[(t$95$1 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{+227}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{+144}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-251}:\\
\;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;t_1 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.3499999999999999e227 or -1.7e144 < F < -3.1e16Initial program 67.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 90.0%
if -1.3499999999999999e227 < F < -1.7e144Initial program 45.5%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 90.3%
if -3.1e16 < F < -1.15000000000000009e-251Initial program 99.5%
Taylor expanded in B around 0 88.9%
Taylor expanded in B around 0 74.5%
if -1.15000000000000009e-251 < F < 5.49999999999999993e-44Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 81.7%
associate-/l*81.7%
tan-quot81.8%
expm1-log1p-u56.5%
expm1-udef27.0%
Applied egg-rr27.0%
expm1-def56.5%
expm1-log1p81.8%
Simplified81.8%
if 5.49999999999999993e-44 < F < 0.0028500000000000001Initial program 98.8%
Taylor expanded in B around 0 89.0%
Taylor expanded in B around 0 70.8%
if 0.0028500000000000001 < F Initial program 49.8%
Taylor expanded in B around 0 30.5%
Taylor expanded in F around inf 78.2%
Final simplification81.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B)))
(t_1
(-
(+
(* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B))
(* 0.3333333333333333 (* B x)))
(/ x B))))
(if (<= F -1.2e+228)
t_0
(if (<= F -1.7e+144)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -0.005)
t_0
(if (<= F -1.15e-251)
t_1
(if (<= F 4.2e-44)
(/ (- x) (tan B))
(if (<= F 0.0022) t_1 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double t_1 = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (B * x))) - (x / B);
double tmp;
if (F <= -1.2e+228) {
tmp = t_0;
} else if (F <= -1.7e+144) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -0.005) {
tmp = t_0;
} else if (F <= -1.15e-251) {
tmp = t_1;
} else if (F <= 4.2e-44) {
tmp = -x / tan(B);
} else if (F <= 0.0022) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
t_1 = ((sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) + (0.3333333333333333d0 * (b * x))) - (x / b)
if (f <= (-1.2d+228)) then
tmp = t_0
else if (f <= (-1.7d+144)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-0.005d0)) then
tmp = t_0
else if (f <= (-1.15d-251)) then
tmp = t_1
else if (f <= 4.2d-44) then
tmp = -x / tan(b)
else if (f <= 0.0022d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double t_1 = ((Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (B * x))) - (x / B);
double tmp;
if (F <= -1.2e+228) {
tmp = t_0;
} else if (F <= -1.7e+144) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -0.005) {
tmp = t_0;
} else if (F <= -1.15e-251) {
tmp = t_1;
} else if (F <= 4.2e-44) {
tmp = -x / Math.tan(B);
} else if (F <= 0.0022) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) t_1 = ((math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (B * x))) - (x / B) tmp = 0 if F <= -1.2e+228: tmp = t_0 elif F <= -1.7e+144: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -0.005: tmp = t_0 elif F <= -1.15e-251: tmp = t_1 elif F <= 4.2e-44: tmp = -x / math.tan(B) elif F <= 0.0022: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_1 = Float64(Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) + Float64(0.3333333333333333 * Float64(B * x))) - Float64(x / B)) tmp = 0.0 if (F <= -1.2e+228) tmp = t_0; elseif (F <= -1.7e+144) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -0.005) tmp = t_0; elseif (F <= -1.15e-251) tmp = t_1; elseif (F <= 4.2e-44) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.0022) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); t_1 = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (B * x))) - (x / B); tmp = 0.0; if (F <= -1.2e+228) tmp = t_0; elseif (F <= -1.7e+144) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -0.005) tmp = t_0; elseif (F <= -1.15e-251) tmp = t_1; elseif (F <= 4.2e-44) tmp = -x / tan(B); elseif (F <= 0.0022) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2e+228], t$95$0, If[LessEqual[F, -1.7e+144], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.005], t$95$0, If[LessEqual[F, -1.15e-251], t$95$1, If[LessEqual[F, 4.2e-44], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0022], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_1 := \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\right) - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{+228}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{+144}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -0.005:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-251}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.0022:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.19999999999999994e228 or -1.7e144 < F < -0.0050000000000000001Initial program 70.0%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 86.0%
if -1.19999999999999994e228 < F < -1.7e144Initial program 45.5%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 90.3%
if -0.0050000000000000001 < F < -1.15000000000000009e-251 or 4.20000000000000003e-44 < F < 0.00220000000000000013Initial program 99.3%
Taylor expanded in F around 0 98.5%
Taylor expanded in B around 0 83.8%
Taylor expanded in B around 0 73.0%
if -1.15000000000000009e-251 < F < 4.20000000000000003e-44Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 81.7%
associate-/l*81.7%
tan-quot81.8%
expm1-log1p-u56.5%
expm1-udef27.0%
Applied egg-rr27.0%
expm1-def56.5%
expm1-log1p81.8%
Simplified81.8%
if 0.00220000000000000013 < F Initial program 49.8%
Taylor expanded in B around 0 30.5%
Taylor expanded in F around inf 78.2%
Final simplification80.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2.3e+228)
t_0
(if (<= F -1.9e+144)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -3.1e+16)
t_0
(if (<= F -1.15e-251)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.7e-43)
(/ (- x) (tan B))
(if (<= F 0.00285)
(-
(+
(* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B))
(* 0.3333333333333333 (* B x)))
(/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2.3e+228) {
tmp = t_0;
} else if (F <= -1.9e+144) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -3.1e+16) {
tmp = t_0;
} else if (F <= -1.15e-251) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.7e-43) {
tmp = -x / tan(B);
} else if (F <= 0.00285) {
tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (B * x))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2.3d+228)) then
tmp = t_0
else if (f <= (-1.9d+144)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-3.1d+16)) then
tmp = t_0
else if (f <= (-1.15d-251)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.7d-43) then
tmp = -x / tan(b)
else if (f <= 0.00285d0) then
tmp = ((sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) + (0.3333333333333333d0 * (b * x))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -2.3e+228) {
tmp = t_0;
} else if (F <= -1.9e+144) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -3.1e+16) {
tmp = t_0;
} else if (F <= -1.15e-251) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.7e-43) {
tmp = -x / Math.tan(B);
} else if (F <= 0.00285) {
tmp = ((Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (B * x))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2.3e+228: tmp = t_0 elif F <= -1.9e+144: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -3.1e+16: tmp = t_0 elif F <= -1.15e-251: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.7e-43: tmp = -x / math.tan(B) elif F <= 0.00285: tmp = ((math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (B * x))) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.3e+228) tmp = t_0; elseif (F <= -1.9e+144) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -3.1e+16) tmp = t_0; elseif (F <= -1.15e-251) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.7e-43) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.00285) tmp = Float64(Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) + Float64(0.3333333333333333 * Float64(B * x))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2.3e+228) tmp = t_0; elseif (F <= -1.9e+144) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -3.1e+16) tmp = t_0; elseif (F <= -1.15e-251) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.7e-43) tmp = -x / tan(B); elseif (F <= 0.00285) tmp = ((sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) + (0.3333333333333333 * (B * x))) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.3e+228], t$95$0, If[LessEqual[F, -1.9e+144], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.1e+16], t$95$0, If[LessEqual[F, -1.15e-251], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-43], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.3 \cdot 10^{+228}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.9 \cdot 10^{+144}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-251}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-43}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;\left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.30000000000000013e228 or -1.90000000000000013e144 < F < -3.1e16Initial program 67.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 90.0%
if -2.30000000000000013e228 < F < -1.90000000000000013e144Initial program 45.5%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 90.3%
if -3.1e16 < F < -1.15000000000000009e-251Initial program 99.5%
Taylor expanded in B around 0 88.9%
Taylor expanded in B around 0 74.5%
if -1.15000000000000009e-251 < F < 4.7000000000000001e-43Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 81.7%
associate-/l*81.7%
tan-quot81.8%
expm1-log1p-u56.5%
expm1-udef27.0%
Applied egg-rr27.0%
expm1-def56.5%
expm1-log1p81.8%
Simplified81.8%
if 4.7000000000000001e-43 < F < 0.0028500000000000001Initial program 98.8%
Taylor expanded in F around 0 98.8%
Taylor expanded in B around 0 79.5%
Taylor expanded in B around 0 70.5%
if 0.0028500000000000001 < F Initial program 49.8%
Taylor expanded in B around 0 30.5%
Taylor expanded in F around inf 78.2%
Final simplification81.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B)))
(t_1 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -5.5e+227)
t_0
(if (<= F -1.7e+144)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -0.005)
t_0
(if (<= F -1.15e-251)
t_1
(if (<= F 7.2e-44)
(/ (- x) (tan B))
(if (<= F 0.00285) t_1 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double t_1 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -5.5e+227) {
tmp = t_0;
} else if (F <= -1.7e+144) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -0.005) {
tmp = t_0;
} else if (F <= -1.15e-251) {
tmp = t_1;
} else if (F <= 7.2e-44) {
tmp = -x / tan(B);
} else if (F <= 0.00285) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
t_1 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-5.5d+227)) then
tmp = t_0
else if (f <= (-1.7d+144)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-0.005d0)) then
tmp = t_0
else if (f <= (-1.15d-251)) then
tmp = t_1
else if (f <= 7.2d-44) then
tmp = -x / tan(b)
else if (f <= 0.00285d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double t_1 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -5.5e+227) {
tmp = t_0;
} else if (F <= -1.7e+144) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -0.005) {
tmp = t_0;
} else if (F <= -1.15e-251) {
tmp = t_1;
} else if (F <= 7.2e-44) {
tmp = -x / Math.tan(B);
} else if (F <= 0.00285) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) t_1 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -5.5e+227: tmp = t_0 elif F <= -1.7e+144: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -0.005: tmp = t_0 elif F <= -1.15e-251: tmp = t_1 elif F <= 7.2e-44: tmp = -x / math.tan(B) elif F <= 0.00285: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_1 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -5.5e+227) tmp = t_0; elseif (F <= -1.7e+144) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -0.005) tmp = t_0; elseif (F <= -1.15e-251) tmp = t_1; elseif (F <= 7.2e-44) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.00285) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); t_1 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -5.5e+227) tmp = t_0; elseif (F <= -1.7e+144) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -0.005) tmp = t_0; elseif (F <= -1.15e-251) tmp = t_1; elseif (F <= 7.2e-44) tmp = -x / tan(B); elseif (F <= 0.00285) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -5.5e+227], t$95$0, If[LessEqual[F, -1.7e+144], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.005], t$95$0, If[LessEqual[F, -1.15e-251], t$95$1, If[LessEqual[F, 7.2e-44], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_1 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -5.5 \cdot 10^{+227}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{+144}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -0.005:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-251}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.5000000000000001e227 or -1.7e144 < F < -0.0050000000000000001Initial program 70.0%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 86.0%
if -5.5000000000000001e227 < F < -1.7e144Initial program 45.5%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 90.3%
if -0.0050000000000000001 < F < -1.15000000000000009e-251 or 7.1999999999999998e-44 < F < 0.0028500000000000001Initial program 99.3%
Taylor expanded in F around 0 98.5%
Taylor expanded in B around 0 72.8%
if -1.15000000000000009e-251 < F < 7.1999999999999998e-44Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 81.7%
associate-/l*81.7%
tan-quot81.8%
expm1-log1p-u56.5%
expm1-udef27.0%
Applied egg-rr27.0%
expm1-def56.5%
expm1-log1p81.8%
Simplified81.8%
if 0.0028500000000000001 < F Initial program 49.8%
Taylor expanded in B around 0 30.5%
Taylor expanded in F around inf 78.2%
Final simplification80.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B)))
(t_1 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F -1.15e+226)
t_0
(if (<= F -2.1e+144)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -0.005)
t_0
(if (<= F -3e-252)
(- (* t_1 (/ F B)) (/ x B))
(if (<= F 7.2e-44)
(/ (- x) (tan B))
(if (<= F 0.00285)
(/ (- (* F t_1) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double t_1 = sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -1.15e+226) {
tmp = t_0;
} else if (F <= -2.1e+144) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -0.005) {
tmp = t_0;
} else if (F <= -3e-252) {
tmp = (t_1 * (F / B)) - (x / B);
} else if (F <= 7.2e-44) {
tmp = -x / tan(B);
} else if (F <= 0.00285) {
tmp = ((F * t_1) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
t_1 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
if (f <= (-1.15d+226)) then
tmp = t_0
else if (f <= (-2.1d+144)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-0.005d0)) then
tmp = t_0
else if (f <= (-3d-252)) then
tmp = (t_1 * (f / b)) - (x / b)
else if (f <= 7.2d-44) then
tmp = -x / tan(b)
else if (f <= 0.00285d0) then
tmp = ((f * t_1) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double t_1 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -1.15e+226) {
tmp = t_0;
} else if (F <= -2.1e+144) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -0.005) {
tmp = t_0;
} else if (F <= -3e-252) {
tmp = (t_1 * (F / B)) - (x / B);
} else if (F <= 7.2e-44) {
tmp = -x / Math.tan(B);
} else if (F <= 0.00285) {
tmp = ((F * t_1) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) t_1 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) tmp = 0 if F <= -1.15e+226: tmp = t_0 elif F <= -2.1e+144: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -0.005: tmp = t_0 elif F <= -3e-252: tmp = (t_1 * (F / B)) - (x / B) elif F <= 7.2e-44: tmp = -x / math.tan(B) elif F <= 0.00285: tmp = ((F * t_1) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_1 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) tmp = 0.0 if (F <= -1.15e+226) tmp = t_0; elseif (F <= -2.1e+144) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -0.005) tmp = t_0; elseif (F <= -3e-252) tmp = Float64(Float64(t_1 * Float64(F / B)) - Float64(x / B)); elseif (F <= 7.2e-44) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.00285) tmp = Float64(Float64(Float64(F * t_1) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); t_1 = sqrt((1.0 / (2.0 + (x * 2.0)))); tmp = 0.0; if (F <= -1.15e+226) tmp = t_0; elseif (F <= -2.1e+144) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -0.005) tmp = t_0; elseif (F <= -3e-252) tmp = (t_1 * (F / B)) - (x / B); elseif (F <= 7.2e-44) tmp = -x / tan(B); elseif (F <= 0.00285) tmp = ((F * t_1) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -1.15e+226], t$95$0, If[LessEqual[F, -2.1e+144], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.005], t$95$0, If[LessEqual[F, -3e-252], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e-44], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00285], N[(N[(N[(F * t$95$1), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_1 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{if}\;F \leq -1.15 \cdot 10^{+226}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{+144}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -0.005:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-252}:\\
\;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.00285:\\
\;\;\;\;\frac{F \cdot t_1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.14999999999999998e226 or -2.09999999999999996e144 < F < -0.0050000000000000001Initial program 70.0%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 86.0%
if -1.14999999999999998e226 < F < -2.09999999999999996e144Initial program 45.5%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 90.3%
if -0.0050000000000000001 < F < -2.99999999999999995e-252Initial program 99.4%
Taylor expanded in B around 0 87.9%
Taylor expanded in B around 0 74.4%
Taylor expanded in F around 0 73.4%
if -2.99999999999999995e-252 < F < 7.1999999999999998e-44Initial program 99.4%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 81.7%
associate-/l*81.7%
tan-quot81.8%
expm1-log1p-u56.5%
expm1-udef27.0%
Applied egg-rr27.0%
expm1-def56.5%
expm1-log1p81.8%
Simplified81.8%
if 7.1999999999999998e-44 < F < 0.0028500000000000001Initial program 98.8%
Taylor expanded in F around 0 98.8%
Taylor expanded in B around 0 70.2%
if 0.0028500000000000001 < F Initial program 49.8%
Taylor expanded in B around 0 30.5%
Taylor expanded in F around inf 78.2%
Final simplification80.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -1.15e+226)
t_0
(if (<= F -2.05e+144)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -7e-20)
t_0
(if (<= F 5e-12) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -1.15e+226) {
tmp = t_0;
} else if (F <= -2.05e+144) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -7e-20) {
tmp = t_0;
} else if (F <= 5e-12) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-1.15d+226)) then
tmp = t_0
else if (f <= (-2.05d+144)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-7d-20)) then
tmp = t_0
else if (f <= 5d-12) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -1.15e+226) {
tmp = t_0;
} else if (F <= -2.05e+144) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -7e-20) {
tmp = t_0;
} else if (F <= 5e-12) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -1.15e+226: tmp = t_0 elif F <= -2.05e+144: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -7e-20: tmp = t_0 elif F <= 5e-12: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -1.15e+226) tmp = t_0; elseif (F <= -2.05e+144) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -7e-20) tmp = t_0; elseif (F <= 5e-12) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -1.15e+226) tmp = t_0; elseif (F <= -2.05e+144) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -7e-20) tmp = t_0; elseif (F <= 5e-12) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.15e+226], t$95$0, If[LessEqual[F, -2.05e+144], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-20], t$95$0, If[LessEqual[F, 5e-12], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.15 \cdot 10^{+226}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{+144}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-12}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.14999999999999998e226 or -2.05000000000000001e144 < F < -7.00000000000000007e-20Initial program 71.7%
Taylor expanded in F around -inf 90.2%
Taylor expanded in B around 0 81.7%
if -1.14999999999999998e226 < F < -2.05000000000000001e144Initial program 45.5%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 90.3%
if -7.00000000000000007e-20 < F < 4.9999999999999997e-12Initial program 99.4%
Taylor expanded in F around -inf 36.1%
Taylor expanded in x around inf 69.6%
associate-/l*69.6%
tan-quot69.7%
expm1-log1p-u44.4%
expm1-udef24.6%
Applied egg-rr24.6%
expm1-def44.4%
expm1-log1p69.7%
Simplified69.7%
if 4.9999999999999997e-12 < F Initial program 51.2%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 76.3%
Final simplification75.7%
(FPCore (F B x) :precision binary64 (if (<= F -7e-20) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 5e-12) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7e-20) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5e-12) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7d-20)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5d-12) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7e-20) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5e-12) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7e-20: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5e-12: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7e-20) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5e-12) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7e-20) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5e-12) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7e-20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-12], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-12}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.00000000000000007e-20Initial program 63.9%
Taylor expanded in F around -inf 93.0%
Taylor expanded in B around 0 77.9%
if -7.00000000000000007e-20 < F < 4.9999999999999997e-12Initial program 99.4%
Taylor expanded in F around -inf 36.1%
Taylor expanded in x around inf 69.6%
associate-/l*69.6%
tan-quot69.7%
expm1-log1p-u44.4%
expm1-udef24.6%
Applied egg-rr24.6%
expm1-def44.4%
expm1-log1p69.7%
Simplified69.7%
if 4.9999999999999997e-12 < F Initial program 51.2%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 76.3%
Final simplification73.9%
(FPCore (F B x) :precision binary64 (if (<= F -7e-20) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.35e+217) (/ (- x) (tan B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7e-20) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.35e+217) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7d-20)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.35d+217) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7e-20) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.35e+217) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7e-20: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.35e+217: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7e-20) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.35e+217) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7e-20) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.35e+217) tmp = -x / tan(B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7e-20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e+217], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{+217}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.00000000000000007e-20Initial program 63.9%
Taylor expanded in F around -inf 93.0%
Taylor expanded in B around 0 77.9%
if -7.00000000000000007e-20 < F < 1.35000000000000001e217Initial program 88.9%
Taylor expanded in F around -inf 38.5%
Taylor expanded in x around inf 62.4%
associate-/l*62.3%
tan-quot62.4%
expm1-log1p-u36.9%
expm1-udef22.9%
Applied egg-rr22.9%
expm1-def36.9%
expm1-log1p62.4%
Simplified62.4%
if 1.35000000000000001e217 < F Initial program 25.7%
Taylor expanded in B around 0 13.6%
Taylor expanded in B around 0 13.6%
Taylor expanded in F around inf 67.7%
Final simplification67.4%
(FPCore (F B x) :precision binary64 (if (<= F -5.6e-67) (+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666))) (if (<= F 3e-43) (/ (- x) (sin B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.6e-67) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 3e-43) {
tmp = -x / sin(B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.6d-67)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 3d-43) then
tmp = -x / sin(b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.6e-67) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 3e-43) {
tmp = -x / Math.sin(B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.6e-67: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 3e-43: tmp = -x / math.sin(B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.6e-67) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 3e-43) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.6e-67) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 3e-43) tmp = -x / sin(B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.6e-67], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-43], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-43}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.60000000000000021e-67Initial program 68.2%
Taylor expanded in F around -inf 84.3%
Taylor expanded in B around 0 47.4%
if -5.60000000000000021e-67 < F < 3.00000000000000003e-43Initial program 99.4%
Taylor expanded in F around -inf 38.7%
Taylor expanded in x around inf 78.2%
Taylor expanded in B around 0 44.2%
if 3.00000000000000003e-43 < F Initial program 56.0%
Taylor expanded in B around 0 37.9%
Taylor expanded in B around 0 26.8%
Taylor expanded in F around inf 47.7%
Final simplification46.4%
(FPCore (F B x) :precision binary64 (if (<= F -7e-20) (+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666))) (if (<= F 2.5e+217) (/ (- x) (tan B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7e-20) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 2.5e+217) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7d-20)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 2.5d+217) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7e-20) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 2.5e+217) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7e-20: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 2.5e+217: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7e-20) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 2.5e+217) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7e-20) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 2.5e+217) tmp = -x / tan(B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7e-20], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e+217], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7 \cdot 10^{-20}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+217}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.00000000000000007e-20Initial program 63.9%
Taylor expanded in F around -inf 93.0%
Taylor expanded in B around 0 51.7%
if -7.00000000000000007e-20 < F < 2.50000000000000021e217Initial program 88.9%
Taylor expanded in F around -inf 38.5%
Taylor expanded in x around inf 62.4%
associate-/l*62.3%
tan-quot62.4%
expm1-log1p-u36.9%
expm1-udef22.9%
Applied egg-rr22.9%
expm1-def36.9%
expm1-log1p62.4%
Simplified62.4%
if 2.50000000000000021e217 < F Initial program 25.7%
Taylor expanded in B around 0 13.6%
Taylor expanded in B around 0 13.6%
Taylor expanded in F around inf 67.7%
Final simplification59.8%
(FPCore (F B x)
:precision binary64
(if (<= F -9.6e-113)
(/ (- -1.0 x) B)
(if (<= F 3e-44)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e-113) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-44) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.6d-113)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3d-44) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (x / b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e-113) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-44) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.6e-113: tmp = (-1.0 - x) / B elif F <= 3e-44: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.6e-113) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3e-44) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.6e-113) tmp = (-1.0 - x) / B; elseif (F <= 3e-44) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.6e-113], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3e-44], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.6 \cdot 10^{-113}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-44}:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.60000000000000049e-113Initial program 70.9%
Taylor expanded in F around -inf 79.5%
Taylor expanded in B around 0 44.6%
associate-*r/44.6%
distribute-lft-in44.6%
metadata-eval44.6%
neg-mul-144.6%
Simplified44.6%
if -9.60000000000000049e-113 < F < 3.0000000000000002e-44Initial program 99.4%
Taylor expanded in F around -inf 40.1%
Taylor expanded in x around inf 80.5%
Taylor expanded in B around 0 46.2%
if 3.0000000000000002e-44 < F Initial program 56.6%
Taylor expanded in B around 0 37.6%
Taylor expanded in B around 0 26.5%
Taylor expanded in F around inf 47.1%
Final simplification45.9%
(FPCore (F B x) :precision binary64 (if (<= F -2e-142) (/ (- -1.0 x) B) (if (<= F 2.6e-44) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-142) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.6e-44) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2d-142)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.6d-44) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2e-142) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.6e-44) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-142: tmp = (-1.0 - x) / B elif F <= 2.6e-44: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-142) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.6e-44) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2e-142) tmp = (-1.0 - x) / B; elseif (F <= 2.6e-44) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-142], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.6e-44], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-142}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-44}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.0000000000000001e-142Initial program 72.1%
Taylor expanded in F around -inf 79.3%
Taylor expanded in B around 0 44.9%
associate-*r/44.9%
distribute-lft-in44.9%
metadata-eval44.9%
neg-mul-144.9%
Simplified44.9%
if -2.0000000000000001e-142 < F < 2.5999999999999998e-44Initial program 99.4%
Taylor expanded in F around -inf 38.3%
Taylor expanded in B around 0 19.8%
associate-*r/19.8%
distribute-lft-in19.8%
metadata-eval19.8%
neg-mul-119.8%
Simplified19.8%
Taylor expanded in x around inf 45.9%
associate-*r/45.9%
neg-mul-145.9%
Simplified45.9%
if 2.5999999999999998e-44 < F Initial program 56.6%
Taylor expanded in B around 0 37.6%
Taylor expanded in B around 0 26.5%
Taylor expanded in F around inf 47.1%
Final simplification45.9%
(FPCore (F B x) :precision binary64 (if (<= F -5.9e-148) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.9e-148) {
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 <= (-5.9d-148)) 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 <= -5.9e-148) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.9e-148: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.9e-148) 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 <= -5.9e-148) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.9e-148], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.9 \cdot 10^{-148}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -5.90000000000000016e-148Initial program 72.1%
Taylor expanded in F around -inf 79.3%
Taylor expanded in B around 0 44.9%
associate-*r/44.9%
distribute-lft-in44.9%
metadata-eval44.9%
neg-mul-144.9%
Simplified44.9%
if -5.90000000000000016e-148 < F Initial program 78.0%
Taylor expanded in F around -inf 40.3%
Taylor expanded in B around 0 22.2%
associate-*r/22.2%
distribute-lft-in22.2%
metadata-eval22.2%
neg-mul-122.2%
Simplified22.2%
Taylor expanded in x around inf 35.7%
associate-*r/35.7%
neg-mul-135.7%
Simplified35.7%
Final simplification39.2%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 75.8%
Taylor expanded in F around -inf 55.0%
Taylor expanded in B around 0 30.7%
associate-*r/30.7%
distribute-lft-in30.7%
metadata-eval30.7%
neg-mul-130.7%
Simplified30.7%
Taylor expanded in x around inf 31.2%
associate-*r/31.2%
neg-mul-131.2%
Simplified31.2%
Final simplification31.2%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 75.8%
Taylor expanded in F around -inf 55.0%
Taylor expanded in B around 0 30.7%
associate-*r/30.7%
distribute-lft-in30.7%
metadata-eval30.7%
neg-mul-130.7%
Simplified30.7%
Taylor expanded in x around 0 11.0%
Final simplification11.0%
herbie shell --seed 2023333
(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))))))