
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+26)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 230000000.0)
(- (/ F (/ (sin B) (pow (fma 2.0 x (fma F F 2.0)) -0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+26) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 230000000.0) {
tmp = (F / (sin(B) / pow(fma(2.0, x, fma(F, F, 2.0)), -0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+26) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 230000000.0) tmp = Float64(Float64(F / Float64(sin(B) / (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 230000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 230000000:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.0000000000000001e26Initial program 48.7%
Simplified71.2%
Taylor expanded in F around -inf 99.9%
if -5.0000000000000001e26 < F < 2.3e8Initial program 99.4%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
if 2.3e8 < F Initial program 50.8%
Simplified66.0%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5000000.0)
(- (* 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 <= -4e+30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5000000.0) {
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 <= -4e+30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5000000.0) 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, -4e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5000000.0], 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 -4 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 5000000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.0000000000000001e30Initial program 47.1%
Simplified70.3%
Taylor expanded in F around -inf 99.9%
if -4.0000000000000001e30 < F < 5e6Initial program 99.4%
Simplified99.6%
if 5e6 < F Initial program 50.8%
Simplified66.0%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -59000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -59000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-59000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -59000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -59000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -59000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -59000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -59000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5000000.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[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -59000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 5000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.9e7Initial program 51.5%
Simplified72.8%
Taylor expanded in F around -inf 99.8%
if -5.9e7 < F < 5e6Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.5%
un-div-inv99.5%
Applied egg-rr99.5%
if 5e6 < F Initial program 50.8%
Simplified66.0%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -74000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 40000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -74000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 40000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-74000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 40000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -74000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 40000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -74000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 40000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -74000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 40000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -74000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 40000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -74000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 40000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -74000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 40000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7.4e7Initial program 51.5%
Simplified72.8%
Taylor expanded in F around -inf 99.8%
if -7.4e7 < F < 4e7Initial program 99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
if 4e7 < F Initial program 50.8%
Simplified66.0%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3400.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3400.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3400.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3400.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3400.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3400.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3400.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3400.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3400:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3400Initial program 51.5%
Simplified72.8%
Taylor expanded in F around -inf 99.8%
if -3400 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 98.0%
associate-/l*98.0%
Simplified98.0%
if 1.3999999999999999 < F Initial program 52.3%
Simplified67.0%
Taylor expanded in F around inf 99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -4e-16)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.4e-171)
t_0
(if (<= F 3.5e-207)
(/ (* x (- (cos B))) (sin B))
(if (<= F 24000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -4e-16) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.4e-171) {
tmp = t_0;
} else if (F <= 3.5e-207) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 24000.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)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-4d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.4d-171)) then
tmp = t_0
else if (f <= 3.5d-207) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 24000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -4e-16) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.4e-171) {
tmp = t_0;
} else if (F <= 3.5e-207) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 24000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -4e-16: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.4e-171: tmp = t_0 elif F <= 3.5e-207: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 24000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.4e-171) tmp = t_0; elseif (F <= 3.5e-207) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 24000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -4e-16) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.4e-171) tmp = t_0; elseif (F <= 3.5e-207) tmp = (x * -cos(B)) / sin(B); elseif (F <= 24000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.4e-171], t$95$0, If[LessEqual[F, 3.5e-207], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 24000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-171}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-207}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 24000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3.9999999999999999e-16Initial program 54.7%
Simplified74.5%
Taylor expanded in F around -inf 97.3%
if -3.9999999999999999e-16 < F < -2.39999999999999987e-171 or 3.5000000000000002e-207 < F < 24000Initial program 99.3%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in B around 0 78.2%
associate-*r/78.2%
neg-mul-178.2%
Simplified78.2%
if -2.39999999999999987e-171 < F < 3.5000000000000002e-207Initial program 99.5%
Simplified99.6%
Taylor expanded in F around -inf 43.3%
Taylor expanded in x around inf 86.1%
associate-*r/86.1%
neg-mul-186.1%
distribute-rgt-neg-in86.1%
Simplified86.1%
if 24000 < F Initial program 52.3%
Simplified67.0%
Taylor expanded in F around inf 99.5%
Final simplification91.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6200.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2600000.0)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F 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 <= -6200.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2600000.0) {
tmp = (x * (-1.0 / tan(B))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= (-6200.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2600000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / 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 <= -6200.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2600000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= -6200.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2600000.0: tmp = (x * (-1.0 / math.tan(B))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= -6200.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2600000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / 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 <= -6200.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2600000.0) tmp = (x * (-1.0 / tan(B))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / 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, -6200.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2600000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $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 -6200:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2600000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6200Initial program 51.5%
Simplified72.8%
Taylor expanded in F around -inf 99.8%
if -6200 < F < 2.6e6Initial program 99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 82.3%
if 2.6e6 < F Initial program 50.8%
Simplified66.0%
Taylor expanded in F around inf 99.8%
Final simplification91.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.5e-46)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.6e-150)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 5.2e-71)
(/ (* x (- (cos B))) (sin 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 <= -5.5e-46) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.6e-150) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 5.2e-71) {
tmp = (x * -cos(B)) / sin(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 <= (-5.5d-46)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.6d-150)) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 5.2d-71) then
tmp = (x * -cos(b)) / sin(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 <= -5.5e-46) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.6e-150) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 5.2e-71) {
tmp = (x * -Math.cos(B)) / Math.sin(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 <= -5.5e-46: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.6e-150: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 5.2e-71: tmp = (x * -math.cos(B)) / math.sin(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 <= -5.5e-46) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.6e-150) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 5.2e-71) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(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 <= -5.5e-46) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.6e-150) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 5.2e-71) tmp = (x * -cos(B)) / sin(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, -5.5e-46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.6e-150], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e-71], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.5 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-150}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.49999999999999983e-46Initial program 57.5%
Simplified76.1%
Taylor expanded in F around -inf 93.0%
if -5.49999999999999983e-46 < F < -3.6000000000000002e-150Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 74.0%
Taylor expanded in F around 0 74.1%
if -3.6000000000000002e-150 < F < 5.1999999999999997e-71Initial program 99.4%
Simplified99.5%
Taylor expanded in F around -inf 35.2%
Taylor expanded in x around inf 72.8%
associate-*r/72.8%
neg-mul-172.8%
distribute-rgt-neg-in72.8%
Simplified72.8%
if 5.1999999999999997e-71 < F Initial program 56.6%
Simplified70.0%
Taylor expanded in F around inf 93.6%
Final simplification85.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.25e-45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.6e-149)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 1.2e-78)
(/ (* x (- (cos B))) (sin B))
(- (* F (/ 1.0 (* F B))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.25e-45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.6e-149) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.2e-78) {
tmp = (x * -cos(B)) / sin(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.25d-45)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.6d-149)) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 1.2d-78) then
tmp = (x * -cos(b)) / sin(b)
else
tmp = (f * (1.0d0 / (f * b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.25e-45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.6e-149) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.2e-78) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.25e-45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.6e-149: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 1.2e-78: tmp = (x * -math.cos(B)) / math.sin(B) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.25e-45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.6e-149) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 1.2e-78) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.25e-45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.6e-149) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 1.2e-78) tmp = (x * -cos(B)) / sin(B); else tmp = (F * (1.0 / (F * B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.25e-45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.6e-149], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-78], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.25 \cdot 10^{-45}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-149}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-78}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -2.2499999999999999e-45Initial program 57.5%
Simplified76.1%
Taylor expanded in F around -inf 93.0%
if -2.2499999999999999e-45 < F < -3.6000000000000002e-149Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 74.0%
Taylor expanded in F around 0 74.1%
if -3.6000000000000002e-149 < F < 1.2e-78Initial program 99.5%
Simplified99.6%
Taylor expanded in F around -inf 35.9%
Taylor expanded in x around inf 73.4%
associate-*r/73.4%
neg-mul-173.4%
distribute-rgt-neg-in73.4%
Simplified73.4%
if 1.2e-78 < F Initial program 57.7%
Simplified70.7%
Taylor expanded in F around inf 91.1%
Taylor expanded in B around 0 73.5%
Final simplification79.7%
(FPCore (F B x)
:precision binary64
(if (<= F -3400.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.7e-79)
(/ (* x (- (cos B))) (sin B))
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3400.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.7e-79) {
tmp = (x * -cos(B)) / sin(B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3400.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.7d-79) then
tmp = (x * -cos(b)) / sin(b)
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3400.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.7e-79) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3400.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.7e-79: tmp = (x * -math.cos(B)) / math.sin(B) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3400.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.7e-79) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3400.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.7e-79) tmp = (x * -cos(B)) / sin(B); else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3400.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-79], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3400:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-79}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3400Initial program 51.5%
Simplified72.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 78.9%
if -3400 < F < 4.7000000000000002e-79Initial program 99.5%
Simplified99.6%
Taylor expanded in F around -inf 35.6%
Taylor expanded in x around inf 66.8%
associate-*r/66.8%
neg-mul-166.8%
distribute-rgt-neg-in66.8%
Simplified66.8%
if 4.7000000000000002e-79 < F Initial program 57.7%
Simplified70.7%
Taylor expanded in F around inf 91.1%
Taylor expanded in B around 0 73.5%
Final simplification72.2%
(FPCore (F B x)
:precision binary64
(if (<= F -3400.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.2e-78)
(* x (/ (cos B) (- (sin B))))
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3400.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.2e-78) {
tmp = x * (cos(B) / -sin(B));
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3400.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.2d-78) then
tmp = x * (cos(b) / -sin(b))
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3400.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.2e-78) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3400.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.2e-78: tmp = x * (math.cos(B) / -math.sin(B)) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3400.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.2e-78) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3400.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.2e-78) tmp = x * (cos(B) / -sin(B)); else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3400.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-78], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3400:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-78}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3400Initial program 51.5%
Simplified72.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 78.9%
if -3400 < F < 1.2e-78Initial program 99.5%
Simplified99.6%
Taylor expanded in F around -inf 33.1%
Taylor expanded in x around inf 66.8%
mul-1-neg66.8%
associate-/l*66.7%
distribute-lft-neg-in66.7%
Simplified66.7%
if 1.2e-78 < F Initial program 57.7%
Simplified70.7%
Taylor expanded in F around inf 91.1%
Taylor expanded in B around 0 73.5%
Final simplification72.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -2.65e-45)
(+ t_1 (/ -1.0 B))
(if (<= F -3.65e-155)
t_0
(if (<= F 1.5e-291)
(+ t_1 (* (/ F B) (/ 1.0 F)))
(if (<= F 3.2e-133) t_0 (- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.65e-45) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -3.65e-155) {
tmp = t_0;
} else if (F <= 1.5e-291) {
tmp = t_1 + ((F / B) * (1.0 / F));
} else if (F <= 3.2e-133) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-2.65d-45)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-3.65d-155)) then
tmp = t_0
else if (f <= 1.5d-291) then
tmp = t_1 + ((f / b) * (1.0d0 / f))
else if (f <= 3.2d-133) then
tmp = t_0
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.65e-45) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -3.65e-155) {
tmp = t_0;
} else if (F <= 1.5e-291) {
tmp = t_1 + ((F / B) * (1.0 / F));
} else if (F <= 3.2e-133) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.65e-45: tmp = t_1 + (-1.0 / B) elif F <= -3.65e-155: tmp = t_0 elif F <= 1.5e-291: tmp = t_1 + ((F / B) * (1.0 / F)) elif F <= 3.2e-133: tmp = t_0 else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.65e-45) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -3.65e-155) tmp = t_0; elseif (F <= 1.5e-291) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 3.2e-133) tmp = t_0; else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.65e-45) tmp = t_1 + (-1.0 / B); elseif (F <= -3.65e-155) tmp = t_0; elseif (F <= 1.5e-291) tmp = t_1 + ((F / B) * (1.0 / F)); elseif (F <= 3.2e-133) tmp = t_0; else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.65e-45], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.65e-155], t$95$0, If[LessEqual[F, 1.5e-291], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-133], t$95$0, N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.65 \cdot 10^{-45}:\\
\;\;\;\;t\_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -3.65 \cdot 10^{-155}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-291}:\\
\;\;\;\;t\_1 + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-133}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.6499999999999999e-45Initial program 57.5%
metadata-eval57.5%
metadata-eval57.5%
Applied egg-rr57.5%
Taylor expanded in B around 0 38.4%
Taylor expanded in F around -inf 71.4%
if -2.6499999999999999e-45 < F < -3.65000000000000017e-155 or 1.5e-291 < F < 3.20000000000000013e-133Initial program 99.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 66.9%
Taylor expanded in F around 0 67.0%
if -3.65000000000000017e-155 < F < 1.5e-291Initial program 99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 88.4%
Taylor expanded in F around inf 68.8%
if 3.20000000000000013e-133 < F Initial program 62.1%
Simplified73.8%
Taylor expanded in F around inf 85.4%
Taylor expanded in B around 0 71.2%
Final simplification70.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -2.25e-45)
(+ t_1 (/ -1.0 B))
(if (<= F -2.2e-155)
t_0
(if (<= F 4.5e-286)
(+ t_1 (* (/ F B) (/ 1.0 F)))
(if (<= F 5.5e-134) t_0 (- (* F (/ 1.0 (* F B))) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.25e-45) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.2e-155) {
tmp = t_0;
} else if (F <= 4.5e-286) {
tmp = t_1 + ((F / B) * (1.0 / F));
} else if (F <= 5.5e-134) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-2.25d-45)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-2.2d-155)) then
tmp = t_0
else if (f <= 4.5d-286) then
tmp = t_1 + ((f / b) * (1.0d0 / f))
else if (f <= 5.5d-134) then
tmp = t_0
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.25e-45) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.2e-155) {
tmp = t_0;
} else if (F <= 4.5e-286) {
tmp = t_1 + ((F / B) * (1.0 / F));
} else if (F <= 5.5e-134) {
tmp = t_0;
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.25e-45: tmp = t_1 + (-1.0 / B) elif F <= -2.2e-155: tmp = t_0 elif F <= 4.5e-286: tmp = t_1 + ((F / B) * (1.0 / F)) elif F <= 5.5e-134: tmp = t_0 else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.25e-45) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -2.2e-155) tmp = t_0; elseif (F <= 4.5e-286) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 5.5e-134) tmp = t_0; else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.25e-45) tmp = t_1 + (-1.0 / B); elseif (F <= -2.2e-155) tmp = t_0; elseif (F <= 4.5e-286) tmp = t_1 + ((F / B) * (1.0 / F)); elseif (F <= 5.5e-134) tmp = t_0; else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.25e-45], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.2e-155], t$95$0, If[LessEqual[F, 4.5e-286], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-134], t$95$0, N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.25 \cdot 10^{-45}:\\
\;\;\;\;t\_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-155}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-286}:\\
\;\;\;\;t\_1 + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-134}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.2499999999999999e-45Initial program 57.5%
metadata-eval57.5%
metadata-eval57.5%
Applied egg-rr57.5%
Taylor expanded in B around 0 38.4%
Taylor expanded in F around -inf 71.4%
if -2.2499999999999999e-45 < F < -2.1999999999999999e-155 or 4.50000000000000005e-286 < F < 5.5000000000000002e-134Initial program 99.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 66.9%
Taylor expanded in x around 0 66.9%
if -2.1999999999999999e-155 < F < 4.50000000000000005e-286Initial program 99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 88.4%
Taylor expanded in F around inf 68.8%
if 5.5000000000000002e-134 < F Initial program 62.1%
Simplified73.8%
Taylor expanded in F around inf 85.4%
Taylor expanded in B around 0 71.2%
Final simplification70.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.75e-45)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 6.5e-133)
(/ (- (* F (sqrt 0.5)) x) B)
(if (or (<= F 9.8e+117) (not (<= F 1.56e+237)))
(- (/ -1.0 B) (/ x (tan B)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-45) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 6.5e-133) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if ((F <= 9.8e+117) || !(F <= 1.56e+237)) {
tmp = (-1.0 / B) - (x / tan(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.75d-45)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 6.5d-133) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if ((f <= 9.8d+117) .or. (.not. (f <= 1.56d+237))) then
tmp = ((-1.0d0) / b) - (x / tan(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.75e-45) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 6.5e-133) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if ((F <= 9.8e+117) || !(F <= 1.56e+237)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.75e-45: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 6.5e-133: tmp = ((F * math.sqrt(0.5)) - x) / B elif (F <= 9.8e+117) or not (F <= 1.56e+237): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.75e-45) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 6.5e-133) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif ((F <= 9.8e+117) || !(F <= 1.56e+237)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(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.75e-45) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 6.5e-133) tmp = ((F * sqrt(0.5)) - x) / B; elseif ((F <= 9.8e+117) || ~((F <= 1.56e+237))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.75e-45], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-133], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 9.8e+117], N[Not[LessEqual[F, 1.56e+237]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-133}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 9.8 \cdot 10^{+117} \lor \neg \left(F \leq 1.56 \cdot 10^{+237}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.75e-45Initial program 57.5%
metadata-eval57.5%
metadata-eval57.5%
Applied egg-rr57.5%
Taylor expanded in B around 0 38.4%
Taylor expanded in F around -inf 71.4%
if -1.75e-45 < F < 6.5000000000000002e-133Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around 0 57.0%
if 6.5000000000000002e-133 < F < 9.8000000000000002e117 or 1.56e237 < F Initial program 77.2%
Simplified86.8%
Taylor expanded in F around -inf 51.7%
Taylor expanded in B around 0 56.9%
if 9.8000000000000002e117 < F < 1.56e237Initial program 37.8%
Simplified52.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 69.6%
Final simplification63.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -5.8e-45)
t_0
(if (<= F 5e-133)
(/ (- (* F (sqrt 0.5)) x) B)
(if (or (<= F 2.45e+119) (not (<= F 3.1e+237))) t_0 (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -5.8e-45) {
tmp = t_0;
} else if (F <= 5e-133) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if ((F <= 2.45e+119) || !(F <= 3.1e+237)) {
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 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-5.8d-45)) then
tmp = t_0
else if (f <= 5d-133) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if ((f <= 2.45d+119) .or. (.not. (f <= 3.1d+237))) 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 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -5.8e-45) {
tmp = t_0;
} else if (F <= 5e-133) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if ((F <= 2.45e+119) || !(F <= 3.1e+237)) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -5.8e-45: tmp = t_0 elif F <= 5e-133: tmp = ((F * math.sqrt(0.5)) - x) / B elif (F <= 2.45e+119) or not (F <= 3.1e+237): tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -5.8e-45) tmp = t_0; elseif (F <= 5e-133) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif ((F <= 2.45e+119) || !(F <= 3.1e+237)) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -5.8e-45) tmp = t_0; elseif (F <= 5e-133) tmp = ((F * sqrt(0.5)) - x) / B; elseif ((F <= 2.45e+119) || ~((F <= 3.1e+237))) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e-45], t$95$0, If[LessEqual[F, 5e-133], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 2.45e+119], N[Not[LessEqual[F, 3.1e+237]], $MachinePrecision]], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{-45}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-133}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{+119} \lor \neg \left(F \leq 3.1 \cdot 10^{+237}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.8e-45 or 4.9999999999999999e-133 < F < 2.44999999999999998e119 or 3.09999999999999991e237 < F Initial program 65.3%
Simplified80.3%
Taylor expanded in F around -inf 76.7%
Taylor expanded in B around 0 65.6%
if -5.8e-45 < F < 4.9999999999999999e-133Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around 0 57.0%
if 2.44999999999999998e119 < F < 3.09999999999999991e237Initial program 37.8%
Simplified52.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 69.6%
Final simplification63.2%
(FPCore (F B x) :precision binary64 (if (<= B 0.00085) (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0)))))) x) B) (+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ 1.0 F)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.00085) {
tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / F));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 0.00085d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0)))))) - x) / b
else
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * (1.0d0 / f))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 0.00085) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (1.0 / F));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 0.00085: tmp = ((F * math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B else: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (1.0 / F)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 0.00085) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0)))))) - x) / B); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(1.0 / F))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 0.00085) tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B; else tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / F)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 0.00085], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.00085:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{1}{F}\\
\end{array}
\end{array}
if B < 8.49999999999999953e-4Initial program 70.5%
Simplified83.6%
Taylor expanded in B around 0 57.0%
pow257.0%
Applied egg-rr57.0%
if 8.49999999999999953e-4 < B Initial program 83.0%
metadata-eval83.0%
metadata-eval83.0%
Applied egg-rr83.0%
Taylor expanded in B around 0 58.9%
Taylor expanded in F around inf 58.5%
Final simplification57.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.3e-44)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 6.8e-133)
(/ (- (* F (sqrt 0.5)) x) B)
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-44) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 6.8e-133) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.3d-44)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 6.8d-133) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-44) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 6.8e-133) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-44: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 6.8e-133: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-44) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 6.8e-133) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-44) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 6.8e-133) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-44], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.8e-133], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-44}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-133}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.2999999999999999e-44Initial program 57.5%
metadata-eval57.5%
metadata-eval57.5%
Applied egg-rr57.5%
Taylor expanded in B around 0 38.4%
Taylor expanded in F around -inf 71.4%
if -1.2999999999999999e-44 < F < 6.80000000000000012e-133Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around 0 57.0%
if 6.80000000000000012e-133 < F Initial program 62.1%
Simplified73.8%
Taylor expanded in F around inf 85.4%
Taylor expanded in B around 0 71.2%
Final simplification66.3%
(FPCore (F B x) :precision binary64 (if (or (<= F 3.6e+119) (not (<= F 3.3e+237))) (- (/ -1.0 B) (/ x (tan B))) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if ((F <= 3.6e+119) || !(F <= 3.3e+237)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((f <= 3.6d+119) .or. (.not. (f <= 3.3d+237))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((F <= 3.6e+119) || !(F <= 3.3e+237)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= 3.6e+119) or not (F <= 3.3e+237): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((F <= 3.6e+119) || !(F <= 3.3e+237)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= 3.6e+119) || ~((F <= 3.3e+237))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, 3.6e+119], N[Not[LessEqual[F, 3.3e+237]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.6 \cdot 10^{+119} \lor \neg \left(F \leq 3.3 \cdot 10^{+237}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 3.60000000000000001e119 or 3.3000000000000001e237 < F Initial program 78.9%
Simplified88.0%
Taylor expanded in F around -inf 59.5%
Taylor expanded in B around 0 58.0%
if 3.60000000000000001e119 < F < 3.3000000000000001e237Initial program 37.8%
Simplified52.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 69.6%
Final simplification59.5%
(FPCore (F B x)
:precision binary64
(if (<= F -4.6e+72)
(/ (- -1.0 x) B)
(if (<= F -9e-22)
(/ -1.0 (sin B))
(if (<= F 7.9e-87) (/ x (- B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e+72) {
tmp = (-1.0 - x) / B;
} else if (F <= -9e-22) {
tmp = -1.0 / sin(B);
} else if (F <= 7.9e-87) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.6d+72)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-9d-22)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 7.9d-87) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e+72) {
tmp = (-1.0 - x) / B;
} else if (F <= -9e-22) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 7.9e-87) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.6e+72: tmp = (-1.0 - x) / B elif F <= -9e-22: tmp = -1.0 / math.sin(B) elif F <= 7.9e-87: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.6e+72) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -9e-22) tmp = Float64(-1.0 / sin(B)); elseif (F <= 7.9e-87) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.6e+72) tmp = (-1.0 - x) / B; elseif (F <= -9e-22) tmp = -1.0 / sin(B); elseif (F <= 7.9e-87) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.6e+72], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -9e-22], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.9e-87], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.6 \cdot 10^{+72}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 7.9 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.6e72Initial program 42.4%
Simplified66.8%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 61.7%
associate-*r/61.7%
neg-mul-161.7%
distribute-neg-in61.7%
metadata-eval61.7%
unsub-neg61.7%
Simplified61.7%
if -4.6e72 < F < -8.99999999999999973e-22Initial program 94.9%
Simplified99.5%
Taylor expanded in F around -inf 81.1%
Taylor expanded in x around 0 53.2%
if -8.99999999999999973e-22 < F < 7.90000000000000033e-87Initial program 99.4%
Simplified99.6%
Taylor expanded in F around inf 25.4%
Taylor expanded in B around 0 22.9%
Taylor expanded in x around inf 37.1%
associate-*r/37.1%
neg-mul-137.1%
Simplified37.1%
if 7.90000000000000033e-87 < F Initial program 58.8%
Simplified71.5%
Taylor expanded in F around inf 89.0%
Taylor expanded in B around 0 49.9%
Final simplification47.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.02e-94) (/ (- -1.0 x) B) (if (<= F 1.95e-86) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.02e-94) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.95e-86) {
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.02d-94)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.95d-86) 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.02e-94) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.95e-86) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.02e-94: tmp = (-1.0 - x) / B elif F <= 1.95e-86: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.02e-94) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.95e-86) 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.02e-94) tmp = (-1.0 - x) / B; elseif (F <= 1.95e-86) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.02e-94], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.95e-86], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.02 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{-86}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.02e-94Initial program 61.2%
Simplified78.2%
Taylor expanded in F around -inf 87.1%
Taylor expanded in B around 0 47.2%
associate-*r/47.2%
neg-mul-147.2%
distribute-neg-in47.2%
metadata-eval47.2%
unsub-neg47.2%
Simplified47.2%
if -1.02e-94 < F < 1.9500000000000001e-86Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 26.2%
Taylor expanded in B around 0 23.3%
Taylor expanded in x around inf 39.1%
associate-*r/39.1%
neg-mul-139.1%
Simplified39.1%
if 1.9500000000000001e-86 < F Initial program 58.8%
Simplified71.5%
Taylor expanded in F around inf 89.0%
Taylor expanded in B around 0 49.9%
Final simplification45.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.12e-94) (/ (- -1.0 x) B) (if (<= F 2.05e+105) (/ x (- B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.12e-94) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.05e+105) {
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 (f <= (-1.12d-94)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.05d+105) 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 (F <= -1.12e-94) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.05e+105) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.12e-94: tmp = (-1.0 - x) / B elif F <= 2.05e+105: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.12e-94) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.05e+105) 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 (F <= -1.12e-94) tmp = (-1.0 - x) / B; elseif (F <= 2.05e+105) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.12e-94], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e+105], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.12 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+105}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -1.12e-94Initial program 61.2%
Simplified78.2%
Taylor expanded in F around -inf 87.1%
Taylor expanded in B around 0 47.2%
associate-*r/47.2%
neg-mul-147.2%
distribute-neg-in47.2%
metadata-eval47.2%
unsub-neg47.2%
Simplified47.2%
if -1.12e-94 < F < 2.0500000000000001e105Initial program 96.9%
Simplified99.5%
Taylor expanded in F around inf 35.6%
Taylor expanded in B around 0 27.2%
Taylor expanded in x around inf 36.9%
associate-*r/36.9%
neg-mul-136.9%
Simplified36.9%
if 2.0500000000000001e105 < F Initial program 44.5%
Simplified57.7%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 54.5%
Taylor expanded in x around 0 34.5%
Final simplification40.0%
(FPCore (F B x) :precision binary64 (if (<= F 1.95e+105) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.95e+105) {
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 (f <= 1.95d+105) 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 (F <= 1.95e+105) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.95e+105: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.95e+105) 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 (F <= 1.95e+105) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.95e+105], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.95 \cdot 10^{+105}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1.94999999999999989e105Initial program 81.2%
Simplified90.2%
Taylor expanded in F around inf 38.4%
Taylor expanded in B around 0 26.1%
Taylor expanded in x around inf 31.8%
associate-*r/31.8%
neg-mul-131.8%
Simplified31.8%
if 1.94999999999999989e105 < F Initial program 44.5%
Simplified57.7%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 54.5%
Taylor expanded in x around 0 34.5%
Final simplification32.4%
(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 73.6%
Simplified83.5%
Taylor expanded in F around inf 51.0%
Taylor expanded in B around 0 32.0%
Taylor expanded in x around 0 10.7%
herbie shell --seed 2024188
(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))))))