
(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 27 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 -10000000.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 1e+107)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -10000000.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 1e+107) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -10000000.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 1e+107) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -10000000.0], N[(N[(N[(N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e+107], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -10000000:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{+107}:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1e7Initial program 52.5%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.4%
*-lft-identity71.4%
+-commutative71.4%
unpow271.4%
fma-undefine71.4%
Simplified71.4%
associate-*r/71.5%
pow1/271.5%
fma-define71.5%
inv-pow71.5%
metadata-eval71.5%
pow-pow71.5%
fma-define71.5%
metadata-eval71.5%
metadata-eval71.5%
Applied egg-rr71.5%
Taylor expanded in F around -inf 99.8%
if -1e7 < F < 9.9999999999999997e106Initial program 97.5%
Simplified99.6%
if 9.9999999999999997e106 < F Initial program 38.3%
Simplified67.1%
Taylor expanded in x around 0 67.1%
associate-*l/67.1%
*-lft-identity67.1%
+-commutative67.1%
unpow267.1%
fma-undefine67.1%
Simplified67.1%
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 -10000000.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 155000000.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 <= -10000000.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 155000000.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 <= -10000000.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 155000000.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, -10000000.0], N[(N[(N[(N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 155000000.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 -10000000:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 155000000:\\
\;\;\;\;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 < -1e7Initial program 52.5%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.4%
*-lft-identity71.4%
+-commutative71.4%
unpow271.4%
fma-undefine71.4%
Simplified71.4%
associate-*r/71.5%
pow1/271.5%
fma-define71.5%
inv-pow71.5%
metadata-eval71.5%
pow-pow71.5%
fma-define71.5%
metadata-eval71.5%
metadata-eval71.5%
Applied egg-rr71.5%
Taylor expanded in F around -inf 99.8%
if -1e7 < F < 1.55e8Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
if 1.55e8 < F Initial program 54.7%
Simplified78.1%
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.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+130)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e+107)
(- (/ (* F (pow (fma F F 2.0) -0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+130) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e+107) {
tmp = ((F * pow(fma(F, F, 2.0), -0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+130) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e+107) tmp = Float64(Float64(Float64(F * (fma(F, F, 2.0) ^ -0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+130], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e+107], N[(N[(N[(F * N[Power[N[(F * F + 2.0), $MachinePrecision], -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 -1 \cdot 10^{+130}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{+107}:\\
\;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.0000000000000001e130Initial program 38.8%
Simplified58.1%
Taylor expanded in x around 0 58.1%
associate-*l/58.1%
*-lft-identity58.1%
+-commutative58.1%
unpow258.1%
fma-undefine58.1%
Simplified58.1%
Taylor expanded in F around -inf 99.8%
if -1.0000000000000001e130 < F < 9.9999999999999997e106Initial program 95.6%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
pow1/299.6%
fma-define99.6%
inv-pow99.6%
metadata-eval99.6%
pow-pow99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 9.9999999999999997e106 < F Initial program 38.3%
Simplified67.1%
Taylor expanded in x around 0 67.1%
associate-*l/67.1%
*-lft-identity67.1%
+-commutative67.1%
unpow267.1%
fma-undefine67.1%
Simplified67.1%
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 -10000000.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 2000.0)
(- (/ (/ 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 <= -10000000.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 2000.0) {
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 <= -10000000.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 2000.0) 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, -10000000.0], N[(N[(N[(N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2000.0], 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 -10000000:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2000:\\
\;\;\;\;\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 < -1e7Initial program 52.5%
Simplified71.3%
Taylor expanded in x around 0 71.4%
associate-*l/71.4%
*-lft-identity71.4%
+-commutative71.4%
unpow271.4%
fma-undefine71.4%
Simplified71.4%
associate-*r/71.5%
pow1/271.5%
fma-define71.5%
inv-pow71.5%
metadata-eval71.5%
pow-pow71.5%
fma-define71.5%
metadata-eval71.5%
metadata-eval71.5%
Applied egg-rr71.5%
Taylor expanded in F around -inf 99.8%
if -1e7 < F < 2e3Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
pow1/299.6%
fma-define99.6%
inv-pow99.6%
metadata-eval99.6%
pow-pow99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
add-sqr-sqrt99.5%
unpow-prod-down99.5%
Applied egg-rr99.5%
pow-sqr99.5%
metadata-eval99.5%
unpow-199.5%
Simplified99.5%
un-div-inv99.6%
Applied egg-rr99.6%
if 2e3 < F Initial program 54.7%
Simplified78.1%
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.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -12000.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 41000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -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 <= -12000.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 41000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= (-12000.0d0)) then
tmp = (((1.0d0 / (f ** 2.0d0)) + (-1.0d0)) / sin(b)) - t_0
else if (f <= 41000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-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 <= -12000.0) {
tmp = (((1.0 / Math.pow(F, 2.0)) + -1.0) / Math.sin(B)) - t_0;
} else if (F <= 41000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= -12000.0: tmp = (((1.0 / math.pow(F, 2.0)) + -1.0) / math.sin(B)) - t_0 elif F <= 41000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= -12000.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 41000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -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 <= -12000.0) tmp = (((1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0; elseif (F <= 41000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (2.0 * x)) ^ -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, -12000.0], N[(N[(N[(N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 41000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $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 -12000:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 41000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -12000Initial program 54.0%
Simplified72.2%
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.4%
pow1/272.4%
fma-define72.4%
inv-pow72.4%
metadata-eval72.4%
pow-pow72.4%
fma-define72.4%
metadata-eval72.4%
metadata-eval72.4%
Applied egg-rr72.4%
Taylor expanded in F around -inf 99.8%
if -12000 < F < 4.1e7Initial program 99.5%
if 4.1e7 < F Initial program 54.7%
Simplified78.1%
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.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -55000.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 100000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -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 <= -55000.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= (-55000.0d0)) then
tmp = (((1.0d0 / (f ** 2.0d0)) + (-1.0d0)) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-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 <= -55000.0) {
tmp = (((1.0 / Math.pow(F, 2.0)) + -1.0) / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= -55000.0: tmp = (((1.0 / math.pow(F, 2.0)) + -1.0) / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= -55000.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -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 <= -55000.0) tmp = (((1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (2.0 * x)) ^ -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, -55000.0], N[(N[(N[(N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], 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[(2.0 * x), $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 -55000:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -55000Initial program 53.3%
Simplified71.8%
Taylor expanded in x around 0 71.9%
associate-*l/71.8%
*-lft-identity71.8%
+-commutative71.8%
unpow271.8%
fma-undefine71.8%
Simplified71.8%
associate-*r/72.0%
pow1/272.0%
fma-define72.0%
inv-pow72.0%
metadata-eval72.0%
pow-pow72.0%
fma-define72.0%
metadata-eval72.0%
metadata-eval72.0%
Applied egg-rr72.0%
Taylor expanded in F around -inf 99.8%
if -55000 < F < 1e8Initial program 99.4%
div-inv99.6%
clear-num99.5%
Applied egg-rr99.5%
if 1e8 < F Initial program 54.7%
Simplified78.1%
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.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.045)
(- (* 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 <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.045) {
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 <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.045d0) 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 <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.045) {
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 <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.045: 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 <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.045) 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 <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.045) 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, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.045], 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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.045:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 54.7%
Simplified72.6%
Taylor expanded in x around 0 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-undefine72.7%
Simplified72.7%
Taylor expanded in F around -inf 99.1%
if -1.3999999999999999 < F < 0.044999999999999998Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 97.6%
if 0.044999999999999998 < F Initial program 57.2%
Simplified79.2%
Taylor expanded in x around 0 79.2%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 97.2%
Final simplification97.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 0.045)
(- (* 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 <= -1.4) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 0.045) {
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 <= (-1.4d0)) then
tmp = (((1.0d0 / (f ** 2.0d0)) + (-1.0d0)) / sin(b)) - t_0
else if (f <= 0.045d0) 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 <= -1.4) {
tmp = (((1.0 / Math.pow(F, 2.0)) + -1.0) / Math.sin(B)) - t_0;
} else if (F <= 0.045) {
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 <= -1.4: tmp = (((1.0 / math.pow(F, 2.0)) + -1.0) / math.sin(B)) - t_0 elif F <= 0.045: 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 <= -1.4) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 0.045) 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 <= -1.4) tmp = (((1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0; elseif (F <= 0.045) 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, -1.4], N[(N[(N[(N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.045], 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 -1.4:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.045:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 54.7%
Simplified72.6%
Taylor expanded in x around 0 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-undefine72.7%
Simplified72.7%
associate-*r/72.8%
pow1/272.8%
fma-define72.8%
inv-pow72.8%
metadata-eval72.8%
pow-pow72.8%
fma-define72.8%
metadata-eval72.8%
metadata-eval72.8%
Applied egg-rr72.8%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 0.044999999999999998Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 97.6%
if 0.044999999999999998 < F Initial program 57.2%
Simplified79.2%
Taylor expanded in x around 0 79.2%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 97.2%
Final simplification98.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -15500.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4e-123)
t_0
(if (<= F 9.5e-111)
(/ (* x (- (cos B))) (sin B))
(if (<= F 890000.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)) + (2.0 * x)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -15500.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4e-123) {
tmp = t_0;
} else if (F <= 9.5e-111) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 890000.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) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-15500.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4d-123)) then
tmp = t_0
else if (f <= 9.5d-111) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 890000.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)) + (2.0 * x)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -15500.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4e-123) {
tmp = t_0;
} else if (F <= 9.5e-111) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 890000.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)) + (2.0 * x)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -15500.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4e-123: tmp = t_0 elif F <= 9.5e-111: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 890000.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(2.0 * x)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -15500.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4e-123) tmp = t_0; elseif (F <= 9.5e-111) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 890000.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)) + (2.0 * x)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -15500.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4e-123) tmp = t_0; elseif (F <= 9.5e-111) tmp = (x * -cos(B)) / sin(B); elseif (F <= 890000.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[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -15500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4e-123], t$95$0, If[LessEqual[F, 9.5e-111], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 890000.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) + 2 \cdot x\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -15500:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-123}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-111}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 890000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -15500Initial program 54.0%
Simplified72.2%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
Taylor expanded in F around -inf 99.7%
if -15500 < F < -4.0000000000000002e-123 or 9.4999999999999995e-111 < F < 8.9e5Initial program 99.4%
Taylor expanded in B around 0 86.5%
if -4.0000000000000002e-123 < F < 9.4999999999999995e-111Initial program 99.5%
Taylor expanded in F around inf 34.8%
Taylor expanded in x around inf 88.2%
associate-*r/88.2%
neg-mul-188.2%
distribute-rgt-neg-in88.2%
Simplified88.2%
if 8.9e5 < F Initial program 54.7%
Simplified78.1%
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.7%
Final simplification93.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5))
(t_1 (/ x (tan B)))
(t_2 (/ 1.0 (sin B))))
(if (<= F -8200.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -3.9e-121)
(- (* t_0 (* F t_2)) (/ x B))
(if (<= F 2.2e-111)
(/ (* x (- (cos B))) (sin B))
(if (<= F 22500.0) (- (* (/ F (sin B)) t_0) (/ x B)) (- t_2 t_1)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (2.0 * x)), -0.5);
double t_1 = x / tan(B);
double t_2 = 1.0 / sin(B);
double tmp;
if (F <= -8200.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -3.9e-121) {
tmp = (t_0 * (F * t_2)) - (x / B);
} else if (F <= 2.2e-111) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 22500.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = t_2 - 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 = ((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0)
t_1 = x / tan(b)
t_2 = 1.0d0 / sin(b)
if (f <= (-8200.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-3.9d-121)) then
tmp = (t_0 * (f * t_2)) - (x / b)
else if (f <= 2.2d-111) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 22500.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = t_2 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5);
double t_1 = x / Math.tan(B);
double t_2 = 1.0 / Math.sin(B);
double tmp;
if (F <= -8200.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -3.9e-121) {
tmp = (t_0 * (F * t_2)) - (x / B);
} else if (F <= 2.2e-111) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 22500.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = t_2 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) t_1 = x / math.tan(B) t_2 = 1.0 / math.sin(B) tmp = 0 if F <= -8200.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -3.9e-121: tmp = (t_0 * (F * t_2)) - (x / B) elif F <= 2.2e-111: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 22500.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = t_2 - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -0.5 t_1 = Float64(x / tan(B)) t_2 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -8200.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -3.9e-121) tmp = Float64(Float64(t_0 * Float64(F * t_2)) - Float64(x / B)); elseif (F <= 2.2e-111) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 22500.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(t_2 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (2.0 * x)) ^ -0.5; t_1 = x / tan(B); t_2 = 1.0 / sin(B); tmp = 0.0; if (F <= -8200.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -3.9e-121) tmp = (t_0 * (F * t_2)) - (x / B); elseif (F <= 2.2e-111) tmp = (x * -cos(B)) / sin(B); elseif (F <= 22500.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = t_2 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8200.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.9e-121], N[(N[(t$95$0 * N[(F * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-111], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 22500.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
t_2 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -8200:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -3.9 \cdot 10^{-121}:\\
\;\;\;\;t\_0 \cdot \left(F \cdot t\_2\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-111}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 22500:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_2 - t\_1\\
\end{array}
\end{array}
if F < -8200Initial program 54.0%
Simplified72.2%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
Taylor expanded in F around -inf 99.7%
if -8200 < F < -3.9e-121Initial program 99.4%
Taylor expanded in B around 0 88.1%
div-inv88.1%
Applied egg-rr88.1%
if -3.9e-121 < F < 2.2e-111Initial program 99.5%
Taylor expanded in F around inf 34.8%
Taylor expanded in x around inf 88.2%
associate-*r/88.2%
neg-mul-188.2%
distribute-rgt-neg-in88.2%
Simplified88.2%
if 2.2e-111 < F < 22500Initial program 99.4%
Taylor expanded in B around 0 84.6%
if 22500 < F Initial program 54.7%
Simplified78.1%
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.7%
Final simplification93.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* 2.0 x))))) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -0.0058)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.4e-119)
t_0
(if (<= F 2.9e-111)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.003) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (2.0 * x))))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.0058) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.4e-119) {
tmp = t_0;
} else if (F <= 2.9e-111) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.003) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (2.0d0 * x))))) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.0058d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.4d-119)) then
tmp = t_0
else if (f <= 2.9d-111) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.003d0) 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.sqrt((1.0 / (2.0 + (2.0 * x))))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.0058) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.4e-119) {
tmp = t_0;
} else if (F <= 2.9e-111) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.003) {
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.sqrt((1.0 / (2.0 + (2.0 * x))))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.0058: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.4e-119: tmp = t_0 elif F <= 2.9e-111: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.003: 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)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(2.0 * x))))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0058) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.4e-119) tmp = t_0; elseif (F <= 2.9e-111) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.003) 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)) * sqrt((1.0 / (2.0 + (2.0 * x))))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.0058) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.4e-119) tmp = t_0; elseif (F <= 2.9e-111) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.003) 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[Sqrt[N[(1.0 / N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0058], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.4e-119], t$95$0, If[LessEqual[F, 2.9e-111], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.003], 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 \sqrt{\frac{1}{2 + 2 \cdot x}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0058:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-119}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-111}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.003:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -0.0058Initial program 56.0%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
+-commutative73.5%
unpow273.5%
fma-undefine73.5%
Simplified73.5%
Taylor expanded in F around -inf 97.8%
if -0.0058 < F < -1.4e-119 or 2.90000000000000002e-111 < F < 0.0030000000000000001Initial program 99.3%
Taylor expanded in B around 0 86.6%
Taylor expanded in F around 0 83.7%
if -1.4e-119 < F < 2.90000000000000002e-111Initial program 99.5%
Taylor expanded in F around inf 34.8%
Taylor expanded in x around inf 88.2%
associate-*r/88.2%
neg-mul-188.2%
distribute-rgt-neg-in88.2%
Simplified88.2%
if 0.0030000000000000001 < F Initial program 57.2%
Simplified79.2%
Taylor expanded in x around 0 79.2%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 97.2%
Final simplification92.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5) (/ F B)) (/ x B))))
(if (<= F -2.8e+132)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -18000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -15600.0)
(- (* F (/ -1.0 (* F B))) (/ x (tan B)))
(if (<= F -4e-120)
t_0
(if (<= F 2.9e-67)
(* x (/ (cos B) (- (sin B))))
(if (<= F 0.045) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -2.8e+132) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -18000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -15600.0) {
tmp = (F * (-1.0 / (F * B))) - (x / tan(B));
} else if (F <= -4e-120) {
tmp = t_0;
} else if (F <= 2.9e-67) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 0.045) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0)) * (f / b)) - (x / b)
if (f <= (-2.8d+132)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-18000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-15600.0d0)) then
tmp = (f * ((-1.0d0) / (f * b))) - (x / tan(b))
else if (f <= (-4d-120)) then
tmp = t_0
else if (f <= 2.9d-67) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 0.045d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -2.8e+132) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -18000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -15600.0) {
tmp = (F * (-1.0 / (F * B))) - (x / Math.tan(B));
} else if (F <= -4e-120) {
tmp = t_0;
} else if (F <= 2.9e-67) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 0.045) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B) tmp = 0 if F <= -2.8e+132: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -18000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -15600.0: tmp = (F * (-1.0 / (F * B))) - (x / math.tan(B)) elif F <= -4e-120: tmp = t_0 elif F <= 2.9e-67: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 0.045: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.8e+132) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -18000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -15600.0) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - Float64(x / tan(B))); elseif (F <= -4e-120) tmp = t_0; elseif (F <= 2.9e-67) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 0.045) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (2.0 * x)) ^ -0.5) * (F / B)) - (x / B); tmp = 0.0; if (F <= -2.8e+132) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -18000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -15600.0) tmp = (F * (-1.0 / (F * B))) - (x / tan(B)); elseif (F <= -4e-120) tmp = t_0; elseif (F <= 2.9e-67) tmp = x * (cos(B) / -sin(B)); elseif (F <= 0.045) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+132], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -18000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -15600.0], N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4e-120], t$95$0, If[LessEqual[F, 2.9e-67], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.045], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+132}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -18000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -15600:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-120}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-67}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.045:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.7999999999999999e132Initial program 39.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 77.1%
if -2.7999999999999999e132 < F < -1.8e7Initial program 77.8%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around -inf 94.2%
mul-1-neg94.2%
distribute-neg-in94.2%
distribute-neg-frac94.2%
metadata-eval94.2%
unsub-neg94.2%
Simplified94.2%
if -1.8e7 < F < -15600Initial program 99.2%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-*l/100.0%
*-lft-identity100.0%
+-commutative100.0%
unpow2100.0%
fma-undefine100.0%
Simplified100.0%
Taylor expanded in F around -inf 100.0%
Taylor expanded in B around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -15600 < F < -3.99999999999999991e-120 or 2.90000000000000005e-67 < F < 0.044999999999999998Initial program 99.3%
Taylor expanded in B around 0 90.3%
Taylor expanded in B around 0 53.3%
if -3.99999999999999991e-120 < F < 2.90000000000000005e-67Initial program 99.5%
Taylor expanded in F around -inf 36.2%
Taylor expanded in x around inf 83.0%
mul-1-neg83.0%
associate-/l*82.8%
distribute-lft-neg-in82.8%
Simplified82.8%
if 0.044999999999999998 < F Initial program 57.2%
Taylor expanded in B around 0 37.9%
Taylor expanded in F around inf 77.5%
Final simplification75.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5) (/ F B)) (/ x B))))
(if (<= F -5e+131)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -4700000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6700.0)
(- (* F (/ -1.0 (* F B))) (/ x (tan B)))
(if (<= F -5.3e-120)
t_0
(if (<= F 1.75e-47)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.035) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -5e+131) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -4700000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6700.0) {
tmp = (F * (-1.0 / (F * B))) - (x / tan(B));
} else if (F <= -5.3e-120) {
tmp = t_0;
} else if (F <= 1.75e-47) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.035) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0)) * (f / b)) - (x / b)
if (f <= (-5d+131)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-4700000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6700.0d0)) then
tmp = (f * ((-1.0d0) / (f * b))) - (x / tan(b))
else if (f <= (-5.3d-120)) then
tmp = t_0
else if (f <= 1.75d-47) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.035d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -5e+131) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -4700000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6700.0) {
tmp = (F * (-1.0 / (F * B))) - (x / Math.tan(B));
} else if (F <= -5.3e-120) {
tmp = t_0;
} else if (F <= 1.75e-47) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.035) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B) tmp = 0 if F <= -5e+131: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -4700000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6700.0: tmp = (F * (-1.0 / (F * B))) - (x / math.tan(B)) elif F <= -5.3e-120: tmp = t_0 elif F <= 1.75e-47: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.035: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) tmp = 0.0 if (F <= -5e+131) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -4700000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6700.0) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - Float64(x / tan(B))); elseif (F <= -5.3e-120) tmp = t_0; elseif (F <= 1.75e-47) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.035) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (2.0 * x)) ^ -0.5) * (F / B)) - (x / B); tmp = 0.0; if (F <= -5e+131) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -4700000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6700.0) tmp = (F * (-1.0 / (F * B))) - (x / tan(B)); elseif (F <= -5.3e-120) tmp = t_0; elseif (F <= 1.75e-47) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.035) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+131], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4700000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6700.0], N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.3e-120], t$95$0, If[LessEqual[F, 1.75e-47], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.035], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+131}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4700000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6700:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.3 \cdot 10^{-120}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-47}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.035:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.99999999999999995e131Initial program 39.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 77.1%
if -4.99999999999999995e131 < F < -4.7e6Initial program 77.8%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around -inf 94.2%
mul-1-neg94.2%
distribute-neg-in94.2%
distribute-neg-frac94.2%
metadata-eval94.2%
unsub-neg94.2%
Simplified94.2%
if -4.7e6 < F < -6700Initial program 99.2%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-*l/100.0%
*-lft-identity100.0%
+-commutative100.0%
unpow2100.0%
fma-undefine100.0%
Simplified100.0%
Taylor expanded in F around -inf 100.0%
Taylor expanded in B around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -6700 < F < -5.29999999999999997e-120 or 1.7499999999999999e-47 < F < 0.035000000000000003Initial program 99.3%
Taylor expanded in B around 0 89.7%
Taylor expanded in B around 0 52.4%
if -5.29999999999999997e-120 < F < 1.7499999999999999e-47Initial program 99.5%
Taylor expanded in F around inf 35.6%
Taylor expanded in x around inf 82.4%
associate-*r/82.4%
neg-mul-182.4%
distribute-rgt-neg-in82.4%
Simplified82.4%
if 0.035000000000000003 < F Initial program 57.2%
Taylor expanded in B around 0 37.9%
Taylor expanded in F around inf 77.5%
Final simplification75.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5) (/ F B)) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -6000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -5.3e-120)
t_0
(if (<= F 1.2e-47)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.0122) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -6000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -5.3e-120) {
tmp = t_0;
} else if (F <= 1.2e-47) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.0122) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0)) * (f / b)) - (x / b)
t_1 = x / tan(b)
if (f <= (-6000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-5.3d-120)) then
tmp = t_0
else if (f <= 1.2d-47) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.0122d0) 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 = (Math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -6000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -5.3e-120) {
tmp = t_0;
} else if (F <= 1.2e-47) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.0122) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -6000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -5.3e-120: tmp = t_0 elif F <= 1.2e-47: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.0122: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -5.3e-120) tmp = t_0; elseif (F <= 1.2e-47) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.0122) 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 = ((((2.0 + (F * F)) + (2.0 * x)) ^ -0.5) * (F / B)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -6000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -5.3e-120) tmp = t_0; elseif (F <= 1.2e-47) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.0122) 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[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.3e-120], t$95$0, If[LessEqual[F, 1.2e-47], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0122], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -5.3 \cdot 10^{-120}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.0122:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -6e3Initial program 54.0%
Simplified72.2%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
Taylor expanded in F around -inf 99.7%
if -6e3 < F < -5.29999999999999997e-120 or 1.2e-47 < F < 0.0122000000000000008Initial program 99.3%
Taylor expanded in B around 0 89.7%
Taylor expanded in B around 0 52.4%
if -5.29999999999999997e-120 < F < 1.2e-47Initial program 99.5%
Taylor expanded in F around inf 35.6%
Taylor expanded in x around inf 82.4%
associate-*r/82.4%
neg-mul-182.4%
distribute-rgt-neg-in82.4%
Simplified82.4%
if 0.0122000000000000008 < F Initial program 57.2%
Simplified79.2%
Taylor expanded in x around 0 79.2%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-undefine79.2%
Simplified79.2%
Taylor expanded in F around inf 97.2%
Final simplification85.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5) (/ F B)) (/ x B))))
(if (<= F -6000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1e-119)
t_0
(if (<= F 4e-48)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.045) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -6000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1e-119) {
tmp = t_0;
} else if (F <= 4e-48) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.045) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0)) * (f / b)) - (x / b)
if (f <= (-6000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1d-119)) then
tmp = t_0
else if (f <= 4d-48) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.045d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -6000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1e-119) {
tmp = t_0;
} else if (F <= 4e-48) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.045) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B) tmp = 0 if F <= -6000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1e-119: tmp = t_0 elif F <= 4e-48: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.045: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) tmp = 0.0 if (F <= -6000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1e-119) tmp = t_0; elseif (F <= 4e-48) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.045) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (2.0 * x)) ^ -0.5) * (F / B)) - (x / B); tmp = 0.0; if (F <= -6000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1e-119) tmp = t_0; elseif (F <= 4e-48) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.045) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1e-119], t$95$0, If[LessEqual[F, 4e-48], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.045], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -6000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1 \cdot 10^{-119}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-48}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.045:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6e3Initial program 54.0%
Simplified72.2%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
Taylor expanded in F around -inf 99.7%
if -6e3 < F < -1.00000000000000001e-119 or 3.9999999999999999e-48 < F < 0.044999999999999998Initial program 99.3%
Taylor expanded in B around 0 89.7%
Taylor expanded in B around 0 52.4%
if -1.00000000000000001e-119 < F < 3.9999999999999999e-48Initial program 99.5%
Taylor expanded in F around inf 35.6%
Taylor expanded in x around inf 82.4%
associate-*r/82.4%
neg-mul-182.4%
distribute-rgt-neg-in82.4%
Simplified82.4%
if 0.044999999999999998 < F Initial program 57.2%
Taylor expanded in B around 0 37.9%
Taylor expanded in F around inf 77.5%
Final simplification79.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5) (/ F B)) (/ x B)))
(t_1 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)))
(t_2 (- (* F (/ -1.0 (* F B))) (/ x (tan B)))))
(if (<= F -8.5e+131)
t_1
(if (<= F -12000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -8000.0)
t_2
(if (<= F -1.7e-136)
t_0
(if (<= F -2.5e-256)
t_2
(if (<= F 4.9e-287)
(/ x (- B))
(if (<= F 9.8e-71)
t_1
(if (<= F 0.045) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double t_2 = (F * (-1.0 / (F * B))) - (x / tan(B));
double tmp;
if (F <= -8.5e+131) {
tmp = t_1;
} else if (F <= -12000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -8000.0) {
tmp = t_2;
} else if (F <= -1.7e-136) {
tmp = t_0;
} else if (F <= -2.5e-256) {
tmp = t_2;
} else if (F <= 4.9e-287) {
tmp = x / -B;
} else if (F <= 9.8e-71) {
tmp = t_1;
} else if (F <= 0.045) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0)) * (f / b)) - (x / b)
t_1 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
t_2 = (f * ((-1.0d0) / (f * b))) - (x / tan(b))
if (f <= (-8.5d+131)) then
tmp = t_1
else if (f <= (-12000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-8000.0d0)) then
tmp = t_2
else if (f <= (-1.7d-136)) then
tmp = t_0
else if (f <= (-2.5d-256)) then
tmp = t_2
else if (f <= 4.9d-287) then
tmp = x / -b
else if (f <= 9.8d-71) then
tmp = t_1
else if (f <= 0.045d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B);
double t_1 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double t_2 = (F * (-1.0 / (F * B))) - (x / Math.tan(B));
double tmp;
if (F <= -8.5e+131) {
tmp = t_1;
} else if (F <= -12000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -8000.0) {
tmp = t_2;
} else if (F <= -1.7e-136) {
tmp = t_0;
} else if (F <= -2.5e-256) {
tmp = t_2;
} else if (F <= 4.9e-287) {
tmp = x / -B;
} else if (F <= 9.8e-71) {
tmp = t_1;
} else if (F <= 0.045) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5) * (F / B)) - (x / B) t_1 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) t_2 = (F * (-1.0 / (F * B))) - (x / math.tan(B)) tmp = 0 if F <= -8.5e+131: tmp = t_1 elif F <= -12000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -8000.0: tmp = t_2 elif F <= -1.7e-136: tmp = t_0 elif F <= -2.5e-256: tmp = t_2 elif F <= 4.9e-287: tmp = x / -B elif F <= 9.8e-71: tmp = t_1 elif F <= 0.045: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) t_2 = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - Float64(x / tan(B))) tmp = 0.0 if (F <= -8.5e+131) tmp = t_1; elseif (F <= -12000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -8000.0) tmp = t_2; elseif (F <= -1.7e-136) tmp = t_0; elseif (F <= -2.5e-256) tmp = t_2; elseif (F <= 4.9e-287) tmp = Float64(x / Float64(-B)); elseif (F <= 9.8e-71) tmp = t_1; elseif (F <= 0.045) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (2.0 * x)) ^ -0.5) * (F / B)) - (x / B); t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B); t_2 = (F * (-1.0 / (F * B))) - (x / tan(B)); tmp = 0.0; if (F <= -8.5e+131) tmp = t_1; elseif (F <= -12000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -8000.0) tmp = t_2; elseif (F <= -1.7e-136) tmp = t_0; elseif (F <= -2.5e-256) tmp = t_2; elseif (F <= 4.9e-287) tmp = x / -B; elseif (F <= 9.8e-71) tmp = t_1; elseif (F <= 0.045) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.5e+131], t$95$1, If[LessEqual[F, -12000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8000.0], t$95$2, If[LessEqual[F, -1.7e-136], t$95$0, If[LessEqual[F, -2.5e-256], t$95$2, If[LessEqual[F, 4.9e-287], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 9.8e-71], t$95$1, If[LessEqual[F, 0.045], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
t_2 := F \cdot \frac{-1}{F \cdot B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.5 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -12000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -8000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2.5 \cdot 10^{-256}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq 4.9 \cdot 10^{-287}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 9.8 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 0.045:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.50000000000000063e131 or 4.9000000000000001e-287 < F < 9.7999999999999994e-71Initial program 66.8%
Taylor expanded in F around -inf 72.8%
Taylor expanded in B around 0 70.9%
if -8.50000000000000063e131 < F < -1.2e7Initial program 77.8%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around -inf 94.2%
mul-1-neg94.2%
distribute-neg-in94.2%
distribute-neg-frac94.2%
metadata-eval94.2%
unsub-neg94.2%
Simplified94.2%
if -1.2e7 < F < -8e3 or -1.7e-136 < F < -2.5e-256Initial program 99.3%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around -inf 46.8%
Taylor expanded in B around 0 64.8%
*-commutative64.8%
Simplified64.8%
if -8e3 < F < -1.7e-136 or 9.7999999999999994e-71 < F < 0.044999999999999998Initial program 99.3%
Taylor expanded in B around 0 88.8%
Taylor expanded in B around 0 53.2%
if -2.5e-256 < F < 4.9000000000000001e-287Initial program 99.6%
Taylor expanded in B around 0 71.9%
Taylor expanded in x around inf 71.9%
mul-1-neg71.9%
distribute-frac-neg71.9%
Simplified71.9%
if 0.044999999999999998 < F Initial program 57.2%
Taylor expanded in B around 0 37.9%
Taylor expanded in F around inf 77.5%
Final simplification70.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (sqrt (/ 1.0 (+ 2.0 (* 2.0 x)))) (/ F B)) (/ x B)))
(t_1 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)))
(t_2 (- (* F (/ -1.0 (* F B))) (/ x (tan B)))))
(if (<= F -6.9e+131)
t_1
(if (<= F -10200000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.02e-5)
t_2
(if (<= F -1.65e-136)
t_0
(if (<= F -1.45e-262)
t_2
(if (<= F 8e-287)
(/ x (- B))
(if (<= F 5e-59)
t_1
(if (<= F 0.04) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))))
double code(double F, double B, double x) {
double t_0 = (sqrt((1.0 / (2.0 + (2.0 * x)))) * (F / B)) - (x / B);
double t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double t_2 = (F * (-1.0 / (F * B))) - (x / tan(B));
double tmp;
if (F <= -6.9e+131) {
tmp = t_1;
} else if (F <= -10200000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.02e-5) {
tmp = t_2;
} else if (F <= -1.65e-136) {
tmp = t_0;
} else if (F <= -1.45e-262) {
tmp = t_2;
} else if (F <= 8e-287) {
tmp = x / -B;
} else if (F <= 5e-59) {
tmp = t_1;
} else if (F <= 0.04) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (sqrt((1.0d0 / (2.0d0 + (2.0d0 * x)))) * (f / b)) - (x / b)
t_1 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
t_2 = (f * ((-1.0d0) / (f * b))) - (x / tan(b))
if (f <= (-6.9d+131)) then
tmp = t_1
else if (f <= (-10200000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.02d-5)) then
tmp = t_2
else if (f <= (-1.65d-136)) then
tmp = t_0
else if (f <= (-1.45d-262)) then
tmp = t_2
else if (f <= 8d-287) then
tmp = x / -b
else if (f <= 5d-59) then
tmp = t_1
else if (f <= 0.04d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.sqrt((1.0 / (2.0 + (2.0 * x)))) * (F / B)) - (x / B);
double t_1 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double t_2 = (F * (-1.0 / (F * B))) - (x / Math.tan(B));
double tmp;
if (F <= -6.9e+131) {
tmp = t_1;
} else if (F <= -10200000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.02e-5) {
tmp = t_2;
} else if (F <= -1.65e-136) {
tmp = t_0;
} else if (F <= -1.45e-262) {
tmp = t_2;
} else if (F <= 8e-287) {
tmp = x / -B;
} else if (F <= 5e-59) {
tmp = t_1;
} else if (F <= 0.04) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.sqrt((1.0 / (2.0 + (2.0 * x)))) * (F / B)) - (x / B) t_1 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) t_2 = (F * (-1.0 / (F * B))) - (x / math.tan(B)) tmp = 0 if F <= -6.9e+131: tmp = t_1 elif F <= -10200000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.02e-5: tmp = t_2 elif F <= -1.65e-136: tmp = t_0 elif F <= -1.45e-262: tmp = t_2 elif F <= 8e-287: tmp = x / -B elif F <= 5e-59: tmp = t_1 elif F <= 0.04: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(2.0 * x)))) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) t_2 = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - Float64(x / tan(B))) tmp = 0.0 if (F <= -6.9e+131) tmp = t_1; elseif (F <= -10200000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.02e-5) tmp = t_2; elseif (F <= -1.65e-136) tmp = t_0; elseif (F <= -1.45e-262) tmp = t_2; elseif (F <= 8e-287) tmp = Float64(x / Float64(-B)); elseif (F <= 5e-59) tmp = t_1; elseif (F <= 0.04) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (sqrt((1.0 / (2.0 + (2.0 * x)))) * (F / B)) - (x / B); t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B); t_2 = (F * (-1.0 / (F * B))) - (x / tan(B)); tmp = 0.0; if (F <= -6.9e+131) tmp = t_1; elseif (F <= -10200000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.02e-5) tmp = t_2; elseif (F <= -1.65e-136) tmp = t_0; elseif (F <= -1.45e-262) tmp = t_2; elseif (F <= 8e-287) tmp = x / -B; elseif (F <= 5e-59) tmp = t_1; elseif (F <= 0.04) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.9e+131], t$95$1, If[LessEqual[F, -10200000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.02e-5], t$95$2, If[LessEqual[F, -1.65e-136], t$95$0, If[LessEqual[F, -1.45e-262], t$95$2, If[LessEqual[F, 8e-287], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 5e-59], t$95$1, If[LessEqual[F, 0.04], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
t_2 := F \cdot \frac{-1}{F \cdot B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.9 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -10200000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.45 \cdot 10^{-262}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-287}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 0.04:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.9000000000000001e131 or 8.00000000000000017e-287 < F < 5.0000000000000001e-59Initial program 66.8%
Taylor expanded in F around -inf 72.8%
Taylor expanded in B around 0 70.9%
if -6.9000000000000001e131 < F < -1.02e7Initial program 77.8%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around -inf 94.2%
mul-1-neg94.2%
distribute-neg-in94.2%
distribute-neg-frac94.2%
metadata-eval94.2%
unsub-neg94.2%
Simplified94.2%
if -1.02e7 < F < -1.0200000000000001e-5 or -1.65000000000000009e-136 < F < -1.44999999999999998e-262Initial program 99.3%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around -inf 46.7%
Taylor expanded in B around 0 61.2%
*-commutative61.2%
Simplified61.2%
if -1.0200000000000001e-5 < F < -1.65000000000000009e-136 or 5.0000000000000001e-59 < F < 0.0400000000000000008Initial program 99.3%
Taylor expanded in B around 0 89.9%
Taylor expanded in B around 0 53.4%
Taylor expanded in F around 0 51.2%
if -1.44999999999999998e-262 < F < 8.00000000000000017e-287Initial program 99.6%
Taylor expanded in B around 0 71.9%
Taylor expanded in x around inf 71.9%
mul-1-neg71.9%
distribute-frac-neg71.9%
Simplified71.9%
if 0.0400000000000000008 < F Initial program 57.2%
Taylor expanded in B around 0 37.9%
Taylor expanded in F around inf 77.5%
Final simplification70.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -2.8e+132)
t_0
(if (<= F -5800000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.1e-256)
t_0
(if (<= F 3.5e-287)
(/ x (- B))
(if (<= F 1e-55) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -2.8e+132) {
tmp = t_0;
} else if (F <= -5800000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.1e-256) {
tmp = t_0;
} else if (F <= 3.5e-287) {
tmp = x / -B;
} else if (F <= 1e-55) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-2.8d+132)) then
tmp = t_0
else if (f <= (-5800000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.1d-256)) then
tmp = t_0
else if (f <= 3.5d-287) then
tmp = x / -b
else if (f <= 1d-55) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -2.8e+132) {
tmp = t_0;
} else if (F <= -5800000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.1e-256) {
tmp = t_0;
} else if (F <= 3.5e-287) {
tmp = x / -B;
} else if (F <= 1e-55) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -2.8e+132: tmp = t_0 elif F <= -5800000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.1e-256: tmp = t_0 elif F <= 3.5e-287: tmp = x / -B elif F <= 1e-55: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -2.8e+132) tmp = t_0; elseif (F <= -5800000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.1e-256) tmp = t_0; elseif (F <= 3.5e-287) tmp = Float64(x / Float64(-B)); elseif (F <= 1e-55) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -2.8e+132) tmp = t_0; elseif (F <= -5800000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.1e-256) tmp = t_0; elseif (F <= 3.5e-287) tmp = x / -B; elseif (F <= 1e-55) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+132], t$95$0, If[LessEqual[F, -5800000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-256], t$95$0, If[LessEqual[F, 3.5e-287], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 1e-55], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+132}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -5800000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-256}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-287}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 10^{-55}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.7999999999999999e132 or -5.8e6 < F < -2.10000000000000003e-256 or 3.5e-287 < F < 9.99999999999999995e-56Initial program 81.0%
Taylor expanded in F around -inf 53.3%
Taylor expanded in B around 0 55.5%
if -2.7999999999999999e132 < F < -5.8e6Initial program 77.8%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around -inf 94.2%
mul-1-neg94.2%
distribute-neg-in94.2%
distribute-neg-frac94.2%
metadata-eval94.2%
unsub-neg94.2%
Simplified94.2%
if -2.10000000000000003e-256 < F < 3.5e-287Initial program 99.6%
Taylor expanded in B around 0 71.9%
Taylor expanded in x around inf 71.9%
mul-1-neg71.9%
distribute-frac-neg71.9%
Simplified71.9%
if 9.99999999999999995e-56 < F Initial program 63.6%
Taylor expanded in B around 0 46.8%
Taylor expanded in F around inf 70.3%
Final simplification64.7%
(FPCore (F B x)
:precision binary64
(if (<= F -2.85e-18)
(- (/ -1.0 B) (/ x B))
(if (<= F 1.65)
(/ x (- B))
(if (<= F 4.5e+160) (+ (/ 1.0 (sin B)) (/ x B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.85e-18) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.65) {
tmp = x / -B;
} else if (F <= 4.5e+160) {
tmp = (1.0 / sin(B)) + (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.85d-18)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.65d0) then
tmp = x / -b
else if (f <= 4.5d+160) then
tmp = (1.0d0 / sin(b)) + (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.85e-18) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.65) {
tmp = x / -B;
} else if (F <= 4.5e+160) {
tmp = (1.0 / Math.sin(B)) + (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.85e-18: tmp = (-1.0 / B) - (x / B) elif F <= 1.65: tmp = x / -B elif F <= 4.5e+160: tmp = (1.0 / math.sin(B)) + (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.85e-18) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.65) tmp = Float64(x / Float64(-B)); elseif (F <= 4.5e+160) tmp = Float64(Float64(1.0 / sin(B)) + Float64(x / 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.85e-18) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.65) tmp = x / -B; elseif (F <= 4.5e+160) tmp = (1.0 / sin(B)) + (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.85e-18], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.65], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 4.5e+160], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.85 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.65:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{+160}:\\
\;\;\;\;\frac{1}{\sin B} + \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.84999999999999986e-18Initial program 57.3%
Taylor expanded in B around 0 32.0%
Taylor expanded in B around 0 22.4%
Taylor expanded in F around -inf 48.1%
distribute-lft-in48.1%
mul-1-neg48.1%
unsub-neg48.1%
neg-mul-148.1%
distribute-neg-frac48.1%
metadata-eval48.1%
Simplified48.1%
if -2.84999999999999986e-18 < F < 1.6499999999999999Initial program 99.5%
Taylor expanded in B around 0 66.6%
Taylor expanded in x around inf 30.3%
mul-1-neg30.3%
distribute-frac-neg30.3%
Simplified30.3%
if 1.6499999999999999 < F < 4.4999999999999998e160Initial program 76.9%
Taylor expanded in B around 0 66.0%
Taylor expanded in F around inf 63.4%
*-un-lft-identity63.4%
add-sqr-sqrt45.3%
sqrt-unprod54.3%
sqr-neg54.3%
sqrt-unprod34.4%
add-sqr-sqrt51.3%
associate-*l/56.5%
pow156.5%
inv-pow56.5%
pow-prod-up56.5%
metadata-eval56.5%
metadata-eval56.5%
Applied egg-rr56.5%
*-lft-identity56.5%
+-commutative56.5%
Simplified56.5%
if 4.4999999999999998e160 < F Initial program 37.9%
Taylor expanded in B around 0 10.5%
Taylor expanded in F around inf 40.3%
Taylor expanded in B around 0 58.9%
Final simplification42.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.85e-30)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 8.0)
(/ x (- B))
(if (<= F 2.95e+162) (+ (/ 1.0 (sin B)) (/ x B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e-30) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8.0) {
tmp = x / -B;
} else if (F <= 2.95e+162) {
tmp = (1.0 / sin(B)) + (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.85d-30)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8.0d0) then
tmp = x / -b
else if (f <= 2.95d+162) then
tmp = (1.0d0 / sin(b)) + (x / b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e-30) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8.0) {
tmp = x / -B;
} else if (F <= 2.95e+162) {
tmp = (1.0 / Math.sin(B)) + (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.85e-30: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8.0: tmp = x / -B elif F <= 2.95e+162: tmp = (1.0 / math.sin(B)) + (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.85e-30) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8.0) tmp = Float64(x / Float64(-B)); elseif (F <= 2.95e+162) tmp = Float64(Float64(1.0 / sin(B)) + Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.85e-30) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8.0) tmp = x / -B; elseif (F <= 2.95e+162) tmp = (1.0 / sin(B)) + (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.85e-30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.0], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 2.95e+162], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.85 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{+162}:\\
\;\;\;\;\frac{1}{\sin B} + \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.8500000000000002e-30Initial program 59.5%
Taylor expanded in B around 0 35.7%
Taylor expanded in F around -inf 67.7%
mul-1-neg67.7%
distribute-neg-in67.7%
distribute-neg-frac67.7%
metadata-eval67.7%
unsub-neg67.7%
Simplified67.7%
if -1.8500000000000002e-30 < F < 8Initial program 99.5%
Taylor expanded in B around 0 65.4%
Taylor expanded in x around inf 30.4%
mul-1-neg30.4%
distribute-frac-neg30.4%
Simplified30.4%
if 8 < F < 2.95000000000000014e162Initial program 76.9%
Taylor expanded in B around 0 66.0%
Taylor expanded in F around inf 63.4%
*-un-lft-identity63.4%
add-sqr-sqrt45.3%
sqrt-unprod54.3%
sqr-neg54.3%
sqrt-unprod34.4%
add-sqr-sqrt51.3%
associate-*l/56.5%
pow156.5%
inv-pow56.5%
pow-prod-up56.5%
metadata-eval56.5%
metadata-eval56.5%
Applied egg-rr56.5%
*-lft-identity56.5%
+-commutative56.5%
Simplified56.5%
if 2.95000000000000014e162 < F Initial program 37.9%
Taylor expanded in B around 0 10.5%
Taylor expanded in F around inf 40.3%
Taylor expanded in B around 0 58.9%
Final simplification48.6%
(FPCore (F B x) :precision binary64 (if (<= F -2e-42) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.86e-56) (/ x (- B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-42) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.86e-56) {
tmp = x / -B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2d-42)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.86d-56) then
tmp = x / -b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2e-42) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.86e-56) {
tmp = x / -B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-42: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.86e-56: tmp = x / -B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-42) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.86e-56) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2e-42) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.86e-56) tmp = x / -B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.86e-56], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-42}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.86 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.00000000000000008e-42Initial program 59.5%
Taylor expanded in B around 0 35.7%
Taylor expanded in F around -inf 67.7%
mul-1-neg67.7%
distribute-neg-in67.7%
distribute-neg-frac67.7%
metadata-eval67.7%
unsub-neg67.7%
Simplified67.7%
if -2.00000000000000008e-42 < F < 1.85999999999999997e-56Initial program 99.5%
Taylor expanded in B around 0 61.0%
Taylor expanded in x around inf 30.3%
mul-1-neg30.3%
distribute-frac-neg30.3%
Simplified30.3%
if 1.85999999999999997e-56 < F Initial program 63.6%
Taylor expanded in B around 0 46.8%
Taylor expanded in F around inf 70.3%
Final simplification54.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- B))))
(if (<= x -1.9e-54)
t_0
(if (<= x 4.5e-271)
(/ -1.0 B)
(if (or (<= x 3.9e-194) (not (<= x 1.48e-36))) t_0 (/ (+ 1.0 x) B))))))
double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (x <= -1.9e-54) {
tmp = t_0;
} else if (x <= 4.5e-271) {
tmp = -1.0 / B;
} else if ((x <= 3.9e-194) || !(x <= 1.48e-36)) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x / -b
if (x <= (-1.9d-54)) then
tmp = t_0
else if (x <= 4.5d-271) then
tmp = (-1.0d0) / b
else if ((x <= 3.9d-194) .or. (.not. (x <= 1.48d-36))) then
tmp = t_0
else
tmp = (1.0d0 + x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (x <= -1.9e-54) {
tmp = t_0;
} else if (x <= 4.5e-271) {
tmp = -1.0 / B;
} else if ((x <= 3.9e-194) || !(x <= 1.48e-36)) {
tmp = t_0;
} else {
tmp = (1.0 + x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / -B tmp = 0 if x <= -1.9e-54: tmp = t_0 elif x <= 4.5e-271: tmp = -1.0 / B elif (x <= 3.9e-194) or not (x <= 1.48e-36): tmp = t_0 else: tmp = (1.0 + x) / B return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-B)) tmp = 0.0 if (x <= -1.9e-54) tmp = t_0; elseif (x <= 4.5e-271) tmp = Float64(-1.0 / B); elseif ((x <= 3.9e-194) || !(x <= 1.48e-36)) tmp = t_0; else tmp = Float64(Float64(1.0 + x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -B; tmp = 0.0; if (x <= -1.9e-54) tmp = t_0; elseif (x <= 4.5e-271) tmp = -1.0 / B; elseif ((x <= 3.9e-194) || ~((x <= 1.48e-36))) tmp = t_0; else tmp = (1.0 + x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-B)), $MachinePrecision]}, If[LessEqual[x, -1.9e-54], t$95$0, If[LessEqual[x, 4.5e-271], N[(-1.0 / B), $MachinePrecision], If[Or[LessEqual[x, 3.9e-194], N[Not[LessEqual[x, 1.48e-36]], $MachinePrecision]], t$95$0, N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-B}\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{-54}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-271}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-194} \lor \neg \left(x \leq 1.48 \cdot 10^{-36}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x}{B}\\
\end{array}
\end{array}
if x < -1.9000000000000001e-54 or 4.4999999999999998e-271 < x < 3.8999999999999999e-194 or 1.48e-36 < x Initial program 80.8%
Taylor expanded in B around 0 42.4%
Taylor expanded in x around inf 45.9%
mul-1-neg45.9%
distribute-frac-neg45.9%
Simplified45.9%
if -1.9000000000000001e-54 < x < 4.4999999999999998e-271Initial program 66.0%
Taylor expanded in F around -inf 36.4%
Taylor expanded in B around 0 23.9%
mul-1-neg23.9%
distribute-neg-frac223.9%
Simplified23.9%
Taylor expanded in x around 0 23.9%
if 3.8999999999999999e-194 < x < 1.48e-36Initial program 75.7%
Taylor expanded in F around -inf 18.9%
Taylor expanded in B around 0 13.4%
mul-1-neg13.4%
distribute-neg-frac213.4%
Simplified13.4%
add-sqr-sqrt10.0%
sqrt-unprod11.6%
sqr-neg11.6%
sqrt-unprod7.2%
add-sqr-sqrt18.1%
*-un-lft-identity18.1%
Applied egg-rr18.1%
*-lft-identity18.1%
Simplified18.1%
Final simplification35.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.2e-18)
t_0
(if (<= F 1.05e+189)
(/ x (- B))
(if (<= F 2.7e+222) (/ (+ 1.0 x) B) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.2e-18) {
tmp = t_0;
} else if (F <= 1.05e+189) {
tmp = x / -B;
} else if (F <= 2.7e+222) {
tmp = (1.0 + 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 <= (-1.2d-18)) then
tmp = t_0
else if (f <= 1.05d+189) then
tmp = x / -b
else if (f <= 2.7d+222) then
tmp = (1.0d0 + 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 <= -1.2e-18) {
tmp = t_0;
} else if (F <= 1.05e+189) {
tmp = x / -B;
} else if (F <= 2.7e+222) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -1.2e-18: tmp = t_0 elif F <= 1.05e+189: tmp = x / -B elif F <= 2.7e+222: tmp = (1.0 + 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 <= -1.2e-18) tmp = t_0; elseif (F <= 1.05e+189) tmp = Float64(x / Float64(-B)); elseif (F <= 2.7e+222) tmp = Float64(Float64(1.0 + x) / 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 <= -1.2e-18) tmp = t_0; elseif (F <= 1.05e+189) tmp = x / -B; elseif (F <= 2.7e+222) tmp = (1.0 + 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, -1.2e-18], t$95$0, If[LessEqual[F, 1.05e+189], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 2.7e+222], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{-18}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{+189}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{+222}:\\
\;\;\;\;\frac{1 + x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -1.19999999999999997e-18 or 2.70000000000000013e222 < F Initial program 51.1%
Taylor expanded in F around -inf 87.8%
Taylor expanded in B around 0 47.3%
mul-1-neg47.3%
distribute-neg-frac247.3%
Simplified47.3%
Taylor expanded in B around 0 47.3%
associate-*r/47.3%
neg-mul-147.3%
distribute-neg-in47.3%
metadata-eval47.3%
unsub-neg47.3%
Simplified47.3%
if -1.19999999999999997e-18 < F < 1.04999999999999996e189Initial program 93.9%
Taylor expanded in B around 0 65.0%
Taylor expanded in x around inf 30.3%
mul-1-neg30.3%
distribute-frac-neg30.3%
Simplified30.3%
if 1.04999999999999996e189 < F < 2.70000000000000013e222Initial program 26.0%
Taylor expanded in F around -inf 25.5%
Taylor expanded in B around 0 1.4%
mul-1-neg1.4%
distribute-neg-frac21.4%
Simplified1.4%
add-sqr-sqrt0.6%
sqrt-unprod14.8%
sqr-neg14.8%
sqrt-unprod25.9%
add-sqr-sqrt63.8%
*-un-lft-identity63.8%
Applied egg-rr63.8%
*-lft-identity63.8%
Simplified63.8%
Final simplification37.5%
(FPCore (F B x) :precision binary64 (if (<= F -9e-19) (/ (- -1.0 x) B) (if (<= F 8.5e-52) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-19) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.5e-52) {
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 <= (-9d-19)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.5d-52) 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 <= -9e-19) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.5e-52) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-19: tmp = (-1.0 - x) / B elif F <= 8.5e-52: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-19) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.5e-52) 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 <= -9e-19) tmp = (-1.0 - x) / B; elseif (F <= 8.5e-52) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-19], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.5e-52], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-52}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.00000000000000026e-19Initial program 57.3%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 48.1%
mul-1-neg48.1%
distribute-neg-frac248.1%
Simplified48.1%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
neg-mul-148.1%
distribute-neg-in48.1%
metadata-eval48.1%
unsub-neg48.1%
Simplified48.1%
if -9.00000000000000026e-19 < F < 8.50000000000000006e-52Initial program 99.5%
Taylor expanded in B around 0 63.3%
Taylor expanded in x around inf 30.6%
mul-1-neg30.6%
distribute-frac-neg30.6%
Simplified30.6%
if 8.50000000000000006e-52 < F Initial program 62.8%
Taylor expanded in B around 0 45.5%
Taylor expanded in F around inf 48.7%
Taylor expanded in B around 0 48.0%
Final simplification41.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.2e-15) (- (/ -1.0 B) (/ x B)) (if (<= F 8.2e-52) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-15) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 8.2e-52) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.2d-15)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 8.2d-52) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-15) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 8.2e-52) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2e-15: tmp = (-1.0 / B) - (x / B) elif F <= 8.2e-52: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.2e-15) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 8.2e-52) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.2e-15) tmp = (-1.0 / B) - (x / B); elseif (F <= 8.2e-52) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2e-15], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-52], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-52}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.19999999999999997e-15Initial program 57.3%
Taylor expanded in B around 0 32.0%
Taylor expanded in B around 0 22.4%
Taylor expanded in F around -inf 48.1%
distribute-lft-in48.1%
mul-1-neg48.1%
unsub-neg48.1%
neg-mul-148.1%
distribute-neg-frac48.1%
metadata-eval48.1%
Simplified48.1%
if -1.19999999999999997e-15 < F < 8.19999999999999977e-52Initial program 99.5%
Taylor expanded in B around 0 63.3%
Taylor expanded in x around inf 30.6%
mul-1-neg30.6%
distribute-frac-neg30.6%
Simplified30.6%
if 8.19999999999999977e-52 < F Initial program 62.8%
Taylor expanded in B around 0 45.5%
Taylor expanded in F around inf 48.7%
Taylor expanded in B around 0 48.0%
Final simplification41.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -4e-54) (not (<= x 4.6e-271))) (/ x (- B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -4e-54) || !(x <= 4.6e-271)) {
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-54)) .or. (.not. (x <= 4.6d-271))) 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-54) || !(x <= 4.6e-271)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -4e-54) or not (x <= 4.6e-271): tmp = x / -B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -4e-54) || !(x <= 4.6e-271)) 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-54) || ~((x <= 4.6e-271))) tmp = x / -B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -4e-54], N[Not[LessEqual[x, 4.6e-271]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{-54} \lor \neg \left(x \leq 4.6 \cdot 10^{-271}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -4.0000000000000001e-54 or 4.60000000000000017e-271 < x Initial program 79.5%
Taylor expanded in B around 0 46.2%
Taylor expanded in x around inf 36.0%
mul-1-neg36.0%
distribute-frac-neg36.0%
Simplified36.0%
if -4.0000000000000001e-54 < x < 4.60000000000000017e-271Initial program 66.0%
Taylor expanded in F around -inf 36.4%
Taylor expanded in B around 0 23.9%
mul-1-neg23.9%
distribute-neg-frac223.9%
Simplified23.9%
Taylor expanded in x around 0 23.9%
Final simplification33.0%
(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 76.2%
Taylor expanded in F around -inf 53.4%
Taylor expanded in B around 0 29.3%
mul-1-neg29.3%
distribute-neg-frac229.3%
Simplified29.3%
Taylor expanded in x around 0 10.9%
Final simplification10.9%
herbie shell --seed 2024076
(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))))))