
(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 25 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 -4.2e+142)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 150000000.0)
(- (* 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 <= -4.2e+142) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 150000000.0) {
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 <= -4.2e+142) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 150000000.0) 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, -4.2e+142], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 150000000.0], 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 -4.2 \cdot 10^{+142}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 150000000:\\
\;\;\;\;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.2e142Initial program 38.7%
distribute-lft-neg-in38.7%
+-commutative38.7%
associate-*l/59.1%
associate-/l*59.1%
fma-define59.1%
/-rgt-identity59.1%
remove-double-neg59.1%
fma-neg59.1%
Simplified59.2%
Taylor expanded in x around 0 59.2%
associate-*l/59.2%
*-lft-identity59.2%
+-commutative59.2%
unpow259.2%
fma-undefine59.2%
Simplified59.2%
associate-*r/59.2%
sqrt-div59.2%
metadata-eval59.2%
un-div-inv59.2%
Applied egg-rr59.2%
Taylor expanded in F around -inf 99.9%
mul-1-neg99.9%
Simplified99.9%
if -4.2e142 < F < 1.5e8Initial program 98.7%
distribute-lft-neg-in98.7%
+-commutative98.7%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.6%
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.5e8 < F Initial program 62.7%
distribute-lft-neg-in62.7%
+-commutative62.7%
associate-*l/77.9%
associate-/l*77.8%
fma-define77.8%
/-rgt-identity77.8%
remove-double-neg77.8%
fma-neg77.8%
Simplified78.0%
Taylor expanded in x around 0 78.0%
associate-*l/78.0%
*-lft-identity78.0%
+-commutative78.0%
unpow278.0%
fma-undefine78.0%
Simplified78.0%
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 -1e+156)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.5)
(- (/ (/ F (sqrt (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 <= -1e+156) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.5) {
tmp = ((F / sqrt(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 <= -1e+156) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.5) tmp = Float64(Float64(Float64(F / sqrt(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, -1e+156], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.5], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $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 \cdot 10^{+156}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.5:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\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 < -9.9999999999999998e155Initial program 34.1%
distribute-lft-neg-in34.1%
+-commutative34.1%
associate-*l/54.6%
associate-/l*54.6%
fma-define54.6%
/-rgt-identity54.6%
remove-double-neg54.6%
fma-neg54.6%
Simplified54.7%
Taylor expanded in x around 0 54.7%
associate-*l/54.7%
*-lft-identity54.7%
+-commutative54.7%
unpow254.7%
fma-undefine54.7%
Simplified54.7%
associate-*r/54.7%
sqrt-div54.7%
metadata-eval54.7%
un-div-inv54.7%
Applied egg-rr54.7%
Taylor expanded in F around -inf 100.0%
mul-1-neg100.0%
Simplified100.0%
if -9.9999999999999998e155 < F < 0.5Initial program 98.1%
distribute-lft-neg-in98.1%
+-commutative98.1%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if 0.5 < F Initial program 62.7%
distribute-lft-neg-in62.7%
+-commutative62.7%
associate-*l/77.9%
associate-/l*77.8%
fma-define77.8%
/-rgt-identity77.8%
remove-double-neg77.8%
fma-neg77.8%
Simplified78.0%
Taylor expanded in x around 0 78.0%
associate-*l/78.0%
*-lft-identity78.0%
+-commutative78.0%
unpow278.0%
fma-undefine78.0%
Simplified78.0%
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 -2000000000000.0)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 200000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (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 <= -2000000000000.0) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - 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 <= (-2000000000000.0d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 200000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - 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 <= -2000000000000.0) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2000000000000.0: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 200000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2000000000000.0) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2000000000000.0) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 200000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - 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, -2000000000000.0], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2000000000000:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2e12Initial program 58.3%
distribute-lft-neg-in58.3%
+-commutative58.3%
associate-*l/73.0%
associate-/l*72.9%
fma-define73.0%
/-rgt-identity73.0%
remove-double-neg73.0%
fma-neg72.9%
Simplified73.0%
Taylor expanded in x around 0 73.0%
associate-*l/73.0%
*-lft-identity73.0%
+-commutative73.0%
unpow273.0%
fma-undefine73.0%
Simplified73.0%
associate-*r/73.0%
sqrt-div73.1%
metadata-eval73.1%
un-div-inv73.1%
Applied egg-rr73.1%
Taylor expanded in F around -inf 99.9%
mul-1-neg99.9%
Simplified99.9%
if -2e12 < F < 2e8Initial program 99.4%
if 2e8 < F Initial program 62.7%
distribute-lft-neg-in62.7%
+-commutative62.7%
associate-*l/77.9%
associate-/l*77.8%
fma-define77.8%
/-rgt-identity77.8%
remove-double-neg77.8%
fma-neg77.8%
Simplified78.0%
Taylor expanded in x around 0 78.0%
associate-*l/78.0%
*-lft-identity78.0%
+-commutative78.0%
unpow278.0%
fma-undefine78.0%
Simplified78.0%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+21)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.5)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -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 <= -1e+21) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.5) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= (-1d+21)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.5d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-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 <= -1e+21) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.5) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= -1e+21: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.5: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= -1e+21) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.5) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + 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)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1e+21) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.5) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -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, -1e+21], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.5], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.5:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1e21Initial program 57.2%
distribute-lft-neg-in57.2%
+-commutative57.2%
associate-*l/72.3%
associate-/l*72.2%
fma-define72.2%
/-rgt-identity72.2%
remove-double-neg72.2%
fma-neg72.2%
Simplified72.3%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
associate-*r/72.3%
sqrt-div72.3%
metadata-eval72.3%
un-div-inv72.3%
Applied egg-rr72.3%
Taylor expanded in F around -inf 99.9%
mul-1-neg99.9%
Simplified99.9%
if -1e21 < F < 0.5Initial program 99.4%
div-inv99.5%
clear-num99.4%
Applied egg-rr99.4%
if 0.5 < F Initial program 62.7%
distribute-lft-neg-in62.7%
+-commutative62.7%
associate-*l/77.9%
associate-/l*77.8%
fma-define77.8%
/-rgt-identity77.8%
remove-double-neg77.8%
fma-neg77.8%
Simplified78.0%
Taylor expanded in x around 0 78.0%
associate-*l/78.0%
*-lft-identity78.0%
+-commutative78.0%
unpow278.0%
fma-undefine78.0%
Simplified78.0%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 1.4)
(- (* 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 <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= (-0.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 1.4d0) 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 <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 1.4: 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 <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 1.4) 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 <= -0.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 1.4) 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, -0.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], 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 -0.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 58.9%
distribute-lft-neg-in58.9%
+-commutative58.9%
associate-*l/73.3%
associate-/l*73.3%
fma-define73.3%
/-rgt-identity73.3%
remove-double-neg73.3%
fma-neg73.3%
Simplified73.3%
Taylor expanded in x around 0 73.4%
associate-*l/73.4%
*-lft-identity73.4%
+-commutative73.4%
unpow273.4%
fma-undefine73.4%
Simplified73.4%
associate-*r/73.4%
sqrt-div73.4%
metadata-eval73.4%
un-div-inv73.4%
Applied egg-rr73.4%
Taylor expanded in F around -inf 99.9%
mul-1-neg99.9%
Simplified99.9%
if -0.900000000000000022 < F < 1.3999999999999999Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.8%
if 1.3999999999999999 < F Initial program 62.7%
distribute-lft-neg-in62.7%
+-commutative62.7%
associate-*l/77.9%
associate-/l*77.8%
fma-define77.8%
/-rgt-identity77.8%
remove-double-neg77.8%
fma-neg77.8%
Simplified78.0%
Taylor expanded in x around 0 78.0%
associate-*l/78.0%
*-lft-identity78.0%
+-commutative78.0%
unpow278.0%
fma-undefine78.0%
Simplified78.0%
Taylor expanded in F around inf 99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 1.4)
(- (/ (* 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 <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= (-0.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 1.4d0) 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 <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 1.4: 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 <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F * 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 <= -0.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 1.4) 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, -0.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $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 -0.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 58.9%
distribute-lft-neg-in58.9%
+-commutative58.9%
associate-*l/73.3%
associate-/l*73.3%
fma-define73.3%
/-rgt-identity73.3%
remove-double-neg73.3%
fma-neg73.3%
Simplified73.3%
Taylor expanded in x around 0 73.4%
associate-*l/73.4%
*-lft-identity73.4%
+-commutative73.4%
unpow273.4%
fma-undefine73.4%
Simplified73.4%
associate-*r/73.4%
sqrt-div73.4%
metadata-eval73.4%
un-div-inv73.4%
Applied egg-rr73.4%
Taylor expanded in F around -inf 99.9%
mul-1-neg99.9%
Simplified99.9%
if -0.900000000000000022 < F < 1.3999999999999999Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.8%
*-commutative98.8%
Simplified98.8%
if 1.3999999999999999 < F Initial program 62.7%
distribute-lft-neg-in62.7%
+-commutative62.7%
associate-*l/77.9%
associate-/l*77.8%
fma-define77.8%
/-rgt-identity77.8%
remove-double-neg77.8%
fma-neg77.8%
Simplified78.0%
Taylor expanded in x around 0 78.0%
associate-*l/78.0%
*-lft-identity78.0%
+-commutative78.0%
unpow278.0%
fma-undefine78.0%
Simplified78.0%
Taylor expanded in F around inf 99.8%
Final simplification99.4%
(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)))
(t_2 (- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_1)))
(if (<= F -3.3e+18)
t_2
(if (<= F -4.6e-57)
t_0
(if (<= F 3.25e-164)
t_2
(if (<= F 3400.0) 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 t_2 = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1;
double tmp;
if (F <= -3.3e+18) {
tmp = t_2;
} else if (F <= -4.6e-57) {
tmp = t_0;
} else if (F <= 3.25e-164) {
tmp = t_2;
} else if (F <= 3400.0) {
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) :: t_2
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
t_2 = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_1
if (f <= (-3.3d+18)) then
tmp = t_2
else if (f <= (-4.6d-57)) then
tmp = t_0
else if (f <= 3.25d-164) then
tmp = t_2
else if (f <= 3400.0d0) 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 t_2 = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_1;
double tmp;
if (F <= -3.3e+18) {
tmp = t_2;
} else if (F <= -4.6e-57) {
tmp = t_0;
} else if (F <= 3.25e-164) {
tmp = t_2;
} else if (F <= 3400.0) {
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) t_2 = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_1 tmp = 0 if F <= -3.3e+18: tmp = t_2 elif F <= -4.6e-57: tmp = t_0 elif F <= 3.25e-164: tmp = t_2 elif F <= 3400.0: 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)) t_2 = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_1) tmp = 0.0 if (F <= -3.3e+18) tmp = t_2; elseif (F <= -4.6e-57) tmp = t_0; elseif (F <= 3.25e-164) tmp = t_2; elseif (F <= 3400.0) 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); t_2 = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1; tmp = 0.0; if (F <= -3.3e+18) tmp = t_2; elseif (F <= -4.6e-57) tmp = t_0; elseif (F <= 3.25e-164) tmp = t_2; elseif (F <= 3400.0) 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]}, Block[{t$95$2 = N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -3.3e+18], t$95$2, If[LessEqual[F, -4.6e-57], t$95$0, If[LessEqual[F, 3.25e-164], t$95$2, If[LessEqual[F, 3400.0], 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}\\
t_2 := \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_1\\
\mathbf{if}\;F \leq -3.3 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-57}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.25 \cdot 10^{-164}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq 3400:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3.3e18 or -4.6e-57 < F < 3.25000000000000002e-164Initial program 76.6%
distribute-lft-neg-in76.6%
+-commutative76.6%
associate-*l/84.8%
associate-/l*84.8%
fma-define84.8%
/-rgt-identity84.8%
remove-double-neg84.8%
fma-neg84.8%
Simplified84.9%
Taylor expanded in x around 0 84.9%
associate-*l/84.9%
*-lft-identity84.9%
+-commutative84.9%
unpow284.9%
fma-undefine84.9%
Simplified84.9%
associate-*r/84.9%
sqrt-div84.9%
metadata-eval84.9%
un-div-inv84.9%
Applied egg-rr84.9%
Taylor expanded in F around -inf 92.3%
mul-1-neg92.3%
Simplified92.3%
if -3.3e18 < F < -4.6e-57 or 3.25000000000000002e-164 < F < 3400Initial program 99.2%
Taylor expanded in B around 0 87.5%
if 3400 < F Initial program 62.7%
distribute-lft-neg-in62.7%
+-commutative62.7%
associate-*l/77.9%
associate-/l*77.8%
fma-define77.8%
/-rgt-identity77.8%
remove-double-neg77.8%
fma-neg77.8%
Simplified78.0%
Taylor expanded in x around 0 78.0%
associate-*l/78.0%
*-lft-identity78.0%
+-commutative78.0%
unpow278.0%
fma-undefine78.0%
Simplified78.0%
Taylor expanded in F around inf 99.8%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 F) F)) (t_1 (/ x (tan B))))
(if (<= F -1.1e+164)
(- (/ -1.0 B) t_1)
(if (<= F -5.7e-52)
(- (/ (/ F t_0) (sin B)) (/ x B))
(if (<= F 7.8e-21) (- (/ F (* t_0 B)) t_1) (- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / F) - F;
double t_1 = x / tan(B);
double tmp;
if (F <= -1.1e+164) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -5.7e-52) {
tmp = ((F / t_0) / sin(B)) - (x / B);
} else if (F <= 7.8e-21) {
tmp = (F / (t_0 * B)) - t_1;
} 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 = ((-1.0d0) / f) - f
t_1 = x / tan(b)
if (f <= (-1.1d+164)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-5.7d-52)) then
tmp = ((f / t_0) / sin(b)) - (x / b)
else if (f <= 7.8d-21) then
tmp = (f / (t_0 * b)) - t_1
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 = (-1.0 / F) - F;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.1e+164) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -5.7e-52) {
tmp = ((F / t_0) / Math.sin(B)) - (x / B);
} else if (F <= 7.8e-21) {
tmp = (F / (t_0 * B)) - t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / F) - F t_1 = x / math.tan(B) tmp = 0 if F <= -1.1e+164: tmp = (-1.0 / B) - t_1 elif F <= -5.7e-52: tmp = ((F / t_0) / math.sin(B)) - (x / B) elif F <= 7.8e-21: tmp = (F / (t_0 * B)) - t_1 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / F) - F) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.1e+164) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -5.7e-52) tmp = Float64(Float64(Float64(F / t_0) / sin(B)) - Float64(x / B)); elseif (F <= 7.8e-21) tmp = Float64(Float64(F / Float64(t_0 * B)) - t_1); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / F) - F; t_1 = x / tan(B); tmp = 0.0; if (F <= -1.1e+164) tmp = (-1.0 / B) - t_1; elseif (F <= -5.7e-52) tmp = ((F / t_0) / sin(B)) - (x / B); elseif (F <= 7.8e-21) tmp = (F / (t_0 * B)) - t_1; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.1e+164], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.7e-52], N[(N[(N[(F / t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-21], N[(N[(F / N[(t$95$0 * B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{F} - F\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.1 \cdot 10^{+164}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -5.7 \cdot 10^{-52}:\\
\;\;\;\;\frac{\frac{F}{t\_0}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{F}{t\_0 \cdot B} - t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.10000000000000003e164Initial program 36.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 81.5%
+-commutative81.5%
*-un-lft-identity81.5%
fma-define81.5%
un-div-inv81.6%
Applied egg-rr81.6%
fma-undefine81.6%
*-lft-identity81.6%
unsub-neg81.6%
Simplified81.6%
if -1.10000000000000003e164 < F < -5.6999999999999997e-52Initial program 88.2%
distribute-lft-neg-in88.2%
+-commutative88.2%
associate-*l/92.8%
associate-/l*92.7%
fma-define92.7%
/-rgt-identity92.7%
remove-double-neg92.7%
fma-neg92.7%
Simplified92.7%
Taylor expanded in x around 0 92.7%
associate-*l/92.7%
*-lft-identity92.7%
+-commutative92.7%
unpow292.7%
fma-undefine92.7%
Simplified92.7%
associate-*r/92.8%
sqrt-div92.8%
metadata-eval92.8%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in F around -inf 89.0%
mul-1-neg89.0%
Simplified89.0%
Taylor expanded in B around 0 82.2%
if -5.6999999999999997e-52 < F < 7.8000000000000001e-21Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
associate-*l/99.4%
associate-/l*99.5%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in F around -inf 72.7%
mul-1-neg72.7%
Simplified72.7%
Taylor expanded in B around 0 72.7%
mul-1-neg72.7%
distribute-neg-frac72.7%
Simplified72.7%
if 7.8000000000000001e-21 < F Initial program 66.0%
distribute-lft-neg-in66.0%
+-commutative66.0%
associate-*l/79.8%
associate-/l*79.8%
fma-define79.8%
/-rgt-identity79.8%
remove-double-neg79.8%
fma-neg79.8%
Simplified79.9%
Taylor expanded in x around 0 79.9%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 94.2%
Final simplification82.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e+164)
(- (/ -1.0 B) t_0)
(if (<= F -7.2e-47)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) (/ x B))
(if (<= F 7e-9)
(* (cos B) (/ x (- (sin B))))
(if (<= F 1.7e+79)
(- (/ 1.0 (sin B)) (+ (/ x B) (* -0.3333333333333333 (* B x))))
(- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.9e+164) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -7.2e-47) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - (x / B);
} else if (F <= 7e-9) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 1.7e+79) {
tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.9d+164)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-7.2d-47)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - (x / b)
else if (f <= 7d-9) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 1.7d+79) then
tmp = (1.0d0 / sin(b)) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.9e+164) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -7.2e-47) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - (x / B);
} else if (F <= 7e-9) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 1.7e+79) {
tmp = (1.0 / Math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.9e+164: tmp = (-1.0 / B) - t_0 elif F <= -7.2e-47: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - (x / B) elif F <= 7e-9: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 1.7e+79: tmp = (1.0 / math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e+164) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -7.2e-47) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - Float64(x / B)); elseif (F <= 7e-9) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 1.7e+79) tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.9e+164) tmp = (-1.0 / B) - t_0; elseif (F <= -7.2e-47) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - (x / B); elseif (F <= 7e-9) tmp = cos(B) * (x / -sin(B)); elseif (F <= 1.7e+79) tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e+164], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7.2e-47], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-9], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e+79], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{+164}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{+79}:\\
\;\;\;\;\frac{1}{\sin B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.90000000000000011e164Initial program 36.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 81.5%
+-commutative81.5%
*-un-lft-identity81.5%
fma-define81.5%
un-div-inv81.6%
Applied egg-rr81.6%
fma-undefine81.6%
*-lft-identity81.6%
unsub-neg81.6%
Simplified81.6%
if -1.90000000000000011e164 < F < -7.19999999999999982e-47Initial program 88.2%
distribute-lft-neg-in88.2%
+-commutative88.2%
associate-*l/92.8%
associate-/l*92.7%
fma-define92.7%
/-rgt-identity92.7%
remove-double-neg92.7%
fma-neg92.7%
Simplified92.7%
Taylor expanded in x around 0 92.7%
associate-*l/92.7%
*-lft-identity92.7%
+-commutative92.7%
unpow292.7%
fma-undefine92.7%
Simplified92.7%
associate-*r/92.8%
sqrt-div92.8%
metadata-eval92.8%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in F around -inf 89.0%
mul-1-neg89.0%
Simplified89.0%
Taylor expanded in B around 0 82.2%
if -7.19999999999999982e-47 < F < 6.9999999999999998e-9Initial program 99.3%
Taylor expanded in F around -inf 35.6%
Taylor expanded in x around inf 71.8%
mul-1-neg71.8%
*-commutative71.8%
associate-/l*71.8%
distribute-rgt-neg-in71.8%
Simplified71.8%
if 6.9999999999999998e-9 < F < 1.70000000000000016e79Initial program 95.0%
Taylor expanded in B around 0 75.7%
Taylor expanded in F around inf 71.6%
if 1.70000000000000016e79 < F Initial program 52.8%
distribute-lft-neg-in52.8%
+-commutative52.8%
associate-*l/71.1%
associate-/l*71.1%
fma-define71.1%
/-rgt-identity71.1%
remove-double-neg71.1%
fma-neg71.1%
Simplified71.2%
Taylor expanded in F around inf 99.6%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 76.7%
Final simplification76.1%
(FPCore (F B x) :precision binary64 (if (<= F -2e-49) (+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B))) (- (/ (/ F (+ F (/ 1.0 F))) (sin B)) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-49) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2d-49)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2e-49) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-49: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-49) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2e-49) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-49], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.99999999999999987e-49Initial program 62.3%
Taylor expanded in F around -inf 94.0%
if -1.99999999999999987e-49 < F Initial program 84.2%
distribute-lft-neg-in84.2%
+-commutative84.2%
associate-*l/90.6%
associate-/l*90.5%
fma-define90.5%
/-rgt-identity90.5%
remove-double-neg90.5%
fma-neg90.5%
Simplified90.7%
Taylor expanded in x around 0 90.7%
associate-*l/90.7%
*-lft-identity90.7%
+-commutative90.7%
unpow290.7%
fma-undefine90.7%
Simplified90.7%
associate-*r/90.7%
sqrt-div90.7%
metadata-eval90.7%
un-div-inv90.7%
Applied egg-rr90.7%
Taylor expanded in F around inf 82.5%
Final simplification86.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e-113)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e-113) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-5d-113)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -5e-113) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5e-113: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e-113) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -5e-113) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -5e-113], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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^{-113}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.9999999999999997e-113Initial program 67.6%
distribute-lft-neg-in67.6%
+-commutative67.6%
associate-*l/79.0%
associate-/l*78.9%
fma-define78.9%
/-rgt-identity78.9%
remove-double-neg78.9%
fma-neg78.9%
Simplified79.0%
Taylor expanded in x around 0 79.0%
associate-*l/79.0%
*-lft-identity79.0%
+-commutative79.0%
unpow279.0%
fma-undefine79.0%
Simplified79.0%
associate-*r/79.0%
sqrt-div79.0%
metadata-eval79.0%
un-div-inv79.0%
Applied egg-rr79.0%
Taylor expanded in F around -inf 91.4%
mul-1-neg91.4%
Simplified91.4%
if -4.9999999999999997e-113 < F Initial program 82.8%
distribute-lft-neg-in82.8%
+-commutative82.8%
associate-*l/89.7%
associate-/l*89.7%
fma-define89.7%
/-rgt-identity89.7%
remove-double-neg89.7%
fma-neg89.7%
Simplified89.9%
Taylor expanded in x around 0 89.9%
associate-*l/89.9%
*-lft-identity89.9%
+-commutative89.9%
unpow289.9%
fma-undefine89.9%
Simplified89.9%
associate-*r/89.9%
sqrt-div89.9%
metadata-eval89.9%
un-div-inv89.9%
Applied egg-rr89.9%
Taylor expanded in F around inf 83.4%
Final simplification86.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.3e+18)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 2.7e-20)
(- (/ F (* (- (/ -1.0 F) F) 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 <= -3.3e+18) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 2.7e-20) {
tmp = (F / (((-1.0 / F) - F) * 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 <= (-3.3d+18)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 2.7d-20) then
tmp = (f / ((((-1.0d0) / f) - f) * 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 <= -3.3e+18) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 2.7e-20) {
tmp = (F / (((-1.0 / F) - F) * 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 <= -3.3e+18: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 2.7e-20: tmp = (F / (((-1.0 / F) - F) * 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 <= -3.3e+18) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 2.7e-20) tmp = Float64(Float64(F / Float64(Float64(Float64(-1.0 / F) - F) * 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 <= -3.3e+18) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 2.7e-20) tmp = (F / (((-1.0 / F) - F) * 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, -3.3e+18], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-20], N[(N[(F / N[(N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision] * B), $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 -3.3 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-20}:\\
\;\;\;\;\frac{F}{\left(\frac{-1}{F} - F\right) \cdot B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.3e18Initial program 57.2%
Taylor expanded in F around -inf 99.8%
if -3.3e18 < F < 2.7e-20Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in F around -inf 71.0%
mul-1-neg71.0%
Simplified71.0%
Taylor expanded in B around 0 70.8%
mul-1-neg70.8%
distribute-neg-frac70.8%
Simplified70.8%
if 2.7e-20 < F Initial program 66.0%
distribute-lft-neg-in66.0%
+-commutative66.0%
associate-*l/79.8%
associate-/l*79.8%
fma-define79.8%
/-rgt-identity79.8%
remove-double-neg79.8%
fma-neg79.8%
Simplified79.9%
Taylor expanded in x around 0 79.9%
associate-*l/79.9%
*-lft-identity79.9%
+-commutative79.9%
unpow279.9%
fma-undefine79.9%
Simplified79.9%
Taylor expanded in F around inf 94.2%
Final simplification86.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.92e+164)
(- (/ -1.0 B) t_0)
(if (<= F -7.2e-47)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 7e-9) (not (<= F 4.2e+78)))
(- (/ 1.0 B) t_0)
(- (/ 1.0 (sin B)) (+ (/ x B) (* -0.3333333333333333 (* B x)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.92e+164) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -7.2e-47) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 7e-9) || !(F <= 4.2e+78)) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
}
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.92d+164)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-7.2d-47)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 7d-9) .or. (.not. (f <= 4.2d+78))) then
tmp = (1.0d0 / b) - t_0
else
tmp = (1.0d0 / sin(b)) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
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.92e+164) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -7.2e-47) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 7e-9) || !(F <= 4.2e+78)) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.92e+164: tmp = (-1.0 / B) - t_0 elif F <= -7.2e-47: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 7e-9) or not (F <= 4.2e+78): tmp = (1.0 / B) - t_0 else: tmp = (1.0 / math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.92e+164) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -7.2e-47) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 7e-9) || !(F <= 4.2e+78)) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.92e+164) tmp = (-1.0 / B) - t_0; elseif (F <= -7.2e-47) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 7e-9) || ~((F <= 4.2e+78))) tmp = (1.0 / B) - t_0; else tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.92e+164], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7.2e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 7e-9], N[Not[LessEqual[F, 4.2e+78]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.92 \cdot 10^{+164}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9} \lor \neg \left(F \leq 4.2 \cdot 10^{+78}\right):\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\end{array}
\end{array}
if F < -1.9199999999999999e164Initial program 36.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 81.5%
+-commutative81.5%
*-un-lft-identity81.5%
fma-define81.5%
un-div-inv81.6%
Applied egg-rr81.6%
fma-undefine81.6%
*-lft-identity81.6%
unsub-neg81.6%
Simplified81.6%
if -1.9199999999999999e164 < F < -7.19999999999999982e-47Initial program 88.2%
Taylor expanded in F around -inf 88.2%
Taylor expanded in B around 0 81.4%
if -7.19999999999999982e-47 < F < 6.9999999999999998e-9 or 4.2000000000000002e78 < F Initial program 82.8%
distribute-lft-neg-in82.8%
+-commutative82.8%
associate-*l/89.4%
associate-/l*89.4%
fma-define89.4%
/-rgt-identity89.4%
remove-double-neg89.4%
fma-neg89.4%
Simplified89.5%
Taylor expanded in F around inf 51.9%
associate-/r*51.9%
Simplified51.9%
Taylor expanded in B around 0 60.3%
if 6.9999999999999998e-9 < F < 4.2000000000000002e78Initial program 95.0%
Taylor expanded in B around 0 75.7%
Taylor expanded in F around inf 71.6%
Final simplification68.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e+164)
(- (/ -1.0 B) t_0)
(if (<= F -3.65e+18)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7e-9)
(- (/ F (* (- (/ -1.0 F) F) B)) t_0)
(if (<= F 1.9e+78)
(- (/ 1.0 (sin B)) (+ (/ x B) (* -0.3333333333333333 (* B x))))
(- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.9e+164) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.65e+18) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7e-9) {
tmp = (F / (((-1.0 / F) - F) * B)) - t_0;
} else if (F <= 1.9e+78) {
tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.9d+164)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-3.65d+18)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7d-9) then
tmp = (f / ((((-1.0d0) / f) - f) * b)) - t_0
else if (f <= 1.9d+78) then
tmp = (1.0d0 / sin(b)) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.9e+164) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.65e+18) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7e-9) {
tmp = (F / (((-1.0 / F) - F) * B)) - t_0;
} else if (F <= 1.9e+78) {
tmp = (1.0 / Math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.9e+164: tmp = (-1.0 / B) - t_0 elif F <= -3.65e+18: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7e-9: tmp = (F / (((-1.0 / F) - F) * B)) - t_0 elif F <= 1.9e+78: tmp = (1.0 / math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e+164) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -3.65e+18) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7e-9) tmp = Float64(Float64(F / Float64(Float64(Float64(-1.0 / F) - F) * B)) - t_0); elseif (F <= 1.9e+78) tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.9e+164) tmp = (-1.0 / B) - t_0; elseif (F <= -3.65e+18) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7e-9) tmp = (F / (((-1.0 / F) - F) * B)) - t_0; elseif (F <= 1.9e+78) tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e+164], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.65e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-9], N[(N[(F / N[(N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.9e+78], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{+164}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -3.65 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;\frac{F}{\left(\frac{-1}{F} - F\right) \cdot B} - t\_0\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{+78}:\\
\;\;\;\;\frac{1}{\sin B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.90000000000000011e164Initial program 36.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 81.5%
+-commutative81.5%
*-un-lft-identity81.5%
fma-define81.5%
un-div-inv81.6%
Applied egg-rr81.6%
fma-undefine81.6%
*-lft-identity81.6%
unsub-neg81.6%
Simplified81.6%
if -1.90000000000000011e164 < F < -3.65e18Initial program 84.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 90.9%
if -3.65e18 < F < 6.9999999999999998e-9Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in F around -inf 70.2%
mul-1-neg70.2%
Simplified70.2%
Taylor expanded in B around 0 70.1%
mul-1-neg70.1%
distribute-neg-frac70.1%
Simplified70.1%
if 6.9999999999999998e-9 < F < 1.9e78Initial program 95.0%
Taylor expanded in B around 0 75.7%
Taylor expanded in F around inf 71.6%
if 1.9e78 < F Initial program 52.8%
distribute-lft-neg-in52.8%
+-commutative52.8%
associate-*l/71.1%
associate-/l*71.1%
fma-define71.1%
/-rgt-identity71.1%
remove-double-neg71.1%
fma-neg71.1%
Simplified71.2%
Taylor expanded in F around inf 99.6%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 76.7%
Final simplification76.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 F) F)) (t_1 (/ x (tan B))))
(if (<= F -1.85e+164)
(- (/ -1.0 B) t_1)
(if (<= F -7.2e-47)
(- (/ (/ F t_0) (sin B)) (/ x B))
(if (<= F 7e-9)
(- (/ F (* t_0 B)) t_1)
(if (<= F 2.1e+80)
(- (/ 1.0 (sin B)) (+ (/ x B) (* -0.3333333333333333 (* B x))))
(- (/ 1.0 B) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / F) - F;
double t_1 = x / tan(B);
double tmp;
if (F <= -1.85e+164) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -7.2e-47) {
tmp = ((F / t_0) / sin(B)) - (x / B);
} else if (F <= 7e-9) {
tmp = (F / (t_0 * B)) - t_1;
} else if (F <= 2.1e+80) {
tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (1.0 / 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 = ((-1.0d0) / f) - f
t_1 = x / tan(b)
if (f <= (-1.85d+164)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-7.2d-47)) then
tmp = ((f / t_0) / sin(b)) - (x / b)
else if (f <= 7d-9) then
tmp = (f / (t_0 * b)) - t_1
else if (f <= 2.1d+80) then
tmp = (1.0d0 / sin(b)) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else
tmp = (1.0d0 / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / F) - F;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.85e+164) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -7.2e-47) {
tmp = ((F / t_0) / Math.sin(B)) - (x / B);
} else if (F <= 7e-9) {
tmp = (F / (t_0 * B)) - t_1;
} else if (F <= 2.1e+80) {
tmp = (1.0 / Math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / F) - F t_1 = x / math.tan(B) tmp = 0 if F <= -1.85e+164: tmp = (-1.0 / B) - t_1 elif F <= -7.2e-47: tmp = ((F / t_0) / math.sin(B)) - (x / B) elif F <= 7e-9: tmp = (F / (t_0 * B)) - t_1 elif F <= 2.1e+80: tmp = (1.0 / math.sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))) else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / F) - F) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.85e+164) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -7.2e-47) tmp = Float64(Float64(Float64(F / t_0) / sin(B)) - Float64(x / B)); elseif (F <= 7e-9) tmp = Float64(Float64(F / Float64(t_0 * B)) - t_1); elseif (F <= 2.1e+80) tmp = Float64(Float64(1.0 / sin(B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / F) - F; t_1 = x / tan(B); tmp = 0.0; if (F <= -1.85e+164) tmp = (-1.0 / B) - t_1; elseif (F <= -7.2e-47) tmp = ((F / t_0) / sin(B)) - (x / B); elseif (F <= 7e-9) tmp = (F / (t_0 * B)) - t_1; elseif (F <= 2.1e+80) tmp = (1.0 / sin(B)) - ((x / B) + (-0.3333333333333333 * (B * x))); else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.85e+164], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -7.2e-47], N[(N[(N[(F / t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-9], N[(N[(F / N[(t$95$0 * B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.1e+80], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{F} - F\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.85 \cdot 10^{+164}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{\frac{F}{t\_0}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-9}:\\
\;\;\;\;\frac{F}{t\_0 \cdot B} - t\_1\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{+80}:\\
\;\;\;\;\frac{1}{\sin B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\end{array}
\end{array}
if F < -1.85e164Initial program 36.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 81.5%
+-commutative81.5%
*-un-lft-identity81.5%
fma-define81.5%
un-div-inv81.6%
Applied egg-rr81.6%
fma-undefine81.6%
*-lft-identity81.6%
unsub-neg81.6%
Simplified81.6%
if -1.85e164 < F < -7.19999999999999982e-47Initial program 88.2%
distribute-lft-neg-in88.2%
+-commutative88.2%
associate-*l/92.8%
associate-/l*92.7%
fma-define92.7%
/-rgt-identity92.7%
remove-double-neg92.7%
fma-neg92.7%
Simplified92.7%
Taylor expanded in x around 0 92.7%
associate-*l/92.7%
*-lft-identity92.7%
+-commutative92.7%
unpow292.7%
fma-undefine92.7%
Simplified92.7%
associate-*r/92.8%
sqrt-div92.8%
metadata-eval92.8%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in F around -inf 89.0%
mul-1-neg89.0%
Simplified89.0%
Taylor expanded in B around 0 82.2%
if -7.19999999999999982e-47 < F < 6.9999999999999998e-9Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
associate-*l/99.4%
associate-/l*99.4%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in F around -inf 71.8%
mul-1-neg71.8%
Simplified71.8%
Taylor expanded in B around 0 71.8%
mul-1-neg71.8%
distribute-neg-frac71.8%
Simplified71.8%
if 6.9999999999999998e-9 < F < 2.10000000000000001e80Initial program 95.0%
Taylor expanded in B around 0 75.7%
Taylor expanded in F around inf 71.6%
if 2.10000000000000001e80 < F Initial program 52.8%
distribute-lft-neg-in52.8%
+-commutative52.8%
associate-*l/71.1%
associate-/l*71.1%
fma-define71.1%
/-rgt-identity71.1%
remove-double-neg71.1%
fma-neg71.1%
Simplified71.2%
Taylor expanded in F around inf 99.6%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 76.7%
Final simplification76.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.55e+164)
(- (/ -1.0 B) t_0)
(if (<= F -7.2e-47) (- (/ -1.0 (sin B)) (/ x B)) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.55e+164) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -7.2e-47) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.55d+164)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-7.2d-47)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.55e+164) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -7.2e-47) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.55e+164: tmp = (-1.0 / B) - t_0 elif F <= -7.2e-47: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.55e+164) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -7.2e-47) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.55e+164) tmp = (-1.0 / B) - t_0; elseif (F <= -7.2e-47) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.55e+164], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7.2e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.55 \cdot 10^{+164}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.5500000000000001e164Initial program 36.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 81.5%
+-commutative81.5%
*-un-lft-identity81.5%
fma-define81.5%
un-div-inv81.6%
Applied egg-rr81.6%
fma-undefine81.6%
*-lft-identity81.6%
unsub-neg81.6%
Simplified81.6%
if -1.5500000000000001e164 < F < -7.19999999999999982e-47Initial program 88.2%
Taylor expanded in F around -inf 88.2%
Taylor expanded in B around 0 81.4%
if -7.19999999999999982e-47 < F Initial program 84.2%
distribute-lft-neg-in84.2%
+-commutative84.2%
associate-*l/90.6%
associate-/l*90.5%
fma-define90.5%
/-rgt-identity90.5%
remove-double-neg90.5%
fma-neg90.5%
Simplified90.7%
Taylor expanded in F around inf 55.9%
associate-/r*55.9%
Simplified55.9%
Taylor expanded in B around 0 58.9%
Final simplification66.4%
(FPCore (F B x) :precision binary64 (if (<= B 2.6e-225) (/ x (- B)) (- (/ -1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 2.6e-225) {
tmp = 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 (b <= 2.6d-225) then
tmp = 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 (B <= 2.6e-225) {
tmp = x / -B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 2.6e-225: tmp = x / -B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 2.6e-225) tmp = Float64(x / Float64(-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 (B <= 2.6e-225) tmp = x / -B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 2.6e-225], N[(x / (-B)), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.6 \cdot 10^{-225}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 2.60000000000000013e-225Initial program 74.9%
distribute-lft-neg-in74.9%
+-commutative74.9%
associate-*l/84.6%
associate-/l*84.6%
fma-define84.6%
/-rgt-identity84.6%
remove-double-neg84.6%
fma-neg84.6%
Simplified84.7%
Taylor expanded in F around inf 49.5%
associate-/r*49.5%
Simplified49.5%
Taylor expanded in B around 0 29.0%
Taylor expanded in x around inf 34.5%
associate-*r/34.5%
neg-mul-134.5%
Simplified34.5%
if 2.60000000000000013e-225 < B Initial program 80.2%
Taylor expanded in F around -inf 59.1%
Taylor expanded in B around 0 60.7%
+-commutative60.7%
*-un-lft-identity60.7%
fma-define60.7%
un-div-inv60.8%
Applied egg-rr60.8%
fma-undefine60.8%
*-lft-identity60.8%
unsub-neg60.8%
Simplified60.8%
Final simplification44.9%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ x (tan B)))) (if (<= F 2.5e-160) (- (/ -1.0 B) t_0) (- (/ 1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 2.5e-160) {
tmp = (-1.0 / B) - t_0;
} 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 <= 2.5d-160) then
tmp = ((-1.0d0) / b) - t_0
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 <= 2.5e-160) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 2.5e-160: tmp = (-1.0 / B) - t_0 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 <= 2.5e-160) tmp = Float64(Float64(-1.0 / B) - t_0); 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 <= 2.5e-160) tmp = (-1.0 / B) - t_0; 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, 2.5e-160], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $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 2.5 \cdot 10^{-160}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < 2.49999999999999997e-160Initial program 78.3%
Taylor expanded in F around -inf 69.3%
Taylor expanded in B around 0 64.2%
+-commutative64.2%
*-un-lft-identity64.2%
fma-define64.2%
un-div-inv64.2%
Applied egg-rr64.2%
fma-undefine64.2%
*-lft-identity64.2%
unsub-neg64.2%
Simplified64.2%
if 2.49999999999999997e-160 < F Initial program 75.2%
distribute-lft-neg-in75.2%
+-commutative75.2%
associate-*l/85.2%
associate-/l*85.2%
fma-define85.2%
/-rgt-identity85.2%
remove-double-neg85.2%
fma-neg85.2%
Simplified85.3%
Taylor expanded in F around inf 75.5%
associate-/r*75.6%
Simplified75.6%
Taylor expanded in B around 0 59.7%
Final simplification62.3%
(FPCore (F B x)
:precision binary64
(if (<= F -2.05e-47)
(+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B))
(if (<= F 1.7e-20)
(/ x (- B))
(- (/ (- 1.0 x) B) (* B (* x -0.3333333333333333))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.05e-47) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.7e-20) {
tmp = x / -B;
} else {
tmp = ((1.0 - x) / B) - (B * (x * -0.3333333333333333));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.05d-47)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 1.7d-20) then
tmp = x / -b
else
tmp = ((1.0d0 - x) / b) - (b * (x * (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.05e-47) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.7e-20) {
tmp = x / -B;
} else {
tmp = ((1.0 - x) / B) - (B * (x * -0.3333333333333333));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.05e-47: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 1.7e-20: tmp = x / -B else: tmp = ((1.0 - x) / B) - (B * (x * -0.3333333333333333)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.05e-47) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 1.7e-20) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(Float64(1.0 - x) / B) - Float64(B * Float64(x * -0.3333333333333333))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.05e-47) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 1.7e-20) tmp = x / -B; else tmp = ((1.0 - x) / B) - (B * (x * -0.3333333333333333)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.05e-47], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-20], N[(x / (-B)), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.05 \cdot 10^{-47}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -2.05000000000000001e-47Initial program 62.3%
Taylor expanded in F around -inf 94.0%
Taylor expanded in B around 0 68.7%
Taylor expanded in B around 0 50.4%
+-commutative50.4%
mul-1-neg50.4%
unsub-neg50.4%
associate-*r*50.4%
*-commutative50.4%
associate-*l*50.4%
Simplified50.4%
if -2.05000000000000001e-47 < F < 1.6999999999999999e-20Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
associate-*l/99.4%
associate-/l*99.5%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.5%
Simplified99.6%
Taylor expanded in F around inf 24.3%
associate-/r*24.3%
Simplified24.3%
Taylor expanded in B around 0 21.5%
Taylor expanded in x around inf 39.9%
associate-*r/39.9%
neg-mul-139.9%
Simplified39.9%
if 1.6999999999999999e-20 < F Initial program 66.0%
Taylor expanded in B around 0 34.0%
Taylor expanded in B around 0 25.7%
Taylor expanded in F around inf 42.5%
+-commutative42.5%
associate--r+42.5%
div-sub42.5%
*-commutative42.5%
associate-*l*42.5%
Simplified42.5%
Final simplification44.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- 1.0 x) B)))
(if (<= F -9e+224)
t_0
(if (<= F -6.5e+179) (/ -1.0 B) (if (<= F 8.5e-21) (/ x (- B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (1.0 - x) / B;
double tmp;
if (F <= -9e+224) {
tmp = t_0;
} else if (F <= -6.5e+179) {
tmp = -1.0 / B;
} else if (F <= 8.5e-21) {
tmp = x / -B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 - x) / b
if (f <= (-9d+224)) then
tmp = t_0
else if (f <= (-6.5d+179)) then
tmp = (-1.0d0) / b
else if (f <= 8.5d-21) then
tmp = x / -b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 - x) / B;
double tmp;
if (F <= -9e+224) {
tmp = t_0;
} else if (F <= -6.5e+179) {
tmp = -1.0 / B;
} else if (F <= 8.5e-21) {
tmp = x / -B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 - x) / B tmp = 0 if F <= -9e+224: tmp = t_0 elif F <= -6.5e+179: tmp = -1.0 / B elif F <= 8.5e-21: tmp = x / -B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 - x) / B) tmp = 0.0 if (F <= -9e+224) tmp = t_0; elseif (F <= -6.5e+179) tmp = Float64(-1.0 / B); elseif (F <= 8.5e-21) tmp = Float64(x / Float64(-B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 - x) / B; tmp = 0.0; if (F <= -9e+224) tmp = t_0; elseif (F <= -6.5e+179) tmp = -1.0 / B; elseif (F <= 8.5e-21) tmp = x / -B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -9e+224], t$95$0, If[LessEqual[F, -6.5e+179], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 8.5e-21], N[(x / (-B)), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1 - x}{B}\\
\mathbf{if}\;F \leq -9 \cdot 10^{+224}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{+179}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-21}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -8.9999999999999995e224 or 8.4999999999999993e-21 < F Initial program 59.5%
distribute-lft-neg-in59.5%
+-commutative59.5%
associate-*l/77.0%
associate-/l*76.9%
fma-define76.9%
/-rgt-identity76.9%
remove-double-neg76.9%
fma-neg76.9%
Simplified77.0%
Taylor expanded in F around inf 87.7%
associate-/r*87.7%
Simplified87.7%
Taylor expanded in B around 0 40.5%
if -8.9999999999999995e224 < F < -6.50000000000000052e179Initial program 25.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 83.8%
Taylor expanded in x around 0 59.5%
if -6.50000000000000052e179 < F < 8.4999999999999993e-21Initial program 94.0%
distribute-lft-neg-in94.0%
+-commutative94.0%
associate-*l/96.8%
associate-/l*96.8%
fma-define96.8%
/-rgt-identity96.8%
remove-double-neg96.8%
fma-neg96.8%
Simplified96.9%
Taylor expanded in F around inf 29.7%
associate-/r*29.7%
Simplified29.7%
Taylor expanded in B around 0 24.1%
Taylor expanded in x around inf 36.4%
associate-*r/36.4%
neg-mul-136.4%
Simplified36.4%
Final simplification39.1%
(FPCore (F B x) :precision binary64 (if (<= F -2.55e-47) (+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B)) (if (<= F 1.86e-20) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.55e-47) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.86e-20) {
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 <= (-2.55d-47)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 1.86d-20) 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 <= -2.55e-47) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.86e-20) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.55e-47: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 1.86e-20: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.55e-47) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 1.86e-20) 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 <= -2.55e-47) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 1.86e-20) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.55e-47], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.86e-20], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.55 \cdot 10^{-47}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.86 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.55e-47Initial program 62.3%
Taylor expanded in F around -inf 94.0%
Taylor expanded in B around 0 68.7%
Taylor expanded in B around 0 50.4%
+-commutative50.4%
mul-1-neg50.4%
unsub-neg50.4%
associate-*r*50.4%
*-commutative50.4%
associate-*l*50.4%
Simplified50.4%
if -2.55e-47 < F < 1.86000000000000006e-20Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
associate-*l/99.4%
associate-/l*99.5%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.5%
Simplified99.6%
Taylor expanded in F around inf 24.3%
associate-/r*24.3%
Simplified24.3%
Taylor expanded in B around 0 21.5%
Taylor expanded in x around inf 39.9%
associate-*r/39.9%
neg-mul-139.9%
Simplified39.9%
if 1.86000000000000006e-20 < F Initial program 66.0%
distribute-lft-neg-in66.0%
+-commutative66.0%
associate-*l/79.8%
associate-/l*79.8%
fma-define79.8%
/-rgt-identity79.8%
remove-double-neg79.8%
fma-neg79.8%
Simplified79.9%
Taylor expanded in F around inf 94.0%
associate-/r*94.0%
Simplified94.0%
Taylor expanded in B around 0 42.2%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (<= F -5.5e-80) (/ (- -1.0 x) B) (if (<= F 7.2e-21) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e-80) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.2e-21) {
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 <= (-5.5d-80)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 7.2d-21) 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 <= -5.5e-80) {
tmp = (-1.0 - x) / B;
} else if (F <= 7.2e-21) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e-80: tmp = (-1.0 - x) / B elif F <= 7.2e-21: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e-80) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 7.2e-21) 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 <= -5.5e-80) tmp = (-1.0 - x) / B; elseif (F <= 7.2e-21) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e-80], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7.2e-21], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{-80}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-21}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.4999999999999997e-80Initial program 64.4%
Taylor expanded in F around -inf 92.8%
Taylor expanded in B around 0 50.0%
mul-1-neg50.0%
distribute-neg-frac250.0%
Simplified50.0%
if -5.4999999999999997e-80 < F < 7.19999999999999979e-21Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
associate-*l/99.4%
associate-/l*99.4%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.4%
Simplified99.6%
Taylor expanded in F around inf 21.7%
associate-/r*21.7%
Simplified21.7%
Taylor expanded in B around 0 20.4%
Taylor expanded in x around inf 39.8%
associate-*r/39.8%
neg-mul-139.8%
Simplified39.8%
if 7.19999999999999979e-21 < F Initial program 66.0%
distribute-lft-neg-in66.0%
+-commutative66.0%
associate-*l/79.8%
associate-/l*79.8%
fma-define79.8%
/-rgt-identity79.8%
remove-double-neg79.8%
fma-neg79.8%
Simplified79.9%
Taylor expanded in F around inf 94.0%
associate-/r*94.0%
Simplified94.0%
Taylor expanded in B around 0 42.2%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -4e-100) (not (<= x 1.25e-164))) (/ x (- B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -4e-100) || !(x <= 1.25e-164)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-4d-100)) .or. (.not. (x <= 1.25d-164))) then
tmp = x / -b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -4e-100) || !(x <= 1.25e-164)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -4e-100) or not (x <= 1.25e-164): tmp = x / -B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -4e-100) || !(x <= 1.25e-164)) tmp = Float64(x / Float64(-B)); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -4e-100) || ~((x <= 1.25e-164))) tmp = x / -B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -4e-100], N[Not[LessEqual[x, 1.25e-164]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{-100} \lor \neg \left(x \leq 1.25 \cdot 10^{-164}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -4.0000000000000001e-100 or 1.2499999999999999e-164 < x Initial program 82.6%
distribute-lft-neg-in82.6%
+-commutative82.6%
associate-*l/92.2%
associate-/l*92.2%
fma-define92.2%
/-rgt-identity92.2%
remove-double-neg92.2%
fma-neg92.2%
Simplified92.3%
Taylor expanded in F around inf 64.9%
associate-/r*64.9%
Simplified64.9%
Taylor expanded in B around 0 36.8%
Taylor expanded in x around inf 43.5%
associate-*r/43.5%
neg-mul-143.5%
Simplified43.5%
if -4.0000000000000001e-100 < x < 1.2499999999999999e-164Initial program 66.4%
Taylor expanded in F around -inf 31.9%
Taylor expanded in B around 0 25.0%
Taylor expanded in x around 0 18.4%
Final simplification34.9%
(FPCore (F B x) :precision binary64 (if (<= F 1.65e-28) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.65e-28) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / 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.65d-28) then
tmp = (-1.0d0) / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.65e-28) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.65e-28: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.65e-28) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.65e-28) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.65e-28], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.65 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1.6500000000000001e-28Initial program 81.6%
Taylor expanded in F around -inf 63.9%
Taylor expanded in B around 0 60.3%
Taylor expanded in x around 0 13.9%
if 1.6500000000000001e-28 < F Initial program 67.2%
distribute-lft-neg-in67.2%
+-commutative67.2%
associate-*l/80.6%
associate-/l*80.5%
fma-define80.5%
/-rgt-identity80.5%
remove-double-neg80.5%
fma-neg80.5%
Simplified80.6%
Taylor expanded in F around inf 90.9%
associate-/r*90.9%
Simplified90.9%
Taylor expanded in B around 0 40.9%
Taylor expanded in x around 0 22.6%
Final simplification16.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 77.0%
Taylor expanded in F around -inf 57.9%
Taylor expanded in B around 0 55.7%
Taylor expanded in x around 0 10.2%
Final simplification10.2%
herbie shell --seed 2024039
(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))))))