
(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 22 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 -1e+66)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 14.5)
(- (/ 1.0 (/ (sin B) (* F (pow (fma 2.0 x (fma F F 2.0)) -0.5)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+66) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 14.5) {
tmp = (1.0 / (sin(B) / (F * pow(fma(2.0, x, fma(F, F, 2.0)), -0.5)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+66) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 14.5) tmp = Float64(Float64(1.0 / Float64(sin(B) / Float64(F * (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+66], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 14.5], N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F * N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+66}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 14.5:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.99999999999999945e65Initial program 54.3%
Simplified72.9%
Taylor expanded in F around -inf 99.9%
if -9.99999999999999945e65 < F < 14.5Initial program 98.7%
Simplified99.6%
associate-*r/99.5%
clear-num99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
if 14.5 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+66)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 14.5)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+66) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 14.5) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+66) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 14.5) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+66], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 14.5], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+66}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 14.5:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.99999999999999989e66Initial program 53.6%
Simplified72.5%
Taylor expanded in F around -inf 99.9%
if -1.99999999999999989e66 < F < 14.5Initial program 98.7%
Simplified99.6%
if 14.5 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.65e+21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 14.5)
(+
(/ -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 <= -1.65e+21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 14.5) {
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 <= (-1.65d+21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 14.5d0) 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 <= -1.65e+21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 14.5) {
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 <= -1.65e+21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 14.5: 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 <= -1.65e+21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 14.5) 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 <= -1.65e+21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 14.5) 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, -1.65e+21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 14.5], 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 -1.65 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 14.5:\\
\;\;\;\;\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.65e21Initial program 58.7%
Simplified76.1%
Taylor expanded in F around -inf 99.9%
if -1.65e21 < F < 14.5Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.4%
un-div-inv99.4%
Applied egg-rr99.4%
if 14.5 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.7e+34)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 14.5)
(+
(* (/ 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 <= -1.7e+34) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 14.5) {
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 <= (-1.7d+34)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 14.5d0) 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 <= -1.7e+34) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 14.5) {
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 <= -1.7e+34: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 14.5: 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 <= -1.7e+34) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 14.5) 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 <= -1.7e+34) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 14.5) 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, -1.7e+34], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 14.5], 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 -1.7 \cdot 10^{+34}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 14.5:\\
\;\;\;\;\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.7e34Initial program 56.9%
Simplified75.2%
Taylor expanded in F around -inf 99.9%
if -1.7e34 < F < 14.5Initial program 99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
if 14.5 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (/ 1.0 (* (/ (sin B) F) (sqrt (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (1.0 / ((sin(B) / F) * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = (1.0d0 / ((sin(b) / f) * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (1.0 / ((Math.sin(B) / F) * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = (1.0 / ((math.sin(B) / F) * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(1.0 / Float64(Float64(sin(B) / F) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = (1.0 / ((sin(B) / F) * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F} \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 61.3%
Simplified77.7%
Taylor expanded in F around -inf 98.3%
if -1.44999999999999996 < F < 1.44999999999999996Initial program 99.4%
Simplified99.5%
associate-*r/99.5%
clear-num99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.0%
if 1.44999999999999996 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.55)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.55)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.55) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.55) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.55d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.55d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.55) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.55) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.55: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.55: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.55) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.55) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.55) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.55) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.55], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.55], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.55:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.55:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.55000000000000004Initial program 61.3%
Simplified77.7%
Taylor expanded in F around -inf 98.3%
if -1.55000000000000004 < F < 1.55000000000000004Initial program 99.4%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 98.9%
if 1.55000000000000004 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (/ F (* (sin B) (sqrt 2.0))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F / (sin(B) * sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = (F / (sin(B) * sqrt(2.0))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.3%
Simplified77.7%
Taylor expanded in F around -inf 98.3%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.4%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 98.9%
Taylor expanded in x around 0 98.5%
if 1.4199999999999999 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.3%
Simplified77.7%
Taylor expanded in F around -inf 98.3%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in x around 0 98.4%
if 1.4199999999999999 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.5e-52)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.5e-51)
(/ x (- (tan B)))
(if (<= F 0.116)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) (/ x 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 <= -7.5e-52) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.5e-51) {
tmp = x / -tan(B);
} else if (F <= 0.116) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / 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 <= (-7.5d-52)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.5d-51) then
tmp = x / -tan(b)
else if (f <= 0.116d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - (x / 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 <= -7.5e-52) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.5e-51) {
tmp = x / -Math.tan(B);
} else if (F <= 0.116) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - (x / 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 <= -7.5e-52: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.5e-51: tmp = x / -math.tan(B) elif F <= 0.116: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - (x / 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 <= -7.5e-52) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5e-51) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.116) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x / 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 <= -7.5e-52) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.5e-51) tmp = x / -tan(B); elseif (F <= 0.116) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / 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, -7.5e-52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5e-51], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.116], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.116:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7.50000000000000006e-52Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
if -7.50000000000000006e-52 < F < 1.50000000000000001e-51Initial program 99.5%
Simplified99.7%
associate-*r/99.6%
clear-num99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 77.0%
mul-1-neg77.0%
associate-/l*76.9%
distribute-rgt-neg-in76.9%
distribute-neg-frac276.9%
Simplified76.9%
clear-num76.9%
add-sqr-sqrt42.5%
sqrt-unprod35.9%
sqr-neg35.9%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.3%
sqrt-unprod30.3%
clear-num30.2%
clear-num30.2%
frac-times30.3%
metadata-eval30.3%
metadata-eval30.3%
frac-times30.2%
sqrt-unprod36.0%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
div-inv76.9%
clear-num77.1%
Applied egg-rr77.1%
neg-mul-177.1%
distribute-neg-frac77.1%
Simplified77.1%
if 1.50000000000000001e-51 < F < 0.116000000000000006Initial program 98.8%
Simplified98.7%
clear-num98.3%
un-div-inv98.5%
fma-define98.5%
fma-undefine98.5%
*-commutative98.5%
fma-define98.5%
fma-define98.5%
Applied egg-rr98.5%
Taylor expanded in F around 0 92.3%
Taylor expanded in B around 0 82.6%
if 0.116000000000000006 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
Final simplification89.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.1e-15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.275)
(- (* F (* (/ 1.0 B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.1e-15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.275) {
tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.1d-15)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.275d0) then
tmp = (f * ((1.0d0 / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.1e-15) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.275) {
tmp = (F * ((1.0 / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.1e-15: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.275: tmp = (F * ((1.0 / B) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.1e-15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.275) tmp = Float64(Float64(F * Float64(Float64(1.0 / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.1e-15) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.275) tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.1e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.275], N[(N[(F * N[(N[(1.0 / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.275:\\
\;\;\;\;F \cdot \left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.09999999999999981e-15Initial program 62.7%
Simplified78.5%
Taylor expanded in F around -inf 96.1%
if -2.09999999999999981e-15 < F < 0.27500000000000002Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in B around 0 83.0%
if 0.27500000000000002 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
Final simplification92.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.6e-52)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-46)
(/ x (- (tan B)))
(if (<= F 0.047)
(/ 1.0 (/ (sin B) (* F (sqrt 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 <= -6.6e-52) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-46) {
tmp = x / -tan(B);
} else if (F <= 0.047) {
tmp = 1.0 / (sin(B) / (F * sqrt(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 <= (-6.6d-52)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-46) then
tmp = x / -tan(b)
else if (f <= 0.047d0) then
tmp = 1.0d0 / (sin(b) / (f * sqrt(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 <= -6.6e-52) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-46) {
tmp = x / -Math.tan(B);
} else if (F <= 0.047) {
tmp = 1.0 / (Math.sin(B) / (F * Math.sqrt(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 <= -6.6e-52: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-46: tmp = x / -math.tan(B) elif F <= 0.047: tmp = 1.0 / (math.sin(B) / (F * math.sqrt(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 <= -6.6e-52) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-46) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.047) tmp = Float64(1.0 / Float64(sin(B) / Float64(F * sqrt(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 <= -6.6e-52) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-46) tmp = x / -tan(B); elseif (F <= 0.047) tmp = 1.0 / (sin(B) / (F * sqrt(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, -6.6e-52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-46], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.047], N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F * N[Sqrt[0.5], $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 -6.6 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.047:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.5999999999999999e-52Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
if -6.5999999999999999e-52 < F < 1.3999999999999999e-46Initial program 99.5%
Simplified99.7%
associate-*r/99.6%
clear-num99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 77.0%
mul-1-neg77.0%
associate-/l*76.9%
distribute-rgt-neg-in76.9%
distribute-neg-frac276.9%
Simplified76.9%
clear-num76.9%
add-sqr-sqrt42.5%
sqrt-unprod35.9%
sqr-neg35.9%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.3%
sqrt-unprod30.3%
clear-num30.2%
clear-num30.2%
frac-times30.3%
metadata-eval30.3%
metadata-eval30.3%
frac-times30.2%
sqrt-unprod36.0%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
div-inv76.9%
clear-num77.1%
Applied egg-rr77.1%
neg-mul-177.1%
distribute-neg-frac77.1%
Simplified77.1%
if 1.3999999999999999e-46 < F < 0.047Initial program 98.8%
Simplified98.7%
Taylor expanded in F around 0 91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around 0 75.2%
associate-/l*75.2%
Simplified75.2%
associate-*r/75.2%
clear-num75.4%
Applied egg-rr75.4%
if 0.047 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
Final simplification89.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.6e-52)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-46)
(/ x (- (tan B)))
(if (<= F 0.096)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.6e-52) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-46) {
tmp = x / -tan(B);
} else if (F <= 0.096) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.6d-52)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-46) then
tmp = x / -tan(b)
else if (f <= 0.096d0) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.6e-52) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-46) {
tmp = x / -Math.tan(B);
} else if (F <= 0.096) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.6e-52: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-46: tmp = x / -math.tan(B) elif F <= 0.096: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.6e-52) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-46) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.096) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.6e-52) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-46) tmp = x / -tan(B); elseif (F <= 0.096) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.6e-52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-46], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.096], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.6 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.096:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.5999999999999999e-52Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
if -6.5999999999999999e-52 < F < 1.3999999999999999e-46Initial program 99.5%
Simplified99.7%
associate-*r/99.6%
clear-num99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 77.0%
mul-1-neg77.0%
associate-/l*76.9%
distribute-rgt-neg-in76.9%
distribute-neg-frac276.9%
Simplified76.9%
clear-num76.9%
add-sqr-sqrt42.5%
sqrt-unprod35.9%
sqr-neg35.9%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.3%
sqrt-unprod30.3%
clear-num30.2%
clear-num30.2%
frac-times30.3%
metadata-eval30.3%
metadata-eval30.3%
frac-times30.2%
sqrt-unprod36.0%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
div-inv76.9%
clear-num77.1%
Applied egg-rr77.1%
neg-mul-177.1%
distribute-neg-frac77.1%
Simplified77.1%
if 1.3999999999999999e-46 < F < 0.096000000000000002Initial program 98.8%
Simplified98.7%
Taylor expanded in F around 0 91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around 0 75.2%
associate-/l*75.2%
Simplified75.2%
if 0.096000000000000002 < F Initial program 67.0%
Simplified76.9%
Taylor expanded in F around inf 99.8%
Final simplification89.4%
(FPCore (F B x)
:precision binary64
(if (<= F -7.8e-52)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.4e-47)
(/ x (- (tan B)))
(if (<= F 0.047)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-52) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.4e-47) {
tmp = x / -tan(B);
} else if (F <= 0.047) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.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) :: tmp
if (f <= (-7.8d-52)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.4d-47) then
tmp = x / -tan(b)
else if (f <= 0.047d0) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-52) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.4e-47) {
tmp = x / -Math.tan(B);
} else if (F <= 0.047) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.8e-52: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.4e-47: tmp = x / -math.tan(B) elif F <= 0.047: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.8e-52) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.4e-47) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.047) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.8e-52) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.4e-47) tmp = x / -tan(B); elseif (F <= 0.047) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.8e-52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-47], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.047], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.8 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.047:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.80000000000000036e-52Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
if -7.80000000000000036e-52 < F < 1.39999999999999996e-47Initial program 99.5%
Simplified99.7%
associate-*r/99.6%
clear-num99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 77.0%
mul-1-neg77.0%
associate-/l*76.9%
distribute-rgt-neg-in76.9%
distribute-neg-frac276.9%
Simplified76.9%
clear-num76.9%
add-sqr-sqrt42.5%
sqrt-unprod35.9%
sqr-neg35.9%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.3%
sqrt-unprod30.3%
clear-num30.2%
clear-num30.2%
frac-times30.3%
metadata-eval30.3%
metadata-eval30.3%
frac-times30.2%
sqrt-unprod36.0%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
div-inv76.9%
clear-num77.1%
Applied egg-rr77.1%
neg-mul-177.1%
distribute-neg-frac77.1%
Simplified77.1%
if 1.39999999999999996e-47 < F < 0.047Initial program 98.8%
Simplified98.7%
Taylor expanded in F around 0 91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around 0 75.2%
associate-/l*75.2%
Simplified75.2%
if 0.047 < F Initial program 67.0%
Taylor expanded in B around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
Taylor expanded in F around inf 75.1%
neg-mul-175.1%
distribute-frac-neg75.1%
+-commutative75.1%
distribute-frac-neg75.1%
unsub-neg75.1%
Simplified75.1%
Final simplification82.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.85e-53)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 3.6e-51)
(/ x (- (tan B)))
(if (<= F 0.08)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e-53) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 3.6e-51) {
tmp = x / -tan(B);
} else if (F <= 0.08) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.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) :: tmp
if (f <= (-1.85d-53)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 3.6d-51) then
tmp = x / -tan(b)
else if (f <= 0.08d0) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e-53) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 3.6e-51) {
tmp = x / -Math.tan(B);
} else if (F <= 0.08) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.85e-53: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 3.6e-51: tmp = x / -math.tan(B) elif F <= 0.08: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.85e-53) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 3.6e-51) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.08) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.85e-53) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 3.6e-51) tmp = x / -tan(B); elseif (F <= 0.08) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.85e-53], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.6e-51], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.08], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.85 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.08:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.84999999999999991e-53Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 71.8%
if -1.84999999999999991e-53 < F < 3.6e-51Initial program 99.5%
Simplified99.7%
associate-*r/99.6%
clear-num99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 77.0%
mul-1-neg77.0%
associate-/l*76.9%
distribute-rgt-neg-in76.9%
distribute-neg-frac276.9%
Simplified76.9%
clear-num76.9%
add-sqr-sqrt42.5%
sqrt-unprod35.9%
sqr-neg35.9%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.3%
sqrt-unprod30.3%
clear-num30.2%
clear-num30.2%
frac-times30.3%
metadata-eval30.3%
metadata-eval30.3%
frac-times30.2%
sqrt-unprod36.0%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
div-inv76.9%
clear-num77.1%
Applied egg-rr77.1%
neg-mul-177.1%
distribute-neg-frac77.1%
Simplified77.1%
if 3.6e-51 < F < 0.0800000000000000017Initial program 98.8%
Simplified98.7%
Taylor expanded in F around 0 91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around 0 75.2%
associate-/l*75.2%
Simplified75.2%
if 0.0800000000000000017 < F Initial program 67.0%
Taylor expanded in B around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
Taylor expanded in F around inf 75.1%
neg-mul-175.1%
distribute-frac-neg75.1%
+-commutative75.1%
distribute-frac-neg75.1%
unsub-neg75.1%
Simplified75.1%
Final simplification74.7%
(FPCore (F B x)
:precision binary64
(if (<= F -8.5e-53)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 1.1e-44)
(/ x (- (tan B)))
(if (<= F 13.5)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-53) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 1.1e-44) {
tmp = x / -tan(B);
} else if (F <= 13.5) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.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) :: tmp
if (f <= (-8.5d-53)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 1.1d-44) then
tmp = x / -tan(b)
else if (f <= 13.5d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-53) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 1.1e-44) {
tmp = x / -Math.tan(B);
} else if (F <= 13.5) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-53: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 1.1e-44: tmp = x / -math.tan(B) elif F <= 13.5: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-53) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 1.1e-44) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 13.5) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.5e-53) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 1.1e-44) tmp = x / -tan(B); elseif (F <= 13.5) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-53], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-44], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 13.5], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-44}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 13.5:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.50000000000000044e-53Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 71.8%
if -8.50000000000000044e-53 < F < 1.10000000000000006e-44Initial program 99.5%
Simplified99.7%
associate-*r/99.6%
clear-num99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 77.0%
mul-1-neg77.0%
associate-/l*76.9%
distribute-rgt-neg-in76.9%
distribute-neg-frac276.9%
Simplified76.9%
clear-num76.9%
add-sqr-sqrt42.5%
sqrt-unprod35.9%
sqr-neg35.9%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.3%
sqrt-unprod30.3%
clear-num30.2%
clear-num30.2%
frac-times30.3%
metadata-eval30.3%
metadata-eval30.3%
frac-times30.2%
sqrt-unprod36.0%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
div-inv76.9%
clear-num77.1%
Applied egg-rr77.1%
neg-mul-177.1%
distribute-neg-frac77.1%
Simplified77.1%
if 1.10000000000000006e-44 < F < 13.5Initial program 98.8%
Taylor expanded in B around 0 89.1%
associate-*r/89.1%
neg-mul-189.1%
Simplified89.1%
metadata-eval98.8%
metadata-eval98.8%
Applied egg-rr89.1%
Taylor expanded in B around 0 60.1%
if 13.5 < F Initial program 67.0%
Taylor expanded in B around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
Taylor expanded in F around inf 75.1%
neg-mul-175.1%
distribute-frac-neg75.1%
+-commutative75.1%
distribute-frac-neg75.1%
unsub-neg75.1%
Simplified75.1%
Final simplification74.1%
(FPCore (F B x)
:precision binary64
(if (<= F -6.4e-52)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 8.2e-51)
(/ x (- (tan B)))
(if (<= F 0.17)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.4e-52) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 8.2e-51) {
tmp = x / -tan(B);
} else if (F <= 0.17) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.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) :: tmp
if (f <= (-6.4d-52)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 8.2d-51) then
tmp = x / -tan(b)
else if (f <= 0.17d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.4e-52) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 8.2e-51) {
tmp = x / -Math.tan(B);
} else if (F <= 0.17) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.4e-52: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 8.2e-51: tmp = x / -math.tan(B) elif F <= 0.17: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.4e-52) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 8.2e-51) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 0.17) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.4e-52) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 8.2e-51) tmp = x / -tan(B); elseif (F <= 0.17) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.4e-52], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-51], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.17], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.4 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 0.17:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.4000000000000002e-52Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 71.8%
if -6.4000000000000002e-52 < F < 8.19999999999999947e-51Initial program 99.5%
Simplified99.7%
associate-*r/99.6%
clear-num99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 77.0%
mul-1-neg77.0%
associate-/l*76.9%
distribute-rgt-neg-in76.9%
distribute-neg-frac276.9%
Simplified76.9%
clear-num76.9%
add-sqr-sqrt42.5%
sqrt-unprod35.9%
sqr-neg35.9%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.3%
sqrt-unprod30.3%
clear-num30.2%
clear-num30.2%
frac-times30.3%
metadata-eval30.3%
metadata-eval30.3%
frac-times30.2%
sqrt-unprod36.0%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
div-inv76.9%
clear-num77.1%
Applied egg-rr77.1%
neg-mul-177.1%
distribute-neg-frac77.1%
Simplified77.1%
if 8.19999999999999947e-51 < F < 0.170000000000000012Initial program 98.8%
Simplified98.7%
Taylor expanded in F around 0 91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in B around 0 54.0%
if 0.170000000000000012 < F Initial program 67.0%
Taylor expanded in B around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
Taylor expanded in F around inf 75.1%
neg-mul-175.1%
distribute-frac-neg75.1%
+-commutative75.1%
distribute-frac-neg75.1%
unsub-neg75.1%
Simplified75.1%
Final simplification73.9%
(FPCore (F B x) :precision binary64 (if (<= F -6.4e-52) (- (/ -1.0 B) (/ x (tan B))) (if (<= F 0.023) (/ x (- (tan B))) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.4e-52) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 0.023) {
tmp = x / -tan(B);
} else {
tmp = (1.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) :: tmp
if (f <= (-6.4d-52)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 0.023d0) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.4e-52) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 0.023) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.4e-52: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 0.023: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.4e-52) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 0.023) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.4e-52) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 0.023) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.4e-52], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.023], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.4 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.023:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.4000000000000002e-52Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 71.8%
if -6.4000000000000002e-52 < F < 0.023Initial program 99.4%
Simplified99.6%
associate-*r/99.6%
clear-num99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 70.8%
mul-1-neg70.8%
associate-/l*70.7%
distribute-rgt-neg-in70.7%
distribute-neg-frac270.7%
Simplified70.7%
clear-num70.7%
add-sqr-sqrt39.2%
sqrt-unprod33.3%
sqr-neg33.3%
sqrt-unprod1.3%
add-sqr-sqrt2.5%
tan-quot2.5%
div-inv2.5%
add-sqr-sqrt1.3%
sqrt-unprod28.3%
clear-num28.2%
clear-num28.2%
frac-times28.3%
metadata-eval28.3%
metadata-eval28.3%
frac-times28.2%
sqrt-unprod33.4%
add-sqr-sqrt70.7%
Applied egg-rr70.7%
div-inv70.7%
clear-num70.8%
Applied egg-rr70.8%
neg-mul-170.8%
distribute-neg-frac70.8%
Simplified70.8%
if 0.023 < F Initial program 67.4%
Taylor expanded in B around 0 43.2%
associate-*r/43.2%
neg-mul-143.2%
Simplified43.2%
Taylor expanded in F around inf 74.3%
neg-mul-174.3%
distribute-frac-neg74.3%
+-commutative74.3%
distribute-frac-neg74.3%
unsub-neg74.3%
Simplified74.3%
Final simplification72.1%
(FPCore (F B x) :precision binary64 (if (<= F -3.4e-52) (- (/ -1.0 B) (/ x (tan B))) (/ x (- (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-52) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = x / -tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.4d-52)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-52) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.4e-52: tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.4e-52) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.4e-52) tmp = (-1.0 / B) - (x / tan(B)); else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.4e-52], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.4 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if F < -3.40000000000000017e-52Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 71.8%
if -3.40000000000000017e-52 < F Initial program 85.8%
Simplified90.0%
associate-*r/90.0%
clear-num90.1%
fma-define90.1%
fma-undefine90.1%
*-commutative90.1%
fma-define90.1%
fma-define90.1%
Applied egg-rr90.1%
Taylor expanded in F around 0 63.2%
mul-1-neg63.2%
associate-/l*63.1%
distribute-rgt-neg-in63.1%
distribute-neg-frac263.1%
Simplified63.1%
clear-num63.1%
add-sqr-sqrt32.5%
sqrt-unprod29.5%
sqr-neg29.5%
sqrt-unprod1.0%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.1%
sqrt-unprod25.9%
clear-num25.9%
clear-num25.8%
frac-times25.9%
metadata-eval25.9%
metadata-eval25.9%
frac-times25.8%
sqrt-unprod31.1%
add-sqr-sqrt63.1%
Applied egg-rr63.1%
div-inv63.1%
clear-num63.3%
Applied egg-rr63.3%
neg-mul-163.3%
distribute-neg-frac63.3%
Simplified63.3%
Final simplification66.1%
(FPCore (F B x) :precision binary64 (if (<= B 7.2e-186) (/ (- -1.0 x) B) (/ x (- (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 7.2e-186) {
tmp = (-1.0 - x) / B;
} else {
tmp = 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 (b <= 7.2d-186) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 7.2e-186) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 7.2e-186: tmp = (-1.0 - x) / B else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 7.2e-186) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 7.2e-186) tmp = (-1.0 - x) / B; else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 7.2e-186], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7.2 \cdot 10^{-186}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if B < 7.1999999999999997e-186Initial program 73.5%
Simplified83.5%
Taylor expanded in F around -inf 59.1%
Taylor expanded in B around 0 34.9%
mul-1-neg34.9%
distribute-neg-frac234.9%
Simplified34.9%
if 7.1999999999999997e-186 < B Initial program 87.1%
Simplified91.5%
associate-*r/91.5%
clear-num91.5%
fma-define91.5%
fma-undefine91.5%
*-commutative91.5%
fma-define91.5%
fma-define91.5%
Applied egg-rr91.5%
Taylor expanded in F around 0 59.6%
mul-1-neg59.6%
associate-/l*59.5%
distribute-rgt-neg-in59.5%
distribute-neg-frac259.5%
Simplified59.5%
clear-num59.5%
add-sqr-sqrt17.8%
sqrt-unprod19.3%
sqr-neg19.3%
sqrt-unprod1.4%
add-sqr-sqrt2.3%
tan-quot2.3%
div-inv2.3%
add-sqr-sqrt1.0%
sqrt-unprod20.7%
clear-num20.7%
clear-num20.6%
frac-times20.6%
metadata-eval20.6%
metadata-eval20.6%
frac-times20.6%
sqrt-unprod23.5%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
div-inv59.5%
clear-num59.6%
Applied egg-rr59.6%
neg-mul-159.6%
distribute-neg-frac59.6%
Simplified59.6%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (<= F -3.4e-53) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-53) {
tmp = (-1.0 - x) / 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 (f <= (-3.4d-53)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-53) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.4e-53: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.4e-53) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.4e-53) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.4e-53], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.4 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -3.4e-53Initial program 63.9%
Simplified79.2%
Taylor expanded in F around -inf 95.1%
Taylor expanded in B around 0 45.7%
mul-1-neg45.7%
distribute-neg-frac245.7%
Simplified45.7%
if -3.4e-53 < F Initial program 85.8%
Simplified90.0%
Taylor expanded in F around -inf 40.1%
Taylor expanded in B around 0 22.4%
mul-1-neg22.4%
distribute-neg-frac222.4%
Simplified22.4%
Taylor expanded in x around inf 33.7%
Final simplification37.7%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 78.5%
Simplified86.4%
Taylor expanded in F around -inf 58.4%
Taylor expanded in B around 0 30.2%
mul-1-neg30.2%
distribute-neg-frac230.2%
Simplified30.2%
Taylor expanded in x around inf 31.1%
Final simplification31.1%
(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 78.5%
Simplified86.4%
Taylor expanded in F around -inf 58.4%
Taylor expanded in B around 0 30.2%
mul-1-neg30.2%
distribute-neg-frac230.2%
Simplified30.2%
Taylor expanded in x around 0 10.0%
herbie shell --seed 2024144
(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))))))