
(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 24 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 -5e+30)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.3e+49)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+30) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.3e+49) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+30) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.3e+49) 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)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+30], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e+49], 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] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{+49}:\\
\;\;\;\;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} - t\_0\\
\end{array}
\end{array}
if F < -4.9999999999999998e30Initial program 54.0%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.8%
Applied egg-rr99.8%
if -4.9999999999999998e30 < F < 1.29999999999999994e49Initial program 99.5%
Simplified99.7%
if 1.29999999999999994e49 < F Initial program 55.7%
Simplified63.6%
Taylor expanded in x around 0 63.6%
associate-*l/63.6%
*-lft-identity63.6%
+-commutative63.6%
unpow263.6%
fma-undefine63.6%
Simplified63.6%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= x -1.0)
(- (/ 1.0 (sin B)) (/ x (tan B)))
(+
(* x (/ -1.0 (tan B)))
(/ 1.0 (/ (sin B) (/ F (hypot F (sqrt (fma 2.0 x 2.0)))))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / sin(B)) - (x / tan(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / (sin(B) / (F / hypot(F, sqrt(fma(2.0, x, 2.0))))));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / Float64(sin(B) / Float64(F / hypot(F, sqrt(fma(2.0, x, 2.0))))))); end return tmp end
code[F_, B_, x_] := If[LessEqual[x, -1.0], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F / N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{\sin B}{\frac{F}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}}\\
\end{array}
\end{array}
if x < -1Initial program 67.2%
Simplified98.9%
Taylor expanded in x around 0 98.9%
associate-*l/98.9%
*-lft-identity98.9%
+-commutative98.9%
unpow298.9%
fma-undefine98.9%
Simplified98.9%
Taylor expanded in F around inf 99.9%
if -1 < x Initial program 79.6%
*-commutative79.6%
+-commutative79.6%
*-commutative79.6%
fma-undefine79.6%
fma-define79.6%
metadata-eval79.6%
metadata-eval79.6%
clear-num79.6%
un-div-inv79.6%
fma-define79.6%
fma-undefine79.6%
*-commutative79.6%
fma-define79.6%
fma-define79.6%
Applied egg-rr79.6%
add-sqr-sqrt79.6%
metadata-eval79.6%
metadata-eval79.6%
unpow-prod-down79.6%
fma-undefine79.6%
+-commutative79.6%
fma-define79.6%
associate-+l+79.6%
add-sqr-sqrt79.6%
hypot-define79.6%
+-commutative79.6%
fma-define79.6%
metadata-eval79.6%
metadata-eval79.6%
Applied egg-rr91.5%
clear-num91.5%
inv-pow91.5%
pow-prod-up91.6%
metadata-eval91.6%
unpow-191.6%
Applied egg-rr91.6%
unpow-191.6%
associate-/l/99.4%
associate-*l/99.5%
*-lft-identity99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+48)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.55e+49)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+48) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.55e+49) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+48) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.55e+49) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+48], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e+49], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -5 \cdot 10^{+48}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{+49}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.99999999999999973e48Initial program 54.0%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
clear-num99.8%
Applied egg-rr99.8%
if -4.99999999999999973e48 < F < 1.54999999999999996e49Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
if 1.54999999999999996e49 < F Initial program 55.7%
Simplified63.6%
Taylor expanded in x around 0 63.6%
associate-*l/63.6%
*-lft-identity63.6%
+-commutative63.6%
unpow263.6%
fma-undefine63.6%
Simplified63.6%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45e+77)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 100000000.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45e+77) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} 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 <= (-1.45d+77)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 100000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - t_0
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 <= -1.45e+77) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 100000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} 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 <= -1.45e+77: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 100000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0 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 <= -1.45e+77) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(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)) - t_0); 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 <= -1.45e+77) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 100000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - t_0; 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, -1.45e+77], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[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] - t$95$0), $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 -1.45 \cdot 10^{+77}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4500000000000001e77Initial program 50.6%
Taylor expanded in F around -inf 99.6%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
if -1.4500000000000001e77 < F < 1e8Initial program 99.5%
div-inv99.6%
Applied egg-rr99.6%
if 1e8 < F Initial program 58.2%
Simplified65.6%
Taylor expanded in x around 0 65.6%
associate-*l/65.6%
*-lft-identity65.6%
+-commutative65.6%
unpow265.6%
fma-undefine65.6%
Simplified65.6%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -145000.0)
(- (* F (/ (/ (- -1.0 (/ -1.0 (pow F 2.0))) F) (sin B))) t_0)
(if (<= F 1.05e-7)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -145000.0) {
tmp = (F * (((-1.0 - (-1.0 / pow(F, 2.0))) / F) / sin(B))) - t_0;
} else if (F <= 1.05e-7) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} 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 <= (-145000.0d0)) then
tmp = (f * ((((-1.0d0) - ((-1.0d0) / (f ** 2.0d0))) / f) / sin(b))) - t_0
else if (f <= 1.05d-7) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
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 <= -145000.0) {
tmp = (F * (((-1.0 - (-1.0 / Math.pow(F, 2.0))) / F) / Math.sin(B))) - t_0;
} else if (F <= 1.05e-7) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} 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 <= -145000.0: tmp = (F * (((-1.0 - (-1.0 / math.pow(F, 2.0))) / F) / math.sin(B))) - t_0 elif F <= 1.05e-7: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 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 <= -145000.0) tmp = Float64(Float64(F * Float64(Float64(Float64(-1.0 - Float64(-1.0 / (F ^ 2.0))) / F) / sin(B))) - t_0); elseif (F <= 1.05e-7) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); 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 <= -145000.0) tmp = (F * (((-1.0 - (-1.0 / (F ^ 2.0))) / F) / sin(B))) - t_0; elseif (F <= 1.05e-7) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; 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, -145000.0], N[(N[(F * N[(N[(N[(-1.0 - N[(-1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.05e-7], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -145000:\\
\;\;\;\;F \cdot \frac{\frac{-1 - \frac{-1}{{F}^{2}}}{F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-7}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -145000Initial program 59.7%
Simplified78.8%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-undefine78.7%
Simplified78.7%
Taylor expanded in F around -inf 99.5%
mul-1-neg99.5%
distribute-neg-frac299.5%
sub-neg99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
Simplified99.5%
if -145000 < F < 1.05e-7Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.5%
if 1.05e-7 < F Initial program 60.3%
Simplified67.4%
Taylor expanded in x around 0 67.4%
associate-*l/67.4%
*-lft-identity67.4%
+-commutative67.4%
unpow267.4%
fma-undefine67.4%
Simplified67.4%
Taylor expanded in F around inf 99.1%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -145000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.05e-7)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -145000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.05e-7) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} 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 <= (-145000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.05d-7) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
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 <= -145000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.05e-7) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} 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 <= -145000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.05e-7: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 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 <= -145000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.05e-7) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); 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 <= -145000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.05e-7) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; 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, -145000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-7], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -145000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-7}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -145000Initial program 59.7%
Taylor expanded in F around -inf 98.8%
div-inv98.9%
clear-num98.9%
Applied egg-rr98.9%
if -145000 < F < 1.05e-7Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.5%
if 1.05e-7 < F Initial program 60.3%
Simplified67.4%
Taylor expanded in x around 0 67.4%
associate-*l/67.4%
*-lft-identity67.4%
+-commutative67.4%
unpow267.4%
fma-undefine67.4%
Simplified67.4%
Taylor expanded in F around inf 99.1%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B))))
(if (<= F -9000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F -4.6e-145)
t_0
(if (<= F 3.9e-137)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.05e-7) t_0 (- (/ 1.0 (sin B)) (/ x (tan B)))))))))
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 tmp;
if (F <= -9000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= -4.6e-145) {
tmp = t_0;
} else if (F <= 3.9e-137) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.05e-7) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
if (f <= (-9000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= (-4.6d-145)) then
tmp = t_0
else if (f <= 3.9d-137) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.05d-7) then
tmp = t_0
else
tmp = (1.0d0 / sin(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.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -9000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= -4.6e-145) {
tmp = t_0;
} else if (F <= 3.9e-137) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.05e-7) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
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) tmp = 0 if F <= -9000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= -4.6e-145: tmp = t_0 elif F <= 3.9e-137: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.05e-7: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) 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)) tmp = 0.0 if (F <= -9000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= -4.6e-145) tmp = t_0; elseif (F <= 3.9e-137) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.05e-7) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); 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); tmp = 0.0; if (F <= -9000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= -4.6e-145) tmp = t_0; elseif (F <= 3.9e-137) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.05e-7) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / tan(B)); 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]}, If[LessEqual[F, -9000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.6e-145], t$95$0, If[LessEqual[F, 3.9e-137], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.05e-7], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $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}\\
\mathbf{if}\;F \leq -9000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-145}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-137}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9e3Initial program 60.3%
Taylor expanded in F around -inf 98.8%
div-inv98.9%
clear-num99.0%
Applied egg-rr99.0%
if -9e3 < F < -4.60000000000000014e-145 or 3.8999999999999999e-137 < F < 1.05e-7Initial program 99.3%
Taylor expanded in B around 0 78.9%
if -4.60000000000000014e-145 < F < 3.8999999999999999e-137Initial program 99.6%
Taylor expanded in F around -inf 35.0%
Taylor expanded in x around inf 83.3%
if 1.05e-7 < F Initial program 60.3%
Simplified67.4%
Taylor expanded in x around 0 67.4%
associate-*l/67.4%
*-lft-identity67.4%
+-commutative67.4%
unpow267.4%
fma-undefine67.4%
Simplified67.4%
Taylor expanded in F around inf 99.1%
Final simplification91.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(if (<= F -720.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F -1.15e-145)
(- (* t_0 (/ 1.0 (/ (sin B) F))) (/ x B))
(if (<= F 8.2e-137)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.05e-7)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) (/ x (tan 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 <= -720.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= -1.15e-145) {
tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
} else if (F <= 8.2e-137) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.05e-7) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-720.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= (-1.15d-145)) then
tmp = (t_0 * (1.0d0 / (sin(b) / f))) - (x / b)
else if (f <= 8.2d-137) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.05d-7) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(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 <= -720.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= -1.15e-145) {
tmp = (t_0 * (1.0 / (Math.sin(B) / F))) - (x / B);
} else if (F <= 8.2e-137) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.05e-7) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(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 <= -720.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= -1.15e-145: tmp = (t_0 * (1.0 / (math.sin(B) / F))) - (x / B) elif F <= 8.2e-137: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.05e-7: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(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 <= -720.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= -1.15e-145) tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(sin(B) / F))) - Float64(x / B)); elseif (F <= 8.2e-137) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.05e-7) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(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 <= -720.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= -1.15e-145) tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B); elseif (F <= 8.2e-137) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.05e-7) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - (x / tan(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, -720.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-145], 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, 8.2e-137], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.05e-7], 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[(x / N[Tan[B], $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 -720:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-145}:\\
\;\;\;\;t\_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-137}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-7}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -720Initial program 60.3%
Taylor expanded in F around -inf 98.8%
div-inv98.9%
clear-num99.0%
Applied egg-rr99.0%
if -720 < F < -1.15000000000000004e-145Initial program 99.3%
Taylor expanded in B around 0 80.8%
clear-num80.9%
inv-pow80.9%
Applied egg-rr80.9%
unpow-180.9%
Simplified80.9%
if -1.15000000000000004e-145 < F < 8.1999999999999997e-137Initial program 99.6%
Taylor expanded in F around -inf 35.0%
Taylor expanded in x around inf 83.3%
if 8.1999999999999997e-137 < F < 1.05e-7Initial program 99.3%
Taylor expanded in B around 0 77.0%
if 1.05e-7 < F Initial program 60.3%
Simplified67.4%
Taylor expanded in x around 0 67.4%
associate-*l/67.4%
*-lft-identity67.4%
+-commutative67.4%
unpow267.4%
fma-undefine67.4%
Simplified67.4%
Taylor expanded in F around inf 99.1%
Final simplification91.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))))
(if (<= F -15.5)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F -1.18e-144)
t_0
(if (<= F 6e-137)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.05e-7) t_0 (- (/ 1.0 (sin B)) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -15.5) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= -1.18e-144) {
tmp = t_0;
} else if (F <= 6e-137) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.05e-7) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
if (f <= (-15.5d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= (-1.18d-144)) then
tmp = t_0
else if (f <= 6d-137) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.05d-7) then
tmp = t_0
else
tmp = (1.0d0 / sin(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((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -15.5) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= -1.18e-144) {
tmp = t_0;
} else if (F <= 6e-137) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.05e-7) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) tmp = 0 if F <= -15.5: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= -1.18e-144: tmp = t_0 elif F <= 6e-137: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.05e-7: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) tmp = 0.0 if (F <= -15.5) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= -1.18e-144) tmp = t_0; elseif (F <= 6e-137) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.05e-7) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); tmp = 0.0; if (F <= -15.5) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= -1.18e-144) tmp = t_0; elseif (F <= 6e-137) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.05e-7) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -15.5], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.18e-144], t$95$0, If[LessEqual[F, 6e-137], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.05e-7], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -15.5:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.18 \cdot 10^{-144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-137}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -15.5Initial program 60.3%
Taylor expanded in F around -inf 98.8%
div-inv98.9%
clear-num99.0%
Applied egg-rr99.0%
if -15.5 < F < -1.18e-144 or 5.9999999999999996e-137 < F < 1.05e-7Initial program 99.3%
Taylor expanded in B around 0 78.9%
Taylor expanded in F around 0 78.6%
if -1.18e-144 < F < 5.9999999999999996e-137Initial program 99.6%
Taylor expanded in F around -inf 35.0%
Taylor expanded in x around inf 83.3%
if 1.05e-7 < F Initial program 60.3%
Simplified67.4%
Taylor expanded in x around 0 67.4%
associate-*l/67.4%
*-lft-identity67.4%
+-commutative67.4%
unpow267.4%
fma-undefine67.4%
Simplified67.4%
Taylor expanded in F around inf 99.1%
Final simplification91.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8.2e-94)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.05e-32) (/ x (- (tan B))) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8.2e-94) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.05e-32) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-8.2d-94)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.05d-32) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8.2e-94) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.05e-32) {
tmp = x / -Math.tan(B);
} 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 <= -8.2e-94: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.05e-32: tmp = x / -math.tan(B) 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 <= -8.2e-94) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.05e-32) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8.2e-94) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.05e-32) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.2e-94], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.05e-32], N[(x / (-N[Tan[B], $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 -8.2 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -8.20000000000000001e-94Initial program 68.4%
Simplified83.3%
Taylor expanded in x around 0 83.2%
associate-*l/83.2%
*-lft-identity83.2%
+-commutative83.2%
unpow283.2%
fma-undefine83.2%
Simplified83.2%
Taylor expanded in F around -inf 84.5%
if -8.20000000000000001e-94 < F < 2.04999999999999988e-32Initial program 99.5%
Taylor expanded in F around -inf 34.3%
Taylor expanded in x around inf 72.6%
*-un-lft-identity72.6%
associate-/l*72.5%
clear-num72.5%
tan-quot72.6%
div-inv72.7%
Applied egg-rr72.7%
*-lft-identity72.7%
Simplified72.7%
if 2.04999999999999988e-32 < F Initial program 62.3%
Simplified69.0%
Taylor expanded in x around 0 69.0%
associate-*l/69.0%
*-lft-identity69.0%
+-commutative69.0%
unpow269.0%
fma-undefine69.0%
Simplified69.0%
Taylor expanded in F around inf 94.7%
Final simplification83.4%
(FPCore (F B x) :precision binary64 (if (<= F -8.2e-94) (+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B))) (if (<= F 6.8e-32) (/ x (- (tan B))) (- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-94) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 6.8e-32) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.2d-94)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 6.8d-32) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-94) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 6.8e-32) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.2e-94: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 6.8e-32: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.2e-94) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 6.8e-32) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.2e-94) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 6.8e-32) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.2e-94], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.8e-32], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.2 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -8.20000000000000001e-94Initial program 68.4%
Taylor expanded in F around -inf 84.4%
div-inv84.5%
clear-num84.5%
Applied egg-rr84.5%
if -8.20000000000000001e-94 < F < 6.79999999999999956e-32Initial program 99.5%
Taylor expanded in F around -inf 34.3%
Taylor expanded in x around inf 72.6%
*-un-lft-identity72.6%
associate-/l*72.5%
clear-num72.5%
tan-quot72.6%
div-inv72.7%
Applied egg-rr72.7%
*-lft-identity72.7%
Simplified72.7%
if 6.79999999999999956e-32 < F Initial program 62.3%
Simplified69.0%
Taylor expanded in x around 0 69.0%
associate-*l/69.0%
*-lft-identity69.0%
+-commutative69.0%
unpow269.0%
fma-undefine69.0%
Simplified69.0%
Taylor expanded in F around inf 94.7%
Final simplification83.4%
(FPCore (F B x)
:precision binary64
(if (<= F -8.2e-94)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (or (<= F 0.8) (not (<= F 1.9e+274)))
(/ x (- (tan B)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-94) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if ((F <= 0.8) || !(F <= 1.9e+274)) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.2d-94)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if ((f <= 0.8d0) .or. (.not. (f <= 1.9d+274))) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-94) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if ((F <= 0.8) || !(F <= 1.9e+274)) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.2e-94: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif (F <= 0.8) or not (F <= 1.9e+274): tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.2e-94) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif ((F <= 0.8) || !(F <= 1.9e+274)) tmp = Float64(x / Float64(-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 <= -8.2e-94) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif ((F <= 0.8) || ~((F <= 1.9e+274))) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.2e-94], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 0.8], N[Not[LessEqual[F, 1.9e+274]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.2 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.8 \lor \neg \left(F \leq 1.9 \cdot 10^{+274}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.20000000000000001e-94Initial program 68.4%
Simplified83.3%
Taylor expanded in x around 0 83.2%
associate-*l/83.2%
*-lft-identity83.2%
+-commutative83.2%
unpow283.2%
fma-undefine83.2%
Simplified83.2%
Taylor expanded in F around -inf 84.5%
if -8.20000000000000001e-94 < F < 0.80000000000000004 or 1.8999999999999999e274 < F Initial program 96.5%
Taylor expanded in F around -inf 39.2%
Taylor expanded in x around inf 71.4%
*-un-lft-identity71.4%
associate-/l*71.4%
clear-num71.3%
tan-quot71.4%
div-inv71.5%
Applied egg-rr71.5%
*-lft-identity71.5%
Simplified71.5%
if 0.80000000000000004 < F < 1.8999999999999999e274Initial program 56.8%
Taylor expanded in B around 0 32.3%
Taylor expanded in F around inf 74.2%
Final simplification76.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ x (- (tan B)))))
(if (<= F -15.5)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -1.1e-144)
t_0
(if (<= F -5.2e-186)
t_1
(if (<= F -1.05e-208)
t_0
(if (or (<= F 480.0) (not (<= F 1.9e+274)))
t_1
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / -tan(B);
double tmp;
if (F <= -15.5) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -1.1e-144) {
tmp = t_0;
} else if (F <= -5.2e-186) {
tmp = t_1;
} else if (F <= -1.05e-208) {
tmp = t_0;
} else if ((F <= 480.0) || !(F <= 1.9e+274)) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x / -tan(b)
if (f <= (-15.5d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-1.1d-144)) then
tmp = t_0
else if (f <= (-5.2d-186)) then
tmp = t_1
else if (f <= (-1.05d-208)) then
tmp = t_0
else if ((f <= 480.0d0) .or. (.not. (f <= 1.9d+274))) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / -Math.tan(B);
double tmp;
if (F <= -15.5) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -1.1e-144) {
tmp = t_0;
} else if (F <= -5.2e-186) {
tmp = t_1;
} else if (F <= -1.05e-208) {
tmp = t_0;
} else if ((F <= 480.0) || !(F <= 1.9e+274)) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x / -math.tan(B) tmp = 0 if F <= -15.5: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -1.1e-144: tmp = t_0 elif F <= -5.2e-186: tmp = t_1 elif F <= -1.05e-208: tmp = t_0 elif (F <= 480.0) or not (F <= 1.9e+274): tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x / Float64(-tan(B))) tmp = 0.0 if (F <= -15.5) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -1.1e-144) tmp = t_0; elseif (F <= -5.2e-186) tmp = t_1; elseif (F <= -1.05e-208) tmp = t_0; elseif ((F <= 480.0) || !(F <= 1.9e+274)) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x / -tan(B); tmp = 0.0; if (F <= -15.5) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -1.1e-144) tmp = t_0; elseif (F <= -5.2e-186) tmp = t_1; elseif (F <= -1.05e-208) tmp = t_0; elseif ((F <= 480.0) || ~((F <= 1.9e+274))) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[F, -15.5], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.1e-144], t$95$0, If[LessEqual[F, -5.2e-186], t$95$1, If[LessEqual[F, -1.05e-208], t$95$0, If[Or[LessEqual[F, 480.0], N[Not[LessEqual[F, 1.9e+274]], $MachinePrecision]], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{-\tan B}\\
\mathbf{if}\;F \leq -15.5:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-208}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 480 \lor \neg \left(F \leq 1.9 \cdot 10^{+274}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -15.5Initial program 60.3%
Taylor expanded in F around -inf 98.8%
Taylor expanded in B around 0 78.8%
if -15.5 < F < -1.10000000000000003e-144 or -5.19999999999999986e-186 < F < -1.05000000000000006e-208Initial program 99.4%
Taylor expanded in B around 0 84.3%
Taylor expanded in B around 0 54.6%
Taylor expanded in F around 0 54.3%
if -1.10000000000000003e-144 < F < -5.19999999999999986e-186 or -1.05000000000000006e-208 < F < 480 or 1.8999999999999999e274 < F Initial program 96.1%
Taylor expanded in F around -inf 40.6%
Taylor expanded in x around inf 74.3%
*-un-lft-identity74.3%
associate-/l*74.2%
clear-num74.2%
tan-quot74.3%
div-inv74.4%
Applied egg-rr74.4%
*-lft-identity74.4%
Simplified74.4%
if 480 < F < 1.8999999999999999e274Initial program 56.8%
Taylor expanded in B around 0 32.3%
Taylor expanded in F around inf 74.2%
Final simplification73.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (t_1 (/ x (- (tan B)))))
(if (<= F -15.5)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -1.2e-144)
(- (* t_0 (/ F B)) (/ x B))
(if (<= F -5.2e-186)
t_1
(if (<= F -1.05e-208)
(/ (- (* F t_0) x) B)
(if (or (<= F 44.0) (not (<= F 1.9e+274)))
t_1
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / -tan(B);
double tmp;
if (F <= -15.5) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -1.2e-144) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= -5.2e-186) {
tmp = t_1;
} else if (F <= -1.05e-208) {
tmp = ((F * t_0) - x) / B;
} else if ((F <= 44.0) || !(F <= 1.9e+274)) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x / -tan(b)
if (f <= (-15.5d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-1.2d-144)) then
tmp = (t_0 * (f / b)) - (x / b)
else if (f <= (-5.2d-186)) then
tmp = t_1
else if (f <= (-1.05d-208)) then
tmp = ((f * t_0) - x) / b
else if ((f <= 44.0d0) .or. (.not. (f <= 1.9d+274))) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / -Math.tan(B);
double tmp;
if (F <= -15.5) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -1.2e-144) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= -5.2e-186) {
tmp = t_1;
} else if (F <= -1.05e-208) {
tmp = ((F * t_0) - x) / B;
} else if ((F <= 44.0) || !(F <= 1.9e+274)) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x / -math.tan(B) tmp = 0 if F <= -15.5: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -1.2e-144: tmp = (t_0 * (F / B)) - (x / B) elif F <= -5.2e-186: tmp = t_1 elif F <= -1.05e-208: tmp = ((F * t_0) - x) / B elif (F <= 44.0) or not (F <= 1.9e+274): tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x / Float64(-tan(B))) tmp = 0.0 if (F <= -15.5) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -1.2e-144) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); elseif (F <= -5.2e-186) tmp = t_1; elseif (F <= -1.05e-208) tmp = Float64(Float64(Float64(F * t_0) - x) / B); elseif ((F <= 44.0) || !(F <= 1.9e+274)) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x / -tan(B); tmp = 0.0; if (F <= -15.5) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -1.2e-144) tmp = (t_0 * (F / B)) - (x / B); elseif (F <= -5.2e-186) tmp = t_1; elseif (F <= -1.05e-208) tmp = ((F * t_0) - x) / B; elseif ((F <= 44.0) || ~((F <= 1.9e+274))) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[F, -15.5], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.2e-144], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-186], t$95$1, If[LessEqual[F, -1.05e-208], N[(N[(N[(F * t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 44.0], N[Not[LessEqual[F, 1.9e+274]], $MachinePrecision]], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{-\tan B}\\
\mathbf{if}\;F \leq -15.5:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-144}:\\
\;\;\;\;t\_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-208}:\\
\;\;\;\;\frac{F \cdot t\_0 - x}{B}\\
\mathbf{elif}\;F \leq 44 \lor \neg \left(F \leq 1.9 \cdot 10^{+274}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -15.5Initial program 60.3%
Taylor expanded in F around -inf 98.8%
Taylor expanded in B around 0 78.8%
if -15.5 < F < -1.19999999999999997e-144Initial program 99.3%
Taylor expanded in B around 0 80.8%
Taylor expanded in B around 0 47.8%
Taylor expanded in F around 0 47.4%
if -1.19999999999999997e-144 < F < -5.19999999999999986e-186 or -1.05000000000000006e-208 < F < 44 or 1.8999999999999999e274 < F Initial program 96.1%
Taylor expanded in F around -inf 40.6%
Taylor expanded in x around inf 74.3%
*-un-lft-identity74.3%
associate-/l*74.2%
clear-num74.2%
tan-quot74.3%
div-inv74.4%
Applied egg-rr74.4%
*-lft-identity74.4%
Simplified74.4%
if -5.19999999999999986e-186 < F < -1.05000000000000006e-208Initial program 99.7%
Taylor expanded in B around 0 99.7%
Taylor expanded in B around 0 84.2%
Taylor expanded in F around 0 84.2%
if 44 < F < 1.8999999999999999e274Initial program 56.8%
Taylor expanded in B around 0 32.3%
Taylor expanded in F around inf 74.2%
Final simplification73.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- (tan B)))))
(if (<= F -19.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -1.2e-144)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F -5.2e-186)
t_0
(if (<= F -1.05e-208)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (or (<= F 23.5) (not (<= F 1.9e+274)))
t_0
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = x / -tan(B);
double tmp;
if (F <= -19.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -1.2e-144) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= -5.2e-186) {
tmp = t_0;
} else if (F <= -1.05e-208) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if ((F <= 23.5) || !(F <= 1.9e+274)) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / -tan(b)
if (f <= (-19.0d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-1.2d-144)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= (-5.2d-186)) then
tmp = t_0
else if (f <= (-1.05d-208)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if ((f <= 23.5d0) .or. (.not. (f <= 1.9d+274))) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -Math.tan(B);
double tmp;
if (F <= -19.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -1.2e-144) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= -5.2e-186) {
tmp = t_0;
} else if (F <= -1.05e-208) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if ((F <= 23.5) || !(F <= 1.9e+274)) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / -math.tan(B) tmp = 0 if F <= -19.0: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -1.2e-144: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= -5.2e-186: tmp = t_0 elif F <= -1.05e-208: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif (F <= 23.5) or not (F <= 1.9e+274): tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-tan(B))) tmp = 0.0 if (F <= -19.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -1.2e-144) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= -5.2e-186) tmp = t_0; elseif (F <= -1.05e-208) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif ((F <= 23.5) || !(F <= 1.9e+274)) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -tan(B); tmp = 0.0; if (F <= -19.0) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -1.2e-144) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= -5.2e-186) tmp = t_0; elseif (F <= -1.05e-208) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif ((F <= 23.5) || ~((F <= 1.9e+274))) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[F, -19.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.2e-144], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-186], t$95$0, If[LessEqual[F, -1.05e-208], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 23.5], N[Not[LessEqual[F, 1.9e+274]], $MachinePrecision]], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-\tan B}\\
\mathbf{if}\;F \leq -19:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-144}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-186}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-208}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 23.5 \lor \neg \left(F \leq 1.9 \cdot 10^{+274}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -19Initial program 60.3%
Taylor expanded in F around -inf 98.8%
Taylor expanded in B around 0 78.8%
if -19 < F < -1.19999999999999997e-144Initial program 99.3%
Taylor expanded in B around 0 80.8%
Taylor expanded in B around 0 47.9%
if -1.19999999999999997e-144 < F < -5.19999999999999986e-186 or -1.05000000000000006e-208 < F < 23.5 or 1.8999999999999999e274 < F Initial program 96.1%
Taylor expanded in F around -inf 40.6%
Taylor expanded in x around inf 74.3%
*-un-lft-identity74.3%
associate-/l*74.2%
clear-num74.2%
tan-quot74.3%
div-inv74.4%
Applied egg-rr74.4%
*-lft-identity74.4%
Simplified74.4%
if -5.19999999999999986e-186 < F < -1.05000000000000006e-208Initial program 99.7%
Taylor expanded in B around 0 99.7%
Taylor expanded in B around 0 84.2%
Taylor expanded in F around 0 84.2%
if 23.5 < F < 1.8999999999999999e274Initial program 56.8%
Taylor expanded in B around 0 32.3%
Taylor expanded in F around inf 74.2%
Final simplification73.0%
(FPCore (F B x)
:precision binary64
(if (<= F -145000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 0.078) (not (<= F 1.8e+269)))
(/ x (- (tan B)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -145000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 0.078) || !(F <= 1.8e+269)) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-145000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 0.078d0) .or. (.not. (f <= 1.8d+269))) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -145000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 0.078) || !(F <= 1.8e+269)) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -145000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 0.078) or not (F <= 1.8e+269): tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -145000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 0.078) || !(F <= 1.8e+269)) tmp = Float64(x / Float64(-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 <= -145000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 0.078) || ~((F <= 1.8e+269))) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -145000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 0.078], N[Not[LessEqual[F, 1.8e+269]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -145000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.078 \lor \neg \left(F \leq 1.8 \cdot 10^{+269}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -145000Initial program 59.7%
Taylor expanded in B around 0 34.5%
Taylor expanded in F around -inf 74.1%
distribute-lft-in74.1%
associate-*r/74.1%
metadata-eval74.1%
mul-1-neg74.1%
unsub-neg74.1%
Simplified74.1%
if -145000 < F < 0.0779999999999999999 or 1.80000000000000003e269 < F Initial program 96.9%
Taylor expanded in F around -inf 38.3%
Taylor expanded in x around inf 65.8%
*-un-lft-identity65.8%
associate-/l*65.8%
clear-num65.7%
tan-quot65.8%
div-inv65.9%
Applied egg-rr65.9%
*-lft-identity65.9%
Simplified65.9%
if 0.0779999999999999999 < F < 1.80000000000000003e269Initial program 56.8%
Taylor expanded in B around 0 32.3%
Taylor expanded in F around inf 74.2%
Final simplification70.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.05e-70)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (or (<= F 49.0) (not (<= F 3.8e+273)))
(/ x (- (tan B)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.05e-70) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if ((F <= 49.0) || !(F <= 3.8e+273)) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.05d-70)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if ((f <= 49.0d0) .or. (.not. (f <= 3.8d+273))) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.05e-70) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if ((F <= 49.0) || !(F <= 3.8e+273)) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.05e-70: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif (F <= 49.0) or not (F <= 3.8e+273): tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.05e-70) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif ((F <= 49.0) || !(F <= 3.8e+273)) tmp = Float64(x / Float64(-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.05e-70) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif ((F <= 49.0) || ~((F <= 3.8e+273))) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.05e-70], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 49.0], N[Not[LessEqual[F, 3.8e+273]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.05 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 49 \lor \neg \left(F \leq 3.8 \cdot 10^{+273}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.0500000000000001e-70Initial program 67.3%
Taylor expanded in F around -inf 86.2%
Taylor expanded in B around 0 69.5%
if -1.0500000000000001e-70 < F < 49 or 3.8e273 < F Initial program 96.6%
Taylor expanded in F around -inf 39.1%
Taylor expanded in x around inf 70.5%
*-un-lft-identity70.5%
associate-/l*70.5%
clear-num70.4%
tan-quot70.5%
div-inv70.6%
Applied egg-rr70.6%
*-lft-identity70.6%
Simplified70.6%
if 49 < F < 3.8e273Initial program 56.8%
Taylor expanded in B around 0 32.3%
Taylor expanded in F around inf 74.2%
Final simplification71.1%
(FPCore (F B x) :precision binary64 (if (<= F -2900000.0) (/ (- -1.0 x) B) (if (<= F 0.0039) (/ x (- (sin B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2900000.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.0039) {
tmp = x / -sin(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 <= (-2900000.0d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 0.0039d0) then
tmp = x / -sin(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 <= -2900000.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.0039) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2900000.0: tmp = (-1.0 - x) / B elif F <= 0.0039: tmp = x / -math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2900000.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 0.0039) tmp = Float64(x / Float64(-sin(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 <= -2900000.0) tmp = (-1.0 - x) / B; elseif (F <= 0.0039) tmp = x / -sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2900000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0039], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2900000:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 0.0039:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.9e6Initial program 58.5%
Taylor expanded in B around 0 33.6%
Taylor expanded in B around 0 43.8%
Taylor expanded in F around -inf 56.0%
if -2.9e6 < F < 0.0038999999999999998Initial program 99.4%
Taylor expanded in F around -inf 35.4%
Taylor expanded in x around inf 63.6%
Taylor expanded in B around 0 33.2%
if 0.0038999999999999998 < F Initial program 58.7%
Taylor expanded in B around 0 29.1%
Taylor expanded in B around 0 23.9%
Taylor expanded in F around inf 42.6%
Final simplification41.4%
(FPCore (F B x) :precision binary64 (if (<= F -145000.0) (- (/ -1.0 (sin B)) (/ x B)) (/ x (- (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -145000.0) {
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 <= (-145000.0d0)) 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 <= -145000.0) {
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 <= -145000.0: 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 <= -145000.0) 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 <= -145000.0) tmp = (-1.0 / sin(B)) - (x / B); else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -145000.0], 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 -145000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if F < -145000Initial program 59.7%
Taylor expanded in B around 0 34.5%
Taylor expanded in F around -inf 74.1%
distribute-lft-in74.1%
associate-*r/74.1%
metadata-eval74.1%
mul-1-neg74.1%
unsub-neg74.1%
Simplified74.1%
if -145000 < F Initial program 84.0%
Taylor expanded in F around -inf 39.1%
Taylor expanded in x around inf 58.0%
*-un-lft-identity58.0%
associate-/l*58.0%
clear-num58.0%
tan-quot58.0%
div-inv58.1%
Applied egg-rr58.1%
*-lft-identity58.1%
Simplified58.1%
Final simplification62.1%
(FPCore (F B x) :precision binary64 (/ x (- (tan B))))
double code(double F, double B, double x) {
return x / -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 / -tan(b)
end function
public static double code(double F, double B, double x) {
return x / -Math.tan(B);
}
def code(F, B, x): return x / -math.tan(B)
function code(F, B, x) return Float64(x / Float64(-tan(B))) end
function tmp = code(F, B, x) tmp = x / -tan(B); end
code[F_, B_, x_] := N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-\tan B}
\end{array}
Initial program 77.9%
Taylor expanded in F around -inf 54.0%
Taylor expanded in x around inf 57.6%
*-un-lft-identity57.6%
associate-/l*57.6%
clear-num57.5%
tan-quot57.6%
div-inv57.7%
Applied egg-rr57.7%
*-lft-identity57.7%
Simplified57.7%
Final simplification57.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.8e-100) (/ (- -1.0 x) B) (if (<= F 4.4e-61) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-100) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.4e-61) {
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 <= (-1.8d-100)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.4d-61) 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 <= -1.8e-100) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.4e-61) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-100: tmp = (-1.0 - x) / B elif F <= 4.4e-61: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-100) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.4e-61) 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 <= -1.8e-100) tmp = (-1.0 - x) / B; elseif (F <= 4.4e-61) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-100], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.4e-61], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-100}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-61}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.7999999999999999e-100Initial program 69.2%
Taylor expanded in B around 0 44.2%
Taylor expanded in B around 0 42.3%
Taylor expanded in F around -inf 45.0%
if -1.7999999999999999e-100 < F < 4.40000000000000017e-61Initial program 99.5%
Taylor expanded in B around 0 63.7%
Taylor expanded in x around inf 38.0%
mul-1-neg38.0%
distribute-frac-neg238.0%
Simplified38.0%
if 4.40000000000000017e-61 < F Initial program 64.8%
Taylor expanded in B around 0 34.1%
Taylor expanded in B around 0 25.3%
Taylor expanded in F around inf 39.2%
Final simplification40.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.8e-100) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-100) {
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.8d-100)) 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.8e-100) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-100: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-100) 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.8e-100) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-100], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-100}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -1.7999999999999999e-100Initial program 69.2%
Taylor expanded in B around 0 44.2%
Taylor expanded in B around 0 42.3%
Taylor expanded in F around -inf 45.0%
if -1.7999999999999999e-100 < F Initial program 82.2%
Taylor expanded in B around 0 48.9%
Taylor expanded in x around inf 27.9%
mul-1-neg27.9%
distribute-frac-neg227.9%
Simplified27.9%
Final simplification33.5%
(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 77.9%
Taylor expanded in B around 0 47.4%
Taylor expanded in x around inf 27.8%
mul-1-neg27.8%
distribute-frac-neg227.8%
Simplified27.8%
Final simplification27.8%
(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 77.9%
Taylor expanded in B around 0 47.4%
Taylor expanded in B around 0 38.8%
Taylor expanded in F around -inf 25.6%
Taylor expanded in x around 0 8.5%
Final simplification8.5%
herbie shell --seed 2024074
(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))))))