
(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 29 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 (/ -1.0 (tan B)))))
(if (<= F -150000000.0)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 2100000.0)
(+ t_0 (/ F (/ (sin B) (pow (fma 2.0 x (fma F F 2.0)) -0.5))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -150000000.0) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 2100000.0) {
tmp = t_0 + (F / (sin(B) / pow(fma(2.0, x, fma(F, F, 2.0)), -0.5)));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -150000000.0) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 2100000.0) tmp = Float64(t_0 + Float64(F / Float64(sin(B) / (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -150000000.0], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2100000.0], N[(t$95$0 + N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -150000000:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2100000:\\
\;\;\;\;t_0 + \frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.5e8Initial program 57.6%
Taylor expanded in F around -inf 99.7%
if -1.5e8 < F < 2.1e6Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
if 2.1e6 < F Initial program 51.6%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1e+52)
(- t_0 (/ F (* F (sin B))))
(if (<= F 20000000000000.0)
(+ t_0 (/ (/ F (sin B)) (sqrt (fma 2.0 x (fma F F 2.0)))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1e+52) {
tmp = t_0 - (F / (F * sin(B)));
} else if (F <= 20000000000000.0) {
tmp = t_0 + ((F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0))));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1e+52) tmp = Float64(t_0 - Float64(F / Float64(F * sin(B)))); elseif (F <= 20000000000000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+52], N[(t$95$0 - N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000000000000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+52}:\\
\;\;\;\;t_0 - \frac{F}{F \cdot \sin B}\\
\mathbf{elif}\;F \leq 20000000000000:\\
\;\;\;\;t_0 + \frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -9.9999999999999999e51Initial program 53.8%
Taylor expanded in F around -inf 77.0%
*-commutative77.0%
frac-times99.7%
neg-mul-199.7%
Applied egg-rr99.7%
if -9.9999999999999999e51 < F < 2e13Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
expm1-log1p-u89.0%
expm1-udef59.4%
Applied egg-rr59.4%
expm1-def89.0%
expm1-log1p99.5%
Simplified99.5%
if 2e13 < F Initial program 49.6%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1e+52)
(- (* x (/ -1.0 (tan B))) (/ F (* F (sin B))))
(if (<= F 13500000000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* (cos B) (/ x (sin B))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e+52) {
tmp = (x * (-1.0 / tan(B))) - (F / (F * sin(B)));
} else if (F <= 13500000000000.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)) - (x * (1.0 / 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 <= (-1d+52)) then
tmp = (x * ((-1.0d0) / tan(b))) - (f / (f * sin(b)))
else if (f <= 13500000000000.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)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1e+52) {
tmp = (x * (-1.0 / Math.tan(B))) - (F / (F * Math.sin(B)));
} else if (F <= 13500000000000.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)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e+52: tmp = (x * (-1.0 / math.tan(B))) - (F / (F * math.sin(B))) elif F <= 13500000000000.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)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e+52) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) - Float64(F / Float64(F * sin(B)))); elseif (F <= 13500000000000.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)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1e+52) tmp = (x * (-1.0 / tan(B))) - (F / (F * sin(B))); elseif (F <= 13500000000000.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)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e+52], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 13500000000000.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] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{+52}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} - \frac{F}{F \cdot \sin B}\\
\mathbf{elif}\;F \leq 13500000000000:\\
\;\;\;\;\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} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -9.9999999999999999e51Initial program 53.8%
Taylor expanded in F around -inf 77.0%
*-commutative77.0%
frac-times99.7%
neg-mul-199.7%
Applied egg-rr99.7%
if -9.9999999999999999e51 < F < 1.35e13Initial program 99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
if 1.35e13 < F Initial program 49.6%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -95000000.0)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 13500000000000.0)
(+
t_0
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ 1.0 (/ (sin B) F))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -95000000.0) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 13500000000000.0) {
tmp = t_0 + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (sin(B) / F)));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / 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 <= (-95000000.0d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 13500000000000.0d0) then
tmp = t_0 + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (1.0d0 / (sin(b) / f)))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / 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 <= -95000000.0) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 13500000000000.0) {
tmp = t_0 + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (Math.sin(B) / F)));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -95000000.0: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 13500000000000.0: tmp = t_0 + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (math.sin(B) / F))) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -95000000.0) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 13500000000000.0) tmp = Float64(t_0 + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(1.0 / Float64(sin(B) / F)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / 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 <= -95000000.0) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 13500000000000.0) tmp = t_0 + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (1.0 / (sin(B) / F))); else tmp = (1.0 / sin(B)) - (x * (1.0 / 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, -95000000.0], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 13500000000000.0], N[(t$95$0 + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -95000000:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 13500000000000:\\
\;\;\;\;t_0 + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{1}{\frac{\sin B}{F}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -9.5e7Initial program 57.6%
Taylor expanded in F around -inf 99.7%
if -9.5e7 < F < 1.35e13Initial program 99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
if 1.35e13 < F Initial program 49.6%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.15e+54)
(- t_0 (/ F (* F (sin B))))
(if (<= F 2100000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.15e+54) {
tmp = t_0 - (F / (F * sin(B)));
} else if (F <= 2100000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / 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.15d+54)) then
tmp = t_0 - (f / (f * sin(b)))
else if (f <= 2100000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / 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.15e+54) {
tmp = t_0 - (F / (F * Math.sin(B)));
} else if (F <= 2100000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.15e+54: tmp = t_0 - (F / (F * math.sin(B))) elif F <= 2100000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / 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.15e+54) tmp = Float64(t_0 - Float64(F / Float64(F * sin(B)))); elseif (F <= 2100000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / 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.15e+54) tmp = t_0 - (F / (F * sin(B))); elseif (F <= 2100000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x * (1.0 / 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.15e+54], N[(t$95$0 - N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2100000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.15 \cdot 10^{+54}:\\
\;\;\;\;t_0 - \frac{F}{F \cdot \sin B}\\
\mathbf{elif}\;F \leq 2100000:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.14999999999999997e54Initial program 53.8%
Taylor expanded in F around -inf 77.0%
*-commutative77.0%
frac-times99.7%
neg-mul-199.7%
Applied egg-rr99.7%
if -1.14999999999999997e54 < F < 2.1e6Initial program 99.5%
if 2.1e6 < F Initial program 51.6%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.4)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 2.3e-7)
(+ t_0 (/ F (/ (sin B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.4) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 2.3e-7) {
tmp = t_0 + (F / (sin(B) / sqrt((1.0 / (2.0 + (x * 2.0))))));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / 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.4d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 2.3d-7) then
tmp = t_0 + (f / (sin(b) / sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / 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.4) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 2.3e-7) {
tmp = t_0 + (F / (Math.sin(B) / Math.sqrt((1.0 / (2.0 + (x * 2.0))))));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.4: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 2.3e-7: tmp = t_0 + (F / (math.sin(B) / math.sqrt((1.0 / (2.0 + (x * 2.0)))))) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / 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.4) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 2.3e-7) tmp = Float64(t_0 + Float64(F / Float64(sin(B) / sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / 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.4) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 2.3e-7) tmp = t_0 + (F / (sin(B) / sqrt((1.0 / (2.0 + (x * 2.0)))))); else tmp = (1.0 / sin(B)) - (x * (1.0 / 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.4], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-7], N[(t$95$0 + N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-7}:\\
\;\;\;\;t_0 + \frac{F}{\frac{\sin B}{\sqrt{\frac{1}{2 + x \cdot 2}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 57.6%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 2.29999999999999995e-7Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
if 2.29999999999999995e-7 < F Initial program 52.9%
Taylor expanded in F around inf 99.4%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.4)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 2.3e-7)
(+ t_0 (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.4) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 2.3e-7) {
tmp = t_0 + (F / (sin(B) * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / 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.4d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 2.3d-7) then
tmp = t_0 + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / 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.4) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 2.3e-7) {
tmp = t_0 + (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.4: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 2.3e-7: tmp = t_0 + (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / 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.4) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 2.3e-7) tmp = Float64(t_0 + Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / 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.4) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 2.3e-7) tmp = t_0 + (F / (sin(B) * sqrt((2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x * (1.0 / 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.4], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-7], N[(t$95$0 + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-7}:\\
\;\;\;\;t_0 + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 57.6%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 2.29999999999999995e-7Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
if 2.29999999999999995e-7 < F Initial program 52.9%
Taylor expanded in F around inf 99.4%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.4)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 2.3e-7)
(+ t_0 (/ (/ F (sin B)) (sqrt (+ 2.0 (* x 2.0)))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.4) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 2.3e-7) {
tmp = t_0 + ((F / sin(B)) / sqrt((2.0 + (x * 2.0))));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / 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.4d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 2.3d-7) then
tmp = t_0 + ((f / sin(b)) / sqrt((2.0d0 + (x * 2.0d0))))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / 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.4) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 2.3e-7) {
tmp = t_0 + ((F / Math.sin(B)) / Math.sqrt((2.0 + (x * 2.0))));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.4: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 2.3e-7: tmp = t_0 + ((F / math.sin(B)) / math.sqrt((2.0 + (x * 2.0)))) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / 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.4) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 2.3e-7) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) / sqrt(Float64(2.0 + Float64(x * 2.0))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / 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.4) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 2.3e-7) tmp = t_0 + ((F / sin(B)) / sqrt((2.0 + (x * 2.0)))); else tmp = (1.0 / sin(B)) - (x * (1.0 / 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.4], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-7], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-7}:\\
\;\;\;\;t_0 + \frac{\frac{F}{\sin B}}{\sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 57.6%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 2.29999999999999995e-7Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
expm1-log1p-u90.9%
expm1-udef58.3%
Applied egg-rr58.3%
expm1-def90.8%
expm1-log1p99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
if 2.29999999999999995e-7 < F Initial program 52.9%
Taylor expanded in F around inf 99.4%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -2.1e+51)
(- t_1 (/ F (* F (sin B))))
(if (<= F -3e-189)
t_0
(if (<= F 1.15e-123)
(+ t_1 (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(if (<= F 1100000.0)
t_0
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.1e+51) {
tmp = t_1 - (F / (F * sin(B)));
} else if (F <= -3e-189) {
tmp = t_0;
} else if (F <= 1.15e-123) {
tmp = t_1 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else if (F <= 1100000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / 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 / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-2.1d+51)) then
tmp = t_1 - (f / (f * sin(b)))
else if (f <= (-3d-189)) then
tmp = t_0
else if (f <= 1.15d-123) then
tmp = t_1 + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else if (f <= 1100000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.1e+51) {
tmp = t_1 - (F / (F * Math.sin(B)));
} else if (F <= -3e-189) {
tmp = t_0;
} else if (F <= 1.15e-123) {
tmp = t_1 + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else if (F <= 1100000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.1e+51: tmp = t_1 - (F / (F * math.sin(B))) elif F <= -3e-189: tmp = t_0 elif F <= 1.15e-123: tmp = t_1 + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) elif F <= 1100000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.1e+51) tmp = Float64(t_1 - Float64(F / Float64(F * sin(B)))); elseif (F <= -3e-189) tmp = t_0; elseif (F <= 1.15e-123) tmp = Float64(t_1 + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); elseif (F <= 1100000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.1e+51) tmp = t_1 - (F / (F * sin(B))); elseif (F <= -3e-189) tmp = t_0; elseif (F <= 1.15e-123) tmp = t_1 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); elseif (F <= 1100000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.1e+51], N[(t$95$1 - N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3e-189], t$95$0, If[LessEqual[F, 1.15e-123], N[(t$95$1 + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1100000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{+51}:\\
\;\;\;\;t_1 - \frac{F}{F \cdot \sin B}\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-189}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-123}:\\
\;\;\;\;t_1 + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 1100000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -2.1000000000000001e51Initial program 53.8%
Taylor expanded in F around -inf 77.0%
*-commutative77.0%
frac-times99.7%
neg-mul-199.7%
Applied egg-rr99.7%
if -2.1000000000000001e51 < F < -3e-189 or 1.14999999999999993e-123 < F < 1.1e6Initial program 99.5%
Taylor expanded in B around 0 83.2%
if -3e-189 < F < 1.14999999999999993e-123Initial program 99.5%
Taylor expanded in B around 0 91.5%
Taylor expanded in F around 0 91.5%
if 1.1e6 < F Initial program 51.6%
Taylor expanded in F around inf 99.8%
Final simplification93.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.055)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 3.8e-14)
(+ t_0 (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.055) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 3.8e-14) {
tmp = t_0 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / 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 <= (-0.055d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 3.8d-14) then
tmp = t_0 + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / 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 <= -0.055) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 3.8e-14) {
tmp = t_0 + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.055: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 3.8e-14: tmp = t_0 + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.055) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 3.8e-14) tmp = Float64(t_0 + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / 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 <= -0.055) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 3.8e-14) tmp = t_0 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); else tmp = (1.0 / sin(B)) - (x * (1.0 / 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, -0.055], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e-14], N[(t$95$0 + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.055:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-14}:\\
\;\;\;\;t_0 + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.0550000000000000003Initial program 57.6%
Taylor expanded in F around -inf 99.7%
if -0.0550000000000000003 < F < 3.8000000000000002e-14Initial program 99.5%
Taylor expanded in B around 0 74.5%
Taylor expanded in F around 0 74.5%
if 3.8000000000000002e-14 < F Initial program 54.1%
Taylor expanded in F around inf 97.1%
Final simplification88.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -9.5e-15)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F -1.6e-131)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 3.2e-66)
(+ t_0 (/ (/ F B) (- (/ (- -1.0 x) F) F)))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -9.5e-15) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= -1.6e-131) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 3.2e-66) {
tmp = t_0 + ((F / B) / (((-1.0 - x) / F) - F));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / 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 <= (-9.5d-15)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= (-1.6d-131)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 3.2d-66) then
tmp = t_0 + ((f / b) / ((((-1.0d0) - x) / f) - f))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / 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 <= -9.5e-15) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= -1.6e-131) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 3.2e-66) {
tmp = t_0 + ((F / B) / (((-1.0 - x) / F) - F));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -9.5e-15: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= -1.6e-131: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 3.2e-66: tmp = t_0 + ((F / B) / (((-1.0 - x) / F) - F)) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -9.5e-15) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= -1.6e-131) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 3.2e-66) tmp = Float64(t_0 + Float64(Float64(F / B) / Float64(Float64(Float64(-1.0 - x) / F) - F))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / 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 <= -9.5e-15) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= -1.6e-131) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 3.2e-66) tmp = t_0 + ((F / B) / (((-1.0 - x) / F) - F)); else tmp = (1.0 / sin(B)) - (x * (1.0 / 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, -9.5e-15], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.6e-131], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-66], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{-15}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-131}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-66}:\\
\;\;\;\;t_0 + \frac{\frac{F}{B}}{\frac{-1 - x}{F} - F}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -9.5000000000000005e-15Initial program 57.6%
Taylor expanded in F around -inf 99.7%
if -9.5000000000000005e-15 < F < -1.6e-131Initial program 99.4%
Taylor expanded in B around 0 64.5%
Taylor expanded in B around 0 58.5%
if -1.6e-131 < F < 3.19999999999999982e-66Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
expm1-log1p-u94.3%
expm1-udef68.1%
Applied egg-rr68.1%
expm1-def94.2%
expm1-log1p99.5%
Simplified99.5%
Taylor expanded in F around -inf 72.0%
neg-mul-172.0%
+-commutative72.0%
unsub-neg72.0%
associate-*r/72.0%
distribute-lft-in72.0%
metadata-eval72.0%
associate-*r*72.0%
metadata-eval72.0%
neg-mul-172.0%
Simplified72.0%
Taylor expanded in B around 0 72.1%
if 3.19999999999999982e-66 < F Initial program 58.3%
Taylor expanded in F around inf 89.9%
Final simplification84.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -5e-5)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F -1.6e-131)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 6.2e-71)
(+ t_0 (/ (/ F B) (- (/ (- -1.0 x) F) F)))
(if (<= F 4.5e+247)
(- (/ 1.0 B) (/ x (tan B)))
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -5e-5) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= -1.6e-131) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 6.2e-71) {
tmp = t_0 + ((F / B) / (((-1.0 - x) / F) - F));
} else if (F <= 4.5e+247) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-5d-5)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= (-1.6d-131)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 6.2d-71) then
tmp = t_0 + ((f / b) / ((((-1.0d0) - x) / f) - f))
else if (f <= 4.5d+247) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -5e-5) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= -1.6e-131) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 6.2e-71) {
tmp = t_0 + ((F / B) / (((-1.0 - x) / F) - F));
} else if (F <= 4.5e+247) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -5e-5: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= -1.6e-131: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 6.2e-71: tmp = t_0 + ((F / B) / (((-1.0 - x) / F) - F)) elif F <= 4.5e+247: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -5e-5) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= -1.6e-131) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 6.2e-71) tmp = Float64(t_0 + Float64(Float64(F / B) / Float64(Float64(Float64(-1.0 - x) / F) - F))); elseif (F <= 4.5e+247) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -5e-5) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= -1.6e-131) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 6.2e-71) tmp = t_0 + ((F / B) / (((-1.0 - x) / F) - F)); elseif (F <= 4.5e+247) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F / sin(B)) * (1.0 / F)) - (x / 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, -5e-5], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.6e-131], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-71], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e+247], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{-5}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-131}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-71}:\\
\;\;\;\;t_0 + \frac{\frac{F}{B}}{\frac{-1 - x}{F} - F}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{+247}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.00000000000000024e-5Initial program 57.6%
Taylor expanded in F around -inf 99.7%
if -5.00000000000000024e-5 < F < -1.6e-131Initial program 99.4%
Taylor expanded in B around 0 64.5%
Taylor expanded in B around 0 58.5%
if -1.6e-131 < F < 6.20000000000000004e-71Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
expm1-log1p-u94.2%
expm1-udef68.5%
Applied egg-rr68.5%
expm1-def94.1%
expm1-log1p99.5%
Simplified99.5%
Taylor expanded in F around -inf 72.5%
neg-mul-172.5%
+-commutative72.5%
unsub-neg72.5%
associate-*r/72.5%
distribute-lft-in72.5%
metadata-eval72.5%
associate-*r*72.5%
metadata-eval72.5%
neg-mul-172.5%
Simplified72.5%
Taylor expanded in B around 0 72.6%
if 6.20000000000000004e-71 < F < 4.50000000000000002e247Initial program 66.5%
Taylor expanded in B around 0 45.5%
Taylor expanded in F around inf 48.3%
+-commutative48.3%
unsub-neg48.3%
associate-*l/64.4%
rgt-mult-inverse64.5%
un-div-inv64.5%
Applied egg-rr64.5%
if 4.50000000000000002e247 < F Initial program 26.6%
Taylor expanded in F around inf 93.4%
Taylor expanded in B around 0 75.6%
Final simplification77.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B))) (t_1 (- (/ (- -1.0 x) F) F)) (t_2 (/ x (tan B))))
(if (<= F -2.9e+54)
(- (/ -1.0 B) t_2)
(if (<= F -3.2e-30)
(- (/ t_0 t_1) (/ x B))
(if (<= F 6.2e-71)
(+ (* x (/ -1.0 (tan B))) (/ (/ F B) t_1))
(if (<= F 5e+247)
(- (/ 1.0 B) t_2)
(- (* t_0 (/ 1.0 F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = ((-1.0 - x) / F) - F;
double t_2 = x / tan(B);
double tmp;
if (F <= -2.9e+54) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -3.2e-30) {
tmp = (t_0 / t_1) - (x / B);
} else if (F <= 6.2e-71) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) / t_1);
} else if (F <= 5e+247) {
tmp = (1.0 / B) - t_2;
} else {
tmp = (t_0 * (1.0 / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = f / sin(b)
t_1 = (((-1.0d0) - x) / f) - f
t_2 = x / tan(b)
if (f <= (-2.9d+54)) then
tmp = ((-1.0d0) / b) - t_2
else if (f <= (-3.2d-30)) then
tmp = (t_0 / t_1) - (x / b)
else if (f <= 6.2d-71) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) / t_1)
else if (f <= 5d+247) then
tmp = (1.0d0 / b) - t_2
else
tmp = (t_0 * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = ((-1.0 - x) / F) - F;
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -2.9e+54) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -3.2e-30) {
tmp = (t_0 / t_1) - (x / B);
} else if (F <= 6.2e-71) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) / t_1);
} else if (F <= 5e+247) {
tmp = (1.0 / B) - t_2;
} else {
tmp = (t_0 * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = ((-1.0 - x) / F) - F t_2 = x / math.tan(B) tmp = 0 if F <= -2.9e+54: tmp = (-1.0 / B) - t_2 elif F <= -3.2e-30: tmp = (t_0 / t_1) - (x / B) elif F <= 6.2e-71: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) / t_1) elif F <= 5e+247: tmp = (1.0 / B) - t_2 else: tmp = (t_0 * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(Float64(Float64(-1.0 - x) / F) - F) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.9e+54) tmp = Float64(Float64(-1.0 / B) - t_2); elseif (F <= -3.2e-30) tmp = Float64(Float64(t_0 / t_1) - Float64(x / B)); elseif (F <= 6.2e-71) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) / t_1)); elseif (F <= 5e+247) tmp = Float64(Float64(1.0 / B) - t_2); else tmp = Float64(Float64(t_0 * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = ((-1.0 - x) / F) - F; t_2 = x / tan(B); tmp = 0.0; if (F <= -2.9e+54) tmp = (-1.0 / B) - t_2; elseif (F <= -3.2e-30) tmp = (t_0 / t_1) - (x / B); elseif (F <= 6.2e-71) tmp = (x * (-1.0 / tan(B))) + ((F / B) / t_1); elseif (F <= 5e+247) tmp = (1.0 / B) - t_2; else tmp = (t_0 * (1.0 / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e+54], N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -3.2e-30], N[(N[(t$95$0 / t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-71], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e+247], N[(N[(1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(t$95$0 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := \frac{-1 - x}{F} - F\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{+54}:\\
\;\;\;\;\frac{-1}{B} - t_2\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-30}:\\
\;\;\;\;\frac{t_0}{t_1} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-71}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{B}}{t_1}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+247}:\\
\;\;\;\;\frac{1}{B} - t_2\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.8999999999999999e54Initial program 53.8%
Taylor expanded in B around 0 43.9%
Taylor expanded in F around inf 44.0%
*-commutative44.0%
add-sqr-sqrt0.0%
sqrt-unprod45.3%
frac-times43.9%
metadata-eval43.9%
metadata-eval43.9%
frac-times45.3%
sqrt-unprod54.5%
add-sqr-sqrt54.5%
div-inv54.5%
mul-1-neg54.5%
cancel-sign-sub-inv54.5%
neg-mul-154.5%
*-commutative54.5%
fma-neg54.5%
un-div-inv54.5%
associate-*l/77.1%
rgt-mult-inverse77.2%
Applied egg-rr77.2%
fma-udef77.2%
neg-mul-177.2%
distribute-neg-in77.2%
+-commutative77.2%
distribute-neg-in77.2%
unsub-neg77.2%
distribute-neg-frac77.2%
metadata-eval77.2%
Simplified77.2%
if -2.8999999999999999e54 < F < -3.2e-30Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.6%
associate-/l*99.1%
fma-def99.1%
fma-udef99.1%
*-commutative99.1%
fma-def99.1%
fma-def99.1%
Applied egg-rr99.1%
expm1-log1p-u81.5%
expm1-udef42.6%
Applied egg-rr42.6%
expm1-def81.6%
expm1-log1p99.7%
Simplified99.7%
Taylor expanded in F around -inf 54.7%
neg-mul-154.7%
+-commutative54.7%
unsub-neg54.7%
associate-*r/54.7%
distribute-lft-in54.7%
metadata-eval54.7%
associate-*r*54.7%
metadata-eval54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in B around 0 54.5%
if -3.2e-30 < F < 6.20000000000000004e-71Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
expm1-log1p-u92.6%
expm1-udef64.6%
Applied egg-rr64.6%
expm1-def92.5%
expm1-log1p99.5%
Simplified99.5%
Taylor expanded in F around -inf 65.0%
neg-mul-165.0%
+-commutative65.0%
unsub-neg65.0%
associate-*r/65.0%
distribute-lft-in65.0%
metadata-eval65.0%
associate-*r*65.0%
metadata-eval65.0%
neg-mul-165.0%
Simplified65.0%
Taylor expanded in B around 0 64.9%
if 6.20000000000000004e-71 < F < 5.00000000000000023e247Initial program 66.5%
Taylor expanded in B around 0 45.5%
Taylor expanded in F around inf 48.3%
+-commutative48.3%
unsub-neg48.3%
associate-*l/64.4%
rgt-mult-inverse64.5%
un-div-inv64.5%
Applied egg-rr64.5%
if 5.00000000000000023e247 < F Initial program 26.6%
Taylor expanded in F around inf 93.4%
Taylor expanded in B around 0 75.6%
Final simplification68.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.6e-14)
(- (/ -1.0 B) t_0)
(if (<= F -1.6e-131)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 3.3e-71)
(+ (* x (/ -1.0 (tan B))) (/ (/ F B) (- (/ (- -1.0 x) F) F)))
(if (<= F 5e+247)
(- (/ 1.0 B) t_0)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.6e-14) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.6e-131) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 3.3e-71) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) / (((-1.0 - x) / F) - F));
} else if (F <= 5e+247) {
tmp = (1.0 / B) - t_0;
} else {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7.6d-14)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-1.6d-131)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 3.3d-71) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) / ((((-1.0d0) - x) / f) - f))
else if (f <= 5d+247) then
tmp = (1.0d0 / b) - t_0
else
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7.6e-14) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.6e-131) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 3.3e-71) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) / (((-1.0 - x) / F) - F));
} else if (F <= 5e+247) {
tmp = (1.0 / B) - t_0;
} else {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.6e-14: tmp = (-1.0 / B) - t_0 elif F <= -1.6e-131: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 3.3e-71: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) / (((-1.0 - x) / F) - F)) elif F <= 5e+247: tmp = (1.0 / B) - t_0 else: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.6e-14) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -1.6e-131) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 3.3e-71) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) / Float64(Float64(Float64(-1.0 - x) / F) - F))); elseif (F <= 5e+247) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.6e-14) tmp = (-1.0 / B) - t_0; elseif (F <= -1.6e-131) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 3.3e-71) tmp = (x * (-1.0 / tan(B))) + ((F / B) / (((-1.0 - x) / F) - F)); elseif (F <= 5e+247) tmp = (1.0 / B) - t_0; else tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.6e-14], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.6e-131], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-71], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e+247], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.6 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-131}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-71}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{B}}{\frac{-1 - x}{F} - F}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+247}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.6000000000000004e-14Initial program 57.6%
Taylor expanded in B around 0 43.2%
Taylor expanded in F around inf 40.7%
*-commutative40.7%
add-sqr-sqrt0.0%
sqrt-unprod44.6%
frac-times43.2%
metadata-eval43.2%
metadata-eval43.2%
frac-times44.6%
sqrt-unprod52.9%
add-sqr-sqrt53.0%
div-inv53.0%
mul-1-neg53.0%
cancel-sign-sub-inv53.0%
neg-mul-153.0%
*-commutative53.0%
fma-neg53.0%
un-div-inv53.0%
associate-*l/73.7%
rgt-mult-inverse73.8%
Applied egg-rr73.8%
fma-udef73.8%
neg-mul-173.8%
distribute-neg-in73.8%
+-commutative73.8%
distribute-neg-in73.8%
unsub-neg73.8%
distribute-neg-frac73.8%
metadata-eval73.8%
Simplified73.8%
if -7.6000000000000004e-14 < F < -1.6e-131Initial program 99.4%
Taylor expanded in B around 0 64.5%
Taylor expanded in B around 0 58.5%
if -1.6e-131 < F < 3.3000000000000002e-71Initial program 99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
expm1-log1p-u94.2%
expm1-udef68.5%
Applied egg-rr68.5%
expm1-def94.1%
expm1-log1p99.5%
Simplified99.5%
Taylor expanded in F around -inf 72.5%
neg-mul-172.5%
+-commutative72.5%
unsub-neg72.5%
associate-*r/72.5%
distribute-lft-in72.5%
metadata-eval72.5%
associate-*r*72.5%
metadata-eval72.5%
neg-mul-172.5%
Simplified72.5%
Taylor expanded in B around 0 72.6%
if 3.3000000000000002e-71 < F < 5.00000000000000023e247Initial program 66.5%
Taylor expanded in B around 0 45.5%
Taylor expanded in F around inf 48.3%
+-commutative48.3%
unsub-neg48.3%
associate-*l/64.4%
rgt-mult-inverse64.5%
un-div-inv64.5%
Applied egg-rr64.5%
if 5.00000000000000023e247 < F Initial program 26.6%
Taylor expanded in F around inf 93.4%
Taylor expanded in B around 0 75.6%
Final simplification69.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B))) (t_1 (/ x (tan B))))
(if (<= F -9.2e+54)
(- (/ -1.0 B) t_1)
(if (<= F -2.95e-84)
(- (/ t_0 (- (/ (- -1.0 x) F) F)) (/ x B))
(if (<= F 2e-77)
(+ (* x (/ -1.0 (tan B))) (/ (/ 1.0 F) (/ B F)))
(if (<= F 4.8e+247)
(- (/ 1.0 B) t_1)
(- (* t_0 (/ 1.0 F)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -9.2e+54) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.95e-84) {
tmp = (t_0 / (((-1.0 - x) / F) - F)) - (x / B);
} else if (F <= 2e-77) {
tmp = (x * (-1.0 / tan(B))) + ((1.0 / F) / (B / F));
} else if (F <= 4.8e+247) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (t_0 * (1.0 / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f / sin(b)
t_1 = x / tan(b)
if (f <= (-9.2d+54)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-2.95d-84)) then
tmp = (t_0 / ((((-1.0d0) - x) / f) - f)) - (x / b)
else if (f <= 2d-77) then
tmp = (x * ((-1.0d0) / tan(b))) + ((1.0d0 / f) / (b / f))
else if (f <= 4.8d+247) then
tmp = (1.0d0 / b) - t_1
else
tmp = (t_0 * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -9.2e+54) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.95e-84) {
tmp = (t_0 / (((-1.0 - x) / F) - F)) - (x / B);
} else if (F <= 2e-77) {
tmp = (x * (-1.0 / Math.tan(B))) + ((1.0 / F) / (B / F));
} else if (F <= 4.8e+247) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (t_0 * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -9.2e+54: tmp = (-1.0 / B) - t_1 elif F <= -2.95e-84: tmp = (t_0 / (((-1.0 - x) / F) - F)) - (x / B) elif F <= 2e-77: tmp = (x * (-1.0 / math.tan(B))) + ((1.0 / F) / (B / F)) elif F <= 4.8e+247: tmp = (1.0 / B) - t_1 else: tmp = (t_0 * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.2e+54) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -2.95e-84) tmp = Float64(Float64(t_0 / Float64(Float64(Float64(-1.0 - x) / F) - F)) - Float64(x / B)); elseif (F <= 2e-77) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(1.0 / F) / Float64(B / F))); elseif (F <= 4.8e+247) tmp = Float64(Float64(1.0 / B) - t_1); else tmp = Float64(Float64(t_0 * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -9.2e+54) tmp = (-1.0 / B) - t_1; elseif (F <= -2.95e-84) tmp = (t_0 / (((-1.0 - x) / F) - F)) - (x / B); elseif (F <= 2e-77) tmp = (x * (-1.0 / tan(B))) + ((1.0 / F) / (B / F)); elseif (F <= 4.8e+247) tmp = (1.0 / B) - t_1; else tmp = (t_0 * (1.0 / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.2e+54], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.95e-84], N[(N[(t$95$0 / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-77], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / F), $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e+247], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(t$95$0 * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.2 \cdot 10^{+54}:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq -2.95 \cdot 10^{-84}:\\
\;\;\;\;\frac{t_0}{\frac{-1 - x}{F} - F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-77}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{1}{F}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{+247}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.19999999999999977e54Initial program 53.8%
Taylor expanded in B around 0 43.9%
Taylor expanded in F around inf 44.0%
*-commutative44.0%
add-sqr-sqrt0.0%
sqrt-unprod45.3%
frac-times43.9%
metadata-eval43.9%
metadata-eval43.9%
frac-times45.3%
sqrt-unprod54.5%
add-sqr-sqrt54.5%
div-inv54.5%
mul-1-neg54.5%
cancel-sign-sub-inv54.5%
neg-mul-154.5%
*-commutative54.5%
fma-neg54.5%
un-div-inv54.5%
associate-*l/77.1%
rgt-mult-inverse77.2%
Applied egg-rr77.2%
fma-udef77.2%
neg-mul-177.2%
distribute-neg-in77.2%
+-commutative77.2%
distribute-neg-in77.2%
unsub-neg77.2%
distribute-neg-frac77.2%
metadata-eval77.2%
Simplified77.2%
if -9.19999999999999977e54 < F < -2.94999999999999992e-84Initial program 99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*l/99.5%
associate-/l*99.2%
fma-def99.2%
fma-udef99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
Applied egg-rr99.2%
expm1-log1p-u77.0%
expm1-udef39.7%
Applied egg-rr39.7%
expm1-def77.2%
expm1-log1p99.8%
Simplified99.8%
Taylor expanded in F around -inf 43.0%
neg-mul-143.0%
+-commutative43.0%
unsub-neg43.0%
associate-*r/43.0%
distribute-lft-in43.0%
metadata-eval43.0%
associate-*r*43.0%
metadata-eval43.0%
neg-mul-143.0%
Simplified43.0%
Taylor expanded in B around 0 42.0%
if -2.94999999999999992e-84 < F < 1.9999999999999999e-77Initial program 99.5%
Taylor expanded in B around 0 79.9%
Taylor expanded in F around inf 47.7%
*-commutative47.7%
clear-num48.8%
un-div-inv48.8%
Applied egg-rr48.8%
if 1.9999999999999999e-77 < F < 4.8e247Initial program 66.5%
Taylor expanded in B around 0 45.5%
Taylor expanded in F around inf 48.3%
+-commutative48.3%
unsub-neg48.3%
associate-*l/64.4%
rgt-mult-inverse64.5%
un-div-inv64.5%
Applied egg-rr64.5%
if 4.8e247 < F Initial program 26.6%
Taylor expanded in F around inf 93.4%
Taylor expanded in B around 0 75.6%
Final simplification61.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.4e-256)
(- (/ -1.0 B) t_0)
(if (<= F 1e-75)
(+ (* x (/ -1.0 (tan B))) (/ (/ 1.0 F) (/ B F)))
(if (<= F 5e+247)
(- (/ 1.0 B) t_0)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.4e-256) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1e-75) {
tmp = (x * (-1.0 / tan(B))) + ((1.0 / F) / (B / F));
} else if (F <= 5e+247) {
tmp = (1.0 / B) - t_0;
} else {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.4d-256)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1d-75) then
tmp = (x * ((-1.0d0) / tan(b))) + ((1.0d0 / f) / (b / f))
else if (f <= 5d+247) then
tmp = (1.0d0 / b) - t_0
else
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.4e-256) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1e-75) {
tmp = (x * (-1.0 / Math.tan(B))) + ((1.0 / F) / (B / F));
} else if (F <= 5e+247) {
tmp = (1.0 / B) - t_0;
} else {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.4e-256: tmp = (-1.0 / B) - t_0 elif F <= 1e-75: tmp = (x * (-1.0 / math.tan(B))) + ((1.0 / F) / (B / F)) elif F <= 5e+247: tmp = (1.0 / B) - t_0 else: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.4e-256) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1e-75) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(1.0 / F) / Float64(B / F))); elseif (F <= 5e+247) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.4e-256) tmp = (-1.0 / B) - t_0; elseif (F <= 1e-75) tmp = (x * (-1.0 / tan(B))) + ((1.0 / F) / (B / F)); elseif (F <= 5e+247) tmp = (1.0 / B) - t_0; else tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.4e-256], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-75], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / F), $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e+247], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{-256}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 10^{-75}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{1}{F}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+247}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.3999999999999999e-256Initial program 73.8%
Taylor expanded in B around 0 53.5%
Taylor expanded in F around inf 36.1%
*-commutative36.1%
add-sqr-sqrt0.0%
sqrt-unprod33.7%
frac-times32.9%
metadata-eval32.9%
metadata-eval32.9%
frac-times33.7%
sqrt-unprod43.9%
add-sqr-sqrt44.0%
div-inv44.0%
mul-1-neg44.0%
cancel-sign-sub-inv44.0%
neg-mul-144.0%
*-commutative44.0%
fma-neg44.0%
un-div-inv44.0%
associate-*l/56.7%
rgt-mult-inverse56.7%
Applied egg-rr56.7%
fma-udef56.7%
neg-mul-156.7%
distribute-neg-in56.7%
+-commutative56.7%
distribute-neg-in56.7%
unsub-neg56.7%
distribute-neg-frac56.7%
metadata-eval56.7%
Simplified56.7%
if -2.3999999999999999e-256 < F < 9.9999999999999996e-76Initial program 99.6%
Taylor expanded in B around 0 81.8%
Taylor expanded in F around inf 55.1%
*-commutative55.1%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
if 9.9999999999999996e-76 < F < 5.00000000000000023e247Initial program 66.5%
Taylor expanded in B around 0 45.5%
Taylor expanded in F around inf 48.3%
+-commutative48.3%
unsub-neg48.3%
associate-*l/64.4%
rgt-mult-inverse64.5%
un-div-inv64.5%
Applied egg-rr64.5%
if 5.00000000000000023e247 < F Initial program 26.6%
Taylor expanded in F around inf 93.4%
Taylor expanded in B around 0 75.6%
Final simplification60.1%
(FPCore (F B x)
:precision binary64
(if (<= F 5.5e-265)
(+ (/ -1.0 B) (/ -1.0 (/ (tan B) x)))
(if (<= F 4.8e+247)
(- (/ 1.0 B) (/ x (tan B)))
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= 5.5e-265) {
tmp = (-1.0 / B) + (-1.0 / (tan(B) / x));
} else if (F <= 4.8e+247) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 5.5d-265) then
tmp = ((-1.0d0) / b) + ((-1.0d0) / (tan(b) / x))
else if (f <= 4.8d+247) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 5.5e-265) {
tmp = (-1.0 / B) + (-1.0 / (Math.tan(B) / x));
} else if (F <= 4.8e+247) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 5.5e-265: tmp = (-1.0 / B) + (-1.0 / (math.tan(B) / x)) elif F <= 4.8e+247: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 5.5e-265) tmp = Float64(Float64(-1.0 / B) + Float64(-1.0 / Float64(tan(B) / x))); elseif (F <= 4.8e+247) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 5.5e-265) tmp = (-1.0 / B) + (-1.0 / (tan(B) / x)); elseif (F <= 4.8e+247) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 5.5e-265], N[(N[(-1.0 / B), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e+247], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 5.5 \cdot 10^{-265}:\\
\;\;\;\;\frac{-1}{B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{+247}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < 5.49999999999999985e-265Initial program 76.2%
Taylor expanded in F around -inf 57.6%
Taylor expanded in B around 0 56.7%
div-inv56.7%
clear-num56.7%
Applied egg-rr56.7%
if 5.49999999999999985e-265 < F < 4.8e247Initial program 77.3%
Taylor expanded in B around 0 55.3%
Taylor expanded in F around inf 47.4%
+-commutative47.4%
unsub-neg47.4%
associate-*l/58.2%
rgt-mult-inverse58.3%
un-div-inv58.3%
Applied egg-rr58.3%
if 4.8e247 < F Initial program 26.6%
Taylor expanded in F around inf 93.4%
Taylor expanded in B around 0 75.6%
Final simplification58.5%
(FPCore (F B x) :precision binary64 (if (<= F 1.5e-264) (- (/ -1.0 B) (* x (/ 1.0 (tan B)))) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.5e-264) {
tmp = (-1.0 / B) - (x * (1.0 / tan(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 <= 1.5d-264) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(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 <= 1.5e-264) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.5e-264: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.5e-264) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(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 <= 1.5e-264) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.5e-264], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 1.5 \cdot 10^{-264}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < 1.5e-264Initial program 76.2%
Taylor expanded in F around -inf 57.6%
Taylor expanded in B around 0 56.7%
if 1.5e-264 < F Initial program 70.7%
Taylor expanded in B around 0 51.6%
Taylor expanded in F around inf 46.4%
+-commutative46.4%
unsub-neg46.4%
associate-*l/56.6%
rgt-mult-inverse56.7%
un-div-inv56.7%
Applied egg-rr56.7%
Final simplification56.7%
(FPCore (F B x) :precision binary64 (if (<= F 8.6e-265) (+ (/ -1.0 B) (/ -1.0 (/ (tan B) x))) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= 8.6e-265) {
tmp = (-1.0 / B) + (-1.0 / (tan(B) / x));
} 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 <= 8.6d-265) then
tmp = ((-1.0d0) / b) + ((-1.0d0) / (tan(b) / x))
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 <= 8.6e-265) {
tmp = (-1.0 / B) + (-1.0 / (Math.tan(B) / x));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 8.6e-265: tmp = (-1.0 / B) + (-1.0 / (math.tan(B) / x)) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 8.6e-265) tmp = Float64(Float64(-1.0 / B) + Float64(-1.0 / Float64(tan(B) / x))); 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 <= 8.6e-265) tmp = (-1.0 / B) + (-1.0 / (tan(B) / x)); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 8.6e-265], N[(N[(-1.0 / B), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $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 8.6 \cdot 10^{-265}:\\
\;\;\;\;\frac{-1}{B} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < 8.6000000000000003e-265Initial program 76.2%
Taylor expanded in F around -inf 57.6%
Taylor expanded in B around 0 56.7%
div-inv56.7%
clear-num56.7%
Applied egg-rr56.7%
if 8.6000000000000003e-265 < F Initial program 70.7%
Taylor expanded in B around 0 51.6%
Taylor expanded in F around inf 46.4%
+-commutative46.4%
unsub-neg46.4%
associate-*l/56.6%
rgt-mult-inverse56.7%
un-div-inv56.7%
Applied egg-rr56.7%
Final simplification56.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.4e-39) (+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B)) (if (<= F 7.2e-85) (* (cos B) (/ (- x) B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-39) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 7.2e-85) {
tmp = cos(B) * (-x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.4d-39)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 7.2d-85) then
tmp = cos(b) * (-x / b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-39) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 7.2e-85) {
tmp = Math.cos(B) * (-x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e-39: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 7.2e-85: tmp = math.cos(B) * (-x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e-39) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 7.2e-85) tmp = Float64(cos(B) * 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.4e-39) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 7.2e-85) tmp = cos(B) * (-x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e-39], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e-85], N[(N[Cos[B], $MachinePrecision] * N[((-x) / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-39}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-85}:\\
\;\;\;\;\cos B \cdot \frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.4000000000000001e-39Initial program 61.6%
Taylor expanded in F around -inf 72.0%
Taylor expanded in B around 0 67.4%
Taylor expanded in B around 0 46.7%
+-commutative46.7%
mul-1-neg46.7%
unsub-neg46.7%
*-commutative46.7%
associate-*l*46.7%
Simplified46.7%
if -1.4000000000000001e-39 < F < 7.1999999999999996e-85Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 65.9%
mul-1-neg65.9%
associate-*l/66.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
Taylor expanded in B around 0 31.5%
if 7.1999999999999996e-85 < F Initial program 60.6%
Taylor expanded in B around 0 42.9%
Taylor expanded in F around inf 47.5%
Taylor expanded in B around 0 43.1%
Final simplification40.5%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ x (tan B)))) (if (<= F 7.6e-265) (- (/ -1.0 B) t_0) (- (/ 1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 7.6e-265) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= 7.6d-265) then
tmp = ((-1.0d0) / b) - t_0
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= 7.6e-265) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 7.6e-265: tmp = (-1.0 / B) - t_0 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= 7.6e-265) tmp = Float64(Float64(-1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= 7.6e-265) tmp = (-1.0 / B) - t_0; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 7.6e-265], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 7.6 \cdot 10^{-265}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < 7.59999999999999961e-265Initial program 76.2%
Taylor expanded in B around 0 57.7%
Taylor expanded in F around inf 40.3%
*-commutative40.3%
add-sqr-sqrt6.7%
sqrt-unprod30.8%
frac-times30.0%
metadata-eval30.0%
metadata-eval30.0%
frac-times30.8%
sqrt-unprod40.7%
add-sqr-sqrt47.5%
div-inv47.5%
mul-1-neg47.5%
cancel-sign-sub-inv47.5%
neg-mul-147.5%
*-commutative47.5%
fma-neg47.5%
un-div-inv47.5%
associate-*l/56.6%
rgt-mult-inverse56.7%
Applied egg-rr56.7%
fma-udef56.7%
neg-mul-156.7%
distribute-neg-in56.7%
+-commutative56.7%
distribute-neg-in56.7%
unsub-neg56.7%
distribute-neg-frac56.7%
metadata-eval56.7%
Simplified56.7%
if 7.59999999999999961e-265 < F Initial program 70.7%
Taylor expanded in B around 0 51.6%
Taylor expanded in F around inf 46.4%
+-commutative46.4%
unsub-neg46.4%
associate-*l/56.6%
rgt-mult-inverse56.7%
un-div-inv56.7%
Applied egg-rr56.7%
Final simplification56.7%
(FPCore (F B x) :precision binary64 (- (/ -1.0 B) (/ x (tan B))))
double code(double F, double B, double x) {
return (-1.0 / B) - (x / tan(B));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = ((-1.0d0) / b) - (x / tan(b))
end function
public static double code(double F, double B, double x) {
return (-1.0 / B) - (x / Math.tan(B));
}
def code(F, B, x): return (-1.0 / B) - (x / math.tan(B))
function code(F, B, x) return Float64(Float64(-1.0 / B) - Float64(x / tan(B))) end
function tmp = code(F, B, x) tmp = (-1.0 / B) - (x / tan(B)); end
code[F_, B_, x_] := N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B} - \frac{x}{\tan B}
\end{array}
Initial program 73.5%
Taylor expanded in B around 0 54.8%
Taylor expanded in F around inf 43.2%
*-commutative43.2%
add-sqr-sqrt25.8%
sqrt-unprod32.1%
frac-times31.2%
metadata-eval31.2%
metadata-eval31.2%
frac-times32.1%
sqrt-unprod21.1%
add-sqr-sqrt43.3%
div-inv43.3%
mul-1-neg43.3%
cancel-sign-sub-inv43.3%
neg-mul-143.3%
*-commutative43.3%
fma-neg43.3%
un-div-inv43.3%
associate-*l/50.0%
rgt-mult-inverse50.0%
Applied egg-rr50.0%
fma-udef50.0%
neg-mul-150.0%
distribute-neg-in50.0%
+-commutative50.0%
distribute-neg-in50.0%
unsub-neg50.0%
distribute-neg-frac50.0%
metadata-eval50.0%
Simplified50.0%
Final simplification50.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.5e-42)
(+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B))
(if (<= F 3e-85)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.5e-42) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 3e-85) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (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 <= (-3.5d-42)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 3d-85) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (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 <= -3.5e-42) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 3e-85) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.5e-42: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 3e-85: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.5e-42) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 3e-85) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - 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 <= -3.5e-42) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 3e-85) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.5e-42], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-85], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.5 \cdot 10^{-42}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-85}:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.5000000000000002e-42Initial program 61.6%
Taylor expanded in F around -inf 72.0%
Taylor expanded in B around 0 67.4%
Taylor expanded in B around 0 46.7%
+-commutative46.7%
mul-1-neg46.7%
unsub-neg46.7%
*-commutative46.7%
associate-*l*46.7%
Simplified46.7%
if -3.5000000000000002e-42 < F < 3.00000000000000022e-85Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 65.9%
mul-1-neg65.9%
associate-*l/66.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
Taylor expanded in B around 0 31.4%
if 3.00000000000000022e-85 < F Initial program 60.6%
Taylor expanded in B around 0 42.9%
Taylor expanded in F around inf 47.5%
Taylor expanded in B around 0 43.1%
Final simplification40.5%
(FPCore (F B x) :precision binary64 (if (<= F -2.8e-45) (+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B)) (if (<= F 1.22e-84) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e-45) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.22e-84) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.8d-45)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 1.22d-84) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e-45) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.22e-84) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.8e-45: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 1.22e-84: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.8e-45) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 1.22e-84) 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 <= -2.8e-45) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 1.22e-84) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.8e-45], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.22e-84], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.8 \cdot 10^{-45}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-84}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.8000000000000001e-45Initial program 61.6%
Taylor expanded in F around -inf 72.0%
Taylor expanded in B around 0 67.4%
Taylor expanded in B around 0 46.7%
+-commutative46.7%
mul-1-neg46.7%
unsub-neg46.7%
*-commutative46.7%
associate-*l*46.7%
Simplified46.7%
if -2.8000000000000001e-45 < F < 1.21999999999999998e-84Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 65.9%
mul-1-neg65.9%
associate-*l/66.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
Taylor expanded in B around 0 31.3%
associate-*r/31.3%
neg-mul-131.3%
Simplified31.3%
if 1.21999999999999998e-84 < F Initial program 60.6%
Taylor expanded in B around 0 42.9%
Taylor expanded in F around inf 47.5%
Taylor expanded in B around 0 43.1%
Final simplification40.4%
(FPCore (F B x) :precision binary64 (if (<= F -1.75e-43) (/ (- -1.0 x) B) (if (<= F 6.5e-85) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.5e-85) {
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.75d-43)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6.5d-85) 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.75e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.5e-85) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.75e-43: tmp = (-1.0 - x) / B elif F <= 6.5e-85: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.75e-43) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6.5e-85) 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.75e-43) tmp = (-1.0 - x) / B; elseif (F <= 6.5e-85) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.75e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.5e-85], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-85}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.74999999999999999e-43Initial program 61.6%
Taylor expanded in F around -inf 72.0%
Taylor expanded in B around 0 67.4%
Taylor expanded in B around 0 45.9%
associate-*r/45.9%
mul-1-neg45.9%
Simplified45.9%
if -1.74999999999999999e-43 < F < 6.5e-85Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 65.9%
mul-1-neg65.9%
associate-*l/66.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
Taylor expanded in B around 0 31.3%
associate-*r/31.3%
neg-mul-131.3%
Simplified31.3%
if 6.5e-85 < F Initial program 60.6%
Taylor expanded in B around 0 42.9%
Taylor expanded in F around inf 47.5%
Taylor expanded in B around 0 43.1%
Final simplification40.2%
(FPCore (F B x) :precision binary64 (if (<= F -3e-36) (- (/ -1.0 B) (/ x B)) (if (<= F 1.66e-84) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-36) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.66e-84) {
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 <= (-3d-36)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 1.66d-84) 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 <= -3e-36) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 1.66e-84) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e-36: tmp = (-1.0 / B) - (x / B) elif F <= 1.66e-84: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e-36) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 1.66e-84) 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 <= -3e-36) tmp = (-1.0 / B) - (x / B); elseif (F <= 1.66e-84) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e-36], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.66e-84], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.66 \cdot 10^{-84}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.0000000000000002e-36Initial program 61.6%
Taylor expanded in F around -inf 72.0%
Taylor expanded in B around 0 67.4%
Taylor expanded in B around 0 45.9%
if -3.0000000000000002e-36 < F < 1.6600000000000001e-84Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 65.9%
mul-1-neg65.9%
associate-*l/66.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
Taylor expanded in B around 0 31.3%
associate-*r/31.3%
neg-mul-131.3%
Simplified31.3%
if 1.6600000000000001e-84 < F Initial program 60.6%
Taylor expanded in B around 0 42.9%
Taylor expanded in F around inf 47.5%
Taylor expanded in B around 0 43.1%
Final simplification40.2%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.5e-49) (not (<= x 1.4e-112))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.5e-49) || !(x <= 1.4e-112)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2.5d-49)) .or. (.not. (x <= 1.4d-112))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.5e-49) || !(x <= 1.4e-112)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.5e-49) or not (x <= 1.4e-112): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.5e-49) || !(x <= 1.4e-112)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.5e-49) || ~((x <= 1.4e-112))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.5e-49], N[Not[LessEqual[x, 1.4e-112]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{-49} \lor \neg \left(x \leq 1.4 \cdot 10^{-112}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -2.4999999999999999e-49 or 1.40000000000000011e-112 < x Initial program 75.8%
distribute-lft-neg-in75.8%
+-commutative75.8%
fma-def75.8%
+-commutative75.8%
*-commutative75.8%
fma-def75.8%
fma-def75.8%
metadata-eval75.8%
metadata-eval75.8%
associate-*r/75.8%
*-rgt-identity75.8%
Simplified75.8%
Taylor expanded in F around 0 82.0%
mul-1-neg82.0%
associate-*l/81.9%
distribute-rgt-neg-in81.9%
Simplified81.9%
Taylor expanded in B around 0 42.2%
associate-*r/42.2%
neg-mul-142.2%
Simplified42.2%
if -2.4999999999999999e-49 < x < 1.40000000000000011e-112Initial program 70.9%
Taylor expanded in F around -inf 21.0%
Taylor expanded in B around 0 17.9%
Taylor expanded in x around 0 16.1%
Final simplification30.1%
(FPCore (F B x) :precision binary64 (if (<= F 1.7e-84) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.7e-84) {
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.7d-84) 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.7e-84) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.7e-84: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.7e-84) 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.7e-84) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.7e-84], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.7 \cdot 10^{-84}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.7000000000000001e-84Initial program 80.7%
distribute-lft-neg-in80.7%
+-commutative80.7%
fma-def80.7%
+-commutative80.7%
*-commutative80.7%
fma-def80.7%
fma-def80.7%
metadata-eval80.7%
metadata-eval80.7%
associate-*r/80.7%
*-rgt-identity80.7%
Simplified80.7%
Taylor expanded in F around 0 55.2%
mul-1-neg55.2%
associate-*l/55.2%
distribute-rgt-neg-in55.2%
Simplified55.2%
Taylor expanded in B around 0 27.2%
associate-*r/27.2%
neg-mul-127.2%
Simplified27.2%
if 1.7000000000000001e-84 < F Initial program 60.6%
Taylor expanded in B around 0 42.9%
Taylor expanded in F around inf 47.5%
Taylor expanded in B around 0 43.1%
Final simplification32.8%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 73.5%
Taylor expanded in F around -inf 46.2%
Taylor expanded in B around 0 50.0%
Taylor expanded in x around 0 10.4%
Final simplification10.4%
herbie shell --seed 2023311
(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))))))