
(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 22 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 -1.55e+21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e+46)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) (* (/ x (sin B)) (cos B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.55e+21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e+46) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - ((x / sin(B)) * cos(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.55e+21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e+46) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.55e+21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e+46], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.55 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{+46}:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\
\end{array}
\end{array}
if F < -1.55e21Initial program 50.3%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -1.55e21 < F < 9.9999999999999999e45Initial program 98.2%
Simplified99.6%
if 9.9999999999999999e45 < F Initial program 55.1%
Simplified70.8%
tan-quot70.8%
associate-/r/70.9%
Applied egg-rr70.9%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -5e+32)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 23000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(- (/ 1.0 (sin B)) (* (/ x (sin B)) (cos B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e+32) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 23000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(B));
} else {
tmp = (1.0 / sin(B)) - ((x / sin(B)) * cos(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 <= (-5d+32)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 23000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - ((x / sin(b)) * cos(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5e+32) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 23000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - ((x / Math.sin(B)) * Math.cos(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e+32: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 23000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - ((x / math.sin(B)) * math.cos(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e+32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 23000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e+32) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 23000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (1.0 / sin(B)) - ((x / sin(B)) * cos(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 23000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 23000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\
\end{array}
\end{array}
if F < -4.9999999999999997e32Initial program 50.3%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -4.9999999999999997e32 < F < 2.3e7Initial program 99.4%
Taylor expanded in x around 0 99.5%
if 2.3e7 < F Initial program 57.5%
Simplified74.1%
tan-quot74.1%
associate-/r/74.1%
Applied egg-rr74.1%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.6e+21)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 38000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ -1.0 (/ (tan B) x)))
(- (/ 1.0 (sin B)) (* (/ x (sin B)) (cos B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e+21) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 38000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (tan(B) / x));
} else {
tmp = (1.0 / sin(B)) - ((x / sin(B)) * cos(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.6d+21)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 38000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + ((-1.0d0) / (tan(b) / x))
else
tmp = (1.0d0 / sin(b)) - ((x / sin(b)) * cos(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e+21) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 38000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (Math.tan(B) / x));
} else {
tmp = (1.0 / Math.sin(B)) - ((x / Math.sin(B)) * Math.cos(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.6e+21: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 38000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (math.tan(B) / x)) else: tmp = (1.0 / math.sin(B)) - ((x / math.sin(B)) * math.cos(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.6e+21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 38000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(-1.0 / Float64(tan(B) / x))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.6e+21) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 38000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (-1.0 / (tan(B) / x)); else tmp = (1.0 / sin(B)) - ((x / sin(B)) * cos(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.6e+21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 38000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.6 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 38000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\
\end{array}
\end{array}
if F < -1.6e21Initial program 50.3%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -1.6e21 < F < 3.8e7Initial program 99.4%
div-inv99.6%
clear-num99.5%
Applied egg-rr99.5%
if 3.8e7 < F Initial program 57.5%
Simplified74.1%
tan-quot74.1%
associate-/r/74.1%
Applied egg-rr74.1%
Taylor expanded in F around inf 99.9%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -0.102)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 100000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) (* (/ x (sin B)) (cos B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.102) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - ((x / sin(B)) * cos(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 <= (-0.102d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 100000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - ((x / sin(b)) * cos(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.102) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 100000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - ((x / Math.sin(B)) * Math.cos(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.102: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 100000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - ((x / math.sin(B)) * math.cos(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.102) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.102) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 100000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - ((x / sin(B)) * cos(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.102], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.102:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\
\end{array}
\end{array}
if F < -0.101999999999999993Initial program 53.9%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -0.101999999999999993 < F < 1e8Initial program 99.4%
if 1e8 < F Initial program 57.5%
Simplified74.1%
tan-quot74.1%
associate-/r/74.1%
Applied egg-rr74.1%
Taylor expanded in F around inf 99.9%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))))
(if (<= F -8.8e-32)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.25e-186)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) (/ x B))
(if (<= F 3.1e-228)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 0.47)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (* F t_0)) (/ x B))
(- t_0 (* (/ x (sin B)) (cos B)))))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double tmp;
if (F <= -8.8e-32) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.25e-186) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / B);
} else if (F <= 3.1e-228) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 0.47) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * t_0)) - (x / B);
} else {
tmp = t_0 - ((x / sin(B)) * cos(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)
if (f <= (-8.8d-32)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.25d-186)) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - (x / b)
else if (f <= 3.1d-228) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 0.47d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f * t_0)) - (x / b)
else
tmp = t_0 - ((x / sin(b)) * cos(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);
double tmp;
if (F <= -8.8e-32) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.25e-186) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - (x / B);
} else if (F <= 3.1e-228) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 0.47) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * t_0)) - (x / B);
} else {
tmp = t_0 - ((x / Math.sin(B)) * Math.cos(B));
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) tmp = 0 if F <= -8.8e-32: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.25e-186: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - (x / B) elif F <= 3.1e-228: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 0.47: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * t_0)) - (x / B) else: tmp = t_0 - ((x / math.sin(B)) * math.cos(B)) return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -8.8e-32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.25e-186) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - Float64(x / B)); elseif (F <= 3.1e-228) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 0.47) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F * t_0)) - Float64(x / B)); else tmp = Float64(t_0 - Float64(Float64(x / sin(B)) * cos(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); tmp = 0.0; if (F <= -8.8e-32) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.25e-186) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / B); elseif (F <= 3.1e-228) tmp = (cos(B) * -x) / sin(B); elseif (F <= 0.47) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F * t_0)) - (x / B); else tmp = t_0 - ((x / sin(B)) * cos(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e-32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e-186], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-228], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.47], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-186}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-228}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.47:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot t\_0\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 - \frac{x}{\sin B} \cdot \cos B\\
\end{array}
\end{array}
if F < -8.7999999999999999e-32Initial program 55.5%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -8.7999999999999999e-32 < F < -1.25e-186Initial program 99.5%
Taylor expanded in B around 0 90.7%
Taylor expanded in F around 0 90.7%
associate-*l/90.8%
associate-*r/90.8%
Simplified90.8%
if -1.25e-186 < F < 3.0999999999999998e-228Initial program 99.5%
Taylor expanded in F around -inf 47.9%
Taylor expanded in x around inf 92.5%
associate-*r/92.5%
neg-mul-192.5%
distribute-rgt-neg-in92.5%
Simplified92.5%
if 3.0999999999999998e-228 < F < 0.46999999999999997Initial program 99.4%
Taylor expanded in B around 0 86.5%
div-inv86.5%
Applied egg-rr86.5%
if 0.46999999999999997 < F Initial program 58.7%
Simplified74.8%
tan-quot74.8%
associate-/r/74.9%
Applied egg-rr74.9%
Taylor expanded in F around inf 98.9%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -33000000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 3.7)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 (* (/ x (sin B)) (cos B)))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -33000000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 3.7) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - ((x / sin(B)) * cos(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)
t_1 = x / tan(b)
if (f <= (-33000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 3.7d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = t_0 - ((x / sin(b)) * cos(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);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -33000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 3.7) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - ((x / Math.sin(B)) * Math.cos(B));
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -33000000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 3.7: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - ((x / math.sin(B)) * math.cos(B)) return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -33000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 3.7) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - Float64(Float64(x / sin(B)) * cos(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -33000000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 3.7) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - ((x / sin(B)) * cos(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -33000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 3.7], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -33000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 3.7:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - \frac{x}{\sin B} \cdot \cos B\\
\end{array}
\end{array}
if F < -3.3e10Initial program 52.2%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -3.3e10 < F < 3.7000000000000002Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.1%
if 3.7000000000000002 < F Initial program 57.5%
Simplified74.1%
tan-quot74.1%
associate-/r/74.1%
Applied egg-rr74.1%
Taylor expanded in F around inf 99.9%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))))
(if (<= F -8.8e-32)
(- t_0 (/ x (tan B)))
(if (<= F -2.05e-187)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) (/ x B))
(if (<= F 4.6e-229)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 0.47)
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (* F (/ 1.0 (sin B))))
(/ x B))
(- (/ (- x) (tan B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double tmp;
if (F <= -8.8e-32) {
tmp = t_0 - (x / tan(B));
} else if (F <= -2.05e-187) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / B);
} else if (F <= 4.6e-229) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 0.47) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * (1.0 / sin(B)))) - (x / B);
} else {
tmp = (-x / tan(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 = (-1.0d0) / sin(b)
if (f <= (-8.8d-32)) then
tmp = t_0 - (x / tan(b))
else if (f <= (-2.05d-187)) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - (x / b)
else if (f <= 4.6d-229) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 0.47d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f * (1.0d0 / sin(b)))) - (x / b)
else
tmp = (-x / tan(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -1.0 / Math.sin(B);
double tmp;
if (F <= -8.8e-32) {
tmp = t_0 - (x / Math.tan(B));
} else if (F <= -2.05e-187) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - (x / B);
} else if (F <= 4.6e-229) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 0.47) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * (1.0 / Math.sin(B)))) - (x / B);
} else {
tmp = (-x / Math.tan(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) tmp = 0 if F <= -8.8e-32: tmp = t_0 - (x / math.tan(B)) elif F <= -2.05e-187: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - (x / B) elif F <= 4.6e-229: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 0.47: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F * (1.0 / math.sin(B)))) - (x / B) else: tmp = (-x / math.tan(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) tmp = 0.0 if (F <= -8.8e-32) tmp = Float64(t_0 - Float64(x / tan(B))); elseif (F <= -2.05e-187) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - Float64(x / B)); elseif (F <= 4.6e-229) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 0.47) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F * Float64(1.0 / sin(B)))) - Float64(x / B)); else tmp = Float64(Float64(Float64(-x) / tan(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); tmp = 0.0; if (F <= -8.8e-32) tmp = t_0 - (x / tan(B)); elseif (F <= -2.05e-187) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / B); elseif (F <= 4.6e-229) tmp = (cos(B) * -x) / sin(B); elseif (F <= 0.47) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F * (1.0 / sin(B)))) - (x / B); else tmp = (-x / tan(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e-32], N[(t$95$0 - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.05e-187], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.6e-229], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.47], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F * N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-32}:\\
\;\;\;\;t\_0 - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{-187}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-229}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.47:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \left(F \cdot \frac{1}{\sin B}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B} - t\_0\\
\end{array}
\end{array}
if F < -8.7999999999999999e-32Initial program 55.5%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -8.7999999999999999e-32 < F < -2.0500000000000001e-187Initial program 99.5%
Taylor expanded in B around 0 90.7%
Taylor expanded in F around 0 90.7%
associate-*l/90.8%
associate-*r/90.8%
Simplified90.8%
if -2.0500000000000001e-187 < F < 4.59999999999999992e-229Initial program 99.5%
Taylor expanded in F around -inf 47.9%
Taylor expanded in x around inf 92.5%
associate-*r/92.5%
neg-mul-192.5%
distribute-rgt-neg-in92.5%
Simplified92.5%
if 4.59999999999999992e-229 < F < 0.46999999999999997Initial program 99.4%
Taylor expanded in B around 0 86.5%
div-inv86.5%
Applied egg-rr86.5%
if 0.46999999999999997 < F Initial program 58.7%
Simplified74.8%
Taylor expanded in F around inf 98.6%
associate-/r*98.7%
associate-*r/98.8%
rgt-mult-inverse98.9%
frac-2neg98.9%
metadata-eval98.9%
Applied egg-rr98.9%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))))
(if (<= F -8.8e-32)
(- t_0 (/ x (tan B)))
(if (<= F -2.4e-182)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) (/ x B))
(if (<= F 2.25e-228)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 0.47)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B))
(- (/ (- x) (tan B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double tmp;
if (F <= -8.8e-32) {
tmp = t_0 - (x / tan(B));
} else if (F <= -2.4e-182) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / B);
} else if (F <= 2.25e-228) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 0.47) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (-x / tan(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 = (-1.0d0) / sin(b)
if (f <= (-8.8d-32)) then
tmp = t_0 - (x / tan(b))
else if (f <= (-2.4d-182)) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - (x / b)
else if (f <= 2.25d-228) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 0.47d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = (-x / tan(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -1.0 / Math.sin(B);
double tmp;
if (F <= -8.8e-32) {
tmp = t_0 - (x / Math.tan(B));
} else if (F <= -2.4e-182) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - (x / B);
} else if (F <= 2.25e-228) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 0.47) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (-x / Math.tan(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) tmp = 0 if F <= -8.8e-32: tmp = t_0 - (x / math.tan(B)) elif F <= -2.4e-182: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - (x / B) elif F <= 2.25e-228: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 0.47: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) else: tmp = (-x / math.tan(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) tmp = 0.0 if (F <= -8.8e-32) tmp = Float64(t_0 - Float64(x / tan(B))); elseif (F <= -2.4e-182) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - Float64(x / B)); elseif (F <= 2.25e-228) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 0.47) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(Float64(Float64(-x) / tan(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); tmp = 0.0; if (F <= -8.8e-32) tmp = t_0 - (x / tan(B)); elseif (F <= -2.4e-182) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / B); elseif (F <= 2.25e-228) tmp = (cos(B) * -x) / sin(B); elseif (F <= 0.47) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = (-x / tan(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e-32], N[(t$95$0 - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.4e-182], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.25e-228], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.47], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-32}:\\
\;\;\;\;t\_0 - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-182}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{-228}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.47:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B} - t\_0\\
\end{array}
\end{array}
if F < -8.7999999999999999e-32Initial program 55.5%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -8.7999999999999999e-32 < F < -2.3999999999999998e-182Initial program 99.5%
Taylor expanded in B around 0 90.7%
Taylor expanded in F around 0 90.7%
associate-*l/90.8%
associate-*r/90.8%
Simplified90.8%
if -2.3999999999999998e-182 < F < 2.25e-228Initial program 99.5%
Taylor expanded in F around -inf 47.9%
Taylor expanded in x around inf 92.5%
associate-*r/92.5%
neg-mul-192.5%
distribute-rgt-neg-in92.5%
Simplified92.5%
if 2.25e-228 < F < 0.46999999999999997Initial program 99.4%
Taylor expanded in B around 0 86.5%
if 0.46999999999999997 < F Initial program 58.7%
Simplified74.8%
Taylor expanded in F around inf 98.6%
associate-/r*98.7%
associate-*r/98.8%
rgt-mult-inverse98.9%
frac-2neg98.9%
metadata-eval98.9%
Applied egg-rr98.9%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) (/ x B)))
(t_1 (/ -1.0 (sin B))))
(if (<= F -8.8e-32)
(- t_1 (/ x (tan B)))
(if (<= F -1.15e-186)
t_0
(if (<= F 2.4e-228)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 0.029) t_0 (- (/ (- x) (tan B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / B);
double t_1 = -1.0 / sin(B);
double tmp;
if (F <= -8.8e-32) {
tmp = t_1 - (x / tan(B));
} else if (F <= -1.15e-186) {
tmp = t_0;
} else if (F <= 2.4e-228) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 0.029) {
tmp = t_0;
} else {
tmp = (-x / tan(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - (x / b)
t_1 = (-1.0d0) / sin(b)
if (f <= (-8.8d-32)) then
tmp = t_1 - (x / tan(b))
else if (f <= (-1.15d-186)) then
tmp = t_0
else if (f <= 2.4d-228) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 0.029d0) then
tmp = t_0
else
tmp = (-x / tan(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - (x / B);
double t_1 = -1.0 / Math.sin(B);
double tmp;
if (F <= -8.8e-32) {
tmp = t_1 - (x / Math.tan(B));
} else if (F <= -1.15e-186) {
tmp = t_0;
} else if (F <= 2.4e-228) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 0.029) {
tmp = t_0;
} else {
tmp = (-x / Math.tan(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - (x / B) t_1 = -1.0 / math.sin(B) tmp = 0 if F <= -8.8e-32: tmp = t_1 - (x / math.tan(B)) elif F <= -1.15e-186: tmp = t_0 elif F <= 2.4e-228: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 0.029: tmp = t_0 else: tmp = (-x / math.tan(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - Float64(x / B)) t_1 = Float64(-1.0 / sin(B)) tmp = 0.0 if (F <= -8.8e-32) tmp = Float64(t_1 - Float64(x / tan(B))); elseif (F <= -1.15e-186) tmp = t_0; elseif (F <= 2.4e-228) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 0.029) tmp = t_0; else tmp = Float64(Float64(Float64(-x) / tan(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / B); t_1 = -1.0 / sin(B); tmp = 0.0; if (F <= -8.8e-32) tmp = t_1 - (x / tan(B)); elseif (F <= -1.15e-186) tmp = t_0; elseif (F <= 2.4e-228) tmp = (cos(B) * -x) / sin(B); elseif (F <= 0.029) tmp = t_0; else tmp = (-x / tan(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e-32], N[(t$95$1 - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-186], t$95$0, If[LessEqual[F, 2.4e-228], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.029], t$95$0, N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-32}:\\
\;\;\;\;t\_1 - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-186}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-228}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.029:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B} - t\_1\\
\end{array}
\end{array}
if F < -8.7999999999999999e-32Initial program 55.5%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -8.7999999999999999e-32 < F < -1.15e-186 or 2.40000000000000002e-228 < F < 0.0290000000000000015Initial program 99.4%
Taylor expanded in B around 0 87.7%
Taylor expanded in F around 0 87.6%
associate-*l/87.6%
associate-*r/87.7%
Simplified87.7%
if -1.15e-186 < F < 2.40000000000000002e-228Initial program 99.5%
Taylor expanded in F around -inf 47.9%
Taylor expanded in x around inf 92.5%
associate-*r/92.5%
neg-mul-192.5%
distribute-rgt-neg-in92.5%
Simplified92.5%
if 0.0290000000000000015 < F Initial program 58.7%
Simplified74.8%
Taylor expanded in F around inf 98.6%
associate-/r*98.7%
associate-*r/98.8%
rgt-mult-inverse98.9%
frac-2neg98.9%
metadata-eval98.9%
Applied egg-rr98.9%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))))
(if (<= F -7.5e-134)
(- t_0 (/ x (tan B)))
(if (<= F 2.5e-228)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 0.0055)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ (- x) (tan B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double tmp;
if (F <= -7.5e-134) {
tmp = t_0 - (x / tan(B));
} else if (F <= 2.5e-228) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 0.0055) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (-x / tan(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 = (-1.0d0) / sin(b)
if (f <= (-7.5d-134)) then
tmp = t_0 - (x / tan(b))
else if (f <= 2.5d-228) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 0.0055d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (-x / tan(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -1.0 / Math.sin(B);
double tmp;
if (F <= -7.5e-134) {
tmp = t_0 - (x / Math.tan(B));
} else if (F <= 2.5e-228) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 0.0055) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (-x / Math.tan(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) tmp = 0 if F <= -7.5e-134: tmp = t_0 - (x / math.tan(B)) elif F <= 2.5e-228: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 0.0055: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (-x / math.tan(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) tmp = 0.0 if (F <= -7.5e-134) tmp = Float64(t_0 - Float64(x / tan(B))); elseif (F <= 2.5e-228) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 0.0055) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(Float64(-x) / tan(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); tmp = 0.0; if (F <= -7.5e-134) tmp = t_0 - (x / tan(B)); elseif (F <= 2.5e-228) tmp = (cos(B) * -x) / sin(B); elseif (F <= 0.0055) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (-x / tan(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e-134], N[(t$95$0 - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-228], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0055], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{-134}:\\
\;\;\;\;t\_0 - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-228}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.0055:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B} - t\_0\\
\end{array}
\end{array}
if F < -7.50000000000000048e-134Initial program 62.6%
Taylor expanded in F around -inf 88.7%
div-inv88.8%
Applied egg-rr88.8%
if -7.50000000000000048e-134 < F < 2.49999999999999986e-228Initial program 99.5%
Taylor expanded in F around -inf 43.0%
Taylor expanded in x around inf 85.8%
associate-*r/85.8%
neg-mul-185.8%
distribute-rgt-neg-in85.8%
Simplified85.8%
if 2.49999999999999986e-228 < F < 0.0054999999999999997Initial program 99.4%
Taylor expanded in B around 0 86.5%
Taylor expanded in B around 0 66.7%
if 0.0054999999999999997 < F Initial program 58.7%
Simplified74.8%
Taylor expanded in F around inf 98.6%
associate-/r*98.7%
associate-*r/98.8%
rgt-mult-inverse98.9%
frac-2neg98.9%
metadata-eval98.9%
Applied egg-rr98.9%
Final simplification86.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.7e-133)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 3.2e-228)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 850.0)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-133) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3.2e-228) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 850.0) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (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) :: tmp
if (f <= (-1.7d-133)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 3.2d-228) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 850.0d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (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 tmp;
if (F <= -1.7e-133) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 3.2e-228) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 850.0) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-133: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 3.2e-228: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 850.0: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-133) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3.2e-228) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 850.0) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * 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) tmp = 0.0; if (F <= -1.7e-133) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 3.2e-228) tmp = (cos(B) * -x) / sin(B); elseif (F <= 850.0) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-133], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-228], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 850.0], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-133}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-228}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 850:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.70000000000000003e-133Initial program 62.6%
Taylor expanded in F around -inf 88.7%
div-inv88.8%
Applied egg-rr88.8%
if -1.70000000000000003e-133 < F < 3.20000000000000022e-228Initial program 99.5%
Taylor expanded in F around -inf 43.0%
Taylor expanded in x around inf 85.8%
associate-*r/85.8%
neg-mul-185.8%
distribute-rgt-neg-in85.8%
Simplified85.8%
if 3.20000000000000022e-228 < F < 850Initial program 99.3%
Taylor expanded in B around 0 85.3%
Taylor expanded in B around 0 66.2%
if 850 < F Initial program 57.5%
Taylor expanded in B around 0 34.8%
Taylor expanded in F around inf 76.9%
Final simplification79.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.7e-133)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 3.2e-228)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 160000.0)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-133) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 3.2e-228) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 160000.0) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (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) :: tmp
if (f <= (-1.7d-133)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 3.2d-228) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 160000.0d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (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 tmp;
if (F <= -1.7e-133) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 3.2e-228) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 160000.0) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-133: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 3.2e-228: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 160000.0: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-133) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 3.2e-228) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 160000.0) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * 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) tmp = 0.0; if (F <= -1.7e-133) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 3.2e-228) tmp = (cos(B) * -x) / sin(B); elseif (F <= 160000.0) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-133], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-228], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 160000.0], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-133}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-228}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 160000:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.70000000000000003e-133Initial program 62.6%
Taylor expanded in F around -inf 88.7%
Taylor expanded in B around 0 73.0%
if -1.70000000000000003e-133 < F < 3.20000000000000022e-228Initial program 99.5%
Taylor expanded in F around -inf 43.0%
Taylor expanded in x around inf 85.8%
associate-*r/85.8%
neg-mul-185.8%
distribute-rgt-neg-in85.8%
Simplified85.8%
if 3.20000000000000022e-228 < F < 1.6e5Initial program 99.3%
Taylor expanded in B around 0 85.3%
Taylor expanded in B around 0 66.2%
if 1.6e5 < F Initial program 57.5%
Taylor expanded in B around 0 34.8%
Taylor expanded in F around inf 76.9%
Final simplification75.5%
(FPCore (F B x)
:precision binary64
(if (<= F -7.5e-134)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 3.2e-228)
(* x (/ -1.0 (tan B)))
(if (<= F 1800.0)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e-134) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 3.2e-228) {
tmp = x * (-1.0 / tan(B));
} else if (F <= 1800.0) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (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) :: tmp
if (f <= (-7.5d-134)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 3.2d-228) then
tmp = x * ((-1.0d0) / tan(b))
else if (f <= 1800.0d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (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 tmp;
if (F <= -7.5e-134) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 3.2e-228) {
tmp = x * (-1.0 / Math.tan(B));
} else if (F <= 1800.0) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.5e-134: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 3.2e-228: tmp = x * (-1.0 / math.tan(B)) elif F <= 1800.0: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.5e-134) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 3.2e-228) tmp = Float64(x * Float64(-1.0 / tan(B))); elseif (F <= 1800.0) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * 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) tmp = 0.0; if (F <= -7.5e-134) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 3.2e-228) tmp = x * (-1.0 / tan(B)); elseif (F <= 1800.0) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.5e-134], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-228], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1800.0], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], 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.5 \cdot 10^{-134}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-228}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 1800:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.50000000000000048e-134Initial program 62.6%
Taylor expanded in F around -inf 88.7%
Taylor expanded in B around 0 73.0%
if -7.50000000000000048e-134 < F < 3.20000000000000022e-228Initial program 99.5%
Taylor expanded in F around -inf 43.0%
Taylor expanded in x around inf 85.8%
mul-1-neg85.8%
associate-/l*85.7%
distribute-rgt-neg-in85.7%
Simplified85.7%
clear-num85.7%
tan-quot85.7%
frac-2neg85.7%
metadata-eval85.7%
div-inv85.7%
Applied egg-rr85.7%
mul-1-neg85.7%
distribute-frac-neg285.7%
remove-double-neg85.7%
Simplified85.7%
if 3.20000000000000022e-228 < F < 1800Initial program 99.3%
Taylor expanded in B around 0 85.3%
Taylor expanded in B around 0 66.2%
if 1800 < F Initial program 57.5%
Taylor expanded in B around 0 34.8%
Taylor expanded in F around inf 76.9%
Final simplification75.5%
(FPCore (F B x) :precision binary64 (if (or (<= x -9.6e-183) (not (<= x 2.6e-124))) (* x (/ -1.0 (tan B))) (- (/ -1.0 (sin B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -9.6e-183) || !(x <= 2.6e-124)) {
tmp = x * (-1.0 / 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 ((x <= (-9.6d-183)) .or. (.not. (x <= 2.6d-124))) then
tmp = x * ((-1.0d0) / 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 ((x <= -9.6e-183) || !(x <= 2.6e-124)) {
tmp = x * (-1.0 / Math.tan(B));
} else {
tmp = (-1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -9.6e-183) or not (x <= 2.6e-124): tmp = x * (-1.0 / math.tan(B)) else: tmp = (-1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -9.6e-183) || !(x <= 2.6e-124)) tmp = Float64(x * Float64(-1.0 / 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 ((x <= -9.6e-183) || ~((x <= 2.6e-124))) tmp = x * (-1.0 / tan(B)); else tmp = (-1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -9.6e-183], N[Not[LessEqual[x, 2.6e-124]], $MachinePrecision]], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{-183} \lor \neg \left(x \leq 2.6 \cdot 10^{-124}\right):\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if x < -9.59999999999999972e-183 or 2.6e-124 < x Initial program 81.3%
Taylor expanded in F around -inf 67.2%
Taylor expanded in x around inf 81.3%
mul-1-neg81.3%
associate-/l*81.1%
distribute-rgt-neg-in81.1%
Simplified81.1%
clear-num81.1%
tan-quot81.2%
frac-2neg81.2%
metadata-eval81.2%
div-inv81.2%
Applied egg-rr81.2%
mul-1-neg81.2%
distribute-frac-neg281.2%
remove-double-neg81.2%
Simplified81.2%
if -9.59999999999999972e-183 < x < 2.6e-124Initial program 70.5%
Taylor expanded in B around 0 64.0%
Taylor expanded in F around -inf 23.7%
distribute-lft-in23.7%
associate-*r/23.7%
metadata-eval23.7%
mul-1-neg23.7%
unsub-neg23.7%
Simplified23.7%
Final simplification63.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.7e-133) (- (/ -1.0 B) (* x (/ 1.0 (tan B)))) (if (<= F 240.0) (* x (/ -1.0 (tan B))) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-133) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 240.0) {
tmp = x * (-1.0 / 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 <= (-1.7d-133)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 240.0d0) then
tmp = x * ((-1.0d0) / 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 <= -1.7e-133) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 240.0) {
tmp = x * (-1.0 / Math.tan(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-133: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 240.0: tmp = x * (-1.0 / math.tan(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-133) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 240.0) tmp = Float64(x * Float64(-1.0 / 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 <= -1.7e-133) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 240.0) tmp = x * (-1.0 / tan(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-133], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 240.0], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-133}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 240:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.70000000000000003e-133Initial program 62.6%
Taylor expanded in F around -inf 88.7%
Taylor expanded in B around 0 73.0%
if -1.70000000000000003e-133 < F < 240Initial program 99.4%
Taylor expanded in F around -inf 38.6%
Taylor expanded in x around inf 69.0%
mul-1-neg69.0%
associate-/l*68.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
clear-num69.0%
tan-quot69.0%
frac-2neg69.0%
metadata-eval69.0%
div-inv69.0%
Applied egg-rr69.0%
mul-1-neg69.0%
distribute-frac-neg269.0%
remove-double-neg69.0%
Simplified69.0%
if 240 < F Initial program 57.5%
Taylor expanded in B around 0 34.8%
Taylor expanded in F around inf 76.9%
Final simplification72.2%
(FPCore (F B x) :precision binary64 (if (<= F -5.4e+132) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 88.0) (* x (/ -1.0 (tan B))) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e+132) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 88.0) {
tmp = x * (-1.0 / 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 <= (-5.4d+132)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 88.0d0) then
tmp = x * ((-1.0d0) / 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 <= -5.4e+132) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 88.0) {
tmp = x * (-1.0 / Math.tan(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.4e+132: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 88.0: tmp = x * (-1.0 / math.tan(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.4e+132) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 88.0) tmp = Float64(x * Float64(-1.0 / 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 <= -5.4e+132) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 88.0) tmp = x * (-1.0 / tan(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.4e+132], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 88.0], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.4 \cdot 10^{+132}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 88:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.3999999999999999e132Initial program 40.5%
Taylor expanded in B around 0 19.3%
Taylor expanded in F around -inf 78.6%
distribute-lft-in78.6%
associate-*r/78.6%
metadata-eval78.6%
mul-1-neg78.6%
unsub-neg78.6%
Simplified78.6%
if -5.3999999999999999e132 < F < 88Initial program 98.8%
Taylor expanded in F around -inf 44.9%
Taylor expanded in x around inf 66.7%
mul-1-neg66.7%
associate-/l*66.6%
distribute-rgt-neg-in66.6%
Simplified66.6%
clear-num66.6%
tan-quot66.6%
frac-2neg66.6%
metadata-eval66.6%
div-inv66.6%
Applied egg-rr66.6%
mul-1-neg66.6%
distribute-frac-neg266.6%
remove-double-neg66.6%
Simplified66.6%
if 88 < F Initial program 57.5%
Taylor expanded in B around 0 34.8%
Taylor expanded in F around inf 76.9%
Final simplification71.4%
(FPCore (F B x) :precision binary64 (if (<= F -5.4e+132) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.6e-117) (* x (/ -1.0 (tan B))) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e+132) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.6e-117) {
tmp = x * (-1.0 / tan(B));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.4d+132)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.6d-117) then
tmp = x * ((-1.0d0) / tan(b))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e+132) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.6e-117) {
tmp = x * (-1.0 / Math.tan(B));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.4e+132: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.6e-117: tmp = x * (-1.0 / math.tan(B)) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.4e+132) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.6e-117) tmp = Float64(x * Float64(-1.0 / tan(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.4e+132) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.6e-117) tmp = x * (-1.0 / tan(B)); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.4e+132], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-117], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.4 \cdot 10^{+132}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-117}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.3999999999999999e132Initial program 40.5%
Taylor expanded in B around 0 19.3%
Taylor expanded in F around -inf 78.6%
distribute-lft-in78.6%
associate-*r/78.6%
metadata-eval78.6%
mul-1-neg78.6%
unsub-neg78.6%
Simplified78.6%
if -5.3999999999999999e132 < F < 1.59999999999999998e-117Initial program 98.7%
Taylor expanded in F around -inf 46.9%
Taylor expanded in x around inf 74.2%
mul-1-neg74.2%
associate-/l*74.1%
distribute-rgt-neg-in74.1%
Simplified74.1%
clear-num74.1%
tan-quot74.1%
frac-2neg74.1%
metadata-eval74.1%
div-inv74.1%
Applied egg-rr74.1%
mul-1-neg74.1%
distribute-frac-neg274.1%
remove-double-neg74.1%
Simplified74.1%
if 1.59999999999999998e-117 < F Initial program 70.5%
Simplified81.9%
Taylor expanded in F around inf 81.4%
Taylor expanded in B around 0 64.7%
Final simplification71.0%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ (- -1.0 x) B))) (if (<= F -1.7e-133) t_0 (if (<= F 9e+29) (/ x (- B)) (fabs t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.7e-133) {
tmp = t_0;
} else if (F <= 9e+29) {
tmp = x / -B;
} else {
tmp = fabs(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 = ((-1.0d0) - x) / b
if (f <= (-1.7d-133)) then
tmp = t_0
else if (f <= 9d+29) then
tmp = x / -b
else
tmp = abs(t_0)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.7e-133) {
tmp = t_0;
} else if (F <= 9e+29) {
tmp = x / -B;
} else {
tmp = Math.abs(t_0);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -1.7e-133: tmp = t_0 elif F <= 9e+29: tmp = x / -B else: tmp = math.fabs(t_0) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -1.7e-133) tmp = t_0; elseif (F <= 9e+29) tmp = Float64(x / Float64(-B)); else tmp = abs(t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -1.7e-133) tmp = t_0; elseif (F <= 9e+29) tmp = x / -B; else tmp = abs(t_0); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -1.7e-133], t$95$0, If[LessEqual[F, 9e+29], N[(x / (-B)), $MachinePrecision], N[Abs[t$95$0], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{-133}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9 \cdot 10^{+29}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0\right|\\
\end{array}
\end{array}
if F < -1.70000000000000003e-133Initial program 62.6%
Taylor expanded in F around -inf 88.7%
Taylor expanded in B around 0 44.5%
Taylor expanded in B around 0 44.7%
associate-*r/44.7%
distribute-lft-in44.7%
metadata-eval44.7%
neg-mul-144.7%
unsub-neg44.7%
Simplified44.7%
if -1.70000000000000003e-133 < F < 9.0000000000000005e29Initial program 99.4%
Taylor expanded in B around 0 75.5%
Taylor expanded in x around inf 47.1%
associate-*r/47.1%
neg-mul-147.1%
Simplified47.1%
if 9.0000000000000005e29 < F Initial program 56.9%
Taylor expanded in F around -inf 45.8%
Taylor expanded in B around 0 24.4%
Taylor expanded in B around 0 23.8%
associate-*r/23.8%
distribute-lft-in23.8%
metadata-eval23.8%
neg-mul-123.8%
unsub-neg23.8%
Simplified23.8%
add-sqr-sqrt11.1%
sqrt-unprod15.5%
pow215.5%
Applied egg-rr15.5%
unpow215.5%
rem-sqrt-square28.9%
Simplified28.9%
Final simplification41.5%
(FPCore (F B x) :precision binary64 (* x (/ -1.0 (tan B))))
double code(double F, double B, double x) {
return x * (-1.0 / tan(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 * ((-1.0d0) / tan(b))
end function
public static double code(double F, double B, double x) {
return x * (-1.0 / Math.tan(B));
}
def code(F, B, x): return x * (-1.0 / math.tan(B))
function code(F, B, x) return Float64(x * Float64(-1.0 / tan(B))) end
function tmp = code(F, B, x) tmp = x * (-1.0 / tan(B)); end
code[F_, B_, x_] := N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{-1}{\tan B}
\end{array}
Initial program 78.0%
Taylor expanded in F around -inf 54.1%
Taylor expanded in x around inf 60.2%
mul-1-neg60.2%
associate-/l*60.1%
distribute-rgt-neg-in60.1%
Simplified60.1%
clear-num60.1%
tan-quot60.1%
frac-2neg60.1%
metadata-eval60.1%
div-inv60.1%
Applied egg-rr60.1%
mul-1-neg60.1%
distribute-frac-neg260.1%
remove-double-neg60.1%
Simplified60.1%
Final simplification60.1%
(FPCore (F B x) :precision binary64 (if (<= F -1.7e-133) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-133) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.7d-133)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-133) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-133: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-133) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e-133) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-133], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-133}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -1.70000000000000003e-133Initial program 62.6%
Taylor expanded in F around -inf 88.7%
Taylor expanded in B around 0 44.5%
Taylor expanded in B around 0 44.7%
associate-*r/44.7%
distribute-lft-in44.7%
metadata-eval44.7%
neg-mul-144.7%
unsub-neg44.7%
Simplified44.7%
if -1.70000000000000003e-133 < F Initial program 83.6%
Taylor expanded in B around 0 60.0%
Taylor expanded in x around inf 38.8%
associate-*r/38.8%
neg-mul-138.8%
Simplified38.8%
Final simplification40.3%
(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(x / Float64(-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 78.0%
Taylor expanded in B around 0 53.1%
Taylor expanded in x around inf 36.2%
associate-*r/36.2%
neg-mul-136.2%
Simplified36.2%
Final simplification36.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 78.0%
Taylor expanded in F around -inf 54.1%
Taylor expanded in B around 0 31.1%
Taylor expanded in B around 0 31.2%
associate-*r/31.2%
distribute-lft-in31.2%
metadata-eval31.2%
neg-mul-131.2%
unsub-neg31.2%
Simplified31.2%
Taylor expanded in x around 0 7.5%
herbie shell --seed 2024086
(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))))))