
(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 23 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 -200000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.4e+19)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -200000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.4e+19) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -200000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.4e+19) 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(cos(B) * Float64(x / sin(B)))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -200000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.4e+19], 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[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -200000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{+19}:\\
\;\;\;\;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} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -2e8Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -2e8 < F < 3.4e19Initial program 99.5%
Simplified99.6%
if 3.4e19 < F Initial program 59.3%
Simplified78.0%
Taylor expanded in F around inf 99.8%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
(FPCore (F B x)
:precision binary64
(if (<= F -75000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 3.2)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -75000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3.2) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-75000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 3.2d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -75000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 3.2) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -75000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 3.2: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -75000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3.2) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -75000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 3.2) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -75000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -75000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.2:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -7.5e7Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -7.5e7 < F < 3.2000000000000002Initial program 99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 3.2000000000000002 < F Initial program 61.3%
Simplified79.1%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(if (<= F -6600.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.05e-153)
(- (* t_0 (/ 1.0 (/ (sin B) F))) (/ x B))
(if (<= F 4.6e-142)
(/ x (- (tan B)))
(if (<= F 1.6e+19)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B))))))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double tmp;
if (F <= -6600.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.05e-153) {
tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
} else if (F <= 4.6e-142) {
tmp = x / -tan(B);
} else if (F <= 1.6e+19) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-6600.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.05d-153)) then
tmp = (t_0 * (1.0d0 / (sin(b) / f))) - (x / b)
else if (f <= 4.6d-142) then
tmp = x / -tan(b)
else if (f <= 1.6d+19) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double tmp;
if (F <= -6600.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.05e-153) {
tmp = (t_0 * (1.0 / (Math.sin(B) / F))) - (x / B);
} else if (F <= 4.6e-142) {
tmp = x / -Math.tan(B);
} else if (F <= 1.6e+19) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) tmp = 0 if F <= -6600.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.05e-153: tmp = (t_0 * (1.0 / (math.sin(B) / F))) - (x / B) elif F <= 4.6e-142: tmp = x / -math.tan(B) elif F <= 1.6e+19: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -6600.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.05e-153) tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(sin(B) / F))) - Float64(x / B)); elseif (F <= 4.6e-142) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1.6e+19) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -6600.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.05e-153) tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B); elseif (F <= 4.6e-142) tmp = x / -tan(B); elseif (F <= 1.6e+19) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -6600.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.05e-153], N[(N[(t$95$0 * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.6e-142], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.6e+19], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -6600:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-153}:\\
\;\;\;\;t\_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-142}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+19}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -6600Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -6600 < F < -1.05000000000000002e-153Initial program 99.3%
Taylor expanded in B around 0 90.6%
associate-*r/90.6%
neg-mul-190.6%
Simplified90.6%
clear-num90.7%
inv-pow90.7%
Applied egg-rr90.7%
unpow-190.7%
Simplified90.7%
if -1.05000000000000002e-153 < F < 4.60000000000000005e-142Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 35.7%
Taylor expanded in x around inf 89.4%
mul-1-neg89.4%
neg-sub089.4%
associate-/l*89.4%
clear-num89.3%
un-div-inv89.5%
quot-tan89.6%
Applied egg-rr89.6%
neg-sub089.6%
distribute-neg-frac289.6%
Simplified89.6%
if 4.60000000000000005e-142 < F < 1.6e19Initial program 99.6%
Taylor expanded in B around 0 86.3%
associate-*r/86.3%
neg-mul-186.3%
Simplified86.3%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr86.3%
if 1.6e19 < F Initial program 59.3%
Simplified78.0%
Taylor expanded in F around inf 99.8%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) t_0)
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], 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] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -1.44999999999999996 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 97.2%
*-commutative97.2%
Simplified97.2%
if 1.3999999999999999 < F Initial program 61.3%
Simplified79.1%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.6)
(- (/ (* F (pow (+ 2.0 (* x 2.0)) -0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.6) {
tmp = ((F * pow((2.0 + (x * 2.0)), -0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.6d0) then
tmp = ((f * ((2.0d0 + (x * 2.0d0)) ** (-0.5d0))) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.6) {
tmp = ((F * Math.pow((2.0 + (x * 2.0)), -0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.6: tmp = ((F * math.pow((2.0 + (x * 2.0)), -0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.6) tmp = Float64(Float64(Float64(F * (Float64(2.0 + Float64(x * 2.0)) ^ -0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.6) tmp = ((F * ((2.0 + (x * 2.0)) ^ -0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.6], N[(N[(N[(F * N[Power[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.6:\\
\;\;\;\;\frac{F \cdot {\left(2 + x \cdot 2\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -1.44999999999999996 < F < 1.6000000000000001Initial program 99.5%
Simplified99.6%
associate-*r/99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 97.2%
if 1.6000000000000001 < F Initial program 61.3%
Simplified79.1%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Final simplification98.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.45)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.4)
(/ (- (* F (sqrt 0.5)) (* x (cos B))) (sin B))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.4) {
tmp = ((F * sqrt(0.5)) - (x * cos(B))) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.4d0) then
tmp = ((f * sqrt(0.5d0)) - (x * cos(b))) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.4) {
tmp = ((F * Math.sqrt(0.5)) - (x * Math.cos(B))) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.4: tmp = ((F * math.sqrt(0.5)) - (x * math.cos(B))) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - Float64(x * cos(B))) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.4) tmp = ((F * sqrt(0.5)) - (x * cos(B))) / sin(B); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45], 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[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -1.44999999999999996 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 97.2%
*-commutative97.2%
associate-*l/97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in x around 0 97.1%
associate-*l/97.0%
associate-*r/97.0%
sub-div97.0%
Applied egg-rr97.0%
if 1.3999999999999999 < F Initial program 61.3%
Simplified79.1%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Final simplification98.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -14000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.8e-153)
(- (* t_0 (/ 1.0 (/ (sin B) F))) (/ x B))
(if (<= F 2.25e-142)
(/ x (- (tan B)))
(if (<= F 1.6e+19)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -14000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.8e-153) {
tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
} else if (F <= 2.25e-142) {
tmp = x / -tan(B);
} else if (F <= 1.6e+19) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / sin(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 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-14000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.8d-153)) then
tmp = (t_0 * (1.0d0 / (sin(b) / f))) - (x / b)
else if (f <= 2.25d-142) then
tmp = x / -tan(b)
else if (f <= 1.6d+19) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -14000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.8e-153) {
tmp = (t_0 * (1.0 / (Math.sin(B) / F))) - (x / B);
} else if (F <= 2.25e-142) {
tmp = x / -Math.tan(B);
} else if (F <= 1.6e+19) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -14000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.8e-153: tmp = (t_0 * (1.0 / (math.sin(B) / F))) - (x / B) elif F <= 2.25e-142: tmp = x / -math.tan(B) elif F <= 1.6e+19: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -14000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.8e-153) tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(sin(B) / F))) - Float64(x / B)); elseif (F <= 2.25e-142) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1.6e+19) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -14000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.8e-153) tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B); elseif (F <= 2.25e-142) tmp = x / -tan(B); elseif (F <= 1.6e+19) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -14000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.8e-153], N[(N[(t$95$0 * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.25e-142], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.6e+19], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -14000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.8 \cdot 10^{-153}:\\
\;\;\;\;t\_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{-142}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+19}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.4e7Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -1.4e7 < F < -1.7999999999999999e-153Initial program 99.3%
Taylor expanded in B around 0 90.6%
associate-*r/90.6%
neg-mul-190.6%
Simplified90.6%
clear-num90.7%
inv-pow90.7%
Applied egg-rr90.7%
unpow-190.7%
Simplified90.7%
if -1.7999999999999999e-153 < F < 2.25000000000000009e-142Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 35.7%
Taylor expanded in x around inf 89.4%
mul-1-neg89.4%
neg-sub089.4%
associate-/l*89.4%
clear-num89.3%
un-div-inv89.5%
quot-tan89.6%
Applied egg-rr89.6%
neg-sub089.6%
distribute-neg-frac289.6%
Simplified89.6%
if 2.25000000000000009e-142 < F < 1.6e19Initial program 99.6%
Taylor expanded in B around 0 86.3%
associate-*r/86.3%
neg-mul-186.3%
Simplified86.3%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr86.3%
if 1.6e19 < F Initial program 59.3%
Simplified78.0%
Taylor expanded in F around inf 99.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -1300000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.25e-153)
t_0
(if (<= F 7e-142)
(/ x (- (tan B)))
(if (<= F 1.6e+19) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1300000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.25e-153) {
tmp = t_0;
} else if (F <= 7e-142) {
tmp = x / -tan(B);
} else if (F <= 1.6e+19) {
tmp = t_0;
} else {
tmp = (1.0 / sin(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 / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-1300000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.25d-153)) then
tmp = t_0
else if (f <= 7d-142) then
tmp = x / -tan(b)
else if (f <= 1.6d+19) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1300000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.25e-153) {
tmp = t_0;
} else if (F <= 7e-142) {
tmp = x / -Math.tan(B);
} else if (F <= 1.6e+19) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -1300000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.25e-153: tmp = t_0 elif F <= 7e-142: tmp = x / -math.tan(B) elif F <= 1.6e+19: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1300000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.25e-153) tmp = t_0; elseif (F <= 7e-142) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1.6e+19) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1300000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.25e-153) tmp = t_0; elseif (F <= 7e-142) tmp = x / -tan(B); elseif (F <= 1.6e+19) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$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 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1300000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.25e-153], t$95$0, If[LessEqual[F, 7e-142], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.6e+19], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1300000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.25 \cdot 10^{-153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-142}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.3e6Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -1.3e6 < F < -2.25e-153 or 7.00000000000000029e-142 < F < 1.6e19Initial program 99.4%
Taylor expanded in B around 0 88.5%
associate-*r/88.5%
neg-mul-188.5%
Simplified88.5%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr88.5%
if -2.25e-153 < F < 7.00000000000000029e-142Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 35.7%
Taylor expanded in x around inf 89.4%
mul-1-neg89.4%
neg-sub089.4%
associate-/l*89.4%
clear-num89.3%
un-div-inv89.5%
quot-tan89.6%
Applied egg-rr89.6%
neg-sub089.6%
distribute-neg-frac289.6%
Simplified89.6%
if 1.6e19 < F Initial program 59.3%
Simplified78.0%
Taylor expanded in F around inf 99.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.11)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8.5e-105)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 7e-124)
(/ x (- (tan B)))
(if (<= F 0.086)
(* (/ F (sin B)) (sqrt 0.5))
(- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.11) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8.5e-105) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 7e-124) {
tmp = x / -tan(B);
} else if (F <= 0.086) {
tmp = (F / sin(B)) * sqrt(0.5);
} 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 / tan(b)
if (f <= (-0.11d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8.5d-105)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 7d-124) then
tmp = x / -tan(b)
else if (f <= 0.086d0) then
tmp = (f / sin(b)) * sqrt(0.5d0)
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 / Math.tan(B);
double tmp;
if (F <= -0.11) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8.5e-105) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 7e-124) {
tmp = x / -Math.tan(B);
} else if (F <= 0.086) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.11: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8.5e-105: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 7e-124: tmp = x / -math.tan(B) elif F <= 0.086: tmp = (F / math.sin(B)) * math.sqrt(0.5) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.11) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8.5e-105) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 7e-124) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.086) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.11) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8.5e-105) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 7e-124) tmp = x / -tan(B); elseif (F <= 0.086) tmp = (F / sin(B)) * sqrt(0.5); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.5e-105], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-124], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.086], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.11:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-105}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-124}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.086:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.110000000000000001Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -0.110000000000000001 < F < -8.50000000000000038e-105Initial program 99.3%
Simplified99.3%
Taylor expanded in F around 0 91.5%
*-commutative91.5%
associate-*l/91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in x around 0 61.0%
if -8.50000000000000038e-105 < F < 6.9999999999999997e-124Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 36.3%
Taylor expanded in x around inf 86.8%
mul-1-neg86.8%
neg-sub086.8%
associate-/l*86.7%
clear-num86.6%
un-div-inv86.8%
quot-tan86.9%
Applied egg-rr86.9%
neg-sub086.9%
distribute-neg-frac286.9%
Simplified86.9%
if 6.9999999999999997e-124 < F < 0.085999999999999993Initial program 99.5%
Simplified99.5%
Taylor expanded in F around 0 94.9%
*-commutative94.9%
associate-*l/94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in x around 0 64.9%
associate-*l/65.2%
Applied egg-rr65.2%
if 0.085999999999999993 < F Initial program 61.3%
Simplified79.1%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.11)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.25e-102)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 6.4e-124)
(/ x (- (tan B)))
(if (<= F 0.035)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 2.45e+181)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.11) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.25e-102) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 6.4e-124) {
tmp = x / -tan(B);
} else if (F <= 0.035) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 2.45e+181) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.11d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.25d-102)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 6.4d-124) then
tmp = x / -tan(b)
else if (f <= 0.035d0) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 2.45d+181) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.11) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.25e-102) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 6.4e-124) {
tmp = x / -Math.tan(B);
} else if (F <= 0.035) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 2.45e+181) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.11: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.25e-102: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 6.4e-124: tmp = x / -math.tan(B) elif F <= 0.035: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 2.45e+181: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.11) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.25e-102) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 6.4e-124) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.035) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 2.45e+181) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.11) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.25e-102) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 6.4e-124) tmp = x / -tan(B); elseif (F <= 0.035) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 2.45e+181) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.25e-102], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.4e-124], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.035], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.45e+181], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.11:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -3.25 \cdot 10^{-102}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{-124}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.035:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{+181}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -0.110000000000000001Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
if -0.110000000000000001 < F < -3.2500000000000001e-102Initial program 99.3%
Simplified99.3%
Taylor expanded in F around 0 91.5%
*-commutative91.5%
associate-*l/91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in x around 0 61.0%
if -3.2500000000000001e-102 < F < 6.40000000000000008e-124Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 36.3%
Taylor expanded in x around inf 86.8%
mul-1-neg86.8%
neg-sub086.8%
associate-/l*86.7%
clear-num86.6%
un-div-inv86.8%
quot-tan86.9%
Applied egg-rr86.9%
neg-sub086.9%
distribute-neg-frac286.9%
Simplified86.9%
if 6.40000000000000008e-124 < F < 0.035000000000000003Initial program 99.5%
Simplified99.5%
Taylor expanded in F around 0 94.9%
*-commutative94.9%
associate-*l/94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in x around 0 64.9%
associate-*l/65.2%
Applied egg-rr65.2%
if 0.035000000000000003 < F < 2.44999999999999991e181Initial program 79.9%
Taylor expanded in B around 0 66.8%
associate-*r/66.8%
neg-mul-166.8%
Simplified66.8%
Taylor expanded in F around inf 86.7%
+-commutative86.7%
neg-mul-186.7%
unsub-neg86.7%
Simplified86.7%
if 2.44999999999999991e181 < F Initial program 37.1%
Simplified55.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 79.6%
(FPCore (F B x)
:precision binary64
(if (<= F -0.21)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.55e-103)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 7e-124)
(/ x (- (tan B)))
(if (<= F 0.12)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 4.1e+180)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.55e-103) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 7e-124) {
tmp = x / -tan(B);
} else if (F <= 0.12) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 4.1e+180) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.21d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.55d-103)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 7d-124) then
tmp = x / -tan(b)
else if (f <= 0.12d0) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 4.1d+180) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.55e-103) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 7e-124) {
tmp = x / -Math.tan(B);
} else if (F <= 0.12) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 4.1e+180) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.21: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.55e-103: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 7e-124: tmp = x / -math.tan(B) elif F <= 0.12: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 4.1e+180: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.55e-103) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 7e-124) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.12) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 4.1e+180) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.21) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.55e-103) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 7e-124) tmp = x / -tan(B); elseif (F <= 0.12) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 4.1e+180) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-103], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-124], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.12], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e+180], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.21:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-103}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-124}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.12:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+180}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.209999999999999992Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.5%
if -0.209999999999999992 < F < -1.5500000000000001e-103Initial program 99.3%
Simplified99.3%
Taylor expanded in F around 0 91.5%
*-commutative91.5%
associate-*l/91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in x around 0 61.0%
if -1.5500000000000001e-103 < F < 6.9999999999999997e-124Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 36.3%
Taylor expanded in x around inf 86.8%
mul-1-neg86.8%
neg-sub086.8%
associate-/l*86.7%
clear-num86.6%
un-div-inv86.8%
quot-tan86.9%
Applied egg-rr86.9%
neg-sub086.9%
distribute-neg-frac286.9%
Simplified86.9%
if 6.9999999999999997e-124 < F < 0.12Initial program 99.5%
Simplified99.5%
Taylor expanded in F around 0 94.9%
*-commutative94.9%
associate-*l/94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in x around 0 64.9%
associate-*l/65.2%
Applied egg-rr65.2%
if 0.12 < F < 4.1e180Initial program 79.9%
Taylor expanded in B around 0 66.8%
associate-*r/66.8%
neg-mul-166.8%
Simplified66.8%
Taylor expanded in F around inf 86.7%
+-commutative86.7%
neg-mul-186.7%
unsub-neg86.7%
Simplified86.7%
if 4.1e180 < F Initial program 37.1%
Simplified55.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 79.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5))))
(if (<= F -0.105)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -7.2e-103)
t_0
(if (<= F 6.4e-124)
(/ x (- (tan B)))
(if (<= F 0.035)
t_0
(if (<= F 3.3e+178)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double tmp;
if (F <= -0.105) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -7.2e-103) {
tmp = t_0;
} else if (F <= 6.4e-124) {
tmp = x / -tan(B);
} else if (F <= 0.035) {
tmp = t_0;
} else if (F <= 3.3e+178) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt(0.5d0)
if (f <= (-0.105d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-7.2d-103)) then
tmp = t_0
else if (f <= 6.4d-124) then
tmp = x / -tan(b)
else if (f <= 0.035d0) then
tmp = t_0
else if (f <= 3.3d+178) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.sqrt(0.5);
double tmp;
if (F <= -0.105) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -7.2e-103) {
tmp = t_0;
} else if (F <= 6.4e-124) {
tmp = x / -Math.tan(B);
} else if (F <= 0.035) {
tmp = t_0;
} else if (F <= 3.3e+178) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) tmp = 0 if F <= -0.105: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -7.2e-103: tmp = t_0 elif F <= 6.4e-124: tmp = x / -math.tan(B) elif F <= 0.035: tmp = t_0 elif F <= 3.3e+178: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) tmp = 0.0 if (F <= -0.105) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -7.2e-103) tmp = t_0; elseif (F <= 6.4e-124) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.035) tmp = t_0; elseif (F <= 3.3e+178) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); tmp = 0.0; if (F <= -0.105) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -7.2e-103) tmp = t_0; elseif (F <= 6.4e-124) tmp = x / -tan(B); elseif (F <= 0.035) tmp = t_0; elseif (F <= 3.3e+178) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.105], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.2e-103], t$95$0, If[LessEqual[F, 6.4e-124], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.035], t$95$0, If[LessEqual[F, 3.3e+178], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{if}\;F \leq -0.105:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-103}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{-124}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.035:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{+178}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.104999999999999996Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.5%
if -0.104999999999999996 < F < -7.1999999999999996e-103 or 6.40000000000000008e-124 < F < 0.035000000000000003Initial program 99.4%
Simplified99.4%
Taylor expanded in F around 0 93.3%
*-commutative93.3%
associate-*l/93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in x around 0 63.1%
associate-*l/63.3%
Applied egg-rr63.3%
if -7.1999999999999996e-103 < F < 6.40000000000000008e-124Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 36.3%
Taylor expanded in x around inf 86.8%
mul-1-neg86.8%
neg-sub086.8%
associate-/l*86.7%
clear-num86.6%
un-div-inv86.8%
quot-tan86.9%
Applied egg-rr86.9%
neg-sub086.9%
distribute-neg-frac286.9%
Simplified86.9%
if 0.035000000000000003 < F < 3.2999999999999998e178Initial program 79.9%
Taylor expanded in B around 0 66.8%
associate-*r/66.8%
neg-mul-166.8%
Simplified66.8%
Taylor expanded in F around inf 86.7%
+-commutative86.7%
neg-mul-186.7%
unsub-neg86.7%
Simplified86.7%
if 3.2999999999999998e178 < F Initial program 37.1%
Simplified55.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 79.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))))
(if (<= F -0.115)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.2e-102)
t_0
(if (<= F 6.4e-124)
(/ x (- (tan B)))
(if (<= F 0.029)
t_0
(if (<= F 2.45e+181)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double tmp;
if (F <= -0.115) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.2e-102) {
tmp = t_0;
} else if (F <= 6.4e-124) {
tmp = x / -tan(B);
} else if (F <= 0.029) {
tmp = t_0;
} else if (F <= 2.45e+181) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
if (f <= (-0.115d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.2d-102)) then
tmp = t_0
else if (f <= 6.4d-124) then
tmp = x / -tan(b)
else if (f <= 0.029d0) then
tmp = t_0
else if (f <= 2.45d+181) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double tmp;
if (F <= -0.115) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.2e-102) {
tmp = t_0;
} else if (F <= 6.4e-124) {
tmp = x / -Math.tan(B);
} else if (F <= 0.029) {
tmp = t_0;
} else if (F <= 2.45e+181) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) tmp = 0 if F <= -0.115: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.2e-102: tmp = t_0 elif F <= 6.4e-124: tmp = x / -math.tan(B) elif F <= 0.029: tmp = t_0 elif F <= 2.45e+181: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) tmp = 0.0 if (F <= -0.115) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.2e-102) tmp = t_0; elseif (F <= 6.4e-124) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.029) tmp = t_0; elseif (F <= 2.45e+181) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); tmp = 0.0; if (F <= -0.115) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.2e-102) tmp = t_0; elseif (F <= 6.4e-124) tmp = x / -tan(B); elseif (F <= 0.029) tmp = t_0; elseif (F <= 2.45e+181) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.115], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.2e-102], t$95$0, If[LessEqual[F, 6.4e-124], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.029], t$95$0, If[LessEqual[F, 2.45e+181], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -0.115:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-102}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{-124}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.029:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{+181}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.115000000000000005Initial program 60.6%
Simplified74.5%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.5%
if -0.115000000000000005 < F < -3.19999999999999986e-102 or 6.40000000000000008e-124 < F < 0.0290000000000000015Initial program 99.4%
Simplified99.4%
Taylor expanded in F around 0 93.3%
*-commutative93.3%
associate-*l/93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in x around 0 93.0%
Taylor expanded in F around inf 63.1%
associate-*r/63.1%
Simplified63.1%
if -3.19999999999999986e-102 < F < 6.40000000000000008e-124Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 36.3%
Taylor expanded in x around inf 86.8%
mul-1-neg86.8%
neg-sub086.8%
associate-/l*86.7%
clear-num86.6%
un-div-inv86.8%
quot-tan86.9%
Applied egg-rr86.9%
neg-sub086.9%
distribute-neg-frac286.9%
Simplified86.9%
if 0.0290000000000000015 < F < 2.44999999999999991e181Initial program 79.9%
Taylor expanded in B around 0 66.8%
associate-*r/66.8%
neg-mul-166.8%
Simplified66.8%
Taylor expanded in F around inf 86.7%
+-commutative86.7%
neg-mul-186.7%
unsub-neg86.7%
Simplified86.7%
if 2.44999999999999991e181 < F Initial program 37.1%
Simplified55.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 79.6%
(FPCore (F B x)
:precision binary64
(if (<= F -8.5e-9)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.8e-130)
(/ x (- (tan B)))
(if (<= F 0.025)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 2.45e+181)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-9) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.8e-130) {
tmp = x / -tan(B);
} else if (F <= 0.025) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.45e+181) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.5d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.8d-130) then
tmp = x / -tan(b)
else if (f <= 0.025d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 2.45d+181) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.8e-130) {
tmp = x / -Math.tan(B);
} else if (F <= 0.025) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.45e+181) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-9: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.8e-130: tmp = x / -math.tan(B) elif F <= 0.025: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 2.45e+181: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.8e-130) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.025) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.45e+181) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.5e-9) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.8e-130) tmp = x / -tan(B); elseif (F <= 0.025) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 2.45e+181) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-130], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.025], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.45e+181], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-130}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.025:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{+181}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -8.5e-9Initial program 62.9%
Simplified75.9%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 76.6%
if -8.5e-9 < F < 2.80000000000000016e-130Initial program 99.5%
Simplified99.7%
Taylor expanded in F around -inf 34.1%
Taylor expanded in x around inf 78.1%
mul-1-neg78.1%
neg-sub078.1%
associate-/l*78.0%
clear-num77.9%
un-div-inv78.1%
quot-tan78.2%
Applied egg-rr78.2%
neg-sub078.2%
distribute-neg-frac278.2%
Simplified78.2%
if 2.80000000000000016e-130 < F < 0.025000000000000001Initial program 99.6%
Taylor expanded in B around 0 87.4%
associate-*r/87.4%
neg-mul-187.4%
Simplified87.4%
Taylor expanded in B around 0 61.4%
if 0.025000000000000001 < F < 2.44999999999999991e181Initial program 80.5%
Taylor expanded in B around 0 65.4%
associate-*r/65.4%
neg-mul-165.4%
Simplified65.4%
Taylor expanded in F around inf 84.7%
+-commutative84.7%
neg-mul-184.7%
unsub-neg84.7%
Simplified84.7%
if 2.44999999999999991e181 < F Initial program 37.1%
Simplified55.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 79.6%
Final simplification77.0%
(FPCore (F B x)
:precision binary64
(if (<= F -6.6e-9)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.8e-130)
(/ x (- (tan B)))
(if (<= F 0.025)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 4.1e+175)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.6e-9) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.8e-130) {
tmp = x / -tan(B);
} else if (F <= 0.025) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 4.1e+175) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.6d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.8d-130) then
tmp = x / -tan(b)
else if (f <= 0.025d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 4.1d+175) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.6e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.8e-130) {
tmp = x / -Math.tan(B);
} else if (F <= 0.025) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 4.1e+175) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.6e-9: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.8e-130: tmp = x / -math.tan(B) elif F <= 0.025: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 4.1e+175: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.6e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.8e-130) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.025) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 4.1e+175) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.6e-9) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.8e-130) tmp = x / -tan(B); elseif (F <= 0.025) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 4.1e+175) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.6e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-130], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.025], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.1e+175], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.6 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-130}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.025:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+175}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.60000000000000037e-9Initial program 62.9%
Simplified75.9%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 76.6%
if -6.60000000000000037e-9 < F < 4.79999999999999993e-130Initial program 99.5%
Simplified99.7%
Taylor expanded in F around -inf 34.1%
Taylor expanded in x around inf 78.1%
mul-1-neg78.1%
neg-sub078.1%
associate-/l*78.0%
clear-num77.9%
un-div-inv78.1%
quot-tan78.2%
Applied egg-rr78.2%
neg-sub078.2%
distribute-neg-frac278.2%
Simplified78.2%
if 4.79999999999999993e-130 < F < 0.025000000000000001Initial program 99.6%
Simplified99.5%
Taylor expanded in F around 0 97.4%
*-commutative97.4%
associate-*l/97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in x around 0 97.4%
Taylor expanded in B around 0 59.6%
if 0.025000000000000001 < F < 4.09999999999999978e175Initial program 80.5%
Taylor expanded in B around 0 65.4%
associate-*r/65.4%
neg-mul-165.4%
Simplified65.4%
Taylor expanded in F around inf 84.7%
+-commutative84.7%
neg-mul-184.7%
unsub-neg84.7%
Simplified84.7%
if 4.09999999999999978e175 < F Initial program 37.1%
Simplified55.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 79.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4e-9)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.66e-69)
(/ x (- (tan B)))
(if (<= F 3.5e+175)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-9) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.66e-69) {
tmp = x / -tan(B);
} else if (F <= 3.5e+175) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.4d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.66d-69) then
tmp = x / -tan(b)
else if (f <= 3.5d+175) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.66e-69) {
tmp = x / -Math.tan(B);
} else if (F <= 3.5e+175) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e-9: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.66e-69: tmp = x / -math.tan(B) elif F <= 3.5e+175: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.66e-69) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 3.5e+175) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4e-9) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.66e-69) tmp = x / -tan(B); elseif (F <= 3.5e+175) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.66e-69], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 3.5e+175], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.66 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+175}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.39999999999999992e-9Initial program 62.9%
Simplified75.9%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 76.6%
if -1.39999999999999992e-9 < F < 1.66000000000000012e-69Initial program 99.5%
Simplified99.7%
Taylor expanded in F around -inf 31.1%
Taylor expanded in x around inf 72.5%
mul-1-neg72.5%
neg-sub072.5%
associate-/l*72.4%
clear-num72.4%
un-div-inv72.6%
quot-tan72.6%
Applied egg-rr72.6%
neg-sub072.6%
distribute-neg-frac272.6%
Simplified72.6%
if 1.66000000000000012e-69 < F < 3.5000000000000003e175Initial program 84.4%
Taylor expanded in B around 0 71.0%
associate-*r/71.0%
neg-mul-171.0%
Simplified71.0%
Taylor expanded in F around inf 71.3%
+-commutative71.3%
neg-mul-171.3%
unsub-neg71.3%
Simplified71.3%
if 3.5000000000000003e175 < F Initial program 37.1%
Simplified55.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 79.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.15e-8)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.3e-70)
(/ x (- (tan B)))
(if (<= F 0.000225) (/ (* F (sqrt 0.5)) B) (- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-8) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.3e-70) {
tmp = x / -tan(B);
} else if (F <= 0.000225) {
tmp = (F * sqrt(0.5)) / 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 <= (-1.15d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.3d-70) then
tmp = x / -tan(b)
else if (f <= 0.000225d0) then
tmp = (f * sqrt(0.5d0)) / 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 <= -1.15e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.3e-70) {
tmp = x / -Math.tan(B);
} else if (F <= 0.000225) {
tmp = (F * Math.sqrt(0.5)) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-8: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.3e-70: tmp = x / -math.tan(B) elif F <= 0.000225: tmp = (F * math.sqrt(0.5)) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.3e-70) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.000225) tmp = Float64(Float64(F * sqrt(0.5)) / 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 <= -1.15e-8) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.3e-70) tmp = x / -tan(B); elseif (F <= 0.000225) tmp = (F * sqrt(0.5)) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.3e-70], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.000225], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.000225:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.15e-8Initial program 62.9%
Simplified75.9%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 76.6%
if -1.15e-8 < F < 5.29999999999999983e-70Initial program 99.5%
Simplified99.7%
Taylor expanded in F around -inf 31.1%
Taylor expanded in x around inf 72.5%
mul-1-neg72.5%
neg-sub072.5%
associate-/l*72.4%
clear-num72.4%
un-div-inv72.6%
quot-tan72.6%
Applied egg-rr72.6%
neg-sub072.6%
distribute-neg-frac272.6%
Simplified72.6%
if 5.29999999999999983e-70 < F < 2.2499999999999999e-4Initial program 99.6%
Simplified99.5%
Taylor expanded in F around 0 93.4%
*-commutative93.4%
associate-*l/93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in x around 0 75.4%
Taylor expanded in B around 0 62.8%
if 2.2499999999999999e-4 < F Initial program 62.0%
Simplified79.4%
Taylor expanded in F around inf 98.3%
Taylor expanded in B around 0 75.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.15e-8) (- (/ -1.0 (sin B)) (/ x B)) (/ x (- (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-8) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = 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 <= (-1.15d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-8: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-8) tmp = (-1.0 / sin(B)) - (x / B); else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if F < -1.15e-8Initial program 62.9%
Simplified75.9%
Taylor expanded in F around -inf 94.7%
Taylor expanded in B around 0 76.6%
if -1.15e-8 < F Initial program 86.1%
Simplified92.4%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 62.5%
mul-1-neg62.5%
neg-sub062.5%
associate-/l*62.4%
clear-num62.4%
un-div-inv62.5%
quot-tan62.6%
Applied egg-rr62.6%
neg-sub062.6%
distribute-neg-frac262.6%
Simplified62.6%
(FPCore (F B x) :precision binary64 (if (<= F -3.4e+47) (/ (- -1.0 x) B) (/ x (- (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e+47) {
tmp = (-1.0 - x) / B;
} else {
tmp = 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 <= (-3.4d+47)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e+47) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.4e+47: tmp = (-1.0 - x) / B else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.4e+47) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.4e+47) tmp = (-1.0 - x) / B; else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.4e+47], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.4 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if F < -3.3999999999999998e47Initial program 56.3%
Simplified71.7%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 58.5%
associate-*r/58.5%
neg-mul-158.5%
Simplified58.5%
if -3.3999999999999998e47 < F Initial program 87.1%
Simplified92.9%
Taylor expanded in F around -inf 39.4%
Taylor expanded in x around inf 60.9%
mul-1-neg60.9%
neg-sub060.9%
associate-/l*60.9%
clear-num60.8%
un-div-inv60.9%
quot-tan61.0%
Applied egg-rr61.0%
neg-sub061.0%
distribute-neg-frac261.0%
Simplified61.0%
Final simplification60.3%
(FPCore (F B x) :precision binary64 (if (<= F -4.7e-8) (/ (- -1.0 x) B) (if (<= F 6e-74) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.7e-8) {
tmp = (-1.0 - x) / B;
} else if (F <= 6e-74) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.7d-8)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6d-74) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.7e-8) {
tmp = (-1.0 - x) / B;
} else if (F <= 6e-74) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.7e-8: tmp = (-1.0 - x) / B elif F <= 6e-74: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.7e-8) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6e-74) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.7e-8) tmp = (-1.0 - x) / B; elseif (F <= 6e-74) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.7e-8], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6e-74], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.7 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-74}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.6999999999999997e-8Initial program 62.4%
Simplified75.6%
Taylor expanded in F around -inf 95.7%
Taylor expanded in B around 0 55.4%
associate-*r/55.4%
neg-mul-155.4%
Simplified55.4%
if -4.6999999999999997e-8 < F < 6.00000000000000014e-74Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 20.0%
Taylor expanded in B around 0 19.9%
Taylor expanded in x around inf 41.0%
mul-1-neg41.0%
Simplified41.0%
if 6.00000000000000014e-74 < F Initial program 67.3%
Simplified82.2%
Taylor expanded in F around inf 86.9%
Taylor expanded in B around 0 48.9%
Final simplification47.9%
(FPCore (F B x) :precision binary64 (if (<= F 3.4e-70) (/ x (- B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 3.4e-70) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 3.4d-70) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 3.4e-70) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 3.4e-70: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 3.4e-70) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 3.4e-70) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 3.4e-70], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.4 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 3.39999999999999995e-70Initial program 82.7%
Simplified88.8%
Taylor expanded in F around inf 30.7%
Taylor expanded in B around 0 22.4%
Taylor expanded in x around inf 34.2%
mul-1-neg34.2%
Simplified34.2%
if 3.39999999999999995e-70 < F Initial program 67.3%
Simplified82.2%
Taylor expanded in F around inf 86.9%
Taylor expanded in B around 0 48.9%
Final simplification38.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.4%
Simplified86.9%
Taylor expanded in F around inf 46.3%
Taylor expanded in B around 0 29.8%
Taylor expanded in x around inf 32.7%
mul-1-neg32.7%
Simplified32.7%
Final simplification32.7%
(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.4%
Simplified86.9%
Taylor expanded in F around inf 46.3%
Taylor expanded in B around 0 29.8%
Taylor expanded in x around 0 7.8%
herbie shell --seed 2024143
(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))))))