
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -520000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 108000000.0)
(- (* F (/ 1.0 (/ (sin B) (pow (fma 2.0 x (fma F F 2.0)) -0.5)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -520000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 108000000.0) {
tmp = (F * (1.0 / (sin(B) / pow(fma(2.0, x, fma(F, F, 2.0)), -0.5)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -520000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 108000000.0) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) / (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -520000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 108000000.0], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -520000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 108000000:\\
\;\;\;\;F \cdot \frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5.2e8Initial program 67.3%
distribute-lft-neg-in67.3%
+-commutative67.3%
cancel-sign-sub-inv67.3%
Simplified78.4%
clear-num78.4%
inv-pow78.4%
fma-def78.4%
fma-udef78.4%
*-commutative78.4%
fma-def78.4%
fma-def78.4%
Applied egg-rr78.4%
unpow-178.4%
Simplified78.4%
Taylor expanded in F around -inf 99.8%
if -5.2e8 < F < 1.08e8Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.5%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
if 1.08e8 < F Initial program 58.9%
distribute-lft-neg-in58.9%
+-commutative58.9%
cancel-sign-sub-inv58.9%
Simplified67.1%
clear-num67.2%
inv-pow67.2%
fma-def67.2%
fma-udef67.2%
*-commutative67.2%
fma-def67.2%
fma-def67.2%
Applied egg-rr67.2%
unpow-167.2%
Simplified67.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.5e+81)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 120000000.0)
(- (/ (/ F (sin B)) (sqrt (fma F F (fma 2.0 x 2.0)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.5e+81) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 120000000.0) {
tmp = ((F / sin(B)) / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e+81) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 120000000.0) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(F, F, fma(2.0, x, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e+81], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 120000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(F * F + N[(2.0 * x + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+81}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, \mathsf{fma}\left(2, x, 2\right)\right)}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.5e81Initial program 60.2%
distribute-lft-neg-in60.2%
+-commutative60.2%
cancel-sign-sub-inv60.2%
Simplified73.7%
clear-num73.7%
inv-pow73.7%
fma-def73.7%
fma-udef73.7%
*-commutative73.7%
fma-def73.7%
fma-def73.7%
Applied egg-rr73.7%
unpow-173.7%
Simplified73.7%
Taylor expanded in F around -inf 99.8%
if -3.5e81 < F < 1.2e8Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.5%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
expm1-log1p-u86.2%
expm1-udef67.6%
Applied egg-rr67.6%
expm1-def86.2%
expm1-log1p99.6%
associate-/r*99.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
if 1.2e8 < F Initial program 58.9%
distribute-lft-neg-in58.9%
+-commutative58.9%
cancel-sign-sub-inv58.9%
Simplified67.1%
clear-num67.2%
inv-pow67.2%
fma-def67.2%
fma-udef67.2%
*-commutative67.2%
fma-def67.2%
fma-def67.2%
Applied egg-rr67.2%
unpow-167.2%
Simplified67.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -520000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -520000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-520000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -520000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -520000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -520000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -520000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -520000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -520000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5.2e8Initial program 67.3%
distribute-lft-neg-in67.3%
+-commutative67.3%
cancel-sign-sub-inv67.3%
Simplified78.4%
clear-num78.4%
inv-pow78.4%
fma-def78.4%
fma-udef78.4%
*-commutative78.4%
fma-def78.4%
fma-def78.4%
Applied egg-rr78.4%
unpow-178.4%
Simplified78.4%
Taylor expanded in F around -inf 99.8%
if -5.2e8 < F < 1e8Initial program 99.4%
if 1e8 < F Initial program 58.9%
distribute-lft-neg-in58.9%
+-commutative58.9%
cancel-sign-sub-inv58.9%
Simplified67.1%
clear-num67.2%
inv-pow67.2%
fma-def67.2%
fma-udef67.2%
*-commutative67.2%
fma-def67.2%
fma-def67.2%
Applied egg-rr67.2%
unpow-167.2%
Simplified67.2%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -520000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -520000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-520000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -520000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -520000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -520000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -520000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -520000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -520000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5.2e8Initial program 67.3%
distribute-lft-neg-in67.3%
+-commutative67.3%
cancel-sign-sub-inv67.3%
Simplified78.4%
clear-num78.4%
inv-pow78.4%
fma-def78.4%
fma-udef78.4%
*-commutative78.4%
fma-def78.4%
fma-def78.4%
Applied egg-rr78.4%
unpow-178.4%
Simplified78.4%
Taylor expanded in F around -inf 99.8%
if -5.2e8 < F < 1e8Initial program 99.4%
div-inv82.8%
clear-num82.6%
Applied egg-rr99.4%
if 1e8 < F Initial program 58.9%
distribute-lft-neg-in58.9%
+-commutative58.9%
cancel-sign-sub-inv58.9%
Simplified67.1%
clear-num67.2%
inv-pow67.2%
fma-def67.2%
fma-udef67.2%
*-commutative67.2%
fma-def67.2%
fma-def67.2%
Applied egg-rr67.2%
unpow-167.2%
Simplified67.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.85)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.205)
(- (* F (/ 1.0 (* (sin B) (sqrt (+ 2.0 (* x 2.0)))))) t_0)
(+
(* x (/ -1.0 (tan B)))
(+ (/ 1.0 (sin B)) (/ (- -1.0 x) (* (sin B) (* F F)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.85) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.205) {
tmp = (F * (1.0 / (sin(B) * sqrt((2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + ((1.0 / sin(B)) + ((-1.0 - x) / (sin(B) * (F * F))));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.85d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.205d0) then
tmp = (f * (1.0d0 / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + ((1.0d0 / sin(b)) + (((-1.0d0) - x) / (sin(b) * (f * f))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.85) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.205) {
tmp = (F * (1.0 / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + ((1.0 / Math.sin(B)) + ((-1.0 - x) / (Math.sin(B) * (F * F))));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.85: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.205: tmp = (F * (1.0 / (math.sin(B) * math.sqrt((2.0 + (x * 2.0)))))) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + ((1.0 / math.sin(B)) + ((-1.0 - x) / (math.sin(B) * (F * F)))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.85) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.205) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(1.0 / sin(B)) + Float64(Float64(-1.0 - x) / Float64(sin(B) * Float64(F * F))))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.85) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.205) tmp = (F * (1.0 / (sin(B) * sqrt((2.0 + (x * 2.0)))))) - t_0; else tmp = (x * (-1.0 / tan(B))) + ((1.0 / sin(B)) + ((-1.0 - x) / (sin(B) * (F * F)))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.85], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.205], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] * N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.85:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.205:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \left(\frac{1}{\sin B} + \frac{-1 - x}{\sin B \cdot \left(F \cdot F\right)}\right)\\
\end{array}
\end{array}
if F < -1.8500000000000001Initial program 68.6%
distribute-lft-neg-in68.6%
+-commutative68.6%
cancel-sign-sub-inv68.6%
Simplified79.2%
clear-num79.3%
inv-pow79.3%
fma-def79.3%
fma-udef79.3%
*-commutative79.3%
fma-def79.3%
fma-def79.3%
Applied egg-rr79.3%
unpow-179.3%
Simplified79.3%
Taylor expanded in F around -inf 99.3%
if -1.8500000000000001 < F < 0.204999999999999988Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
cancel-sign-sub-inv99.3%
Simplified99.5%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
if 0.204999999999999988 < F Initial program 59.8%
Taylor expanded in F around inf 99.8%
+-commutative99.8%
associate-*r/99.8%
+-commutative99.8%
distribute-lft-in99.8%
metadata-eval99.8%
associate-*r*99.8%
metadata-eval99.8%
mul-1-neg99.8%
*-commutative99.8%
unpow299.8%
Simplified99.8%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.2e-10)
(- (* F (/ 1.0 (* (sin B) (sqrt (+ 2.0 (* x 2.0)))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.2e-10) {
tmp = (F * (1.0 / (sin(B) * sqrt((2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.2d-10) then
tmp = (f * (1.0d0 / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.2e-10) {
tmp = (F * (1.0 / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.2e-10: tmp = (F * (1.0 / (math.sin(B) * math.sqrt((2.0 + (x * 2.0)))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.2e-10) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.2e-10) tmp = (F * (1.0 / (sin(B) * sqrt((2.0 + (x * 2.0)))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.2e-10], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-10}:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 68.6%
distribute-lft-neg-in68.6%
+-commutative68.6%
cancel-sign-sub-inv68.6%
Simplified79.2%
clear-num79.3%
inv-pow79.3%
fma-def79.3%
fma-udef79.3%
*-commutative79.3%
fma-def79.3%
fma-def79.3%
Applied egg-rr79.3%
unpow-179.3%
Simplified79.3%
Taylor expanded in F around -inf 99.3%
if -1.4199999999999999 < F < 5.19999999999999962e-10Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
cancel-sign-sub-inv99.3%
Simplified99.5%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in F around 0 99.5%
if 5.19999999999999962e-10 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified68.7%
clear-num68.7%
inv-pow68.7%
fma-def68.7%
fma-udef68.7%
*-commutative68.7%
fma-def68.7%
fma-def68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.7%
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 (tan B))))
(if (<= F -1.9e-6)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.75e-185)
t_0
(if (<= F 4.4e-205)
(/ (* x (- (cos B))) (sin B))
(if (<= F 3e-61)
t_0
(if (<= F 2e-44)
(- (/ 1.0 B) t_1)
(if (<= F 5.2e-10) t_0 (- (/ 1.0 (sin B)) t_1)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.9e-6) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.75e-185) {
tmp = t_0;
} else if (F <= 4.4e-205) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 3e-61) {
tmp = t_0;
} else if (F <= 2e-44) {
tmp = (1.0 / B) - t_1;
} else if (F <= 5.2e-10) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-1.9d-6)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.75d-185)) then
tmp = t_0
else if (f <= 4.4d-205) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 3d-61) then
tmp = t_0
else if (f <= 2d-44) then
tmp = (1.0d0 / b) - t_1
else if (f <= 5.2d-10) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.9e-6) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.75e-185) {
tmp = t_0;
} else if (F <= 4.4e-205) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 3e-61) {
tmp = t_0;
} else if (F <= 2e-44) {
tmp = (1.0 / B) - t_1;
} else if (F <= 5.2e-10) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.9e-6: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.75e-185: tmp = t_0 elif F <= 4.4e-205: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 3e-61: tmp = t_0 elif F <= 2e-44: tmp = (1.0 / B) - t_1 elif F <= 5.2e-10: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e-6) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.75e-185) tmp = t_0; elseif (F <= 4.4e-205) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 3e-61) tmp = t_0; elseif (F <= 2e-44) tmp = Float64(Float64(1.0 / B) - t_1); elseif (F <= 5.2e-10) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.9e-6) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.75e-185) tmp = t_0; elseif (F <= 4.4e-205) tmp = (x * -cos(B)) / sin(B); elseif (F <= 3e-61) tmp = t_0; elseif (F <= 2e-44) tmp = (1.0 / B) - t_1; elseif (F <= 5.2e-10) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.75e-185], t$95$0, If[LessEqual[F, 4.4e-205], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-61], t$95$0, If[LessEqual[F, 2e-44], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 5.2e-10], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -2.75 \cdot 10^{-185}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-205}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-61}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-44}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -1.9e-6Initial program 69.0%
distribute-lft-neg-in69.0%
+-commutative69.0%
cancel-sign-sub-inv69.0%
Simplified79.5%
clear-num79.5%
inv-pow79.5%
fma-def79.5%
fma-udef79.5%
*-commutative79.5%
fma-def79.5%
fma-def79.5%
Applied egg-rr79.5%
unpow-179.5%
Simplified79.5%
Taylor expanded in F around -inf 99.3%
if -1.9e-6 < F < -2.7499999999999999e-185 or 4.40000000000000018e-205 < F < 3.00000000000000012e-61 or 1.99999999999999991e-44 < F < 5.19999999999999962e-10Initial program 99.3%
Taylor expanded in B around 0 81.5%
if -2.7499999999999999e-185 < F < 4.40000000000000018e-205Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 91.5%
mul-1-neg91.5%
*-commutative91.5%
associate-*l/91.5%
distribute-rgt-neg-in91.5%
Simplified91.5%
associate-*l/91.5%
Applied egg-rr91.5%
if 3.00000000000000012e-61 < F < 1.99999999999999991e-44Initial program 99.1%
distribute-lft-neg-in99.1%
+-commutative99.1%
cancel-sign-sub-inv99.1%
Simplified99.7%
Taylor expanded in F around inf 60.7%
Taylor expanded in B around 0 99.4%
if 5.19999999999999962e-10 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified68.7%
clear-num68.7%
inv-pow68.7%
fma-def68.7%
fma-udef68.7%
*-commutative68.7%
fma-def68.7%
fma-def68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.7%
Final simplification94.3%
(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 (/ 1.0 (sin B)))
(t_2 (/ x (tan B))))
(if (<= F -1.9e-6)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -3.5e-185)
t_0
(if (<= F 4.4e-205)
(- (* F (* t_1 (/ 1.0 (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))) t_2)
(if (<= F 3e-61)
t_0
(if (<= F 8.5e-41)
(- (/ 1.0 B) t_2)
(if (<= F 5.2e-10) t_0 (- t_1 t_2)))))))))
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 = 1.0 / sin(B);
double t_2 = x / tan(B);
double tmp;
if (F <= -1.9e-6) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -3.5e-185) {
tmp = t_0;
} else if (F <= 4.4e-205) {
tmp = (F * (t_1 * (1.0 / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_2;
} else if (F <= 3e-61) {
tmp = t_0;
} else if (F <= 8.5e-41) {
tmp = (1.0 / B) - t_2;
} else if (F <= 5.2e-10) {
tmp = t_0;
} else {
tmp = t_1 - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = 1.0d0 / sin(b)
t_2 = x / tan(b)
if (f <= (-1.9d-6)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-3.5d-185)) then
tmp = t_0
else if (f <= 4.4d-205) then
tmp = (f * (t_1 * (1.0d0 / (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))))) - t_2
else if (f <= 3d-61) then
tmp = t_0
else if (f <= 8.5d-41) then
tmp = (1.0d0 / b) - t_2
else if (f <= 5.2d-10) then
tmp = t_0
else
tmp = t_1 - t_2
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 = 1.0 / Math.sin(B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -1.9e-6) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -3.5e-185) {
tmp = t_0;
} else if (F <= 4.4e-205) {
tmp = (F * (t_1 * (1.0 / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_2;
} else if (F <= 3e-61) {
tmp = t_0;
} else if (F <= 8.5e-41) {
tmp = (1.0 / B) - t_2;
} else if (F <= 5.2e-10) {
tmp = t_0;
} else {
tmp = t_1 - t_2;
}
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 = 1.0 / math.sin(B) t_2 = x / math.tan(B) tmp = 0 if F <= -1.9e-6: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -3.5e-185: tmp = t_0 elif F <= 4.4e-205: tmp = (F * (t_1 * (1.0 / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_2 elif F <= 3e-61: tmp = t_0 elif F <= 8.5e-41: tmp = (1.0 / B) - t_2 elif F <= 5.2e-10: tmp = t_0 else: tmp = t_1 - t_2 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(1.0 / sin(B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e-6) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -3.5e-185) tmp = t_0; elseif (F <= 4.4e-205) tmp = Float64(Float64(F * Float64(t_1 * Float64(1.0 / Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))))) - t_2); elseif (F <= 3e-61) tmp = t_0; elseif (F <= 8.5e-41) tmp = Float64(Float64(1.0 / B) - t_2); elseif (F <= 5.2e-10) tmp = t_0; else tmp = Float64(t_1 - t_2); 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 = 1.0 / sin(B); t_2 = x / tan(B); tmp = 0.0; if (F <= -1.9e-6) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -3.5e-185) tmp = t_0; elseif (F <= 4.4e-205) tmp = (F * (t_1 * (1.0 / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))))) - t_2; elseif (F <= 3e-61) tmp = t_0; elseif (F <= 8.5e-41) tmp = (1.0 / B) - t_2; elseif (F <= 5.2e-10) tmp = t_0; else tmp = t_1 - t_2; 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -3.5e-185], t$95$0, If[LessEqual[F, 4.4e-205], N[(N[(F * N[(t$95$1 * N[(1.0 / N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 3e-61], t$95$0, If[LessEqual[F, 8.5e-41], N[(N[(1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 5.2e-10], t$95$0, N[(t$95$1 - t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{1}{\sin B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-185}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-205}:\\
\;\;\;\;F \cdot \left(t_1 \cdot \frac{1}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}}\right) - t_2\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-61}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-41}:\\
\;\;\;\;\frac{1}{B} - t_2\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 - t_2\\
\end{array}
\end{array}
if F < -1.9e-6Initial program 69.0%
distribute-lft-neg-in69.0%
+-commutative69.0%
cancel-sign-sub-inv69.0%
Simplified79.5%
clear-num79.5%
inv-pow79.5%
fma-def79.5%
fma-udef79.5%
*-commutative79.5%
fma-def79.5%
fma-def79.5%
Applied egg-rr79.5%
unpow-179.5%
Simplified79.5%
Taylor expanded in F around -inf 99.3%
if -1.9e-6 < F < -3.4999999999999998e-185 or 4.40000000000000018e-205 < F < 3.00000000000000012e-61 or 8.4999999999999996e-41 < F < 5.19999999999999962e-10Initial program 99.3%
Taylor expanded in B around 0 81.5%
if -3.4999999999999998e-185 < F < 4.40000000000000018e-205Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
inv-pow99.7%
div-inv99.7%
unpow-prod-down99.7%
inv-pow99.7%
fma-def99.7%
fma-udef99.7%
+-commutative99.7%
pow-flip99.7%
metadata-eval99.7%
pow1/299.7%
+-commutative99.7%
fma-udef99.7%
fma-def99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
Taylor expanded in F around inf 91.7%
if 3.00000000000000012e-61 < F < 8.4999999999999996e-41Initial program 99.1%
distribute-lft-neg-in99.1%
+-commutative99.1%
cancel-sign-sub-inv99.1%
Simplified99.7%
Taylor expanded in F around inf 60.7%
Taylor expanded in B around 0 99.4%
if 5.19999999999999962e-10 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified68.7%
clear-num68.7%
inv-pow68.7%
fma-def68.7%
fma-udef68.7%
*-commutative68.7%
fma-def68.7%
fma-def68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.7%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B))))
(t_2 (/ x (tan B))))
(if (<= F -11500000.0)
(- (/ -1.0 (sin B)) t_2)
(if (<= F 4.4e-205)
t_1
(if (<= F 5.8e-62)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 7.5e-17) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
double t_2 = x / tan(B);
double tmp;
if (F <= -11500000.0) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= 4.4e-205) {
tmp = t_1;
} else if (F <= 5.8e-62) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 7.5e-17) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
t_2 = x / tan(b)
if (f <= (-11500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= 4.4d-205) then
tmp = t_1
else if (f <= 5.8d-62) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 7.5d-17) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -11500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= 4.4e-205) {
tmp = t_1;
} else if (F <= 5.8e-62) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 7.5e-17) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) t_2 = x / math.tan(B) tmp = 0 if F <= -11500000.0: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= 4.4e-205: tmp = t_1 elif F <= 5.8e-62: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 7.5e-17: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -11500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= 4.4e-205) tmp = t_1; elseif (F <= 5.8e-62) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 7.5e-17) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); t_2 = x / tan(B); tmp = 0.0; if (F <= -11500000.0) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= 4.4e-205) tmp = t_1; elseif (F <= 5.8e-62) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 7.5e-17) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -11500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 4.4e-205], t$95$1, If[LessEqual[F, 5.8e-62], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-17], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -11500000:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-62}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\
\end{array}
\end{array}
if F < -1.15e7Initial program 67.8%
distribute-lft-neg-in67.8%
+-commutative67.8%
cancel-sign-sub-inv67.8%
Simplified78.7%
clear-num78.7%
inv-pow78.7%
fma-def78.7%
fma-udef78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
Applied egg-rr78.7%
unpow-178.7%
Simplified78.7%
Taylor expanded in F around -inf 99.8%
if -1.15e7 < F < 4.40000000000000018e-205 or 5.79999999999999971e-62 < F < 7.49999999999999984e-17Initial program 99.3%
Taylor expanded in B around 0 91.0%
if 4.40000000000000018e-205 < F < 5.79999999999999971e-62Initial program 99.4%
Taylor expanded in B around 0 81.2%
if 7.49999999999999984e-17 < F Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified69.0%
clear-num69.1%
inv-pow69.1%
fma-def69.1%
fma-udef69.1%
*-commutative69.1%
fma-def69.1%
fma-def69.1%
Applied egg-rr69.1%
unpow-169.1%
Simplified69.1%
Taylor expanded in F around inf 98.6%
Final simplification95.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B))))
(t_2 (/ x (tan B))))
(if (<= F -11500000.0)
(- (/ -1.0 (sin B)) t_2)
(if (<= F 4.4e-205)
t_1
(if (<= F 1.6e-61)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 7.5e-17) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
double t_2 = x / tan(B);
double tmp;
if (F <= -11500000.0) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= 4.4e-205) {
tmp = t_1;
} else if (F <= 1.6e-61) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 7.5e-17) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
t_2 = x / tan(b)
if (f <= (-11500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= 4.4d-205) then
tmp = t_1
else if (f <= 1.6d-61) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 7.5d-17) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -11500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= 4.4e-205) {
tmp = t_1;
} else if (F <= 1.6e-61) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 7.5e-17) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) t_2 = x / math.tan(B) tmp = 0 if F <= -11500000.0: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= 4.4e-205: tmp = t_1 elif F <= 1.6e-61: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 7.5e-17: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -11500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= 4.4e-205) tmp = t_1; elseif (F <= 1.6e-61) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 7.5e-17) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); t_2 = x / tan(B); tmp = 0.0; if (F <= -11500000.0) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= 4.4e-205) tmp = t_1; elseif (F <= 1.6e-61) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 7.5e-17) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -11500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 4.4e-205], t$95$1, If[LessEqual[F, 1.6e-61], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-17], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -11500000:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-61}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\
\end{array}
\end{array}
if F < -1.15e7Initial program 67.8%
distribute-lft-neg-in67.8%
+-commutative67.8%
cancel-sign-sub-inv67.8%
Simplified78.7%
clear-num78.7%
inv-pow78.7%
fma-def78.7%
fma-udef78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
Applied egg-rr78.7%
unpow-178.7%
Simplified78.7%
Taylor expanded in F around -inf 99.8%
if -1.15e7 < F < 4.40000000000000018e-205 or 1.6000000000000001e-61 < F < 7.49999999999999984e-17Initial program 99.3%
Taylor expanded in B around 0 91.0%
div-inv91.2%
clear-num91.1%
Applied egg-rr91.1%
if 4.40000000000000018e-205 < F < 1.6000000000000001e-61Initial program 99.4%
Taylor expanded in B around 0 81.2%
if 7.49999999999999984e-17 < F Initial program 61.2%
distribute-lft-neg-in61.2%
+-commutative61.2%
cancel-sign-sub-inv61.2%
Simplified69.0%
clear-num69.1%
inv-pow69.1%
fma-def69.1%
fma-udef69.1%
*-commutative69.1%
fma-def69.1%
fma-def69.1%
Applied egg-rr69.1%
unpow-169.1%
Simplified69.1%
Taylor expanded in F around inf 98.6%
Final simplification95.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.55e-54)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.5e-185)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 1.32e-24)
(/ (- (cos B)) (/ (sin B) x))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.55e-54) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.5e-185) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.32e-24) {
tmp = -cos(B) / (sin(B) / x);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.55d-54)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.5d-185)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 1.32d-24) then
tmp = -cos(b) / (sin(b) / x)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.55e-54) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.5e-185) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.32e-24) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.55e-54: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.5e-185: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 1.32e-24: tmp = -math.cos(B) / (math.sin(B) / x) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.55e-54) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.5e-185) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 1.32e-24) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.55e-54) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.5e-185) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 1.32e-24) tmp = -cos(B) / (sin(B) / x); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.55e-54], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.5e-185], 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 * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.32e-24], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.55 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-185}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{-24}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.55000000000000002e-54Initial program 71.9%
distribute-lft-neg-in71.9%
+-commutative71.9%
cancel-sign-sub-inv71.9%
Simplified81.3%
clear-num81.4%
inv-pow81.4%
fma-def81.4%
fma-udef81.4%
*-commutative81.4%
fma-def81.4%
fma-def81.4%
Applied egg-rr81.4%
unpow-181.4%
Simplified81.4%
Taylor expanded in F around -inf 94.8%
if -1.55000000000000002e-54 < F < -3.4999999999999998e-185Initial program 99.3%
Taylor expanded in B around 0 88.0%
Taylor expanded in B around 0 72.6%
if -3.4999999999999998e-185 < F < 1.3199999999999999e-24Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.5%
mul-1-neg70.5%
*-commutative70.5%
associate-*l/70.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
clear-num70.4%
inv-pow70.4%
Applied egg-rr70.4%
unpow-170.4%
Simplified70.4%
associate-*l/70.5%
*-un-lft-identity70.5%
Applied egg-rr70.5%
if 1.3199999999999999e-24 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified69.7%
clear-num69.7%
inv-pow69.7%
fma-def69.7%
fma-udef69.7%
*-commutative69.7%
fma-def69.7%
fma-def69.7%
Applied egg-rr69.7%
unpow-169.7%
Simplified69.7%
Taylor expanded in F around inf 96.6%
Final simplification87.7%
(FPCore (F B x)
:precision binary64
(if (<= F -3.2e-49)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -3.5e-185)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 1.45e-25)
(* (cos B) (/ (- x) (sin B)))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-49) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -3.5e-185) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.45e-25) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.2d-49)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-3.5d-185)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 1.45d-25) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-49) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -3.5e-185) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.45e-25) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.2e-49: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -3.5e-185: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 1.45e-25: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.2e-49) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -3.5e-185) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 1.45e-25) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(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 <= -3.2e-49) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -3.5e-185) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 1.45e-25) tmp = cos(B) * (-x / sin(B)); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.2e-49], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.5e-185], 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 * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45e-25], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $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 -3.2 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-185}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-25}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.20000000000000002e-49Initial program 71.5%
Taylor expanded in B around 0 61.5%
Taylor expanded in F around -inf 77.4%
if -3.20000000000000002e-49 < F < -3.4999999999999998e-185Initial program 99.3%
Taylor expanded in B around 0 84.8%
Taylor expanded in B around 0 70.1%
if -3.4999999999999998e-185 < F < 1.45e-25Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.5%
mul-1-neg70.5%
*-commutative70.5%
associate-*l/70.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
if 1.45e-25 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified69.7%
Taylor expanded in F around inf 96.4%
Taylor expanded in B around 0 68.2%
Final simplification71.9%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e-51)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -3.5e-185)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 1.2e-29)
(/ (- (cos B)) (/ (sin B) x))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-51) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -3.5e-185) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.2e-29) {
tmp = -cos(B) / (sin(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 <= (-9.5d-51)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-3.5d-185)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 1.2d-29) then
tmp = -cos(b) / (sin(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 <= -9.5e-51) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -3.5e-185) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.2e-29) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-51: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -3.5e-185: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 1.2e-29: tmp = -math.cos(B) / (math.sin(B) / x) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-51) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -3.5e-185) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 1.2e-29) tmp = Float64(Float64(-cos(B)) / Float64(sin(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 <= -9.5e-51) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -3.5e-185) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 1.2e-29) tmp = -cos(B) / (sin(B) / x); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-51], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.5e-185], 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 * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-29], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $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 -9.5 \cdot 10^{-51}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-185}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.4999999999999998e-51Initial program 71.5%
Taylor expanded in B around 0 61.5%
Taylor expanded in F around -inf 77.4%
if -9.4999999999999998e-51 < F < -3.4999999999999998e-185Initial program 99.3%
Taylor expanded in B around 0 84.8%
Taylor expanded in B around 0 70.1%
if -3.4999999999999998e-185 < F < 1.19999999999999996e-29Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.5%
mul-1-neg70.5%
*-commutative70.5%
associate-*l/70.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
clear-num70.4%
inv-pow70.4%
Applied egg-rr70.4%
unpow-170.4%
Simplified70.4%
associate-*l/70.5%
*-un-lft-identity70.5%
Applied egg-rr70.5%
if 1.19999999999999996e-29 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified69.7%
Taylor expanded in F around inf 96.4%
Taylor expanded in B around 0 68.2%
Final simplification71.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.6e-53)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.25e-185)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 1.65e-28) (/ (- (cos B)) (/ (sin B) x)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.6e-53) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.25e-185) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.65e-28) {
tmp = -cos(B) / (sin(B) / x);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.6d-53)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.25d-185)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 1.65d-28) then
tmp = -cos(b) / (sin(b) / x)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.6e-53) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.25e-185) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.65e-28) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.6e-53: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.25e-185: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 1.65e-28: tmp = -math.cos(B) / (math.sin(B) / x) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.6e-53) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.25e-185) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 1.65e-28) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.6e-53) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.25e-185) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 1.65e-28) tmp = -cos(B) / (sin(B) / x); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6e-53], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.25e-185], 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 * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.65e-28], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-185}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-28}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.6e-53Initial program 71.9%
distribute-lft-neg-in71.9%
+-commutative71.9%
cancel-sign-sub-inv71.9%
Simplified81.3%
clear-num81.4%
inv-pow81.4%
fma-def81.4%
fma-udef81.4%
*-commutative81.4%
fma-def81.4%
fma-def81.4%
Applied egg-rr81.4%
unpow-181.4%
Simplified81.4%
Taylor expanded in F around -inf 94.8%
if -1.6e-53 < F < -1.2500000000000001e-185Initial program 99.3%
Taylor expanded in B around 0 88.0%
Taylor expanded in B around 0 72.6%
if -1.2500000000000001e-185 < F < 1.6500000000000001e-28Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 70.5%
mul-1-neg70.5%
*-commutative70.5%
associate-*l/70.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
clear-num70.4%
inv-pow70.4%
Applied egg-rr70.4%
unpow-170.4%
Simplified70.4%
associate-*l/70.5%
*-un-lft-identity70.5%
Applied egg-rr70.5%
if 1.6500000000000001e-28 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified69.7%
Taylor expanded in F around inf 96.4%
Taylor expanded in B around 0 68.2%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(if (<= F -3.4e-71)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -4.2e-226)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-71) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -4.2e-226) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.4d-71)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-4.2d-226)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-71) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -4.2e-226) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.4e-71: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -4.2e-226: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.4e-71) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -4.2e-226) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.4e-71) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -4.2e-226) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.4e-71], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.2e-226], 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], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.4 \cdot 10^{-71}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-226}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.40000000000000003e-71Initial program 71.9%
Taylor expanded in B around 0 60.8%
Taylor expanded in F around -inf 76.5%
if -3.40000000000000003e-71 < F < -4.2000000000000003e-226Initial program 99.3%
Taylor expanded in B around 0 87.5%
Taylor expanded in B around 0 69.6%
if -4.2000000000000003e-226 < F Initial program 76.0%
distribute-lft-neg-in76.0%
+-commutative76.0%
cancel-sign-sub-inv76.0%
Simplified80.8%
Taylor expanded in F around inf 70.3%
Taylor expanded in B around 0 60.6%
Final simplification67.0%
(FPCore (F B x)
:precision binary64
(if (<= F -2.35e-60)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -1.1e-225)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.35e-60) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -1.1e-225) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.35d-60)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-1.1d-225)) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.35e-60) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -1.1e-225) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.35e-60: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -1.1e-225: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.35e-60) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -1.1e-225) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.35e-60) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -1.1e-225) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.35e-60], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.1e-225], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.35 \cdot 10^{-60}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-225}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.35e-60Initial program 71.9%
Taylor expanded in B around 0 60.8%
Taylor expanded in F around -inf 76.5%
if -2.35e-60 < F < -1.1e-225Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 69.4%
Taylor expanded in F around 0 69.6%
if -1.1e-225 < F Initial program 76.0%
distribute-lft-neg-in76.0%
+-commutative76.0%
cancel-sign-sub-inv76.0%
Simplified80.8%
Taylor expanded in F around inf 70.3%
Taylor expanded in B around 0 60.6%
Final simplification67.0%
(FPCore (F B x)
:precision binary64
(if (<= F -8.5e-70)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -5.2e-227)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-70) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -5.2e-227) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.5d-70)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-5.2d-227)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-70) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -5.2e-227) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-70: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -5.2e-227: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-70) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -5.2e-227) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.5e-70) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -5.2e-227) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-70], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-227], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-227}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -8.5000000000000002e-70Initial program 71.9%
Taylor expanded in B around 0 60.8%
Taylor expanded in F around -inf 76.5%
if -8.5000000000000002e-70 < F < -5.20000000000000023e-227Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in B around 0 69.4%
Taylor expanded in F around 0 69.4%
if -5.20000000000000023e-227 < F Initial program 76.0%
distribute-lft-neg-in76.0%
+-commutative76.0%
cancel-sign-sub-inv76.0%
Simplified80.8%
Taylor expanded in F around inf 70.3%
Taylor expanded in B around 0 60.6%
Final simplification66.9%
(FPCore (F B x) :precision binary64 (if (<= F 1.25e-174) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.25e-174) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / 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.25d-174) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / 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.25e-174) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.25e-174: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.25e-174) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / 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.25e-174) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.25e-174], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $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.25 \cdot 10^{-174}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < 1.2500000000000001e-174Initial program 83.3%
Taylor expanded in B around 0 73.1%
Taylor expanded in F around -inf 64.5%
if 1.2500000000000001e-174 < F Initial program 70.1%
distribute-lft-neg-in70.1%
+-commutative70.1%
cancel-sign-sub-inv70.1%
Simplified76.1%
Taylor expanded in F around inf 80.4%
Taylor expanded in B around 0 61.9%
Final simplification63.3%
(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 77.5%
distribute-lft-neg-in77.5%
+-commutative77.5%
cancel-sign-sub-inv77.5%
Simplified83.3%
Taylor expanded in F around inf 61.3%
Taylor expanded in B around 0 56.7%
Final simplification56.7%
(FPCore (F B x)
:precision binary64
(if (<= F -2.8e-105)
(+
(-
(* B (- (- (* x -0.16666666666666666) (* x -0.5)) 0.16666666666666666))
(/ x B))
(/ -1.0 B))
(if (<= F 5.4e-24)
(- (* B (* x 0.3333333333333333)) (/ x B))
(+ (* 0.3333333333333333 (* B x)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e-105) {
tmp = ((B * (((x * -0.16666666666666666) - (x * -0.5)) - 0.16666666666666666)) - (x / B)) + (-1.0 / B);
} else if (F <= 5.4e-24) {
tmp = (B * (x * 0.3333333333333333)) - (x / B);
} else {
tmp = (0.3333333333333333 * (B * x)) + ((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-105)) then
tmp = ((b * (((x * (-0.16666666666666666d0)) - (x * (-0.5d0))) - 0.16666666666666666d0)) - (x / b)) + ((-1.0d0) / b)
else if (f <= 5.4d-24) then
tmp = (b * (x * 0.3333333333333333d0)) - (x / b)
else
tmp = (0.3333333333333333d0 * (b * x)) + ((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-105) {
tmp = ((B * (((x * -0.16666666666666666) - (x * -0.5)) - 0.16666666666666666)) - (x / B)) + (-1.0 / B);
} else if (F <= 5.4e-24) {
tmp = (B * (x * 0.3333333333333333)) - (x / B);
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.8e-105: tmp = ((B * (((x * -0.16666666666666666) - (x * -0.5)) - 0.16666666666666666)) - (x / B)) + (-1.0 / B) elif F <= 5.4e-24: tmp = (B * (x * 0.3333333333333333)) - (x / B) else: tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.8e-105) tmp = Float64(Float64(Float64(B * Float64(Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5)) - 0.16666666666666666)) - Float64(x / B)) + Float64(-1.0 / B)); elseif (F <= 5.4e-24) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) - Float64(x / B)); else tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.8e-105) tmp = ((B * (((x * -0.16666666666666666) - (x * -0.5)) - 0.16666666666666666)) - (x / B)) + (-1.0 / B); elseif (F <= 5.4e-24) tmp = (B * (x * 0.3333333333333333)) - (x / B); else tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.8e-105], N[(N[(N[(B * N[(N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.4e-24], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.8 \cdot 10^{-105}:\\
\;\;\;\;\left(B \cdot \left(\left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - 0.16666666666666666\right) - \frac{x}{B}\right) + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-24}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.8e-105Initial program 74.8%
distribute-lft-neg-in74.8%
+-commutative74.8%
fma-def74.8%
+-commutative74.8%
*-commutative74.8%
fma-def74.8%
fma-def74.8%
metadata-eval74.8%
metadata-eval74.8%
associate-*r/74.9%
*-rgt-identity74.9%
Simplified74.9%
Taylor expanded in F around -inf 90.3%
Taylor expanded in B around 0 39.4%
if -2.8e-105 < F < 5.40000000000000014e-24Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-*r/99.5%
*-rgt-identity99.5%
Simplified99.5%
Taylor expanded in F around 0 64.7%
mul-1-neg64.7%
*-commutative64.7%
associate-*l/64.7%
distribute-rgt-neg-in64.7%
Simplified64.7%
clear-num64.6%
inv-pow64.6%
Applied egg-rr64.6%
unpow-164.6%
Simplified64.6%
Taylor expanded in B around 0 32.1%
+-commutative32.1%
mul-1-neg32.1%
unsub-neg32.1%
mul-1-neg32.1%
*-commutative32.1%
distribute-rgt-neg-in32.1%
distribute-rgt-out--32.1%
metadata-eval32.1%
distribute-rgt-neg-in32.1%
metadata-eval32.1%
Simplified32.1%
if 5.40000000000000014e-24 < F Initial program 62.1%
Taylor expanded in B around 0 50.9%
Taylor expanded in F around inf 52.9%
Taylor expanded in B around 0 44.0%
associate--l+44.0%
*-commutative44.0%
div-sub43.9%
Simplified43.9%
Final simplification38.8%
(FPCore (F B x)
:precision binary64
(if (<= F -2.05e-85)
(/ (- -1.0 x) B)
(if (<= F 6.6e-30)
(- (* B (* x 0.3333333333333333)) (/ x B))
(+ (* 0.3333333333333333 (* B x)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.05e-85) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.6e-30) {
tmp = (B * (x * 0.3333333333333333)) - (x / B);
} else {
tmp = (0.3333333333333333 * (B * x)) + ((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.05d-85)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6.6d-30) then
tmp = (b * (x * 0.3333333333333333d0)) - (x / b)
else
tmp = (0.3333333333333333d0 * (b * x)) + ((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.05e-85) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.6e-30) {
tmp = (B * (x * 0.3333333333333333)) - (x / B);
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.05e-85: tmp = (-1.0 - x) / B elif F <= 6.6e-30: tmp = (B * (x * 0.3333333333333333)) - (x / B) else: tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.05e-85) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6.6e-30) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) - Float64(x / B)); else tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.05e-85) tmp = (-1.0 - x) / B; elseif (F <= 6.6e-30) tmp = (B * (x * 0.3333333333333333)) - (x / B); else tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.05e-85], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.6e-30], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.05 \cdot 10^{-85}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-30}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.04999999999999997e-85Initial program 73.4%
distribute-lft-neg-in73.4%
+-commutative73.4%
fma-def73.4%
+-commutative73.4%
*-commutative73.4%
fma-def73.4%
fma-def73.4%
metadata-eval73.4%
metadata-eval73.4%
associate-*r/73.5%
*-rgt-identity73.5%
Simplified73.5%
Taylor expanded in F around -inf 90.8%
Taylor expanded in B around 0 38.8%
if -2.04999999999999997e-85 < F < 6.6000000000000006e-30Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 65.7%
mul-1-neg65.7%
*-commutative65.7%
associate-*l/65.6%
distribute-rgt-neg-in65.6%
Simplified65.6%
clear-num65.6%
inv-pow65.6%
Applied egg-rr65.6%
unpow-165.6%
Simplified65.6%
Taylor expanded in B around 0 32.7%
+-commutative32.7%
mul-1-neg32.7%
unsub-neg32.7%
mul-1-neg32.7%
*-commutative32.7%
distribute-rgt-neg-in32.7%
distribute-rgt-out--32.7%
metadata-eval32.7%
distribute-rgt-neg-in32.7%
metadata-eval32.7%
Simplified32.7%
if 6.6000000000000006e-30 < F Initial program 62.1%
Taylor expanded in B around 0 50.9%
Taylor expanded in F around inf 52.9%
Taylor expanded in B around 0 44.0%
associate--l+44.0%
*-commutative44.0%
div-sub43.9%
Simplified43.9%
Final simplification38.7%
(FPCore (F B x)
:precision binary64
(if (<= F -4.8e-89)
(/ (- -1.0 x) B)
(if (<= F 10500000.0)
(- (* B (* x 0.3333333333333333)) (/ x B))
(- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-89) {
tmp = (-1.0 - x) / B;
} else if (F <= 10500000.0) {
tmp = (B * (x * 0.3333333333333333)) - (x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.8d-89)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 10500000.0d0) then
tmp = (b * (x * 0.3333333333333333d0)) - (x / b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-89) {
tmp = (-1.0 - x) / B;
} else if (F <= 10500000.0) {
tmp = (B * (x * 0.3333333333333333)) - (x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e-89: tmp = (-1.0 - x) / B elif F <= 10500000.0: tmp = (B * (x * 0.3333333333333333)) - (x / B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e-89) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 10500000.0) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.8e-89) tmp = (-1.0 - x) / B; elseif (F <= 10500000.0) tmp = (B * (x * 0.3333333333333333)) - (x / B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e-89], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 10500000.0], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{-89}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 10500000:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.80000000000000032e-89Initial program 73.4%
distribute-lft-neg-in73.4%
+-commutative73.4%
fma-def73.4%
+-commutative73.4%
*-commutative73.4%
fma-def73.4%
fma-def73.4%
metadata-eval73.4%
metadata-eval73.4%
associate-*r/73.5%
*-rgt-identity73.5%
Simplified73.5%
Taylor expanded in F around -inf 90.8%
Taylor expanded in B around 0 38.8%
if -4.80000000000000032e-89 < F < 1.05e7Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 64.7%
mul-1-neg64.7%
*-commutative64.7%
associate-*l/64.6%
distribute-rgt-neg-in64.6%
Simplified64.6%
clear-num64.6%
inv-pow64.6%
Applied egg-rr64.6%
unpow-164.6%
Simplified64.6%
Taylor expanded in B around 0 31.6%
+-commutative31.6%
mul-1-neg31.6%
unsub-neg31.6%
mul-1-neg31.6%
*-commutative31.6%
distribute-rgt-neg-in31.6%
distribute-rgt-out--31.6%
metadata-eval31.6%
distribute-rgt-neg-in31.6%
metadata-eval31.6%
Simplified31.6%
if 1.05e7 < F Initial program 58.9%
Taylor expanded in B around 0 48.5%
Taylor expanded in F around inf 52.8%
Taylor expanded in F around 0 69.4%
Taylor expanded in B around 0 45.2%
Final simplification38.4%
(FPCore (F B x) :precision binary64 (if (<= F -1.85e-103) (/ (- -1.0 x) B) (if (<= F 1.45e-28) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e-103) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.45e-28) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.85d-103)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.45d-28) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e-103) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.45e-28) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.85e-103: tmp = (-1.0 - x) / B elif F <= 1.45e-28: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.85e-103) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.45e-28) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.85e-103) tmp = (-1.0 - x) / B; elseif (F <= 1.45e-28) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.85e-103], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.45e-28], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.85 \cdot 10^{-103}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-28}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.85e-103Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
fma-def74.5%
+-commutative74.5%
*-commutative74.5%
fma-def74.5%
fma-def74.5%
metadata-eval74.5%
metadata-eval74.5%
associate-*r/74.7%
*-rgt-identity74.7%
Simplified74.7%
Taylor expanded in F around -inf 90.2%
Taylor expanded in B around 0 39.3%
if -1.85e-103 < F < 1.45000000000000006e-28Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 65.2%
mul-1-neg65.2%
*-commutative65.2%
associate-*l/65.1%
distribute-rgt-neg-in65.1%
Simplified65.1%
Taylor expanded in B around 0 31.6%
associate-*r/31.6%
neg-mul-131.6%
Simplified31.6%
if 1.45000000000000006e-28 < F Initial program 62.1%
Taylor expanded in B around 0 50.9%
Taylor expanded in F around inf 52.9%
Taylor expanded in F around 0 68.1%
Taylor expanded in B around 0 43.0%
Final simplification38.3%
(FPCore (F B x) :precision binary64 (if (<= F -2.1e-103) (/ (- -1.0 x) B) (if (<= F 6.2e-30) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-103) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.2e-30) {
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.1d-103)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6.2d-30) 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.1e-103) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.2e-30) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-103: tmp = (-1.0 - x) / B elif F <= 6.2e-30: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-103) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6.2e-30) 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.1e-103) tmp = (-1.0 - x) / B; elseif (F <= 6.2e-30) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-103], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.2e-30], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-103}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-30}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.10000000000000005e-103Initial program 74.5%
distribute-lft-neg-in74.5%
+-commutative74.5%
fma-def74.5%
+-commutative74.5%
*-commutative74.5%
fma-def74.5%
fma-def74.5%
metadata-eval74.5%
metadata-eval74.5%
associate-*r/74.7%
*-rgt-identity74.7%
Simplified74.7%
Taylor expanded in F around -inf 90.2%
Taylor expanded in B around 0 39.3%
if -2.10000000000000005e-103 < F < 6.19999999999999982e-30Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.3%
+-commutative99.3%
*-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 65.2%
mul-1-neg65.2%
*-commutative65.2%
associate-*l/65.1%
distribute-rgt-neg-in65.1%
Simplified65.1%
Taylor expanded in B around 0 31.6%
associate-*r/31.6%
neg-mul-131.6%
Simplified31.6%
if 6.19999999999999982e-30 < F Initial program 62.1%
Taylor expanded in B around 0 50.9%
Taylor expanded in F around inf 52.9%
Taylor expanded in B around 0 43.0%
Final simplification38.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -0.000165) (not (<= x 1e-133))) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -0.000165) || !(x <= 1e-133)) {
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 <= (-0.000165d0)) .or. (.not. (x <= 1d-133))) 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 <= -0.000165) || !(x <= 1e-133)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -0.000165) or not (x <= 1e-133): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -0.000165) || !(x <= 1e-133)) 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 <= -0.000165) || ~((x <= 1e-133))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -0.000165], N[Not[LessEqual[x, 1e-133]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.000165 \lor \neg \left(x \leq 10^{-133}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -1.65e-4 or 1.0000000000000001e-133 < x Initial program 84.9%
distribute-lft-neg-in84.9%
+-commutative84.9%
fma-def84.9%
+-commutative84.9%
*-commutative84.9%
fma-def84.9%
fma-def84.9%
metadata-eval84.9%
metadata-eval84.9%
associate-*r/85.0%
*-rgt-identity85.0%
Simplified85.0%
Taylor expanded in F around 0 82.5%
mul-1-neg82.5%
*-commutative82.5%
associate-*l/82.4%
distribute-rgt-neg-in82.4%
Simplified82.4%
Taylor expanded in B around 0 36.0%
associate-*r/36.0%
neg-mul-136.0%
Simplified36.0%
if -1.65e-4 < x < 1.0000000000000001e-133Initial program 66.6%
Taylor expanded in B around 0 42.2%
Taylor expanded in F around inf 18.3%
Taylor expanded in B around 0 17.1%
Taylor expanded in x around 0 16.4%
Final simplification28.1%
(FPCore (F B x) :precision binary64 (if (<= F 1.9e-33) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.9e-33) {
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.9d-33) 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.9e-33) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.9e-33: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.9e-33) 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.9e-33) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.9e-33], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.9 \cdot 10^{-33}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.89999999999999997e-33Initial program 85.6%
distribute-lft-neg-in85.6%
+-commutative85.6%
fma-def85.6%
+-commutative85.6%
*-commutative85.6%
fma-def85.6%
fma-def85.6%
metadata-eval85.6%
metadata-eval85.6%
associate-*r/85.8%
*-rgt-identity85.8%
Simplified85.8%
Taylor expanded in F around 0 60.2%
mul-1-neg60.2%
*-commutative60.2%
associate-*l/60.2%
distribute-rgt-neg-in60.2%
Simplified60.2%
Taylor expanded in B around 0 26.2%
associate-*r/26.2%
neg-mul-126.2%
Simplified26.2%
if 1.89999999999999997e-33 < F Initial program 62.1%
Taylor expanded in B around 0 50.9%
Taylor expanded in F around inf 52.9%
Taylor expanded in B around 0 43.0%
Final simplification32.0%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 77.5%
Taylor expanded in B around 0 64.6%
Taylor expanded in F around inf 50.1%
Taylor expanded in B around 0 27.6%
Taylor expanded in x around 0 10.5%
Final simplification10.5%
herbie shell --seed 2023274
(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))))))