
(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 31 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 -42000000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.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 <= -42000000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.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 <= -42000000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.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, -42000000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.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 -42000000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;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.2e13Initial program 57.4%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
add-sqr-sqrt45.0%
sqrt-unprod51.1%
frac-times51.2%
metadata-eval51.2%
metadata-eval51.2%
frac-times51.1%
sqrt-unprod20.3%
add-sqr-sqrt48.4%
metadata-eval48.4%
metadata-eval48.4%
pow-prod-up48.4%
pow148.4%
inv-pow48.4%
associate-*r/48.4%
add-sqr-sqrt20.3%
fma-def20.3%
Applied egg-rr99.8%
if -4.2e13 < F < 1e8Initial program 99.5%
Simplified99.6%
if 1e8 < F Initial program 67.3%
Simplified79.7%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around 0 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.6e+14)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 130000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* (cos B) (/ x (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 <= -1.6e+14) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 130000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (cos(B) * (x / 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 <= (-1.6d+14)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 130000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (cos(b) * (x / 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 <= -1.6e+14) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 130000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (Math.cos(B) * (x / 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 <= -1.6e+14: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 130000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (math.cos(B) * (x / 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 <= -1.6e+14) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 130000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(cos(B) * Float64(x / 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 <= -1.6e+14) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 130000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (cos(B) * (x / 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, -1.6e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 130000000.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[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[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 -1.6 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 130000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.6e14Initial program 57.4%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
add-sqr-sqrt45.0%
sqrt-unprod51.1%
frac-times51.2%
metadata-eval51.2%
metadata-eval51.2%
frac-times51.1%
sqrt-unprod20.3%
add-sqr-sqrt48.4%
metadata-eval48.4%
metadata-eval48.4%
pow-prod-up48.4%
pow148.4%
inv-pow48.4%
associate-*r/48.4%
add-sqr-sqrt20.3%
fma-def20.3%
Applied egg-rr99.8%
if -1.6e14 < F < 1.3e8Initial program 99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
if 1.3e8 < F Initial program 67.3%
Simplified79.7%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around 0 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+14)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.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 <= -5e+14) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.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 <= (-5d+14)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.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 <= -5e+14) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.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 <= -5e+14: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.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 <= -5e+14) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.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 <= -5e+14) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.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, -5e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + 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 -5 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\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 < -5e14Initial program 57.4%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
add-sqr-sqrt45.0%
sqrt-unprod51.1%
frac-times51.2%
metadata-eval51.2%
metadata-eval51.2%
frac-times51.1%
sqrt-unprod20.3%
add-sqr-sqrt48.4%
metadata-eval48.4%
metadata-eval48.4%
pow-prod-up48.4%
pow148.4%
inv-pow48.4%
associate-*r/48.4%
add-sqr-sqrt20.3%
fma-def20.3%
Applied egg-rr99.8%
if -5e14 < F < 1e8Initial program 99.5%
if 1e8 < F Initial program 67.3%
Simplified79.7%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around 0 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.4)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.4) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.4d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.4) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.4: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.4) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 - t_1\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 59.1%
Taylor expanded in F around -inf 99.3%
+-commutative99.3%
add-sqr-sqrt44.5%
sqrt-unprod50.6%
frac-times50.6%
metadata-eval50.6%
metadata-eval50.6%
frac-times50.6%
sqrt-unprod20.9%
add-sqr-sqrt49.1%
metadata-eval49.1%
metadata-eval49.1%
pow-prod-up49.1%
pow149.1%
inv-pow49.1%
associate-*r/49.1%
add-sqr-sqrt20.9%
fma-def20.9%
Applied egg-rr99.4%
if -1.4199999999999999 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
if 1.3999999999999999 < F Initial program 68.3%
Simplified80.4%
Taylor expanded in F around inf 98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in F around 0 99.1%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (/ 1.0 (/ (sin B) (* F (sqrt 0.5)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (1.0 / (sin(B) / (F * sqrt(0.5)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (1.0d0 / (sin(b) / (f * sqrt(0.5d0)))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (1.0 / (Math.sin(B) / (F * Math.sqrt(0.5)))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (1.0 / (math.sin(B) / (F * math.sqrt(0.5)))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(1.0 / Float64(sin(B) / Float64(F * sqrt(0.5)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (1.0 / (sin(B) / (F * sqrt(0.5)))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F * N[Sqrt[0.5], $MachinePrecision]), $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.42:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 59.1%
Taylor expanded in F around -inf 99.3%
+-commutative99.3%
add-sqr-sqrt44.5%
sqrt-unprod50.6%
frac-times50.6%
metadata-eval50.6%
metadata-eval50.6%
frac-times50.6%
sqrt-unprod20.9%
add-sqr-sqrt49.1%
metadata-eval49.1%
metadata-eval49.1%
pow-prod-up49.1%
pow149.1%
inv-pow49.1%
associate-*r/49.1%
add-sqr-sqrt20.9%
fma-def20.9%
Applied egg-rr99.4%
if -1.4199999999999999 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.3%
associate-*r/37.7%
clear-num37.7%
Applied egg-rr99.3%
if 1.3999999999999999 < F Initial program 68.3%
Simplified80.4%
Taylor expanded in F around inf 98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in F around 0 99.1%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -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 <= -1.42) {
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 <= (-1.42d0)) 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 <= -1.42) {
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 <= -1.42: 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 <= -1.42) 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 <= -1.42) 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, -1.42], 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 -1.42:\\
\;\;\;\;\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 < -1.4199999999999999Initial program 59.1%
Taylor expanded in F around -inf 99.3%
+-commutative99.3%
add-sqr-sqrt44.5%
sqrt-unprod50.6%
frac-times50.6%
metadata-eval50.6%
metadata-eval50.6%
frac-times50.6%
sqrt-unprod20.9%
add-sqr-sqrt49.1%
metadata-eval49.1%
metadata-eval49.1%
pow-prod-up49.1%
pow149.1%
inv-pow49.1%
associate-*r/49.1%
add-sqr-sqrt20.9%
fma-def20.9%
Applied egg-rr99.4%
if -1.4199999999999999 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.3%
if 1.3999999999999999 < F Initial program 68.3%
Simplified80.4%
Taylor expanded in F around inf 98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in F around 0 99.1%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B)))
(t_1
(+
(* x (/ -1.0 (tan B)))
(/ 1.0 (* (/ B F) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))))
(t_2 (/ x (tan B))))
(if (<= F -0.019)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -9.5e-104)
(* F (* t_0 (sqrt 0.5)))
(if (<= F 3e-78)
t_1
(if (<= F 1.75e-14)
(/ F (/ (sin B) (sqrt 0.5)))
(if (<= F 8000.0) t_1 (- t_0 t_2))))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = (x * (-1.0 / tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
double t_2 = x / tan(B);
double tmp;
if (F <= -0.019) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -9.5e-104) {
tmp = F * (t_0 * sqrt(0.5));
} else if (F <= 3e-78) {
tmp = t_1;
} else if (F <= 1.75e-14) {
tmp = F / (sin(B) / sqrt(0.5));
} else if (F <= 8000.0) {
tmp = t_1;
} else {
tmp = t_0 - t_2;
}
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 = 1.0d0 / sin(b)
t_1 = (x * ((-1.0d0) / tan(b))) + (1.0d0 / ((b / f) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
t_2 = x / tan(b)
if (f <= (-0.019d0)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-9.5d-104)) then
tmp = f * (t_0 * sqrt(0.5d0))
else if (f <= 3d-78) then
tmp = t_1
else if (f <= 1.75d-14) then
tmp = f / (sin(b) / sqrt(0.5d0))
else if (f <= 8000.0d0) then
tmp = t_1
else
tmp = t_0 - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = (x * (-1.0 / Math.tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -0.019) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -9.5e-104) {
tmp = F * (t_0 * Math.sqrt(0.5));
} else if (F <= 3e-78) {
tmp = t_1;
} else if (F <= 1.75e-14) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else if (F <= 8000.0) {
tmp = t_1;
} else {
tmp = t_0 - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = (x * (-1.0 / math.tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) t_2 = x / math.tan(B) tmp = 0 if F <= -0.019: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -9.5e-104: tmp = F * (t_0 * math.sqrt(0.5)) elif F <= 3e-78: tmp = t_1 elif F <= 1.75e-14: tmp = F / (math.sin(B) / math.sqrt(0.5)) elif F <= 8000.0: tmp = t_1 else: tmp = t_0 - t_2 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / Float64(Float64(B / F) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.019) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -9.5e-104) tmp = Float64(F * Float64(t_0 * sqrt(0.5))); elseif (F <= 3e-78) tmp = t_1; elseif (F <= 1.75e-14) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); elseif (F <= 8000.0) tmp = t_1; else tmp = Float64(t_0 - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = (x * (-1.0 / tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); t_2 = x / tan(B); tmp = 0.0; if (F <= -0.019) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -9.5e-104) tmp = F * (t_0 * sqrt(0.5)); elseif (F <= 3e-78) tmp = t_1; elseif (F <= 1.75e-14) tmp = F / (sin(B) / sqrt(0.5)); elseif (F <= 8000.0) tmp = t_1; else tmp = t_0 - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.019], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -9.5e-104], N[(F * N[(t$95$0 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-78], t$95$1, If[LessEqual[F, 1.75e-14], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8000.0], t$95$1, N[(t$95$0 - t$95$2), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{B}{F} \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.019:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-104}:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{0.5}\right)\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-14}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 8000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 - t_2\\
\end{array}
\end{array}
if F < -0.0189999999999999995Initial program 59.6%
Taylor expanded in F around -inf 99.3%
+-commutative99.3%
add-sqr-sqrt45.2%
sqrt-unprod51.2%
frac-times51.2%
metadata-eval51.2%
metadata-eval51.2%
frac-times51.2%
sqrt-unprod20.6%
add-sqr-sqrt49.8%
metadata-eval49.8%
metadata-eval49.8%
pow-prod-up49.8%
pow149.8%
inv-pow49.8%
associate-*r/49.8%
add-sqr-sqrt20.6%
fma-def20.6%
Applied egg-rr99.4%
if -0.0189999999999999995 < F < -9.5000000000000002e-104Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 98.5%
Taylor expanded in x around 0 70.7%
*-lft-identity70.7%
times-frac70.8%
/-rgt-identity70.8%
Simplified70.8%
div-inv70.8%
Applied egg-rr70.8%
if -9.5000000000000002e-104 < F < 2.99999999999999988e-78 or 1.7500000000000001e-14 < F < 8e3Initial program 99.7%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 87.5%
Taylor expanded in F around inf 76.2%
if 2.99999999999999988e-78 < F < 1.7500000000000001e-14Initial program 99.0%
Simplified99.3%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 62.7%
associate-/l*62.9%
Simplified62.9%
if 8e3 < F Initial program 67.3%
Simplified79.7%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around 0 99.9%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B)))
(t_1
(+
(* x (/ -1.0 (tan B)))
(/ 1.0 (* (/ B F) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))))
(t_2 (/ x (tan B))))
(if (<= F -3.5e-5)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -9.2e-104)
(* F (* t_0 (sqrt 0.5)))
(if (<= F 1.55e-79)
t_1
(if (<= F 5.3e-17)
(/ 1.0 (/ (sin B) (* F (sqrt 0.5))))
(if (<= F 54000.0) t_1 (- t_0 t_2))))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = (x * (-1.0 / tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
double t_2 = x / tan(B);
double tmp;
if (F <= -3.5e-5) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -9.2e-104) {
tmp = F * (t_0 * sqrt(0.5));
} else if (F <= 1.55e-79) {
tmp = t_1;
} else if (F <= 5.3e-17) {
tmp = 1.0 / (sin(B) / (F * sqrt(0.5)));
} else if (F <= 54000.0) {
tmp = t_1;
} else {
tmp = t_0 - t_2;
}
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 = 1.0d0 / sin(b)
t_1 = (x * ((-1.0d0) / tan(b))) + (1.0d0 / ((b / f) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
t_2 = x / tan(b)
if (f <= (-3.5d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-9.2d-104)) then
tmp = f * (t_0 * sqrt(0.5d0))
else if (f <= 1.55d-79) then
tmp = t_1
else if (f <= 5.3d-17) then
tmp = 1.0d0 / (sin(b) / (f * sqrt(0.5d0)))
else if (f <= 54000.0d0) then
tmp = t_1
else
tmp = t_0 - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = (x * (-1.0 / Math.tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -3.5e-5) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -9.2e-104) {
tmp = F * (t_0 * Math.sqrt(0.5));
} else if (F <= 1.55e-79) {
tmp = t_1;
} else if (F <= 5.3e-17) {
tmp = 1.0 / (Math.sin(B) / (F * Math.sqrt(0.5)));
} else if (F <= 54000.0) {
tmp = t_1;
} else {
tmp = t_0 - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = (x * (-1.0 / math.tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) t_2 = x / math.tan(B) tmp = 0 if F <= -3.5e-5: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -9.2e-104: tmp = F * (t_0 * math.sqrt(0.5)) elif F <= 1.55e-79: tmp = t_1 elif F <= 5.3e-17: tmp = 1.0 / (math.sin(B) / (F * math.sqrt(0.5))) elif F <= 54000.0: tmp = t_1 else: tmp = t_0 - t_2 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / Float64(Float64(B / F) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -9.2e-104) tmp = Float64(F * Float64(t_0 * sqrt(0.5))); elseif (F <= 1.55e-79) tmp = t_1; elseif (F <= 5.3e-17) tmp = Float64(1.0 / Float64(sin(B) / Float64(F * sqrt(0.5)))); elseif (F <= 54000.0) tmp = t_1; else tmp = Float64(t_0 - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = (x * (-1.0 / tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); t_2 = x / tan(B); tmp = 0.0; if (F <= -3.5e-5) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -9.2e-104) tmp = F * (t_0 * sqrt(0.5)); elseif (F <= 1.55e-79) tmp = t_1; elseif (F <= 5.3e-17) tmp = 1.0 / (sin(B) / (F * sqrt(0.5))); elseif (F <= 54000.0) tmp = t_1; else tmp = t_0 - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -9.2e-104], N[(F * N[(t$95$0 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e-79], t$95$1, If[LessEqual[F, 5.3e-17], N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 54000.0], t$95$1, N[(t$95$0 - t$95$2), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{B}{F} \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{-104}:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{0.5}\right)\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-79}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{-17}:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 54000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 - t_2\\
\end{array}
\end{array}
if F < -3.4999999999999997e-5Initial program 59.6%
Taylor expanded in F around -inf 99.3%
+-commutative99.3%
add-sqr-sqrt45.2%
sqrt-unprod51.2%
frac-times51.2%
metadata-eval51.2%
metadata-eval51.2%
frac-times51.2%
sqrt-unprod20.6%
add-sqr-sqrt49.8%
metadata-eval49.8%
metadata-eval49.8%
pow-prod-up49.8%
pow149.8%
inv-pow49.8%
associate-*r/49.8%
add-sqr-sqrt20.6%
fma-def20.6%
Applied egg-rr99.4%
if -3.4999999999999997e-5 < F < -9.1999999999999998e-104Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 98.5%
Taylor expanded in x around 0 70.7%
*-lft-identity70.7%
times-frac70.8%
/-rgt-identity70.8%
Simplified70.8%
div-inv70.8%
Applied egg-rr70.8%
if -9.1999999999999998e-104 < F < 1.55e-79 or 5.2999999999999998e-17 < F < 54000Initial program 99.7%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 87.5%
Taylor expanded in F around inf 76.2%
if 1.55e-79 < F < 5.2999999999999998e-17Initial program 99.0%
Simplified99.3%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 62.7%
*-lft-identity62.7%
times-frac62.8%
/-rgt-identity62.8%
Simplified62.8%
associate-*r/62.7%
clear-num62.9%
Applied egg-rr62.9%
if 54000 < F Initial program 67.3%
Simplified79.7%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around 0 99.9%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8100000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.2e-126)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1.65e-13)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8100000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.2e-126) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.65e-13) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-8100000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.2d-126)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1.65d-13) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8100000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.2e-126) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.65e-13) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8100000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.2e-126: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1.65e-13: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8100000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.2e-126) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 1.65e-13) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8100000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.2e-126) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1.65e-13) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8100000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.2e-126], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.65e-13], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / 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 -8100000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-126}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-13}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -8.1e6Initial program 58.0%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
add-sqr-sqrt44.4%
sqrt-unprod51.8%
frac-times51.8%
metadata-eval51.8%
metadata-eval51.8%
frac-times51.8%
sqrt-unprod21.4%
add-sqr-sqrt49.1%
metadata-eval49.1%
metadata-eval49.1%
pow-prod-up49.1%
pow149.1%
inv-pow49.1%
associate-*r/49.1%
add-sqr-sqrt21.4%
fma-def21.4%
Applied egg-rr99.8%
if -8.1e6 < F < -2.20000000000000014e-126Initial program 99.2%
Taylor expanded in B around 0 85.0%
if -2.20000000000000014e-126 < F < 1.65e-13Initial program 99.6%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 84.7%
if 1.65e-13 < F Initial program 69.3%
Simplified81.0%
Taylor expanded in F around inf 97.5%
associate-/r*97.5%
Simplified97.5%
Taylor expanded in F around 0 97.7%
Final simplification92.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -1.3e-15)
(+ t_1 (/ -1.0 B))
(if (<= F -2.8e-104)
t_0
(if (<= F 7.8e-78)
(+ t_1 (/ 1.0 (* (/ B F) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
(if (<= F 1.4)
t_0
(if (<= F 2.55e+66)
(/ 1.0 (sin B))
(- (/ 1.0 B) (/ x (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.3e-15) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.8e-104) {
tmp = t_0;
} else if (F <= 7.8e-78) {
tmp = t_1 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else if (F <= 1.4) {
tmp = t_0;
} else if (F <= 2.55e+66) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-1.3d-15)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-2.8d-104)) then
tmp = t_0
else if (f <= 7.8d-78) then
tmp = t_1 + (1.0d0 / ((b / f) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
else if (f <= 1.4d0) then
tmp = t_0
else if (f <= 2.55d+66) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.3e-15) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.8e-104) {
tmp = t_0;
} else if (F <= 7.8e-78) {
tmp = t_1 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else if (F <= 1.4) {
tmp = t_0;
} else if (F <= 2.55e+66) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.3e-15: tmp = t_1 + (-1.0 / B) elif F <= -2.8e-104: tmp = t_0 elif F <= 7.8e-78: tmp = t_1 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) elif F <= 1.4: tmp = t_0 elif F <= 2.55e+66: tmp = 1.0 / math.sin(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.3e-15) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -2.8e-104) tmp = t_0; elseif (F <= 7.8e-78) tmp = Float64(t_1 + Float64(1.0 / Float64(Float64(B / F) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); elseif (F <= 1.4) tmp = t_0; elseif (F <= 2.55e+66) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.3e-15) tmp = t_1 + (-1.0 / B); elseif (F <= -2.8e-104) tmp = t_0; elseif (F <= 7.8e-78) tmp = t_1 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); elseif (F <= 1.4) tmp = t_0; elseif (F <= 2.55e+66) tmp = 1.0 / sin(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.3e-15], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.8e-104], t$95$0, If[LessEqual[F, 7.8e-78], N[(t$95$1 + N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], t$95$0, If[LessEqual[F, 2.55e+66], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.3 \cdot 10^{-15}:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-104}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-78}:\\
\;\;\;\;t_1 + \frac{1}{\frac{B}{F} \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.55 \cdot 10^{+66}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.30000000000000002e-15Initial program 61.1%
Taylor expanded in F around -inf 95.9%
Taylor expanded in B around 0 79.2%
if -1.30000000000000002e-15 < F < -2.8e-104 or 7.8000000000000004e-78 < F < 1.3999999999999999Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in x around 0 69.2%
*-lft-identity69.2%
times-frac69.3%
/-rgt-identity69.3%
Simplified69.3%
if -2.8e-104 < F < 7.8000000000000004e-78Initial program 99.7%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 88.0%
Taylor expanded in F around inf 76.4%
if 1.3999999999999999 < F < 2.55000000000000004e66Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 95.8%
associate-/r*95.9%
Simplified95.9%
Taylor expanded in F around 0 96.2%
Taylor expanded in x around 0 74.5%
if 2.55000000000000004e66 < F Initial program 59.7%
Simplified75.0%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 81.4%
Final simplification77.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -3.2e-16)
(+ t_0 (/ -1.0 B))
(if (<= F -2.1e-104)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 3.2e-80)
(+ t_0 (/ 1.0 (* (/ B F) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
(if (<= F 1.4)
(/ F (/ (sin B) (sqrt 0.5)))
(if (<= F 3e+58) (/ 1.0 (sin B)) (- (/ 1.0 B) (/ x (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -3.2e-16) {
tmp = t_0 + (-1.0 / B);
} else if (F <= -2.1e-104) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 3.2e-80) {
tmp = t_0 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else if (F <= 1.4) {
tmp = F / (sin(B) / sqrt(0.5));
} else if (F <= 3e+58) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-3.2d-16)) then
tmp = t_0 + ((-1.0d0) / b)
else if (f <= (-2.1d-104)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 3.2d-80) then
tmp = t_0 + (1.0d0 / ((b / f) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
else if (f <= 1.4d0) then
tmp = f / (sin(b) / sqrt(0.5d0))
else if (f <= 3d+58) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -3.2e-16) {
tmp = t_0 + (-1.0 / B);
} else if (F <= -2.1e-104) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 3.2e-80) {
tmp = t_0 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else if (F <= 1.4) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else if (F <= 3e+58) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -3.2e-16: tmp = t_0 + (-1.0 / B) elif F <= -2.1e-104: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 3.2e-80: tmp = t_0 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) elif F <= 1.4: tmp = F / (math.sin(B) / math.sqrt(0.5)) elif F <= 3e+58: tmp = 1.0 / math.sin(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -3.2e-16) tmp = Float64(t_0 + Float64(-1.0 / B)); elseif (F <= -2.1e-104) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 3.2e-80) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(B / F) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); elseif (F <= 1.4) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); elseif (F <= 3e+58) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -3.2e-16) tmp = t_0 + (-1.0 / B); elseif (F <= -2.1e-104) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 3.2e-80) tmp = t_0 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); elseif (F <= 1.4) tmp = F / (sin(B) / sqrt(0.5)); elseif (F <= 3e+58) tmp = 1.0 / sin(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.2e-16], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-104], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-80], N[(t$95$0 + N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e+58], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -3.2 \cdot 10^{-16}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-104}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-80}:\\
\;\;\;\;t_0 + \frac{1}{\frac{B}{F} \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{+58}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.20000000000000023e-16Initial program 61.1%
Taylor expanded in F around -inf 95.9%
Taylor expanded in B around 0 79.2%
if -3.20000000000000023e-16 < F < -2.09999999999999999e-104Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 77.2%
*-lft-identity77.2%
times-frac77.3%
/-rgt-identity77.3%
Simplified77.3%
if -2.09999999999999999e-104 < F < 3.1999999999999999e-80Initial program 99.7%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 88.0%
Taylor expanded in F around inf 76.4%
if 3.1999999999999999e-80 < F < 1.3999999999999999Initial program 99.0%
Simplified99.3%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 61.2%
associate-/l*61.4%
Simplified61.4%
if 1.3999999999999999 < F < 3.0000000000000002e58Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 95.8%
associate-/r*95.9%
Simplified95.9%
Taylor expanded in F around 0 96.2%
Taylor expanded in x around 0 74.5%
if 3.0000000000000002e58 < F Initial program 59.7%
Simplified75.0%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 81.4%
Final simplification77.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -8.6e-20)
(+ t_1 (/ -1.0 B))
(if (<= F -2.1e-104)
(* F (* t_0 (sqrt 0.5)))
(if (<= F 1.48e-78)
(+ t_1 (/ 1.0 (* (/ B F) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
(if (<= F 1.4)
(/ F (/ (sin B) (sqrt 0.5)))
(if (<= F 9.4e+58) t_0 (- (/ 1.0 B) (/ x (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -8.6e-20) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.1e-104) {
tmp = F * (t_0 * sqrt(0.5));
} else if (F <= 1.48e-78) {
tmp = t_1 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else if (F <= 1.4) {
tmp = F / (sin(B) / sqrt(0.5));
} else if (F <= 9.4e+58) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-8.6d-20)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-2.1d-104)) then
tmp = f * (t_0 * sqrt(0.5d0))
else if (f <= 1.48d-78) then
tmp = t_1 + (1.0d0 / ((b / f) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
else if (f <= 1.4d0) then
tmp = f / (sin(b) / sqrt(0.5d0))
else if (f <= 9.4d+58) then
tmp = t_0
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -8.6e-20) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.1e-104) {
tmp = F * (t_0 * Math.sqrt(0.5));
} else if (F <= 1.48e-78) {
tmp = t_1 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else if (F <= 1.4) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else if (F <= 9.4e+58) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -8.6e-20: tmp = t_1 + (-1.0 / B) elif F <= -2.1e-104: tmp = F * (t_0 * math.sqrt(0.5)) elif F <= 1.48e-78: tmp = t_1 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) elif F <= 1.4: tmp = F / (math.sin(B) / math.sqrt(0.5)) elif F <= 9.4e+58: tmp = t_0 else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -8.6e-20) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -2.1e-104) tmp = Float64(F * Float64(t_0 * sqrt(0.5))); elseif (F <= 1.48e-78) tmp = Float64(t_1 + Float64(1.0 / Float64(Float64(B / F) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); elseif (F <= 1.4) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); elseif (F <= 9.4e+58) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -8.6e-20) tmp = t_1 + (-1.0 / B); elseif (F <= -2.1e-104) tmp = F * (t_0 * sqrt(0.5)); elseif (F <= 1.48e-78) tmp = t_1 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); elseif (F <= 1.4) tmp = F / (sin(B) / sqrt(0.5)); elseif (F <= 9.4e+58) tmp = t_0; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.6e-20], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-104], N[(F * N[(t$95$0 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.48e-78], N[(t$95$1 + N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.4e+58], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -8.6 \cdot 10^{-20}:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-104}:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{0.5}\right)\\
\mathbf{elif}\;F \leq 1.48 \cdot 10^{-78}:\\
\;\;\;\;t_1 + \frac{1}{\frac{B}{F} \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 9.4 \cdot 10^{+58}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -8.60000000000000022e-20Initial program 61.1%
Taylor expanded in F around -inf 95.9%
Taylor expanded in B around 0 79.2%
if -8.60000000000000022e-20 < F < -2.09999999999999999e-104Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 77.2%
*-lft-identity77.2%
times-frac77.3%
/-rgt-identity77.3%
Simplified77.3%
div-inv77.3%
Applied egg-rr77.3%
if -2.09999999999999999e-104 < F < 1.48000000000000007e-78Initial program 99.7%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 88.0%
Taylor expanded in F around inf 76.4%
if 1.48000000000000007e-78 < F < 1.3999999999999999Initial program 99.0%
Simplified99.3%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 61.2%
associate-/l*61.4%
Simplified61.4%
if 1.3999999999999999 < F < 9.39999999999999944e58Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 95.8%
associate-/r*95.9%
Simplified95.9%
Taylor expanded in F around 0 96.2%
Taylor expanded in x around 0 74.5%
if 9.39999999999999944e58 < F Initial program 59.7%
Simplified75.0%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 81.4%
Final simplification77.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -0.00029)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -5.2e-106)
(* F (* t_0 (sqrt 0.5)))
(if (<= F 6.1e-80)
(+
(* x (/ -1.0 (tan B)))
(/ 1.0 (* (/ B F) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
(if (<= F 1.4)
(/ F (/ (sin B) (sqrt 0.5)))
(if (<= F 2.5e+58) t_0 (- (/ 1.0 B) t_1))))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.00029) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -5.2e-106) {
tmp = F * (t_0 * sqrt(0.5));
} else if (F <= 6.1e-80) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else if (F <= 1.4) {
tmp = F / (sin(B) / sqrt(0.5));
} else if (F <= 2.5e+58) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-0.00029d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-5.2d-106)) then
tmp = f * (t_0 * sqrt(0.5d0))
else if (f <= 6.1d-80) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / ((b / f) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
else if (f <= 1.4d0) then
tmp = f / (sin(b) / sqrt(0.5d0))
else if (f <= 2.5d+58) then
tmp = t_0
else
tmp = (1.0d0 / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.00029) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -5.2e-106) {
tmp = F * (t_0 * Math.sqrt(0.5));
} else if (F <= 6.1e-80) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else if (F <= 1.4) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else if (F <= 2.5e+58) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.00029: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -5.2e-106: tmp = F * (t_0 * math.sqrt(0.5)) elif F <= 6.1e-80: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) elif F <= 1.4: tmp = F / (math.sin(B) / math.sqrt(0.5)) elif F <= 2.5e+58: tmp = t_0 else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00029) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -5.2e-106) tmp = Float64(F * Float64(t_0 * sqrt(0.5))); elseif (F <= 6.1e-80) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / Float64(Float64(B / F) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); elseif (F <= 1.4) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); elseif (F <= 2.5e+58) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.00029) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -5.2e-106) tmp = F * (t_0 * sqrt(0.5)); elseif (F <= 6.1e-80) tmp = (x * (-1.0 / tan(B))) + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); elseif (F <= 1.4) tmp = F / (sin(B) / sqrt(0.5)); elseif (F <= 2.5e+58) tmp = t_0; else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00029], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.2e-106], N[(F * N[(t$95$0 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.1e-80], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e+58], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00029:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-106}:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{0.5}\right)\\
\mathbf{elif}\;F \leq 6.1 \cdot 10^{-80}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\frac{B}{F} \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+58}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\end{array}
\end{array}
if F < -2.9e-4Initial program 59.6%
Taylor expanded in F around -inf 99.3%
+-commutative99.3%
add-sqr-sqrt45.2%
sqrt-unprod51.2%
frac-times51.2%
metadata-eval51.2%
metadata-eval51.2%
frac-times51.2%
sqrt-unprod20.6%
add-sqr-sqrt49.8%
metadata-eval49.8%
metadata-eval49.8%
pow-prod-up49.8%
pow149.8%
inv-pow49.8%
associate-*r/49.8%
add-sqr-sqrt20.6%
fma-def20.6%
Applied egg-rr99.4%
if -2.9e-4 < F < -5.2000000000000001e-106Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 98.5%
Taylor expanded in x around 0 70.7%
*-lft-identity70.7%
times-frac70.8%
/-rgt-identity70.8%
Simplified70.8%
div-inv70.8%
Applied egg-rr70.8%
if -5.2000000000000001e-106 < F < 6.1000000000000002e-80Initial program 99.7%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 88.0%
Taylor expanded in F around inf 76.4%
if 6.1000000000000002e-80 < F < 1.3999999999999999Initial program 99.0%
Simplified99.3%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 61.2%
associate-/l*61.4%
Simplified61.4%
if 1.3999999999999999 < F < 2.49999999999999993e58Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 95.8%
associate-/r*95.9%
Simplified95.9%
Taylor expanded in F around 0 96.2%
Taylor expanded in x around 0 74.5%
if 2.49999999999999993e58 < F Initial program 59.7%
Simplified75.0%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 81.4%
Final simplification82.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.65e-13)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.65e-13) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.5d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.65d-13) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.65e-13) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.65e-13: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.65e-13) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.65e-13) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.65e-13], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.5:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-13}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.5Initial program 59.1%
Taylor expanded in F around -inf 99.3%
+-commutative99.3%
add-sqr-sqrt44.5%
sqrt-unprod50.6%
frac-times50.6%
metadata-eval50.6%
metadata-eval50.6%
frac-times50.6%
sqrt-unprod20.9%
add-sqr-sqrt49.1%
metadata-eval49.1%
metadata-eval49.1%
pow-prod-up49.1%
pow149.1%
inv-pow49.1%
associate-*r/49.1%
add-sqr-sqrt20.9%
fma-def20.9%
Applied egg-rr99.4%
if -0.5 < F < 1.65e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 81.1%
if 1.65e-13 < F Initial program 69.3%
Simplified81.0%
Taylor expanded in F around inf 97.5%
associate-/r*97.5%
Simplified97.5%
Taylor expanded in F around 0 97.7%
Final simplification90.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.65e-13)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.65e-13) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.47d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.65d-13) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.65e-13) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.65e-13: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.65e-13) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.65e-13) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.65e-13], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.47:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-13}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.46999999999999997Initial program 59.1%
Taylor expanded in F around -inf 99.3%
+-commutative99.3%
add-sqr-sqrt44.5%
sqrt-unprod50.6%
frac-times50.6%
metadata-eval50.6%
metadata-eval50.6%
frac-times50.6%
sqrt-unprod20.9%
add-sqr-sqrt49.1%
metadata-eval49.1%
metadata-eval49.1%
pow-prod-up49.1%
pow149.1%
inv-pow49.1%
associate-*r/49.1%
add-sqr-sqrt20.9%
fma-def20.9%
Applied egg-rr99.4%
if -0.46999999999999997 < F < 1.65e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.3%
Taylor expanded in B around 0 81.1%
if 1.65e-13 < F Initial program 69.3%
Simplified81.0%
Taylor expanded in F around inf 97.5%
associate-/r*97.5%
Simplified97.5%
Taylor expanded in F around 0 97.7%
Final simplification90.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -2.75e-18)
(+ t_0 (/ -1.0 B))
(if (<= F -5.2e-135)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 50000000.0)
(+ t_0 (/ 1.0 (* (/ B F) (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F))))))
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.75e-18) {
tmp = t_0 + (-1.0 / B);
} else if (F <= -5.2e-135) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 50000000.0) {
tmp = t_0 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-2.75d-18)) then
tmp = t_0 + ((-1.0d0) / b)
else if (f <= (-5.2d-135)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 50000000.0d0) then
tmp = t_0 + (1.0d0 / ((b / f) * (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.75e-18) {
tmp = t_0 + (-1.0 / B);
} else if (F <= -5.2e-135) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 50000000.0) {
tmp = t_0 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F)))));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.75e-18: tmp = t_0 + (-1.0 / B) elif F <= -5.2e-135: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 50000000.0: tmp = t_0 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.75e-18) tmp = Float64(t_0 + Float64(-1.0 / B)); elseif (F <= -5.2e-135) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 50000000.0) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(B / F) * Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.75e-18) tmp = t_0 + (-1.0 / B); elseif (F <= -5.2e-135) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 50000000.0) tmp = t_0 + (1.0 / ((B / F) * (F + (0.5 * ((2.0 + (x * 2.0)) / F))))); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.75e-18], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-135], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(t$95$0 + N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.75 \cdot 10^{-18}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-135}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;t_0 + \frac{1}{\frac{B}{F} \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.75e-18Initial program 61.1%
Taylor expanded in F around -inf 95.9%
Taylor expanded in B around 0 79.2%
if -2.75e-18 < F < -5.20000000000000008e-135Initial program 99.2%
Simplified99.3%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 56.6%
Taylor expanded in x around 0 56.6%
if -5.20000000000000008e-135 < F < 5e7Initial program 99.6%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 84.2%
Taylor expanded in F around inf 70.4%
if 5e7 < F Initial program 67.3%
Simplified79.7%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 76.8%
Final simplification73.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.2e-15)
(+ t_0 (/ -1.0 B))
(if (<= F -1.25e-130)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 2.95e-55)
(+ t_0 (/ 1.0 (* (/ B F) (- (/ (- -1.0 x) F) F))))
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.2e-15) {
tmp = t_0 + (-1.0 / B);
} else if (F <= -1.25e-130) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 2.95e-55) {
tmp = t_0 + (1.0 / ((B / F) * (((-1.0 - x) / F) - F)));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-1.2d-15)) then
tmp = t_0 + ((-1.0d0) / b)
else if (f <= (-1.25d-130)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 2.95d-55) then
tmp = t_0 + (1.0d0 / ((b / f) * ((((-1.0d0) - x) / f) - f)))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -1.2e-15) {
tmp = t_0 + (-1.0 / B);
} else if (F <= -1.25e-130) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 2.95e-55) {
tmp = t_0 + (1.0 / ((B / F) * (((-1.0 - x) / F) - F)));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.2e-15: tmp = t_0 + (-1.0 / B) elif F <= -1.25e-130: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 2.95e-55: tmp = t_0 + (1.0 / ((B / F) * (((-1.0 - x) / F) - F))) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.2e-15) tmp = Float64(t_0 + Float64(-1.0 / B)); elseif (F <= -1.25e-130) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 2.95e-55) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(B / F) * Float64(Float64(Float64(-1.0 - x) / F) - F)))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.2e-15) tmp = t_0 + (-1.0 / B); elseif (F <= -1.25e-130) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 2.95e-55) tmp = t_0 + (1.0 / ((B / F) * (((-1.0 - x) / F) - F))); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2e-15], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e-130], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.95e-55], N[(t$95$0 + N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{-15}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-130}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-55}:\\
\;\;\;\;t_0 + \frac{1}{\frac{B}{F} \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.19999999999999997e-15Initial program 61.1%
Taylor expanded in F around -inf 95.9%
Taylor expanded in B around 0 79.2%
if -1.19999999999999997e-15 < F < -1.2499999999999999e-130Initial program 99.2%
Simplified99.3%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 56.6%
Taylor expanded in x around 0 56.6%
if -1.2499999999999999e-130 < F < 2.9499999999999999e-55Initial program 99.6%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 87.4%
Taylor expanded in F around -inf 74.2%
neg-mul-174.2%
+-commutative74.2%
unsub-neg74.2%
associate-*r/74.2%
distribute-lft-in74.2%
metadata-eval74.2%
associate-*r*74.2%
metadata-eval74.2%
neg-mul-174.2%
Simplified74.2%
if 2.9499999999999999e-55 < F Initial program 73.1%
Simplified83.3%
Taylor expanded in F around inf 88.8%
associate-/r*88.8%
Simplified88.8%
Taylor expanded in B around 0 70.4%
Final simplification73.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.68e+174)
t_0
(if (<= F -1.42e+63)
(/ -1.0 (sin B))
(if (<= F -0.0095)
(+ t_0 (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F -7e-110)
(* F (/ (sqrt 0.5) B))
(if (<= F 1.38e-33)
(/ (- x) B)
(if (<= F 3.1e+81)
(/ 1.0 (sin B))
(+
(* B (+ (* x 0.3333333333333333) 0.16666666666666666))
(/ (- 1.0 x) B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.68e+174) {
tmp = t_0;
} else if (F <= -1.42e+63) {
tmp = -1.0 / sin(B);
} else if (F <= -0.0095) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= -7e-110) {
tmp = F * (sqrt(0.5) / B);
} else if (F <= 1.38e-33) {
tmp = -x / B;
} else if (F <= 3.1e+81) {
tmp = 1.0 / sin(B);
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((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) - x) / b
if (f <= (-1.68d+174)) then
tmp = t_0
else if (f <= (-1.42d+63)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-0.0095d0)) then
tmp = t_0 + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= (-7d-110)) then
tmp = f * (sqrt(0.5d0) / b)
else if (f <= 1.38d-33) then
tmp = -x / b
else if (f <= 3.1d+81) then
tmp = 1.0d0 / sin(b)
else
tmp = (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0)) + ((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 - x) / B;
double tmp;
if (F <= -1.68e+174) {
tmp = t_0;
} else if (F <= -1.42e+63) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -0.0095) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= -7e-110) {
tmp = F * (Math.sqrt(0.5) / B);
} else if (F <= 1.38e-33) {
tmp = -x / B;
} else if (F <= 3.1e+81) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -1.68e+174: tmp = t_0 elif F <= -1.42e+63: tmp = -1.0 / math.sin(B) elif F <= -0.0095: tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= -7e-110: tmp = F * (math.sqrt(0.5) / B) elif F <= 1.38e-33: tmp = -x / B elif F <= 3.1e+81: tmp = 1.0 / math.sin(B) else: tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -1.68e+174) tmp = t_0; elseif (F <= -1.42e+63) tmp = Float64(-1.0 / sin(B)); elseif (F <= -0.0095) tmp = Float64(t_0 + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= -7e-110) tmp = Float64(F * Float64(sqrt(0.5) / B)); elseif (F <= 1.38e-33) tmp = Float64(Float64(-x) / B); elseif (F <= 3.1e+81) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -1.68e+174) tmp = t_0; elseif (F <= -1.42e+63) tmp = -1.0 / sin(B); elseif (F <= -0.0095) tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= -7e-110) tmp = F * (sqrt(0.5) / B); elseif (F <= 1.38e-33) tmp = -x / B; elseif (F <= 3.1e+81) tmp = 1.0 / sin(B); else tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B); 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.68e+174], t$95$0, If[LessEqual[F, -1.42e+63], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.0095], N[(t$95$0 + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-110], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.38e-33], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 3.1e+81], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -1.68 \cdot 10^{+174}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.42 \cdot 10^{+63}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -0.0095:\\
\;\;\;\;t_0 + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-110}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 1.38 \cdot 10^{-33}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{+81}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.68e174Initial program 26.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 65.0%
associate-*r/65.0%
distribute-lft-in65.0%
metadata-eval65.0%
neg-mul-165.0%
Simplified65.0%
if -1.68e174 < F < -1.4200000000000001e63Initial program 78.3%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 57.2%
if -1.4200000000000001e63 < F < -0.00949999999999999976Initial program 94.0%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 60.9%
if -0.00949999999999999976 < F < -6.99999999999999947e-110Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 98.5%
Taylor expanded in B around 0 52.9%
Taylor expanded in x around 0 42.9%
associate-/l*42.7%
Simplified42.7%
clear-num42.8%
associate-/r/42.8%
clear-num42.7%
Applied egg-rr42.7%
if -6.99999999999999947e-110 < F < 1.38e-33Initial program 99.6%
Simplified99.7%
Taylor expanded in F around inf 29.0%
associate-/r*29.0%
Simplified29.0%
Taylor expanded in B around 0 16.7%
Taylor expanded in x around inf 39.4%
neg-mul-139.4%
distribute-neg-frac39.4%
Simplified39.4%
if 1.38e-33 < F < 3.1e81Initial program 99.5%
Simplified99.5%
Taylor expanded in F around inf 73.9%
associate-/r*74.0%
Simplified74.0%
Taylor expanded in F around 0 74.2%
Taylor expanded in x around 0 49.2%
if 3.1e81 < F Initial program 57.9%
Simplified73.9%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 63.5%
associate--l+63.5%
+-commutative63.5%
*-commutative63.5%
div-sub63.5%
Simplified63.5%
Final simplification51.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.15e+175)
t_0
(if (<= F -4.6e+63)
(/ -1.0 (sin B))
(if (<= F -7.8e-5)
(+ t_0 (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F -1.55e-114)
(/ F (/ B (sqrt 0.5)))
(if (<= F 3.05e-33)
(/ (- x) B)
(if (<= F 1.2e+80)
(/ 1.0 (sin B))
(+
(* B (+ (* x 0.3333333333333333) 0.16666666666666666))
(/ (- 1.0 x) B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.15e+175) {
tmp = t_0;
} else if (F <= -4.6e+63) {
tmp = -1.0 / sin(B);
} else if (F <= -7.8e-5) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= -1.55e-114) {
tmp = F / (B / sqrt(0.5));
} else if (F <= 3.05e-33) {
tmp = -x / B;
} else if (F <= 1.2e+80) {
tmp = 1.0 / sin(B);
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((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) - x) / b
if (f <= (-1.15d+175)) then
tmp = t_0
else if (f <= (-4.6d+63)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-7.8d-5)) then
tmp = t_0 + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= (-1.55d-114)) then
tmp = f / (b / sqrt(0.5d0))
else if (f <= 3.05d-33) then
tmp = -x / b
else if (f <= 1.2d+80) then
tmp = 1.0d0 / sin(b)
else
tmp = (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0)) + ((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 - x) / B;
double tmp;
if (F <= -1.15e+175) {
tmp = t_0;
} else if (F <= -4.6e+63) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -7.8e-5) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= -1.55e-114) {
tmp = F / (B / Math.sqrt(0.5));
} else if (F <= 3.05e-33) {
tmp = -x / B;
} else if (F <= 1.2e+80) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -1.15e+175: tmp = t_0 elif F <= -4.6e+63: tmp = -1.0 / math.sin(B) elif F <= -7.8e-5: tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= -1.55e-114: tmp = F / (B / math.sqrt(0.5)) elif F <= 3.05e-33: tmp = -x / B elif F <= 1.2e+80: tmp = 1.0 / math.sin(B) else: tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -1.15e+175) tmp = t_0; elseif (F <= -4.6e+63) tmp = Float64(-1.0 / sin(B)); elseif (F <= -7.8e-5) tmp = Float64(t_0 + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= -1.55e-114) tmp = Float64(F / Float64(B / sqrt(0.5))); elseif (F <= 3.05e-33) tmp = Float64(Float64(-x) / B); elseif (F <= 1.2e+80) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -1.15e+175) tmp = t_0; elseif (F <= -4.6e+63) tmp = -1.0 / sin(B); elseif (F <= -7.8e-5) tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= -1.55e-114) tmp = F / (B / sqrt(0.5)); elseif (F <= 3.05e-33) tmp = -x / B; elseif (F <= 1.2e+80) tmp = 1.0 / sin(B); else tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B); 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.15e+175], t$95$0, If[LessEqual[F, -4.6e+63], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.8e-5], N[(t$95$0 + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-114], N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.05e-33], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 1.2e+80], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -1.15 \cdot 10^{+175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{+63}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -7.8 \cdot 10^{-5}:\\
\;\;\;\;t_0 + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-114}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 3.05 \cdot 10^{-33}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{+80}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.15e175Initial program 26.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 65.0%
associate-*r/65.0%
distribute-lft-in65.0%
metadata-eval65.0%
neg-mul-165.0%
Simplified65.0%
if -1.15e175 < F < -4.59999999999999986e63Initial program 78.3%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 57.2%
if -4.59999999999999986e63 < F < -7.7999999999999999e-5Initial program 94.0%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 60.9%
if -7.7999999999999999e-5 < F < -1.55e-114Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 98.5%
Taylor expanded in B around 0 52.9%
Taylor expanded in x around 0 42.9%
associate-/l*42.7%
Simplified42.7%
if -1.55e-114 < F < 3.0500000000000001e-33Initial program 99.6%
Simplified99.7%
Taylor expanded in F around inf 29.0%
associate-/r*29.0%
Simplified29.0%
Taylor expanded in B around 0 16.7%
Taylor expanded in x around inf 39.4%
neg-mul-139.4%
distribute-neg-frac39.4%
Simplified39.4%
if 3.0500000000000001e-33 < F < 1.1999999999999999e80Initial program 99.5%
Simplified99.5%
Taylor expanded in F around inf 73.9%
associate-/r*74.0%
Simplified74.0%
Taylor expanded in F around 0 74.2%
Taylor expanded in x around 0 49.2%
if 1.1999999999999999e80 < F Initial program 57.9%
Simplified73.9%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 63.5%
associate--l+63.5%
+-commutative63.5%
*-commutative63.5%
div-sub63.5%
Simplified63.5%
Final simplification51.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.1e+174)
t_0
(if (<= F -2.9e+62)
(/ -1.0 (sin B))
(if (<= F -0.0051)
(+ t_0 (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F -8e-107)
(/ (* F (sqrt 0.5)) B)
(if (<= F 3.05e-33)
(/ (- x) B)
(if (<= F 7.6e+79)
(/ 1.0 (sin B))
(+
(* B (+ (* x 0.3333333333333333) 0.16666666666666666))
(/ (- 1.0 x) B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.1e+174) {
tmp = t_0;
} else if (F <= -2.9e+62) {
tmp = -1.0 / sin(B);
} else if (F <= -0.0051) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= -8e-107) {
tmp = (F * sqrt(0.5)) / B;
} else if (F <= 3.05e-33) {
tmp = -x / B;
} else if (F <= 7.6e+79) {
tmp = 1.0 / sin(B);
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((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) - x) / b
if (f <= (-1.1d+174)) then
tmp = t_0
else if (f <= (-2.9d+62)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-0.0051d0)) then
tmp = t_0 + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= (-8d-107)) then
tmp = (f * sqrt(0.5d0)) / b
else if (f <= 3.05d-33) then
tmp = -x / b
else if (f <= 7.6d+79) then
tmp = 1.0d0 / sin(b)
else
tmp = (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0)) + ((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 - x) / B;
double tmp;
if (F <= -1.1e+174) {
tmp = t_0;
} else if (F <= -2.9e+62) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -0.0051) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= -8e-107) {
tmp = (F * Math.sqrt(0.5)) / B;
} else if (F <= 3.05e-33) {
tmp = -x / B;
} else if (F <= 7.6e+79) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -1.1e+174: tmp = t_0 elif F <= -2.9e+62: tmp = -1.0 / math.sin(B) elif F <= -0.0051: tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= -8e-107: tmp = (F * math.sqrt(0.5)) / B elif F <= 3.05e-33: tmp = -x / B elif F <= 7.6e+79: tmp = 1.0 / math.sin(B) else: tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -1.1e+174) tmp = t_0; elseif (F <= -2.9e+62) tmp = Float64(-1.0 / sin(B)); elseif (F <= -0.0051) tmp = Float64(t_0 + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= -8e-107) tmp = Float64(Float64(F * sqrt(0.5)) / B); elseif (F <= 3.05e-33) tmp = Float64(Float64(-x) / B); elseif (F <= 7.6e+79) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -1.1e+174) tmp = t_0; elseif (F <= -2.9e+62) tmp = -1.0 / sin(B); elseif (F <= -0.0051) tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= -8e-107) tmp = (F * sqrt(0.5)) / B; elseif (F <= 3.05e-33) tmp = -x / B; elseif (F <= 7.6e+79) tmp = 1.0 / sin(B); else tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B); 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.1e+174], t$95$0, If[LessEqual[F, -2.9e+62], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.0051], N[(t$95$0 + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8e-107], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.05e-33], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 7.6e+79], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -1.1 \cdot 10^{+174}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{+62}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -0.0051:\\
\;\;\;\;t_0 + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq -8 \cdot 10^{-107}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 3.05 \cdot 10^{-33}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{+79}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.1000000000000001e174Initial program 26.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 65.0%
associate-*r/65.0%
distribute-lft-in65.0%
metadata-eval65.0%
neg-mul-165.0%
Simplified65.0%
if -1.1000000000000001e174 < F < -2.89999999999999984e62Initial program 78.3%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 57.2%
if -2.89999999999999984e62 < F < -0.0051000000000000004Initial program 94.0%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 60.9%
if -0.0051000000000000004 < F < -8e-107Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 98.5%
Taylor expanded in B around 0 52.9%
Taylor expanded in x around 0 42.9%
if -8e-107 < F < 3.0500000000000001e-33Initial program 99.6%
Simplified99.7%
Taylor expanded in F around inf 29.0%
associate-/r*29.0%
Simplified29.0%
Taylor expanded in B around 0 16.7%
Taylor expanded in x around inf 39.4%
neg-mul-139.4%
distribute-neg-frac39.4%
Simplified39.4%
if 3.0500000000000001e-33 < F < 7.6000000000000005e79Initial program 99.5%
Simplified99.5%
Taylor expanded in F around inf 73.9%
associate-/r*74.0%
Simplified74.0%
Taylor expanded in F around 0 74.2%
Taylor expanded in x around 0 49.2%
if 7.6000000000000005e79 < F Initial program 57.9%
Simplified73.9%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 63.5%
associate--l+63.5%
+-commutative63.5%
*-commutative63.5%
div-sub63.5%
Simplified63.5%
Final simplification51.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)) (t_1 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= x -1.4e-51)
t_1
(if (<= x -2.5e-111)
t_0
(if (<= x -8.5e-148)
t_1
(if (<= x 4.8e-186) (/ -1.0 (sin B)) (if (<= x 2.8e-86) t_0 t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = (1.0 / B) - (x / tan(B));
double tmp;
if (x <= -1.4e-51) {
tmp = t_1;
} else if (x <= -2.5e-111) {
tmp = t_0;
} else if (x <= -8.5e-148) {
tmp = t_1;
} else if (x <= 4.8e-186) {
tmp = -1.0 / sin(B);
} else if (x <= 2.8e-86) {
tmp = t_0;
} else {
tmp = 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 * sqrt(0.5d0)) - x) / b
t_1 = (1.0d0 / b) - (x / tan(b))
if (x <= (-1.4d-51)) then
tmp = t_1
else if (x <= (-2.5d-111)) then
tmp = t_0
else if (x <= (-8.5d-148)) then
tmp = t_1
else if (x <= 4.8d-186) then
tmp = (-1.0d0) / sin(b)
else if (x <= 2.8d-86) then
tmp = t_0
else
tmp = t_1
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 = (1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -1.4e-51) {
tmp = t_1;
} else if (x <= -2.5e-111) {
tmp = t_0;
} else if (x <= -8.5e-148) {
tmp = t_1;
} else if (x <= 4.8e-186) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 2.8e-86) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -1.4e-51: tmp = t_1 elif x <= -2.5e-111: tmp = t_0 elif x <= -8.5e-148: tmp = t_1 elif x <= 4.8e-186: tmp = -1.0 / math.sin(B) elif x <= 2.8e-86: tmp = t_0 else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -1.4e-51) tmp = t_1; elseif (x <= -2.5e-111) tmp = t_0; elseif (x <= -8.5e-148) tmp = t_1; elseif (x <= 4.8e-186) tmp = Float64(-1.0 / sin(B)); elseif (x <= 2.8e-86) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = (1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -1.4e-51) tmp = t_1; elseif (x <= -2.5e-111) tmp = t_0; elseif (x <= -8.5e-148) tmp = t_1; elseif (x <= 4.8e-186) tmp = -1.0 / sin(B); elseif (x <= 2.8e-86) tmp = t_0; else tmp = t_1; 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[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e-51], t$95$1, If[LessEqual[x, -2.5e-111], t$95$0, If[LessEqual[x, -8.5e-148], t$95$1, If[LessEqual[x, 4.8e-186], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e-86], t$95$0, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-111}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-186}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-86}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.4e-51 or -2.5000000000000001e-111 < x < -8.49999999999999989e-148 or 2.80000000000000009e-86 < x Initial program 82.5%
Simplified94.6%
Taylor expanded in F around inf 71.1%
associate-/r*71.1%
Simplified71.1%
Taylor expanded in B around 0 78.7%
if -1.4e-51 < x < -2.5000000000000001e-111 or 4.80000000000000006e-186 < x < 2.80000000000000009e-86Initial program 81.5%
Simplified84.2%
Taylor expanded in F around 0 64.7%
Taylor expanded in B around 0 53.6%
Taylor expanded in x around 0 53.6%
if -8.49999999999999989e-148 < x < 4.80000000000000006e-186Initial program 74.1%
Taylor expanded in F around -inf 35.3%
Taylor expanded in x around 0 35.3%
Final simplification64.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -5.1e+175)
t_0
(if (<= F -3.05e+62)
(/ -1.0 (sin B))
(if (<= F -4e-60)
(+ t_0 (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 1.2e-34)
(/ (- x) B)
(if (<= F 4.1e+79)
(/ 1.0 (sin B))
(+
(* B (+ (* x 0.3333333333333333) 0.16666666666666666))
(/ (- 1.0 x) B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -5.1e+175) {
tmp = t_0;
} else if (F <= -3.05e+62) {
tmp = -1.0 / sin(B);
} else if (F <= -4e-60) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.2e-34) {
tmp = -x / B;
} else if (F <= 4.1e+79) {
tmp = 1.0 / sin(B);
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((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) - x) / b
if (f <= (-5.1d+175)) then
tmp = t_0
else if (f <= (-3.05d+62)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-4d-60)) then
tmp = t_0 + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 1.2d-34) then
tmp = -x / b
else if (f <= 4.1d+79) then
tmp = 1.0d0 / sin(b)
else
tmp = (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0)) + ((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 - x) / B;
double tmp;
if (F <= -5.1e+175) {
tmp = t_0;
} else if (F <= -3.05e+62) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -4e-60) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.2e-34) {
tmp = -x / B;
} else if (F <= 4.1e+79) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -5.1e+175: tmp = t_0 elif F <= -3.05e+62: tmp = -1.0 / math.sin(B) elif F <= -4e-60: tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 1.2e-34: tmp = -x / B elif F <= 4.1e+79: tmp = 1.0 / math.sin(B) else: tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -5.1e+175) tmp = t_0; elseif (F <= -3.05e+62) tmp = Float64(-1.0 / sin(B)); elseif (F <= -4e-60) tmp = Float64(t_0 + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 1.2e-34) tmp = Float64(Float64(-x) / B); elseif (F <= 4.1e+79) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -5.1e+175) tmp = t_0; elseif (F <= -3.05e+62) tmp = -1.0 / sin(B); elseif (F <= -4e-60) tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 1.2e-34) tmp = -x / B; elseif (F <= 4.1e+79) tmp = 1.0 / sin(B); else tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -5.1e+175], t$95$0, If[LessEqual[F, -3.05e+62], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4e-60], N[(t$95$0 + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-34], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 4.1e+79], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -5.1 \cdot 10^{+175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -3.05 \cdot 10^{+62}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-60}:\\
\;\;\;\;t_0 + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+79}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.10000000000000007e175Initial program 26.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 65.0%
associate-*r/65.0%
distribute-lft-in65.0%
metadata-eval65.0%
neg-mul-165.0%
Simplified65.0%
if -5.10000000000000007e175 < F < -3.0499999999999998e62Initial program 78.3%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 57.2%
if -3.0499999999999998e62 < F < -3.9999999999999999e-60Initial program 96.4%
Taylor expanded in F around -inf 58.7%
Taylor expanded in B around 0 36.7%
if -3.9999999999999999e-60 < F < 1.19999999999999996e-34Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 27.8%
associate-/r*27.8%
Simplified27.8%
Taylor expanded in B around 0 16.6%
Taylor expanded in x around inf 38.0%
neg-mul-138.0%
distribute-neg-frac38.0%
Simplified38.0%
if 1.19999999999999996e-34 < F < 4.1e79Initial program 99.5%
Simplified99.5%
Taylor expanded in F around inf 73.9%
associate-/r*74.0%
Simplified74.0%
Taylor expanded in F around 0 74.2%
Taylor expanded in x around 0 49.2%
if 4.1e79 < F Initial program 57.9%
Simplified73.9%
Taylor expanded in F around inf 99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in B around 0 63.5%
associate--l+63.5%
+-commutative63.5%
*-commutative63.5%
div-sub63.5%
Simplified63.5%
Final simplification48.8%
(FPCore (F B x)
:precision binary64
(if (<= F -6.4e-16)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (or (<= F -4.5e-135) (and (not (<= F -2.1e-223)) (<= F 3.5e-29)))
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.4e-16) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if ((F <= -4.5e-135) || (!(F <= -2.1e-223) && (F <= 3.5e-29))) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.4d-16)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if ((f <= (-4.5d-135)) .or. (.not. (f <= (-2.1d-223))) .and. (f <= 3.5d-29)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.4e-16) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if ((F <= -4.5e-135) || (!(F <= -2.1e-223) && (F <= 3.5e-29))) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.4e-16: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif (F <= -4.5e-135) or (not (F <= -2.1e-223) and (F <= 3.5e-29)): tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.4e-16) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif ((F <= -4.5e-135) || (!(F <= -2.1e-223) && (F <= 3.5e-29))) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.4e-16) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif ((F <= -4.5e-135) || (~((F <= -2.1e-223)) && (F <= 3.5e-29))) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.4e-16], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -4.5e-135], And[N[Not[LessEqual[F, -2.1e-223]], $MachinePrecision], LessEqual[F, 3.5e-29]]], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.4 \cdot 10^{-16}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-135} \lor \neg \left(F \leq -2.1 \cdot 10^{-223}\right) \land F \leq 3.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.40000000000000046e-16Initial program 61.1%
Taylor expanded in F around -inf 95.9%
Taylor expanded in B around 0 79.2%
if -6.40000000000000046e-16 < F < -4.49999999999999987e-135 or -2.09999999999999982e-223 < F < 3.4999999999999997e-29Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 57.9%
Taylor expanded in x around 0 57.9%
if -4.49999999999999987e-135 < F < -2.09999999999999982e-223 or 3.4999999999999997e-29 < F Initial program 75.8%
Simplified85.0%
Taylor expanded in F around inf 85.0%
associate-/r*85.0%
Simplified85.0%
Taylor expanded in B around 0 72.5%
Final simplification69.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -5.9e-148) (not (<= x 5.7e-151))) (- (/ 1.0 B) (/ x (tan B))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.9e-148) || !(x <= 5.7e-151)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-5.9d-148)) .or. (.not. (x <= 5.7d-151))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -5.9e-148) || !(x <= 5.7e-151)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.9e-148) or not (x <= 5.7e-151): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.9e-148) || !(x <= 5.7e-151)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.9e-148) || ~((x <= 5.7e-151))) tmp = (1.0 / B) - (x / tan(B)); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.9e-148], N[Not[LessEqual[x, 5.7e-151]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{-148} \lor \neg \left(x \leq 5.7 \cdot 10^{-151}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -5.90000000000000016e-148 or 5.69999999999999989e-151 < x Initial program 82.5%
Simplified93.0%
Taylor expanded in F around inf 63.9%
associate-/r*63.9%
Simplified63.9%
Taylor expanded in B around 0 70.6%
if -5.90000000000000016e-148 < x < 5.69999999999999989e-151Initial program 75.2%
Taylor expanded in F around -inf 33.1%
Taylor expanded in x around 0 33.1%
Final simplification58.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.68e+174)
t_0
(if (<= F -6e+63)
(/ -1.0 (sin B))
(if (<= F -1.95e-60)
(+ t_0 (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 2.3e-55)
(/ (- x) B)
(+
(* B (+ (* x 0.3333333333333333) 0.16666666666666666))
(/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.68e+174) {
tmp = t_0;
} else if (F <= -6e+63) {
tmp = -1.0 / sin(B);
} else if (F <= -1.95e-60) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 2.3e-55) {
tmp = -x / B;
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((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) - x) / b
if (f <= (-1.68d+174)) then
tmp = t_0
else if (f <= (-6d+63)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-1.95d-60)) then
tmp = t_0 + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 2.3d-55) then
tmp = -x / b
else
tmp = (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0)) + ((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 - x) / B;
double tmp;
if (F <= -1.68e+174) {
tmp = t_0;
} else if (F <= -6e+63) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -1.95e-60) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 2.3e-55) {
tmp = -x / B;
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -1.68e+174: tmp = t_0 elif F <= -6e+63: tmp = -1.0 / math.sin(B) elif F <= -1.95e-60: tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 2.3e-55: tmp = -x / B else: tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -1.68e+174) tmp = t_0; elseif (F <= -6e+63) tmp = Float64(-1.0 / sin(B)); elseif (F <= -1.95e-60) tmp = Float64(t_0 + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 2.3e-55) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -1.68e+174) tmp = t_0; elseif (F <= -6e+63) tmp = -1.0 / sin(B); elseif (F <= -1.95e-60) tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 2.3e-55) tmp = -x / B; else tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B); 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.68e+174], t$95$0, If[LessEqual[F, -6e+63], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.95e-60], N[(t$95$0 + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-55], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -1.68 \cdot 10^{+174}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -6 \cdot 10^{+63}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-60}:\\
\;\;\;\;t_0 + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.68e174Initial program 26.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 65.0%
associate-*r/65.0%
distribute-lft-in65.0%
metadata-eval65.0%
neg-mul-165.0%
Simplified65.0%
if -1.68e174 < F < -5.99999999999999998e63Initial program 78.3%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 57.2%
if -5.99999999999999998e63 < F < -1.9500000000000001e-60Initial program 96.4%
Taylor expanded in F around -inf 58.7%
Taylor expanded in B around 0 36.7%
if -1.9500000000000001e-60 < F < 2.30000000000000011e-55Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 27.4%
associate-/r*27.4%
Simplified27.4%
Taylor expanded in B around 0 15.9%
Taylor expanded in x around inf 38.1%
neg-mul-138.1%
distribute-neg-frac38.1%
Simplified38.1%
if 2.30000000000000011e-55 < F Initial program 73.1%
Simplified83.3%
Taylor expanded in F around inf 88.8%
associate-/r*88.8%
Simplified88.8%
Taylor expanded in B around 0 52.0%
associate--l+52.0%
+-commutative52.0%
*-commutative52.0%
div-sub52.0%
Simplified52.0%
Final simplification47.3%
(FPCore (F B x)
:precision binary64
(if (<= F -3.5e-60)
(/ (- -1.0 x) B)
(if (<= F 4.4e-55)
(/ (- x) B)
(+
(* B (+ (* x 0.3333333333333333) 0.16666666666666666))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.5e-60) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.4e-55) {
tmp = -x / B;
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((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.5d-60)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.4d-55) then
tmp = -x / b
else
tmp = (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0)) + ((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.5e-60) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.4e-55) {
tmp = -x / B;
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.5e-60: tmp = (-1.0 - x) / B elif F <= 4.4e-55: tmp = -x / B else: tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.5e-60) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.4e-55) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.5e-60) tmp = (-1.0 - x) / B; elseif (F <= 4.4e-55) tmp = -x / B; else tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.5e-60], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.4e-55], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.49999999999999976e-60Initial program 65.4%
Taylor expanded in F around -inf 86.1%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
distribute-lft-in48.1%
metadata-eval48.1%
neg-mul-148.1%
Simplified48.1%
if -3.49999999999999976e-60 < F < 4.3999999999999999e-55Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 27.4%
associate-/r*27.4%
Simplified27.4%
Taylor expanded in B around 0 15.9%
Taylor expanded in x around inf 38.1%
neg-mul-138.1%
distribute-neg-frac38.1%
Simplified38.1%
if 4.3999999999999999e-55 < F Initial program 73.1%
Simplified83.3%
Taylor expanded in F around inf 88.8%
associate-/r*88.8%
Simplified88.8%
Taylor expanded in B around 0 52.0%
associate--l+52.0%
+-commutative52.0%
*-commutative52.0%
div-sub52.0%
Simplified52.0%
Final simplification45.5%
(FPCore (F B x)
:precision binary64
(if (<= F -2.4e-60)
(+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 1.6e-55)
(/ (- x) B)
(+
(* B (+ (* x 0.3333333333333333) 0.16666666666666666))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e-60) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.6e-55) {
tmp = -x / B;
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((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.4d-60)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 1.6d-55) then
tmp = -x / b
else
tmp = (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0)) + ((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.4e-60) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.6e-55) {
tmp = -x / B;
} else {
tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e-60: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 1.6e-55: tmp = -x / B else: tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e-60) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 1.6e-55) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.4e-60) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 1.6e-55) tmp = -x / B; else tmp = (B * ((x * 0.3333333333333333) + 0.16666666666666666)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e-60], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-55], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.40000000000000009e-60Initial program 65.4%
Taylor expanded in F around -inf 86.1%
Taylor expanded in B around 0 48.4%
if -2.40000000000000009e-60 < F < 1.6000000000000001e-55Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 27.4%
associate-/r*27.4%
Simplified27.4%
Taylor expanded in B around 0 15.9%
Taylor expanded in x around inf 38.1%
neg-mul-138.1%
distribute-neg-frac38.1%
Simplified38.1%
if 1.6000000000000001e-55 < F Initial program 73.1%
Simplified83.3%
Taylor expanded in F around inf 88.8%
associate-/r*88.8%
Simplified88.8%
Taylor expanded in B around 0 52.0%
associate--l+52.0%
+-commutative52.0%
*-commutative52.0%
div-sub52.0%
Simplified52.0%
Final simplification45.6%
(FPCore (F B x) :precision binary64 (if (<= F -4e-60) (/ (- -1.0 x) B) (if (<= F 2.95e-55) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-60) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.95e-55) {
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 <= (-4d-60)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.95d-55) 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 <= -4e-60) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.95e-55) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-60: tmp = (-1.0 - x) / B elif F <= 2.95e-55: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-60) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.95e-55) tmp = Float64(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 <= -4e-60) tmp = (-1.0 - x) / B; elseif (F <= 2.95e-55) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-60], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.95e-55], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-60}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.9999999999999999e-60Initial program 65.4%
Taylor expanded in F around -inf 86.1%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
distribute-lft-in48.1%
metadata-eval48.1%
neg-mul-148.1%
Simplified48.1%
if -3.9999999999999999e-60 < F < 2.9499999999999999e-55Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 27.4%
associate-/r*27.4%
Simplified27.4%
Taylor expanded in B around 0 15.9%
Taylor expanded in x around inf 38.1%
neg-mul-138.1%
distribute-neg-frac38.1%
Simplified38.1%
if 2.9499999999999999e-55 < F Initial program 73.1%
Simplified83.3%
Taylor expanded in F around inf 88.8%
associate-/r*88.8%
Simplified88.8%
Taylor expanded in B around 0 50.5%
Final simplification45.0%
(FPCore (F B x) :precision binary64 (if (<= F 1.8e-55) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.8e-55) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.8d-55) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.8e-55) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.8e-55: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.8e-55) tmp = Float64(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.8e-55) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.8e-55], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.8 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.8e-55Initial program 82.9%
Simplified90.1%
Taylor expanded in F around inf 35.0%
associate-/r*35.0%
Simplified35.0%
Taylor expanded in B around 0 18.8%
Taylor expanded in x around inf 30.6%
neg-mul-130.6%
distribute-neg-frac30.6%
Simplified30.6%
if 1.8e-55 < F Initial program 73.1%
Simplified83.3%
Taylor expanded in F around inf 88.8%
associate-/r*88.8%
Simplified88.8%
Taylor expanded in B around 0 50.5%
Final simplification36.1%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 80.2%
Simplified88.2%
Taylor expanded in F around inf 49.9%
associate-/r*49.9%
Simplified49.9%
Taylor expanded in B around 0 27.6%
Taylor expanded in x around inf 29.2%
neg-mul-129.2%
distribute-neg-frac29.2%
Simplified29.2%
Final simplification29.2%
(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 80.2%
Simplified88.2%
Taylor expanded in F around inf 49.9%
associate-/r*49.9%
Simplified49.9%
Taylor expanded in B around 0 27.6%
Taylor expanded in x around 0 9.6%
Final simplification9.6%
herbie shell --seed 2024019
(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))))))