
(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 20 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 -1.45e+15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7800000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 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.45e+15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7800000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow((((F * F) + 2.0) + (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.45d+15)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7800000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (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.45e+15) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7800000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (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.45e+15: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7800000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (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.45e+15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7800000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + 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.45e+15) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7800000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * ((((F * F) + 2.0) + (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.45e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7800000.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[(N[(F * F), $MachinePrecision] + 2.0), $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.45 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 7800000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.45e15Initial program 62.6%
Simplified78.7%
Taylor expanded in F around -inf 99.8%
if -1.45e15 < F < 7.8e6Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 7.8e6 < F Initial program 70.8%
Simplified77.4%
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.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.00037)
(- (/ (pow (+ 2.0 (* x 2.0)) -0.5) (/ (sin 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 <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.00037) {
tmp = (pow((2.0 + (x * 2.0)), -0.5) / (sin(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 <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.00037d0) then
tmp = (((2.0d0 + (x * 2.0d0)) ** (-0.5d0)) / (sin(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 <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.00037) {
tmp = (Math.pow((2.0 + (x * 2.0)), -0.5) / (Math.sin(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 <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.00037: tmp = (math.pow((2.0 + (x * 2.0)), -0.5) / (math.sin(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 <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.00037) tmp = Float64(Float64((Float64(2.0 + Float64(x * 2.0)) ^ -0.5) / Float64(sin(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 <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.00037) tmp = (((2.0 + (x * 2.0)) ^ -0.5) / (sin(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, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.00037], N[(N[(N[Power[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / 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 -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.00037:\\
\;\;\;\;\frac{{\left(2 + x \cdot 2\right)}^{-0.5}}{\frac{\sin B}{F}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 63.6%
Simplified79.3%
Taylor expanded in F around -inf 99.1%
if -1.4199999999999999 < F < 3.6999999999999999e-4Initial program 99.4%
Simplified99.6%
associate-*r/99.6%
associate-*l/99.6%
*-commutative99.6%
clear-num99.5%
un-div-inv99.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.2%
if 3.6999999999999999e-4 < F Initial program 71.5%
Simplified77.9%
Taylor expanded in F around inf 99.3%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.00037)
(- (/ 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.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.00037) {
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.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.00037d0) 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.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.00037) {
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.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.00037: 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.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.00037) 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.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.00037) 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.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.00037], 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.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.00037:\\
\;\;\;\;\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.4199999999999999Initial program 63.6%
Simplified79.3%
Taylor expanded in F around -inf 99.1%
if -1.4199999999999999 < F < 3.6999999999999999e-4Initial program 99.4%
Simplified99.6%
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 99.2%
*-commutative99.2%
Simplified99.2%
if 3.6999999999999999e-4 < F Initial program 71.5%
Simplified77.9%
Taylor expanded in F around inf 99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -1.45e+15)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 2.05e-178)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 23500.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.45e+15) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 2.05e-178) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 23500.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-1.45d+15)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 2.05d-178) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 23500.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.45e+15) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 2.05e-178) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 23500.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -1.45e+15: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 2.05e-178: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 23500.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45e+15) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 2.05e-178) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 23500.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -1.45e+15) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 2.05e-178) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 23500.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.05e-178], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 23500.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-178}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 23500:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.45e15Initial program 62.6%
Simplified78.7%
Taylor expanded in F around -inf 99.8%
if -1.45e15 < F < 2.05e-178Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 87.9%
if 2.05e-178 < F < 23500Initial program 99.5%
div-inv99.7%
neg-mul-199.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 83.8%
associate-*r/83.8%
neg-mul-183.8%
Simplified83.8%
if 23500 < F Initial program 70.8%
Simplified77.4%
Taylor expanded in F around inf 99.8%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.02e-16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.8e-178)
(+ (/ -1.0 (/ (tan B) x)) (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F 215000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ 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 <= -1.02e-16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.8e-178) {
tmp = (-1.0 / (tan(B) / x)) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else if (F <= 215000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (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 <= (-1.02d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.8d-178) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else if (f <= 215000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (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 <= -1.02e-16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.8e-178) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else if (F <= 215000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (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 <= -1.02e-16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.8e-178: tmp = (-1.0 / (math.tan(B) / x)) + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) elif F <= 215000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (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 <= -1.02e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.8e-178) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); elseif (F <= 215000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - 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 <= -1.02e-16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.8e-178) tmp = (-1.0 / (tan(B) / x)) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); elseif (F <= 215000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (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, -1.02e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.8e-178], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 215000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $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 -1.02 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-178}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{elif}\;F \leq 215000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.0200000000000001e-16Initial program 64.6%
Simplified79.8%
Taylor expanded in F around -inf 96.7%
if -1.0200000000000001e-16 < F < 2.80000000000000019e-178Initial program 99.5%
div-inv99.6%
neg-mul-199.6%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in B around 0 89.7%
Taylor expanded in F around 0 89.7%
if 2.80000000000000019e-178 < F < 215000Initial program 99.5%
div-inv99.7%
neg-mul-199.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 83.8%
associate-*r/83.8%
neg-mul-183.8%
Simplified83.8%
if 215000 < F Initial program 70.8%
Simplified77.4%
Taylor expanded in F around inf 99.8%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.02e-16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.00037)
(+ (/ -1.0 (/ (tan B) x)) (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.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.02e-16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.00037) {
tmp = (-1.0 / (tan(B) / x)) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.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.02d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.00037d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
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.02e-16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.00037) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.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.02e-16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.00037: tmp = (-1.0 / (math.tan(B) / x)) + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.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.02e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.00037) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.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.02e-16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.00037) tmp = (-1.0 / (tan(B) / x)) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.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.02e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.00037], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $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.02 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.00037:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.0200000000000001e-16Initial program 64.6%
Simplified79.8%
Taylor expanded in F around -inf 96.7%
if -1.0200000000000001e-16 < F < 3.6999999999999999e-4Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 83.8%
Taylor expanded in F around 0 83.4%
if 3.6999999999999999e-4 < F Initial program 71.5%
Simplified77.9%
Taylor expanded in F around inf 99.3%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-83)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-55) (/ x (- (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 <= -6e-83) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-55) {
tmp = x / -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 <= (-6d-83)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-55) then
tmp = x / -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 <= -6e-83) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-55) {
tmp = x / -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 <= -6e-83: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-55: tmp = x / -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 <= -6e-83) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-55) tmp = Float64(x / Float64(-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 <= -6e-83) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-55) tmp = x / -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, -6e-83], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-55], N[(x / (-N[Tan[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 -6 \cdot 10^{-83}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.00000000000000021e-83Initial program 69.2%
Simplified82.4%
Taylor expanded in F around -inf 89.4%
if -6.00000000000000021e-83 < F < 1.39999999999999992e-55Initial program 99.4%
Simplified99.6%
clear-num99.6%
un-div-inv99.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.3%
mul-1-neg70.3%
associate-/l*70.1%
distribute-rgt-neg-in70.1%
Simplified70.1%
distribute-rgt-neg-out70.1%
clear-num70.1%
tan-quot70.1%
div-inv70.3%
Applied egg-rr70.3%
distribute-neg-frac270.3%
Simplified70.3%
if 1.39999999999999992e-55 < F Initial program 73.8%
Simplified79.7%
Taylor expanded in F around inf 93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-83)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8.2e-58) (/ x (- (tan B))) (- (* F (/ 1.0 (* F B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6e-83) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8.2e-58) {
tmp = x / -tan(B);
} else {
tmp = (F * (1.0 / (F * 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 <= (-6d-83)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8.2d-58) then
tmp = x / -tan(b)
else
tmp = (f * (1.0d0 / (f * 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 <= -6e-83) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8.2e-58) {
tmp = x / -Math.tan(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6e-83: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8.2e-58: tmp = x / -math.tan(B) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6e-83) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8.2e-58) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6e-83) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8.2e-58) tmp = x / -tan(B); else tmp = (F * (1.0 / (F * 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, -6e-83], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.2e-58], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6 \cdot 10^{-83}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-58}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -6.00000000000000021e-83Initial program 69.2%
Simplified82.4%
Taylor expanded in F around -inf 89.4%
if -6.00000000000000021e-83 < F < 8.20000000000000056e-58Initial program 99.4%
Simplified99.6%
clear-num99.6%
un-div-inv99.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.3%
mul-1-neg70.3%
associate-/l*70.1%
distribute-rgt-neg-in70.1%
Simplified70.1%
distribute-rgt-neg-out70.1%
clear-num70.1%
tan-quot70.1%
div-inv70.3%
Applied egg-rr70.3%
distribute-neg-frac270.3%
Simplified70.3%
if 8.20000000000000056e-58 < F Initial program 73.8%
Simplified79.7%
Taylor expanded in F around inf 92.8%
Taylor expanded in B around 0 68.3%
Final simplification75.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.55e+165)
(- (* F (* (/ 1.0 F) (/ -1.0 B))) t_0)
(if (<= F -1.1e+51)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7e-57) (/ x (- (tan B))) (- (* F (/ 1.0 (* F B))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.55e+165) {
tmp = (F * ((1.0 / F) * (-1.0 / B))) - t_0;
} else if (F <= -1.1e+51) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7e-57) {
tmp = x / -tan(B);
} else {
tmp = (F * (1.0 / (F * 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.55d+165)) then
tmp = (f * ((1.0d0 / f) * ((-1.0d0) / b))) - t_0
else if (f <= (-1.1d+51)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7d-57) then
tmp = x / -tan(b)
else
tmp = (f * (1.0d0 / (f * 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.55e+165) {
tmp = (F * ((1.0 / F) * (-1.0 / B))) - t_0;
} else if (F <= -1.1e+51) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7e-57) {
tmp = x / -Math.tan(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.55e+165: tmp = (F * ((1.0 / F) * (-1.0 / B))) - t_0 elif F <= -1.1e+51: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7e-57: tmp = x / -math.tan(B) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.55e+165) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) * Float64(-1.0 / B))) - t_0); elseif (F <= -1.1e+51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7e-57) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * 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.55e+165) tmp = (F * ((1.0 / F) * (-1.0 / B))) - t_0; elseif (F <= -1.1e+51) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7e-57) tmp = x / -tan(B); else tmp = (F * (1.0 / (F * 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.55e+165], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.1e+51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-57], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.55 \cdot 10^{+165}:\\
\;\;\;\;F \cdot \left(\frac{1}{F} \cdot \frac{-1}{B}\right) - t\_0\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{+51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-57}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -2.5500000000000002e165Initial program 50.2%
Simplified64.8%
Taylor expanded in F around inf 64.0%
div-inv64.0%
add-sqr-sqrt27.9%
sqrt-unprod67.2%
frac-times67.2%
metadata-eval67.2%
metadata-eval67.2%
frac-times67.2%
sqrt-unprod52.6%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 83.4%
if -2.5500000000000002e165 < F < -1.09999999999999996e51Initial program 72.9%
Simplified93.0%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 84.1%
if -1.09999999999999996e51 < F < 6.99999999999999983e-57Initial program 99.4%
Simplified99.6%
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 65.6%
mul-1-neg65.6%
associate-/l*65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
distribute-rgt-neg-out65.5%
clear-num65.4%
tan-quot65.5%
div-inv65.6%
Applied egg-rr65.6%
distribute-neg-frac265.6%
Simplified65.6%
if 6.99999999999999983e-57 < F Initial program 73.8%
Simplified79.7%
Taylor expanded in F around inf 92.8%
Taylor expanded in B around 0 68.3%
Final simplification71.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.42e+51)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.5e-55)
(/ x (- (tan B)))
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e+51) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.5e-55) {
tmp = x / -tan(B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.42d+51)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.5d-55) then
tmp = x / -tan(b)
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e+51) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.5e-55) {
tmp = x / -Math.tan(B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.42e+51: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.5e-55: tmp = x / -math.tan(B) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.42e+51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.5e-55) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.42e+51) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.5e-55) tmp = x / -tan(B); else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.42e+51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-55], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.42 \cdot 10^{+51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.41999999999999998e51Initial program 60.3%
Simplified77.4%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 69.9%
if -1.41999999999999998e51 < F < 5.4999999999999999e-55Initial program 99.4%
Simplified99.6%
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 65.6%
mul-1-neg65.6%
associate-/l*65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
distribute-rgt-neg-out65.5%
clear-num65.4%
tan-quot65.5%
div-inv65.6%
Applied egg-rr65.6%
distribute-neg-frac265.6%
Simplified65.6%
if 5.4999999999999999e-55 < F Initial program 73.8%
Simplified79.7%
Taylor expanded in F around inf 92.8%
Taylor expanded in B around 0 68.3%
Final simplification67.6%
(FPCore (F B x)
:precision binary64
(if (<= x -1.85e-62)
(* x (/ -1.0 (tan B)))
(if (<= x -1.02e-252)
(* x (/ 1.0 (* (sin B) x)))
(if (<= x 1.55e-181) (/ -1.0 (sin B)) (/ x (- (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -1.85e-62) {
tmp = x * (-1.0 / tan(B));
} else if (x <= -1.02e-252) {
tmp = x * (1.0 / (sin(B) * x));
} else if (x <= 1.55e-181) {
tmp = -1.0 / sin(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 (x <= (-1.85d-62)) then
tmp = x * ((-1.0d0) / tan(b))
else if (x <= (-1.02d-252)) then
tmp = x * (1.0d0 / (sin(b) * x))
else if (x <= 1.55d-181) then
tmp = (-1.0d0) / sin(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 (x <= -1.85e-62) {
tmp = x * (-1.0 / Math.tan(B));
} else if (x <= -1.02e-252) {
tmp = x * (1.0 / (Math.sin(B) * x));
} else if (x <= 1.55e-181) {
tmp = -1.0 / Math.sin(B);
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if x <= -1.85e-62: tmp = x * (-1.0 / math.tan(B)) elif x <= -1.02e-252: tmp = x * (1.0 / (math.sin(B) * x)) elif x <= 1.55e-181: tmp = -1.0 / math.sin(B) else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (x <= -1.85e-62) tmp = Float64(x * Float64(-1.0 / tan(B))); elseif (x <= -1.02e-252) tmp = Float64(x * Float64(1.0 / Float64(sin(B) * x))); elseif (x <= 1.55e-181) tmp = Float64(-1.0 / sin(B)); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (x <= -1.85e-62) tmp = x * (-1.0 / tan(B)); elseif (x <= -1.02e-252) tmp = x * (1.0 / (sin(B) * x)); elseif (x <= 1.55e-181) tmp = -1.0 / sin(B); else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[x, -1.85e-62], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.02e-252], N[(x * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.55e-181], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-62}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;x \leq -1.02 \cdot 10^{-252}:\\
\;\;\;\;x \cdot \frac{1}{\sin B \cdot x}\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-181}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if x < -1.8499999999999999e-62Initial program 79.6%
Simplified94.0%
clear-num94.0%
un-div-inv94.0%
fma-define94.0%
fma-undefine94.0%
*-commutative94.0%
fma-define94.0%
fma-define94.0%
Applied egg-rr94.0%
Taylor expanded in F around 0 87.0%
mul-1-neg87.0%
associate-/l*87.0%
distribute-rgt-neg-in87.0%
Simplified87.0%
neg-sub087.0%
clear-num87.0%
tan-quot87.1%
Applied egg-rr87.1%
sub0-neg87.1%
mul-1-neg87.1%
associate-*r/87.1%
metadata-eval87.1%
Simplified87.1%
if -1.8499999999999999e-62 < x < -1.02000000000000002e-252Initial program 72.5%
Simplified79.7%
Taylor expanded in F around inf 40.0%
Taylor expanded in x around inf 35.4%
Taylor expanded in x around 0 35.4%
if -1.02000000000000002e-252 < x < 1.55000000000000011e-181Initial program 68.4%
Simplified72.8%
Taylor expanded in F around inf 25.4%
div-inv25.4%
add-sqr-sqrt13.6%
sqrt-unprod17.8%
frac-times17.8%
metadata-eval17.8%
metadata-eval17.8%
frac-times17.8%
sqrt-unprod16.1%
add-sqr-sqrt28.5%
Applied egg-rr28.5%
Taylor expanded in B around 0 28.5%
Taylor expanded in B around inf 28.7%
if 1.55000000000000011e-181 < x Initial program 89.0%
Simplified92.6%
clear-num92.6%
un-div-inv92.6%
fma-define92.6%
fma-undefine92.6%
*-commutative92.6%
fma-define92.6%
fma-define92.6%
Applied egg-rr92.6%
Taylor expanded in F around 0 78.0%
mul-1-neg78.0%
associate-/l*78.0%
distribute-rgt-neg-in78.0%
Simplified78.0%
distribute-rgt-neg-out78.0%
clear-num77.8%
tan-quot78.0%
div-inv78.2%
Applied egg-rr78.2%
distribute-neg-frac278.2%
Simplified78.2%
Final simplification64.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.16e+51) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 5e-57) (/ x (- (tan B))) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.16e+51) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5e-57) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.16d+51)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5d-57) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.16e+51) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5e-57) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.16e+51: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5e-57: tmp = x / -math.tan(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.16e+51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5e-57) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.16e+51) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5e-57) tmp = x / -tan(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.16e+51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-57], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.16 \cdot 10^{+51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-57}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.16e51Initial program 60.3%
Simplified77.4%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 69.9%
if -1.16e51 < F < 5.0000000000000002e-57Initial program 99.4%
Simplified99.6%
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 65.6%
mul-1-neg65.6%
associate-/l*65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
distribute-rgt-neg-out65.5%
clear-num65.4%
tan-quot65.5%
div-inv65.6%
Applied egg-rr65.6%
distribute-neg-frac265.6%
Simplified65.6%
if 5.0000000000000002e-57 < F Initial program 73.8%
Simplified79.7%
Taylor expanded in F around inf 92.8%
Taylor expanded in B around 0 68.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.1e+51) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 8.6e+201) (/ x (- (tan B))) (* x (/ 1.0 (* (sin B) x))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e+51) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8.6e+201) {
tmp = x / -tan(B);
} else {
tmp = x * (1.0 / (sin(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 <= (-1.1d+51)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8.6d+201) then
tmp = x / -tan(b)
else
tmp = x * (1.0d0 / (sin(b) * x))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e+51) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8.6e+201) {
tmp = x / -Math.tan(B);
} else {
tmp = x * (1.0 / (Math.sin(B) * x));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e+51: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8.6e+201: tmp = x / -math.tan(B) else: tmp = x * (1.0 / (math.sin(B) * x)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e+51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8.6e+201) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(x * Float64(1.0 / Float64(sin(B) * x))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.1e+51) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8.6e+201) tmp = x / -tan(B); else tmp = x * (1.0 / (sin(B) * x)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e+51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.6e+201], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(x * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{+51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{+201}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{\sin B \cdot x}\\
\end{array}
\end{array}
if F < -1.09999999999999996e51Initial program 60.3%
Simplified77.4%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 69.9%
if -1.09999999999999996e51 < F < 8.59999999999999981e201Initial program 97.2%
Simplified99.0%
clear-num99.0%
un-div-inv99.0%
fma-define99.0%
fma-undefine99.0%
*-commutative99.0%
fma-define99.0%
fma-define99.0%
Applied egg-rr99.0%
Taylor expanded in F around 0 62.2%
mul-1-neg62.2%
associate-/l*62.2%
distribute-rgt-neg-in62.2%
Simplified62.2%
distribute-rgt-neg-out62.2%
clear-num62.1%
tan-quot62.2%
div-inv62.3%
Applied egg-rr62.3%
distribute-neg-frac262.3%
Simplified62.3%
if 8.59999999999999981e201 < F Initial program 23.0%
Simplified32.3%
Taylor expanded in F around inf 99.5%
Taylor expanded in x around inf 84.3%
Taylor expanded in x around 0 54.1%
Final simplification63.4%
(FPCore (F B x) :precision binary64 (if (or (<= x -6.8e-224) (not (<= x 2.7e-181))) (/ x (- (tan B))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -6.8e-224) || !(x <= 2.7e-181)) {
tmp = x / -tan(B);
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-6.8d-224)) .or. (.not. (x <= 2.7d-181))) then
tmp = x / -tan(b)
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -6.8e-224) || !(x <= 2.7e-181)) {
tmp = x / -Math.tan(B);
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -6.8e-224) or not (x <= 2.7e-181): tmp = x / -math.tan(B) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -6.8e-224) || !(x <= 2.7e-181)) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -6.8e-224) || ~((x <= 2.7e-181))) tmp = x / -tan(B); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -6.8e-224], N[Not[LessEqual[x, 2.7e-181]], $MachinePrecision]], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{-224} \lor \neg \left(x \leq 2.7 \cdot 10^{-181}\right):\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -6.79999999999999984e-224 or 2.6999999999999999e-181 < x Initial program 83.4%
Simplified90.6%
clear-num90.6%
un-div-inv90.6%
fma-define90.6%
fma-undefine90.6%
*-commutative90.6%
fma-define90.6%
fma-define90.6%
Applied egg-rr90.6%
Taylor expanded in F around 0 72.2%
mul-1-neg72.2%
associate-/l*72.2%
distribute-rgt-neg-in72.2%
Simplified72.2%
distribute-rgt-neg-out72.2%
clear-num72.1%
tan-quot72.2%
div-inv72.3%
Applied egg-rr72.3%
distribute-neg-frac272.3%
Simplified72.3%
if -6.79999999999999984e-224 < x < 2.6999999999999999e-181Initial program 72.1%
Simplified75.7%
Taylor expanded in F around inf 26.4%
div-inv26.5%
add-sqr-sqrt13.0%
sqrt-unprod16.8%
frac-times16.8%
metadata-eval16.8%
metadata-eval16.8%
frac-times16.8%
sqrt-unprod13.7%
add-sqr-sqrt25.7%
Applied egg-rr25.7%
Taylor expanded in B around 0 25.7%
Taylor expanded in B around inf 25.9%
Final simplification62.0%
(FPCore (F B x) :precision binary64 (if (<= x -3e-218) (* x (/ -1.0 (tan B))) (if (<= x 6.5e-182) (/ -1.0 (sin B)) (/ x (- (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -3e-218) {
tmp = x * (-1.0 / tan(B));
} else if (x <= 6.5e-182) {
tmp = -1.0 / sin(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 (x <= (-3d-218)) then
tmp = x * ((-1.0d0) / tan(b))
else if (x <= 6.5d-182) then
tmp = (-1.0d0) / sin(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 (x <= -3e-218) {
tmp = x * (-1.0 / Math.tan(B));
} else if (x <= 6.5e-182) {
tmp = -1.0 / Math.sin(B);
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if x <= -3e-218: tmp = x * (-1.0 / math.tan(B)) elif x <= 6.5e-182: tmp = -1.0 / math.sin(B) else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (x <= -3e-218) tmp = Float64(x * Float64(-1.0 / tan(B))); elseif (x <= 6.5e-182) tmp = Float64(-1.0 / sin(B)); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (x <= -3e-218) tmp = x * (-1.0 / tan(B)); elseif (x <= 6.5e-182) tmp = -1.0 / sin(B); else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[x, -3e-218], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-182], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-218}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-182}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if x < -2.9999999999999998e-218Initial program 74.7%
Simplified87.4%
clear-num87.4%
un-div-inv87.4%
fma-define87.4%
fma-undefine87.4%
*-commutative87.4%
fma-define87.4%
fma-define87.4%
Applied egg-rr87.4%
Taylor expanded in F around 0 63.3%
mul-1-neg63.3%
associate-/l*63.3%
distribute-rgt-neg-in63.3%
Simplified63.3%
neg-sub063.3%
clear-num63.2%
tan-quot63.3%
Applied egg-rr63.3%
sub0-neg63.3%
mul-1-neg63.3%
associate-*r/63.3%
metadata-eval63.3%
Simplified63.3%
if -2.9999999999999998e-218 < x < 6.49999999999999997e-182Initial program 72.1%
Simplified75.7%
Taylor expanded in F around inf 26.4%
div-inv26.5%
add-sqr-sqrt13.0%
sqrt-unprod16.8%
frac-times16.8%
metadata-eval16.8%
metadata-eval16.8%
frac-times16.8%
sqrt-unprod13.7%
add-sqr-sqrt25.7%
Applied egg-rr25.7%
Taylor expanded in B around 0 25.7%
Taylor expanded in B around inf 25.9%
if 6.49999999999999997e-182 < x Initial program 89.0%
Simplified92.6%
clear-num92.6%
un-div-inv92.6%
fma-define92.6%
fma-undefine92.6%
*-commutative92.6%
fma-define92.6%
fma-define92.6%
Applied egg-rr92.6%
Taylor expanded in F around 0 78.0%
mul-1-neg78.0%
associate-/l*78.0%
distribute-rgt-neg-in78.0%
Simplified78.0%
distribute-rgt-neg-out78.0%
clear-num77.8%
tan-quot78.0%
div-inv78.2%
Applied egg-rr78.2%
distribute-neg-frac278.2%
Simplified78.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.3e+106)
(/ (- -1.0 x) B)
(if (<= F -2.1e+36)
(/ -1.0 (sin B))
(if (<= F 3.4e-56) (/ x (- B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e+106) {
tmp = (-1.0 - x) / B;
} else if (F <= -2.1e+36) {
tmp = -1.0 / sin(B);
} else if (F <= 3.4e-56) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.3d+106)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-2.1d+36)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 3.4d-56) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e+106) {
tmp = (-1.0 - x) / B;
} else if (F <= -2.1e+36) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 3.4e-56) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e+106: tmp = (-1.0 - x) / B elif F <= -2.1e+36: tmp = -1.0 / math.sin(B) elif F <= 3.4e-56: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e+106) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -2.1e+36) tmp = Float64(-1.0 / sin(B)); elseif (F <= 3.4e-56) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e+106) tmp = (-1.0 - x) / B; elseif (F <= -2.1e+36) tmp = -1.0 / sin(B); elseif (F <= 3.4e-56) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e+106], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -2.1e+36], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-56], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{+106}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{+36}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.3000000000000001e106Initial program 53.2%
Simplified71.3%
Taylor expanded in F around inf 63.0%
div-inv63.0%
add-sqr-sqrt27.6%
sqrt-unprod67.1%
frac-times67.1%
metadata-eval67.1%
metadata-eval67.1%
frac-times67.1%
sqrt-unprod52.8%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 49.3%
associate-*r/49.3%
neg-mul-149.3%
distribute-neg-in49.3%
metadata-eval49.3%
unsub-neg49.3%
Simplified49.3%
if -1.3000000000000001e106 < F < -2.10000000000000004e36Initial program 88.7%
Simplified99.4%
Taylor expanded in F around inf 30.2%
div-inv30.2%
add-sqr-sqrt0.2%
sqrt-unprod71.5%
frac-times71.4%
metadata-eval71.4%
metadata-eval71.4%
frac-times71.5%
sqrt-unprod81.9%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
Taylor expanded in B around 0 80.4%
Taylor expanded in B around inf 68.7%
if -2.10000000000000004e36 < F < 3.39999999999999982e-56Initial program 99.4%
Simplified99.6%
Taylor expanded in F around inf 26.7%
Taylor expanded in B around 0 16.2%
Taylor expanded in x around inf 28.7%
associate-*r/28.7%
neg-mul-128.7%
Simplified28.7%
if 3.39999999999999982e-56 < F Initial program 73.8%
Simplified79.7%
Taylor expanded in F around inf 92.8%
Taylor expanded in B around 0 40.3%
Final simplification39.4%
(FPCore (F B x) :precision binary64 (if (<= F -2.4e-93) (/ (- -1.0 x) B) (if (<= F 4.5e-58) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e-93) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.5e-58) {
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.4d-93)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.5d-58) 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.4e-93) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.5e-58) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e-93: tmp = (-1.0 - x) / B elif F <= 4.5e-58: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e-93) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.5e-58) tmp = Float64(x / Float64(-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.4e-93) tmp = (-1.0 - x) / B; elseif (F <= 4.5e-58) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e-93], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.5e-58], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.4000000000000001e-93Initial program 70.3%
Simplified83.0%
Taylor expanded in F around inf 48.8%
div-inv48.8%
add-sqr-sqrt18.6%
sqrt-unprod60.0%
frac-times59.9%
metadata-eval59.9%
metadata-eval59.9%
frac-times60.0%
sqrt-unprod52.3%
add-sqr-sqrt86.4%
Applied egg-rr86.4%
Taylor expanded in B around 0 39.3%
associate-*r/39.3%
neg-mul-139.3%
distribute-neg-in39.3%
metadata-eval39.3%
unsub-neg39.3%
Simplified39.3%
if -2.4000000000000001e-93 < F < 4.5000000000000003e-58Initial program 99.4%
Simplified99.6%
Taylor expanded in F around inf 26.6%
Taylor expanded in B around 0 17.1%
Taylor expanded in x around inf 32.3%
associate-*r/32.3%
neg-mul-132.3%
Simplified32.3%
if 4.5000000000000003e-58 < F Initial program 73.8%
Simplified79.7%
Taylor expanded in F around inf 92.8%
Taylor expanded in B around 0 40.3%
Final simplification37.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -5.8e-62) (not (<= x 1.4e-208))) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.8e-62) || !(x <= 1.4e-208)) {
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 <= (-5.8d-62)) .or. (.not. (x <= 1.4d-208))) 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 <= -5.8e-62) || !(x <= 1.4e-208)) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.8e-62) or not (x <= 1.4e-208): tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.8e-62) || !(x <= 1.4e-208)) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.8e-62) || ~((x <= 1.4e-208))) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.8e-62], N[Not[LessEqual[x, 1.4e-208]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-62} \lor \neg \left(x \leq 1.4 \cdot 10^{-208}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -5.79999999999999971e-62 or 1.40000000000000001e-208 < x Initial program 86.1%
Simplified92.7%
Taylor expanded in F around inf 66.4%
Taylor expanded in B around 0 29.6%
Taylor expanded in x around inf 34.9%
associate-*r/34.9%
neg-mul-134.9%
Simplified34.9%
if -5.79999999999999971e-62 < x < 1.40000000000000001e-208Initial program 69.4%
Simplified75.3%
Taylor expanded in F around inf 34.2%
Taylor expanded in B around 0 21.1%
Taylor expanded in x around 0 21.1%
Final simplification30.6%
(FPCore (F B x) :precision binary64 (if (<= F -2.35e-93) (/ (- -1.0 x) B) (if (<= F 6.5e+190) (/ x (- B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.35e-93) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.5e+190) {
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 (f <= (-2.35d-93)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6.5d+190) 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 (F <= -2.35e-93) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.5e+190) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.35e-93: tmp = (-1.0 - x) / B elif F <= 6.5e+190: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.35e-93) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6.5e+190) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.35e-93) tmp = (-1.0 - x) / B; elseif (F <= 6.5e+190) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.35e-93], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.5e+190], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.35 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{+190}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -2.35e-93Initial program 70.3%
Simplified83.0%
Taylor expanded in F around inf 48.8%
div-inv48.8%
add-sqr-sqrt18.6%
sqrt-unprod60.0%
frac-times59.9%
metadata-eval59.9%
metadata-eval59.9%
frac-times60.0%
sqrt-unprod52.3%
add-sqr-sqrt86.4%
Applied egg-rr86.4%
Taylor expanded in B around 0 39.3%
associate-*r/39.3%
neg-mul-139.3%
distribute-neg-in39.3%
metadata-eval39.3%
unsub-neg39.3%
Simplified39.3%
if -2.35e-93 < F < 6.5000000000000001e190Initial program 96.8%
Simplified98.9%
Taylor expanded in F around inf 53.2%
Taylor expanded in B around 0 26.8%
Taylor expanded in x around inf 30.0%
associate-*r/30.0%
neg-mul-130.0%
Simplified30.0%
if 6.5000000000000001e190 < F Initial program 29.0%
Simplified37.5%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 40.4%
Taylor expanded in x around 0 33.1%
Final simplification33.5%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 80.9%
Simplified87.3%
Taylor expanded in F around inf 56.4%
Taylor expanded in B around 0 27.0%
Taylor expanded in x around 0 9.2%
herbie shell --seed 2024154
(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))))))