
(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 26 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 -2e+40)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 130000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+40) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 130000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+40) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 130000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 130000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+40}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 130000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.00000000000000006e40Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified74.5%
Taylor expanded in x around 0 74.6%
associate-*l/74.6%
*-lft-identity74.6%
+-commutative74.6%
unpow274.6%
fma-udef74.6%
Simplified74.6%
Taylor expanded in F around -inf 99.8%
if -2.00000000000000006e40 < F < 1.3e8Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
if 1.3e8 < F Initial program 56.7%
distribute-lft-neg-in56.7%
+-commutative56.7%
cancel-sign-sub-inv56.7%
Simplified75.2%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1150000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100.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 <= -1150000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100.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 <= (-1150000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100.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 <= -1150000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100.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 <= -1150000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100.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 <= -1150000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100.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 <= -1150000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100.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, -1150000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100.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 -1150000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100:\\
\;\;\;\;\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 < -1.15e9Initial program 59.7%
distribute-lft-neg-in59.7%
+-commutative59.7%
cancel-sign-sub-inv59.7%
Simplified76.5%
Taylor expanded in x around 0 76.6%
associate-*l/76.5%
*-lft-identity76.5%
+-commutative76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
Taylor expanded in F around -inf 99.8%
if -1.15e9 < F < 100Initial program 99.4%
if 100 < F Initial program 56.7%
distribute-lft-neg-in56.7%
+-commutative56.7%
cancel-sign-sub-inv56.7%
Simplified75.2%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
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 -1100000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 22500000.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 <= -1100000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 22500000.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 <= (-1100000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 22500000.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 <= -1100000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 22500000.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 <= -1100000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 22500000.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 <= -1100000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 22500000.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 <= -1100000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 22500000.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, -1100000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 22500000.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 -1100000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 22500000:\\
\;\;\;\;\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 < -1.1e9Initial program 59.7%
distribute-lft-neg-in59.7%
+-commutative59.7%
cancel-sign-sub-inv59.7%
Simplified76.5%
Taylor expanded in x around 0 76.6%
associate-*l/76.5%
*-lft-identity76.5%
+-commutative76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
Taylor expanded in F around -inf 99.8%
if -1.1e9 < F < 2.25e7Initial program 99.4%
div-inv99.6%
clear-num99.5%
Applied egg-rr99.5%
if 2.25e7 < F Initial program 56.7%
distribute-lft-neg-in56.7%
+-commutative56.7%
cancel-sign-sub-inv56.7%
Simplified75.2%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
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 -1.0)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 5.2e-20)
(- (* F (* (/ 1.0 (sin B)) (sqrt (+ 0.5 (* (* F F) -0.25))))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.0) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 5.2e-20) {
tmp = (F * ((1.0 / sin(B)) * sqrt((0.5 + ((F * F) * -0.25))))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.0d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 5.2d-20) then
tmp = (f * ((1.0d0 / sin(b)) * sqrt((0.5d0 + ((f * f) * (-0.25d0)))))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.0) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 5.2e-20) {
tmp = (F * ((1.0 / Math.sin(B)) * Math.sqrt((0.5 + ((F * F) * -0.25))))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.0: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 5.2e-20: tmp = (F * ((1.0 / math.sin(B)) * math.sqrt((0.5 + ((F * F) * -0.25))))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.0) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 5.2e-20) tmp = Float64(Float64(F * Float64(Float64(1.0 / sin(B)) * sqrt(Float64(0.5 + Float64(Float64(F * F) * -0.25))))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.0) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 5.2e-20) tmp = (F * ((1.0 / sin(B)) * sqrt((0.5 + ((F * F) * -0.25))))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.0], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.2e-20], N[(N[(F * N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.5 + N[(N[(F * F), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-20}:\\
\;\;\;\;F \cdot \left(\frac{1}{\sin B} \cdot \sqrt{0.5 + \left(F \cdot F\right) \cdot -0.25}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1Initial program 60.9%
distribute-lft-neg-in60.9%
+-commutative60.9%
cancel-sign-sub-inv60.9%
Simplified77.2%
Taylor expanded in x around 0 77.3%
associate-*l/77.2%
*-lft-identity77.2%
+-commutative77.2%
unpow277.2%
fma-udef77.2%
Simplified77.2%
sqrt-div77.2%
metadata-eval77.2%
Applied egg-rr77.2%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
Simplified99.6%
if -1 < F < 5.1999999999999999e-20Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
*-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
unpow299.6%
Simplified99.6%
if 5.1999999999999999e-20 < F Initial program 60.5%
distribute-lft-neg-in60.5%
+-commutative60.5%
cancel-sign-sub-inv60.5%
Simplified77.4%
Taylor expanded in x around 0 77.3%
associate-*l/77.3%
*-lft-identity77.3%
+-commutative77.3%
unpow277.3%
fma-udef77.3%
Simplified77.3%
sqrt-div77.3%
metadata-eval77.3%
Applied egg-rr77.3%
Taylor expanded in F around inf 99.0%
Taylor expanded in B around inf 99.2%
associate-/l/99.2%
Simplified99.2%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.91)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 5.2e-20)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.91) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 5.2e-20) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.91d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 5.2d-20) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.91) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 5.2e-20) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.91: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 5.2e-20: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.91) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 5.2e-20) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.91) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 5.2e-20) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.91], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.2e-20], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.91:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-20}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.910000000000000031Initial program 60.9%
distribute-lft-neg-in60.9%
+-commutative60.9%
cancel-sign-sub-inv60.9%
Simplified77.2%
Taylor expanded in x around 0 77.3%
associate-*l/77.2%
*-lft-identity77.2%
+-commutative77.2%
unpow277.2%
fma-udef77.2%
Simplified77.2%
sqrt-div77.2%
metadata-eval77.2%
Applied egg-rr77.2%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
Simplified99.6%
if -0.910000000000000031 < F < 5.1999999999999999e-20Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.5%
if 5.1999999999999999e-20 < F Initial program 60.5%
distribute-lft-neg-in60.5%
+-commutative60.5%
cancel-sign-sub-inv60.5%
Simplified77.4%
Taylor expanded in x around 0 77.3%
associate-*l/77.3%
*-lft-identity77.3%
+-commutative77.3%
unpow277.3%
fma-udef77.3%
Simplified77.3%
sqrt-div77.3%
metadata-eval77.3%
Applied egg-rr77.3%
Taylor expanded in F around inf 99.0%
Taylor expanded in B around inf 99.2%
associate-/l/99.2%
Simplified99.2%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.91)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 5.2e-20)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.91) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 5.2e-20) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.91d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 5.2d-20) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.91) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 5.2e-20) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.91: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 5.2e-20: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.91) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 5.2e-20) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.91) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 5.2e-20) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.91], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.2e-20], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.91:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.910000000000000031Initial program 60.9%
distribute-lft-neg-in60.9%
+-commutative60.9%
cancel-sign-sub-inv60.9%
Simplified77.2%
Taylor expanded in x around 0 77.3%
associate-*l/77.2%
*-lft-identity77.2%
+-commutative77.2%
unpow277.2%
fma-udef77.2%
Simplified77.2%
sqrt-div77.2%
metadata-eval77.2%
Applied egg-rr77.2%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
Simplified99.6%
if -0.910000000000000031 < F < 5.1999999999999999e-20Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
if 5.1999999999999999e-20 < F Initial program 60.5%
distribute-lft-neg-in60.5%
+-commutative60.5%
cancel-sign-sub-inv60.5%
Simplified77.4%
Taylor expanded in x around 0 77.3%
associate-*l/77.3%
*-lft-identity77.3%
+-commutative77.3%
unpow277.3%
fma-udef77.3%
Simplified77.3%
sqrt-div77.3%
metadata-eval77.3%
Applied egg-rr77.3%
Taylor expanded in F around inf 99.0%
Taylor expanded in B around inf 99.2%
associate-/l/99.2%
Simplified99.2%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.6e-7)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.2e-20)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.6e-7) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.2e-20) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-9.6d-7)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.2d-20) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -9.6e-7) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.2e-20) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.6e-7: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.2e-20: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.6e-7) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.2e-20) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -9.6e-7) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.2e-20) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -9.6e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.2e-20], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -9.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -9.59999999999999914e-7Initial program 61.4%
distribute-lft-neg-in61.4%
+-commutative61.4%
cancel-sign-sub-inv61.4%
Simplified77.5%
Taylor expanded in x around 0 77.6%
associate-*l/77.5%
*-lft-identity77.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.5%
Taylor expanded in F around -inf 98.0%
if -9.59999999999999914e-7 < F < 5.1999999999999999e-20Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 87.6%
if 5.1999999999999999e-20 < F Initial program 60.5%
distribute-lft-neg-in60.5%
+-commutative60.5%
cancel-sign-sub-inv60.5%
Simplified77.4%
Taylor expanded in x around 0 77.3%
associate-*l/77.3%
*-lft-identity77.3%
+-commutative77.3%
unpow277.3%
fma-udef77.3%
Simplified77.3%
sqrt-div77.3%
metadata-eval77.3%
Applied egg-rr77.3%
Taylor expanded in F around inf 99.0%
Taylor expanded in B around inf 99.2%
associate-/l/99.2%
Simplified99.2%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8.4e-7)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 5.2e-20)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8.4e-7) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 5.2e-20) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-8.4d-7)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 5.2d-20) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -8.4e-7) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 5.2e-20) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8.4e-7: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 5.2e-20: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8.4e-7) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 5.2e-20) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -8.4e-7) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 5.2e-20) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -8.4e-7], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.2e-20], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -8.4 \cdot 10^{-7}:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -8.4e-7Initial program 61.4%
distribute-lft-neg-in61.4%
+-commutative61.4%
cancel-sign-sub-inv61.4%
Simplified77.5%
Taylor expanded in x around 0 77.6%
associate-*l/77.5%
*-lft-identity77.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.5%
sqrt-div77.5%
metadata-eval77.5%
Applied egg-rr77.5%
Taylor expanded in F around -inf 98.3%
mul-1-neg98.3%
Simplified98.3%
if -8.4e-7 < F < 5.1999999999999999e-20Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 87.6%
if 5.1999999999999999e-20 < F Initial program 60.5%
distribute-lft-neg-in60.5%
+-commutative60.5%
cancel-sign-sub-inv60.5%
Simplified77.4%
Taylor expanded in x around 0 77.3%
associate-*l/77.3%
*-lft-identity77.3%
+-commutative77.3%
unpow277.3%
fma-udef77.3%
Simplified77.3%
sqrt-div77.3%
metadata-eval77.3%
Applied egg-rr77.3%
Taylor expanded in F around inf 99.0%
Taylor expanded in B around inf 99.2%
associate-/l/99.2%
Simplified99.2%
Final simplification93.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.6e-7)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-19)
(- (/ F (/ B (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.6e-7) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-19) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9.6d-7)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-19) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -9.6e-7) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-19) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.6e-7: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-19: tmp = (F / (B / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.6e-7) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-19) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.6e-7) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-19) tmp = (F / (B / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.6e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-19], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-19}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -9.59999999999999914e-7Initial program 61.4%
distribute-lft-neg-in61.4%
+-commutative61.4%
cancel-sign-sub-inv61.4%
Simplified77.5%
Taylor expanded in x around 0 77.6%
associate-*l/77.5%
*-lft-identity77.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.5%
Taylor expanded in F around -inf 98.0%
if -9.59999999999999914e-7 < F < 1.40000000000000001e-19Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 87.7%
associate-/l*87.7%
Simplified87.7%
if 1.40000000000000001e-19 < F Initial program 59.9%
distribute-lft-neg-in59.9%
+-commutative59.9%
cancel-sign-sub-inv59.9%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.0%
*-lft-identity77.0%
+-commutative77.0%
unpow277.0%
fma-udef77.0%
Simplified77.0%
Taylor expanded in F around inf 98.9%
Final simplification93.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.6e-7)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-19)
(- (/ (sqrt 0.5) (/ B F)) 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 <= -9.6e-7) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-19) {
tmp = (sqrt(0.5) / (B / F)) - 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 <= (-9.6d-7)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-19) then
tmp = (sqrt(0.5d0) / (b / f)) - 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 <= -9.6e-7) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-19) {
tmp = (Math.sqrt(0.5) / (B / F)) - 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 <= -9.6e-7: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-19: tmp = (math.sqrt(0.5) / (B / F)) - 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 <= -9.6e-7) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-19) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - 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 <= -9.6e-7) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-19) tmp = (sqrt(0.5) / (B / F)) - 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, -9.6e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-19], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $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 -9.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-19}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -9.59999999999999914e-7Initial program 61.4%
distribute-lft-neg-in61.4%
+-commutative61.4%
cancel-sign-sub-inv61.4%
Simplified77.5%
Taylor expanded in x around 0 77.6%
associate-*l/77.5%
*-lft-identity77.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.5%
Taylor expanded in F around -inf 98.0%
if -9.59999999999999914e-7 < F < 1.40000000000000001e-19Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 87.7%
if 1.40000000000000001e-19 < F Initial program 59.9%
distribute-lft-neg-in59.9%
+-commutative59.9%
cancel-sign-sub-inv59.9%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.0%
*-lft-identity77.0%
+-commutative77.0%
unpow277.0%
fma-udef77.0%
Simplified77.0%
Taylor expanded in F around inf 98.9%
Final simplification93.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.6e-94)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 400.0)
(- (/ (/ F B) (+ F (/ 1.0 F))) 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 <= -2.6e-94) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 400.0) {
tmp = ((F / B) / (F + (1.0 / F))) - 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 <= (-2.6d-94)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 400.0d0) then
tmp = ((f / b) / (f + (1.0d0 / f))) - 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 <= -2.6e-94) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 400.0) {
tmp = ((F / B) / (F + (1.0 / F))) - 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 <= -2.6e-94: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 400.0: tmp = ((F / B) / (F + (1.0 / F))) - 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 <= -2.6e-94) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 400.0) tmp = Float64(Float64(Float64(F / B) / Float64(F + Float64(1.0 / F))) - 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 <= -2.6e-94) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 400.0) tmp = ((F / B) / (F + (1.0 / F))) - 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, -2.6e-94], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 400.0], N[(N[(N[(F / B), $MachinePrecision] / N[(F + N[(1.0 / F), $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 -2.6 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 400:\\
\;\;\;\;\frac{\frac{F}{B}}{F + \frac{1}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.59999999999999994e-94Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified80.1%
Taylor expanded in x around 0 80.1%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
Taylor expanded in F around -inf 92.2%
if -2.59999999999999994e-94 < F < 400Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
sqrt-div99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 74.9%
Taylor expanded in B around 0 74.8%
associate-/r*74.8%
Simplified74.8%
if 400 < F Initial program 56.7%
distribute-lft-neg-in56.7%
+-commutative56.7%
cancel-sign-sub-inv56.7%
Simplified75.2%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around inf 99.8%
Final simplification86.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ F (/ 1.0 F))) (t_1 (/ x (tan B))))
(if (<= F -2.6e-94)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 6.8e+86)
(- (/ (/ F B) t_0) t_1)
(- (* F (/ (/ 1.0 t_0) (sin B))) (/ x B))))))
double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double t_1 = x / tan(B);
double tmp;
if (F <= -2.6e-94) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 6.8e+86) {
tmp = ((F / B) / t_0) - t_1;
} else {
tmp = (F * ((1.0 / t_0) / sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f + (1.0d0 / f)
t_1 = x / tan(b)
if (f <= (-2.6d-94)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 6.8d+86) then
tmp = ((f / b) / t_0) - t_1
else
tmp = (f * ((1.0d0 / t_0) / sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.6e-94) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 6.8e+86) {
tmp = ((F / B) / t_0) - t_1;
} else {
tmp = (F * ((1.0 / t_0) / Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F + (1.0 / F) t_1 = x / math.tan(B) tmp = 0 if F <= -2.6e-94: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 6.8e+86: tmp = ((F / B) / t_0) - t_1 else: tmp = (F * ((1.0 / t_0) / math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F + Float64(1.0 / F)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.6e-94) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 6.8e+86) tmp = Float64(Float64(Float64(F / B) / t_0) - t_1); else tmp = Float64(Float64(F * Float64(Float64(1.0 / t_0) / sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F + (1.0 / F); t_1 = x / tan(B); tmp = 0.0; if (F <= -2.6e-94) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 6.8e+86) tmp = ((F / B) / t_0) - t_1; else tmp = (F * ((1.0 / t_0) / sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.6e-94], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 6.8e+86], N[(N[(N[(F / B), $MachinePrecision] / t$95$0), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(F * N[(N[(1.0 / t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F + \frac{1}{F}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.6 \cdot 10^{-94}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{F}{B}}{t_0} - t_1\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{t_0}}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.59999999999999994e-94Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified80.1%
Taylor expanded in x around 0 80.1%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
Taylor expanded in F around -inf 92.2%
if -2.59999999999999994e-94 < F < 6.7999999999999995e86Initial program 98.7%
distribute-lft-neg-in98.7%
+-commutative98.7%
cancel-sign-sub-inv98.7%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in F around inf 78.0%
Taylor expanded in B around 0 76.5%
associate-/r*75.8%
Simplified75.8%
if 6.7999999999999995e86 < F Initial program 42.7%
distribute-lft-neg-in42.7%
+-commutative42.7%
cancel-sign-sub-inv42.7%
Simplified66.0%
Taylor expanded in x around 0 65.9%
associate-*l/65.9%
*-lft-identity65.9%
+-commutative65.9%
unpow265.9%
fma-udef65.9%
Simplified65.9%
sqrt-div65.9%
metadata-eval65.9%
Applied egg-rr65.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 82.3%
Final simplification81.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ F (/ 1.0 F))))
(if (<= F -1.65e-111)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 6.4e+86)
(- (/ (/ F B) t_0) (/ x (tan B)))
(- (* F (/ (/ 1.0 t_0) (sin B))) (/ x B))))))
double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double tmp;
if (F <= -1.65e-111) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 6.4e+86) {
tmp = ((F / B) / t_0) - (x / tan(B));
} else {
tmp = (F * ((1.0 / t_0) / sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = f + (1.0d0 / f)
if (f <= (-1.65d-111)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 6.4d+86) then
tmp = ((f / b) / t_0) - (x / tan(b))
else
tmp = (f * ((1.0d0 / t_0) / sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F + (1.0 / F);
double tmp;
if (F <= -1.65e-111) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 6.4e+86) {
tmp = ((F / B) / t_0) - (x / Math.tan(B));
} else {
tmp = (F * ((1.0 / t_0) / Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F + (1.0 / F) tmp = 0 if F <= -1.65e-111: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 6.4e+86: tmp = ((F / B) / t_0) - (x / math.tan(B)) else: tmp = (F * ((1.0 / t_0) / math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F + Float64(1.0 / F)) tmp = 0.0 if (F <= -1.65e-111) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 6.4e+86) tmp = Float64(Float64(Float64(F / B) / t_0) - Float64(x / tan(B))); else tmp = Float64(Float64(F * Float64(Float64(1.0 / t_0) / sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F + (1.0 / F); tmp = 0.0; if (F <= -1.65e-111) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 6.4e+86) tmp = ((F / B) / t_0) - (x / tan(B)); else tmp = (F * ((1.0 / t_0) / sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.65e-111], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.4e+86], N[(N[(N[(F / B), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(N[(1.0 / t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F + \frac{1}{F}\\
\mathbf{if}\;F \leq -1.65 \cdot 10^{-111}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{F}{B}}{t_0} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{t_0}}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.65e-111Initial program 67.5%
Taylor expanded in F around -inf 89.8%
Taylor expanded in B around 0 73.8%
if -1.65e-111 < F < 6.4000000000000001e86Initial program 98.7%
distribute-lft-neg-in98.7%
+-commutative98.7%
cancel-sign-sub-inv98.7%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in F around inf 78.1%
Taylor expanded in B around 0 76.5%
associate-/r*75.8%
Simplified75.8%
if 6.4000000000000001e86 < F Initial program 42.7%
distribute-lft-neg-in42.7%
+-commutative42.7%
cancel-sign-sub-inv42.7%
Simplified66.0%
Taylor expanded in x around 0 65.9%
associate-*l/65.9%
*-lft-identity65.9%
+-commutative65.9%
unpow265.9%
fma-udef65.9%
Simplified65.9%
sqrt-div65.9%
metadata-eval65.9%
Applied egg-rr65.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 82.3%
Final simplification76.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e+38)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 2.8e-29)
(- (/ (/ (- F) B) (+ F (/ 1.0 F))) t_0)
(- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3e+38) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 2.8e-29) {
tmp = ((-F / B) / (F + (1.0 / F))) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3d+38)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 2.8d-29) then
tmp = ((-f / b) / (f + (1.0d0 / f))) - t_0
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3e+38) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 2.8e-29) {
tmp = ((-F / B) / (F + (1.0 / F))) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3e+38: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 2.8e-29: tmp = ((-F / B) / (F + (1.0 / F))) - t_0 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3e+38) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 2.8e-29) tmp = Float64(Float64(Float64(Float64(-F) / B) / Float64(F + Float64(1.0 / F))) - t_0); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3e+38) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 2.8e-29) tmp = ((-F / B) / (F + (1.0 / F))) - t_0; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+38], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.8e-29], N[(N[(N[((-F) / B), $MachinePrecision] / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+38}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{-F}{B}}{F + \frac{1}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.0000000000000001e38Initial program 56.4%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.6%
if -3.0000000000000001e38 < F < 2.8000000000000002e-29Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in F around -inf 73.6%
mul-1-neg73.6%
Simplified73.6%
Taylor expanded in B around 0 72.0%
mul-1-neg72.0%
associate-/r*72.0%
distribute-neg-frac72.0%
Simplified72.0%
if 2.8000000000000002e-29 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified78.3%
Taylor expanded in F around inf 96.1%
associate-/r*96.0%
Simplified96.0%
Taylor expanded in B around 0 77.4%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.65e-111)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 200000000.0)
(- (/ (/ F B) (+ F (/ 1.0 F))) t_0)
(- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.65e-111) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 200000000.0) {
tmp = ((F / B) / (F + (1.0 / F))) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.65d-111)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 200000000.0d0) then
tmp = ((f / b) / (f + (1.0d0 / f))) - t_0
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.65e-111) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 200000000.0) {
tmp = ((F / B) / (F + (1.0 / F))) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.65e-111: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 200000000.0: tmp = ((F / B) / (F + (1.0 / F))) - t_0 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65e-111) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F / B) / Float64(F + Float64(1.0 / F))) - t_0); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.65e-111) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 200000000.0) tmp = ((F / B) / (F + (1.0 / F))) - t_0; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.65e-111], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F / B), $MachinePrecision] / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.65 \cdot 10^{-111}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{\frac{F}{B}}{F + \frac{1}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.65e-111Initial program 67.5%
Taylor expanded in F around -inf 89.8%
Taylor expanded in B around 0 73.8%
if -1.65e-111 < F < 2e8Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
sqrt-div99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 74.9%
Taylor expanded in B around 0 74.8%
associate-/r*74.8%
Simplified74.8%
if 2e8 < F Initial program 56.7%
distribute-lft-neg-in56.7%
+-commutative56.7%
cancel-sign-sub-inv56.7%
Simplified75.2%
Taylor expanded in F around inf 99.6%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 78.1%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(if (<= F -9.6e-7)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -1.05e-229) (and (not (<= F 1.78e-152)) (<= F 1e-113)))
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e-7) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -1.05e-229) || (!(F <= 1.78e-152) && (F <= 1e-113))) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.6d-7)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-1.05d-229)) .or. (.not. (f <= 1.78d-152)) .and. (f <= 1d-113)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -1.05e-229) || (!(F <= 1.78e-152) && (F <= 1e-113))) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.6e-7: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -1.05e-229) or (not (F <= 1.78e-152) and (F <= 1e-113)): tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.6e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -1.05e-229) || (!(F <= 1.78e-152) && (F <= 1e-113))) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.6e-7) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -1.05e-229) || (~((F <= 1.78e-152)) && (F <= 1e-113))) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.6e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -1.05e-229], And[N[Not[LessEqual[F, 1.78e-152]], $MachinePrecision], LessEqual[F, 1e-113]]], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-229} \lor \neg \left(F \leq 1.78 \cdot 10^{-152}\right) \land F \leq 10^{-113}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.59999999999999914e-7Initial program 61.4%
Taylor expanded in F around -inf 97.9%
Taylor expanded in B around 0 70.1%
if -9.59999999999999914e-7 < F < -1.04999999999999992e-229 or 1.7800000000000001e-152 < F < 9.99999999999999979e-114Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
cancel-sign-sub-inv99.3%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 64.4%
if -1.04999999999999992e-229 < F < 1.7800000000000001e-152 or 9.99999999999999979e-114 < F Initial program 80.5%
distribute-lft-neg-in80.5%
+-commutative80.5%
cancel-sign-sub-inv80.5%
Simplified88.8%
Taylor expanded in F around inf 63.0%
associate-/r*62.9%
Simplified62.9%
Taylor expanded in B around 0 65.7%
Final simplification66.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)) (t_1 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= B -8.2e-114)
t_1
(if (<= B 8.8e-247)
t_0
(if (<= B 2.1e-113) (/ (- 1.0 x) B) (if (<= B 1.15e-49) t_0 t_1))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = (1.0 / B) - (x / tan(B));
double tmp;
if (B <= -8.2e-114) {
tmp = t_1;
} else if (B <= 8.8e-247) {
tmp = t_0;
} else if (B <= 2.1e-113) {
tmp = (1.0 - x) / B;
} else if (B <= 1.15e-49) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = (1.0d0 / b) - (x / tan(b))
if (b <= (-8.2d-114)) then
tmp = t_1
else if (b <= 8.8d-247) then
tmp = t_0
else if (b <= 2.1d-113) then
tmp = (1.0d0 - x) / b
else if (b <= 1.15d-49) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double t_1 = (1.0 / B) - (x / Math.tan(B));
double tmp;
if (B <= -8.2e-114) {
tmp = t_1;
} else if (B <= 8.8e-247) {
tmp = t_0;
} else if (B <= 2.1e-113) {
tmp = (1.0 - x) / B;
} else if (B <= 1.15e-49) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if B <= -8.2e-114: tmp = t_1 elif B <= 8.8e-247: tmp = t_0 elif B <= 2.1e-113: tmp = (1.0 - x) / B elif B <= 1.15e-49: tmp = t_0 else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (B <= -8.2e-114) tmp = t_1; elseif (B <= 8.8e-247) tmp = t_0; elseif (B <= 2.1e-113) tmp = Float64(Float64(1.0 - x) / B); elseif (B <= 1.15e-49) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = (1.0 / B) - (x / tan(B)); tmp = 0.0; if (B <= -8.2e-114) tmp = t_1; elseif (B <= 8.8e-247) tmp = t_0; elseif (B <= 2.1e-113) tmp = (1.0 - x) / B; elseif (B <= 1.15e-49) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8.2e-114], t$95$1, If[LessEqual[B, 8.8e-247], t$95$0, If[LessEqual[B, 2.1e-113], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, 1.15e-49], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;B \leq -8.2 \cdot 10^{-114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 8.8 \cdot 10^{-247}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-113}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-49}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if B < -8.1999999999999993e-114 or 1.15e-49 < B Initial program 83.2%
distribute-lft-neg-in83.2%
+-commutative83.2%
cancel-sign-sub-inv83.2%
Simplified85.4%
Taylor expanded in F around inf 61.4%
associate-/r*61.4%
Simplified61.4%
Taylor expanded in B around 0 61.6%
if -8.1999999999999993e-114 < B < 8.79999999999999966e-247 or 2.1e-113 < B < 1.15e-49Initial program 77.5%
distribute-lft-neg-in77.5%
+-commutative77.5%
cancel-sign-sub-inv77.5%
Simplified90.8%
Taylor expanded in x around 0 90.8%
associate-*l/90.8%
*-lft-identity90.8%
+-commutative90.8%
unpow290.8%
fma-udef90.8%
Simplified90.8%
Taylor expanded in F around 0 65.5%
*-commutative65.5%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in B around 0 69.7%
if 8.79999999999999966e-247 < B < 2.1e-113Initial program 54.7%
distribute-lft-neg-in54.7%
+-commutative54.7%
cancel-sign-sub-inv54.7%
Simplified95.7%
Taylor expanded in F around inf 63.4%
associate-/r*63.3%
Simplified63.3%
Taylor expanded in B around 0 71.9%
Final simplification64.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B))
(t_1 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -2.1e-119)
t_1
(if (<= F -1.15e-227)
t_0
(if (<= F 1.2e-156)
t_1
(if (<= F 1.6e-113) t_0 (- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -2.1e-119) {
tmp = t_1;
} else if (F <= -1.15e-227) {
tmp = t_0;
} else if (F <= 1.2e-156) {
tmp = t_1;
} else if (F <= 1.6e-113) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-2.1d-119)) then
tmp = t_1
else if (f <= (-1.15d-227)) then
tmp = t_0
else if (f <= 1.2d-156) then
tmp = t_1
else if (f <= 1.6d-113) then
tmp = t_0
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double t_1 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -2.1e-119) {
tmp = t_1;
} else if (F <= -1.15e-227) {
tmp = t_0;
} else if (F <= 1.2e-156) {
tmp = t_1;
} else if (F <= 1.6e-113) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -2.1e-119: tmp = t_1 elif F <= -1.15e-227: tmp = t_0 elif F <= 1.2e-156: tmp = t_1 elif F <= 1.6e-113: tmp = t_0 else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -2.1e-119) tmp = t_1; elseif (F <= -1.15e-227) tmp = t_0; elseif (F <= 1.2e-156) tmp = t_1; elseif (F <= 1.6e-113) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -2.1e-119) tmp = t_1; elseif (F <= -1.15e-227) tmp = t_0; elseif (F <= 1.2e-156) tmp = t_1; elseif (F <= 1.6e-113) tmp = t_0; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.1e-119], t$95$1, If[LessEqual[F, -1.15e-227], t$95$0, If[LessEqual[F, 1.2e-156], t$95$1, If[LessEqual[F, 1.6e-113], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{-119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-227}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-113}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.1e-119 or -1.15000000000000006e-227 < F < 1.2e-156Initial program 79.6%
Taylor expanded in F around -inf 70.0%
Taylor expanded in B around 0 67.8%
if -2.1e-119 < F < -1.15000000000000006e-227 or 1.2e-156 < F < 1.6000000000000001e-113Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.8%
*-commutative99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in B around 0 69.6%
if 1.6000000000000001e-113 < F Initial program 70.6%
distribute-lft-neg-in70.6%
+-commutative70.6%
cancel-sign-sub-inv70.6%
Simplified83.1%
Taylor expanded in F around inf 81.5%
associate-/r*81.4%
Simplified81.4%
Taylor expanded in B around 0 70.2%
Final simplification68.9%
(FPCore (F B x) :precision binary64 (if (or (<= B -9.5e-115) (not (<= B 9e-292))) (- (/ 1.0 B) (/ x (tan B))) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if ((B <= -9.5e-115) || !(B <= 9e-292)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = -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 ((b <= (-9.5d-115)) .or. (.not. (b <= 9d-292))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((B <= -9.5e-115) || !(B <= 9e-292)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (B <= -9.5e-115) or not (B <= 9e-292): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if ((B <= -9.5e-115) || !(B <= 9e-292)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((B <= -9.5e-115) || ~((B <= 9e-292))) tmp = (1.0 / B) - (x / tan(B)); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[B, -9.5e-115], N[Not[LessEqual[B, 9e-292]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -9.5 \cdot 10^{-115} \lor \neg \left(B \leq 9 \cdot 10^{-292}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if B < -9.4999999999999996e-115 or 8.99999999999999913e-292 < B Initial program 80.1%
distribute-lft-neg-in80.1%
+-commutative80.1%
cancel-sign-sub-inv80.1%
Simplified87.8%
Taylor expanded in F around inf 57.6%
associate-/r*57.6%
Simplified57.6%
Taylor expanded in B around 0 60.1%
if -9.4999999999999996e-115 < B < 8.99999999999999913e-292Initial program 74.1%
distribute-lft-neg-in74.1%
+-commutative74.1%
cancel-sign-sub-inv74.1%
Simplified88.2%
Taylor expanded in F around inf 33.5%
associate-/r*33.5%
Simplified33.5%
Taylor expanded in B around 0 45.5%
Taylor expanded in x around inf 59.0%
associate-*r/59.0%
neg-mul-159.0%
Simplified59.0%
Final simplification59.9%
(FPCore (F B x)
:precision binary64
(if (<= F -6.2e-5)
(/ (- -1.0 x) B)
(if (<= F -1.25e-121)
(/ F (/ B (sqrt 0.5)))
(if (<= F 2.7e-29)
(/ (- x) B)
(+ (/ (- 1.0 x) B) (* 0.3333333333333333 (* B x)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-5) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.25e-121) {
tmp = F / (B / sqrt(0.5));
} else if (F <= 2.7e-29) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (0.3333333333333333 * (B * x));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.2d-5)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-1.25d-121)) then
tmp = f / (b / sqrt(0.5d0))
else if (f <= 2.7d-29) then
tmp = -x / b
else
tmp = ((1.0d0 - x) / b) + (0.3333333333333333d0 * (b * x))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-5) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.25e-121) {
tmp = F / (B / Math.sqrt(0.5));
} else if (F <= 2.7e-29) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (0.3333333333333333 * (B * x));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e-5: tmp = (-1.0 - x) / B elif F <= -1.25e-121: tmp = F / (B / math.sqrt(0.5)) elif F <= 2.7e-29: tmp = -x / B else: tmp = ((1.0 - x) / B) + (0.3333333333333333 * (B * x)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e-5) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -1.25e-121) tmp = Float64(F / Float64(B / sqrt(0.5))); elseif (F <= 2.7e-29) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.2e-5) tmp = (-1.0 - x) / B; elseif (F <= -1.25e-121) tmp = F / (B / sqrt(0.5)); elseif (F <= 2.7e-29) tmp = -x / B; else tmp = ((1.0 - x) / B) + (0.3333333333333333 * (B * x)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e-5], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.25e-121], N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-29], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-121}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-29}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\end{array}
\end{array}
if F < -6.20000000000000027e-5Initial program 60.9%
Taylor expanded in F around -inf 99.2%
Taylor expanded in B around 0 50.7%
associate-*r/50.7%
distribute-lft-in50.7%
metadata-eval50.7%
neg-mul-150.7%
Simplified50.7%
if -6.20000000000000027e-5 < F < -1.24999999999999997e-121Initial program 99.2%
distribute-lft-neg-in99.2%
+-commutative99.2%
cancel-sign-sub-inv99.2%
Simplified99.5%
Taylor expanded in x around 0 99.6%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 98.7%
*-commutative98.7%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in B around 0 49.3%
Taylor expanded in F around inf 38.1%
associate-/l*38.1%
Simplified38.1%
if -1.24999999999999997e-121 < F < 2.70000000000000023e-29Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in F around inf 27.7%
associate-/r*27.7%
Simplified27.7%
Taylor expanded in B around 0 18.1%
Taylor expanded in x around inf 35.4%
associate-*r/35.4%
neg-mul-135.4%
Simplified35.4%
if 2.70000000000000023e-29 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified78.3%
Taylor expanded in F around inf 96.1%
associate-/r*96.0%
Simplified96.0%
Taylor expanded in B around 0 77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in B around 0 58.4%
associate--l+58.4%
div-sub58.3%
Simplified58.3%
Final simplification46.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.7e-111)
(/ (- -1.0 x) B)
(if (<= F 2.8e-29)
(/ (- x) B)
(+ (/ (- 1.0 x) B) (* 0.3333333333333333 (* B x))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.7e-111) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.8e-29) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (0.3333333333333333 * (B * x));
}
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.7d-111)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.8d-29) then
tmp = -x / b
else
tmp = ((1.0d0 - x) / b) + (0.3333333333333333d0 * (b * x))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.7e-111) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.8e-29) {
tmp = -x / B;
} else {
tmp = ((1.0 - x) / B) + (0.3333333333333333 * (B * x));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.7e-111: tmp = (-1.0 - x) / B elif F <= 2.8e-29: tmp = -x / B else: tmp = ((1.0 - x) / B) + (0.3333333333333333 * (B * x)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.7e-111) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.8e-29) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(0.3333333333333333 * Float64(B * x))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.7e-111) tmp = (-1.0 - x) / B; elseif (F <= 2.8e-29) tmp = -x / B; else tmp = ((1.0 - x) / B) + (0.3333333333333333 * (B * x)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.7e-111], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.8e-29], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.7 \cdot 10^{-111}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + 0.3333333333333333 \cdot \left(B \cdot x\right)\\
\end{array}
\end{array}
if F < -3.7000000000000002e-111Initial program 67.1%
Taylor expanded in F around -inf 89.7%
Taylor expanded in B around 0 45.6%
associate-*r/45.6%
distribute-lft-in45.6%
metadata-eval45.6%
neg-mul-145.6%
Simplified45.6%
if -3.7000000000000002e-111 < F < 2.8000000000000002e-29Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in F around inf 27.2%
associate-/r*27.2%
Simplified27.2%
Taylor expanded in B around 0 17.3%
Taylor expanded in x around inf 33.7%
associate-*r/33.7%
neg-mul-133.7%
Simplified33.7%
if 2.8000000000000002e-29 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified78.3%
Taylor expanded in F around inf 96.1%
associate-/r*96.0%
Simplified96.0%
Taylor expanded in B around 0 77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in B around 0 58.4%
associate--l+58.4%
div-sub58.3%
Simplified58.3%
Final simplification44.2%
(FPCore (F B x) :precision binary64 (if (<= F -4e-111) (/ (- -1.0 x) B) (if (<= F 2.8e-29) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-111) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.8e-29) {
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 <= (-4d-111)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.8d-29) 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 <= -4e-111) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.8e-29) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-111: tmp = (-1.0 - x) / B elif F <= 2.8e-29: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-111) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.8e-29) 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 <= -4e-111) tmp = (-1.0 - x) / B; elseif (F <= 2.8e-29) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-111], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.8e-29], 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 -4 \cdot 10^{-111}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.00000000000000035e-111Initial program 67.1%
Taylor expanded in F around -inf 89.7%
Taylor expanded in B around 0 45.6%
associate-*r/45.6%
distribute-lft-in45.6%
metadata-eval45.6%
neg-mul-145.6%
Simplified45.6%
if -4.00000000000000035e-111 < F < 2.8000000000000002e-29Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in F around inf 27.2%
associate-/r*27.2%
Simplified27.2%
Taylor expanded in B around 0 17.3%
Taylor expanded in x around inf 33.7%
associate-*r/33.7%
neg-mul-133.7%
Simplified33.7%
if 2.8000000000000002e-29 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified78.3%
Taylor expanded in F around inf 96.1%
associate-/r*96.0%
Simplified96.0%
Taylor expanded in B around 0 57.5%
div-sub57.6%
Applied egg-rr57.6%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-111) (/ (- -1.0 x) B) (if (<= F 2.8e-29) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-111) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.8e-29) {
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 <= (-3.8d-111)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.8d-29) 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 <= -3.8e-111) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.8e-29) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-111: tmp = (-1.0 - x) / B elif F <= 2.8e-29: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-111) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.8e-29) 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 <= -3.8e-111) tmp = (-1.0 - x) / B; elseif (F <= 2.8e-29) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-111], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.8e-29], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-111}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.80000000000000022e-111Initial program 67.1%
Taylor expanded in F around -inf 89.7%
Taylor expanded in B around 0 45.6%
associate-*r/45.6%
distribute-lft-in45.6%
metadata-eval45.6%
neg-mul-145.6%
Simplified45.6%
if -3.80000000000000022e-111 < F < 2.8000000000000002e-29Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in F around inf 27.2%
associate-/r*27.2%
Simplified27.2%
Taylor expanded in B around 0 17.3%
Taylor expanded in x around inf 33.7%
associate-*r/33.7%
neg-mul-133.7%
Simplified33.7%
if 2.8000000000000002e-29 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified78.3%
Taylor expanded in F around inf 96.1%
associate-/r*96.0%
Simplified96.0%
Taylor expanded in B around 0 57.5%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -4.2e-223) (not (<= x 1.22e-71))) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -4.2e-223) || !(x <= 1.22e-71)) {
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 <= (-4.2d-223)) .or. (.not. (x <= 1.22d-71))) 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 <= -4.2e-223) || !(x <= 1.22e-71)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -4.2e-223) or not (x <= 1.22e-71): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -4.2e-223) || !(x <= 1.22e-71)) 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 <= -4.2e-223) || ~((x <= 1.22e-71))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -4.2e-223], N[Not[LessEqual[x, 1.22e-71]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-223} \lor \neg \left(x \leq 1.22 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -4.19999999999999965e-223 or 1.21999999999999999e-71 < x Initial program 81.4%
distribute-lft-neg-in81.4%
+-commutative81.4%
cancel-sign-sub-inv81.4%
Simplified91.4%
Taylor expanded in F around inf 62.3%
associate-/r*62.2%
Simplified62.2%
Taylor expanded in B around 0 32.5%
Taylor expanded in x around inf 36.8%
associate-*r/36.8%
neg-mul-136.8%
Simplified36.8%
if -4.19999999999999965e-223 < x < 1.21999999999999999e-71Initial program 72.2%
distribute-lft-neg-in72.2%
+-commutative72.2%
cancel-sign-sub-inv72.2%
Simplified77.8%
Taylor expanded in F around inf 27.9%
associate-/r*27.8%
Simplified27.8%
Taylor expanded in B around 0 24.4%
Taylor expanded in x around 0 24.4%
Final simplification33.5%
(FPCore (F B x) :precision binary64 (if (<= F 2.8e-29) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 2.8e-29) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 2.8d-29) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 2.8e-29) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 2.8e-29: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 2.8e-29) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 2.8e-29) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 2.8e-29], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 2.8000000000000002e-29Initial program 85.5%
distribute-lft-neg-in85.5%
+-commutative85.5%
cancel-sign-sub-inv85.5%
Simplified91.5%
Taylor expanded in F around inf 36.8%
associate-/r*36.8%
Simplified36.8%
Taylor expanded in B around 0 20.0%
Taylor expanded in x around inf 29.4%
associate-*r/29.4%
neg-mul-129.4%
Simplified29.4%
if 2.8000000000000002e-29 < F Initial program 62.1%
distribute-lft-neg-in62.1%
+-commutative62.1%
cancel-sign-sub-inv62.1%
Simplified78.3%
Taylor expanded in F around inf 96.1%
associate-/r*96.0%
Simplified96.0%
Taylor expanded in B around 0 57.5%
Final simplification37.2%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 79.0%
distribute-lft-neg-in79.0%
+-commutative79.0%
cancel-sign-sub-inv79.0%
Simplified87.8%
Taylor expanded in F around inf 53.3%
associate-/r*53.2%
Simplified53.2%
Taylor expanded in B around 0 30.4%
Taylor expanded in x around 0 10.2%
Final simplification10.2%
herbie shell --seed 2023287
(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))))))