
(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 21 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 -3.5e+18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 80000000.0)
(- (* 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 <= -3.5e+18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 80000000.0) {
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 <= -3.5e+18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 80000000.0) 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, -3.5e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 80000000.0], 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 -3.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 80000000:\\
\;\;\;\;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 < -3.5e18Initial program 44.4%
Simplified63.4%
clear-num63.4%
inv-pow63.4%
fma-define63.4%
fma-undefine63.4%
*-commutative63.4%
fma-define63.4%
fma-define63.4%
Applied egg-rr63.4%
unpow-163.4%
Simplified63.4%
Taylor expanded in F around -inf 99.9%
if -3.5e18 < F < 8e7Initial program 99.4%
Simplified99.6%
if 8e7 < F Initial program 54.5%
Simplified68.8%
clear-num68.7%
inv-pow68.7%
fma-define68.7%
fma-undefine68.7%
*-commutative68.7%
fma-define68.7%
fma-define68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.8e+51)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 80000000.0)
(- (/ (/ F (sin B)) (sqrt (fma 2.0 x (fma F F 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.8e+51) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 80000000.0) {
tmp = ((F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.8e+51) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 80000000.0) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e+51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 80000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{+51}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 80000000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.80000000000000005e51Initial program 41.4%
Simplified61.4%
clear-num61.5%
inv-pow61.5%
fma-define61.5%
fma-undefine61.5%
*-commutative61.5%
fma-define61.5%
fma-define61.5%
Applied egg-rr61.5%
unpow-161.5%
Simplified61.5%
Taylor expanded in F around -inf 99.9%
if -1.80000000000000005e51 < F < 8e7Initial program 99.4%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
un-div-inv99.6%
div-inv99.6%
pow-flip99.6%
metadata-eval99.6%
pow1/299.6%
Applied egg-rr99.6%
associate-/r*99.5%
Simplified99.5%
if 8e7 < F Initial program 54.5%
Simplified68.8%
clear-num68.7%
inv-pow68.7%
fma-define68.7%
fma-undefine68.7%
*-commutative68.7%
fma-define68.7%
fma-define68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.2e-18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 42000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.2e-18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 42000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9.2d-18)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 42000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -9.2e-18) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 42000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.2e-18: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 42000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.2e-18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 42000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.2e-18) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 42000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.2e-18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 42000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.2 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 42000000:\\
\;\;\;\;\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 < -9.2000000000000004e-18Initial program 47.0%
Simplified65.1%
clear-num65.1%
inv-pow65.1%
fma-define65.1%
fma-undefine65.1%
*-commutative65.1%
fma-define65.1%
fma-define65.1%
Applied egg-rr65.1%
unpow-165.1%
Simplified65.1%
Taylor expanded in F around -inf 99.9%
if -9.2000000000000004e-18 < F < 4.2e7Initial program 99.4%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
if 4.2e7 < F Initial program 54.5%
Simplified68.8%
clear-num68.7%
inv-pow68.7%
fma-define68.7%
fma-undefine68.7%
*-commutative68.7%
fma-define68.7%
fma-define68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.2e-18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 20000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.2e-18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 20000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9.2d-18)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 20000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -9.2e-18) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 20000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.2e-18: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 20000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.2e-18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 20000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.2e-18) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 20000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.2e-18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.2 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\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 < -9.2000000000000004e-18Initial program 47.0%
Simplified65.1%
clear-num65.1%
inv-pow65.1%
fma-define65.1%
fma-undefine65.1%
*-commutative65.1%
fma-define65.1%
fma-define65.1%
Applied egg-rr65.1%
unpow-165.1%
Simplified65.1%
Taylor expanded in F around -inf 99.9%
if -9.2000000000000004e-18 < F < 2e7Initial program 99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
if 2e7 < F Initial program 54.5%
Simplified68.8%
clear-num68.7%
inv-pow68.7%
fma-define68.7%
fma-undefine68.7%
*-commutative68.7%
fma-define68.7%
fma-define68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.92)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ F (* (sin B) (* F (+ 1.0 (/ 1.0 (pow F 2.0)))))) 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 <= 0.92) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (F / (sin(B) * (F * (1.0 + (1.0 / pow(F, 2.0)))))) - 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 <= 0.92d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (f / (sin(b) * (f * (1.0d0 + (1.0d0 / (f ** 2.0d0)))))) - 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 <= 0.92) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (F / (Math.sin(B) * (F * (1.0 + (1.0 / Math.pow(F, 2.0)))))) - 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 <= 0.92: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (F / (math.sin(B) * (F * (1.0 + (1.0 / math.pow(F, 2.0)))))) - 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 <= 0.92) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(F / Float64(sin(B) * Float64(F * Float64(1.0 + Float64(1.0 / (F ^ 2.0)))))) - 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 <= 0.92) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (F / (sin(B) * (F * (1.0 + (1.0 / (F ^ 2.0)))))) - 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, 0.92], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(F * N[(1.0 + N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 0.92:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(F \cdot \left(1 + \frac{1}{{F}^{2}}\right)\right)} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 45.3%
Simplified64.0%
clear-num64.0%
inv-pow64.0%
fma-define64.0%
fma-undefine64.0%
*-commutative64.0%
fma-define64.0%
fma-define64.0%
Applied egg-rr64.0%
unpow-164.0%
Simplified64.0%
Taylor expanded in F around -inf 99.9%
if -1.3999999999999999 < F < 0.92000000000000004Initial program 99.4%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.8%
if 0.92000000000000004 < F Initial program 55.6%
Simplified69.5%
clear-num69.5%
inv-pow69.5%
fma-define69.5%
fma-undefine69.5%
*-commutative69.5%
fma-define69.5%
fma-define69.5%
Applied egg-rr69.5%
unpow-169.5%
Simplified69.5%
Taylor expanded in x around 0 69.2%
+-commutative69.2%
unpow269.2%
fma-undefine69.2%
Simplified69.2%
un-div-inv69.2%
*-commutative69.2%
Applied egg-rr69.2%
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.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* 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.4) {
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.4d0) 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.4) {
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.4: 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.4) 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.4) 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.4], 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.4:\\
\;\;\;\;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 45.3%
Simplified64.0%
clear-num64.0%
inv-pow64.0%
fma-define64.0%
fma-undefine64.0%
*-commutative64.0%
fma-define64.0%
fma-define64.0%
Applied egg-rr64.0%
unpow-164.0%
Simplified64.0%
Taylor expanded in F around -inf 99.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.8%
if 1.3999999999999999 < F Initial program 55.6%
Simplified69.5%
clear-num69.5%
inv-pow69.5%
fma-define69.5%
fma-undefine69.5%
*-commutative69.5%
fma-define69.5%
fma-define69.5%
Applied egg-rr69.5%
unpow-169.5%
Simplified69.5%
Taylor expanded in F around inf 99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (- (* (/ F (sin B)) t_0) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -7.5e-149)
t_1
(if (<= F 1e-148)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 9500.0) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = ((F / sin(B)) * t_0) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -7.5e-149) {
tmp = t_1;
} else if (F <= 1e-148) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 9500.0) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = ((f / sin(b)) * t_0) - (x / b)
t_2 = x / tan(b)
if (f <= (-3.1d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-7.5d-149)) then
tmp = t_1
else if (f <= 1d-148) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 9500.0d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = ((F / Math.sin(B)) * t_0) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -7.5e-149) {
tmp = t_1;
} else if (F <= 1e-148) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 9500.0) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = ((F / math.sin(B)) * t_0) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -3.1e-16: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -7.5e-149: tmp = t_1 elif F <= 1e-148: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 9500.0: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -7.5e-149) tmp = t_1; elseif (F <= 1e-148) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 9500.0) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = ((F / sin(B)) * t_0) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -3.1e-16) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -7.5e-149) tmp = t_1; elseif (F <= 1e-148) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 9500.0) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -7.5e-149], t$95$1, If[LessEqual[F, 1e-148], 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, 9500.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 10^{-148}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 9500:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_2\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Simplified64.5%
clear-num64.6%
inv-pow64.6%
fma-define64.6%
fma-undefine64.6%
*-commutative64.6%
fma-define64.6%
fma-define64.6%
Applied egg-rr64.6%
unpow-164.6%
Simplified64.6%
Taylor expanded in F around -inf 99.9%
if -3.1000000000000001e-16 < F < -7.49999999999999995e-149 or 9.99999999999999936e-149 < F < 9500Initial program 99.2%
Taylor expanded in B around 0 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
if -7.49999999999999995e-149 < F < 9.99999999999999936e-149Initial program 99.5%
div-inv99.7%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 89.3%
if 9500 < F Initial program 54.5%
Simplified68.8%
clear-num68.7%
inv-pow68.7%
fma-define68.7%
fma-undefine68.7%
*-commutative68.7%
fma-define68.7%
fma-define68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.9%
Final simplification94.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.1e-150)
t_0
(if (<= F 4.5e-150)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 4100000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.1e-150) {
tmp = t_0;
} else if (F <= 4.5e-150) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 4100000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-3.1d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.1d-150)) then
tmp = t_0
else if (f <= 4.5d-150) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 4100000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.1e-150) {
tmp = t_0;
} else if (F <= 4.5e-150) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 4100000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -3.1e-16: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.1e-150: tmp = t_0 elif F <= 4.5e-150: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 4100000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.1e-150) tmp = t_0; elseif (F <= 4.5e-150) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 4100000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -3.1e-16) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.1e-150) tmp = t_0; elseif (F <= 4.5e-150) tmp = (x * cos(B)) / -sin(B); elseif (F <= 4100000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.1e-150], t$95$0, If[LessEqual[F, 4.5e-150], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 4100000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-150}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 4100000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Simplified64.5%
clear-num64.6%
inv-pow64.6%
fma-define64.6%
fma-undefine64.6%
*-commutative64.6%
fma-define64.6%
fma-define64.6%
Applied egg-rr64.6%
unpow-164.6%
Simplified64.6%
Taylor expanded in F around -inf 99.9%
if -3.1000000000000001e-16 < F < -1.1e-150 or 4.5000000000000002e-150 < F < 4.1e6Initial program 99.2%
Taylor expanded in B around 0 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
if -1.1e-150 < F < 4.5000000000000002e-150Initial program 99.5%
Taylor expanded in F around -inf 33.6%
Taylor expanded in x around inf 81.3%
if 4.1e6 < F Initial program 54.5%
Simplified68.8%
clear-num68.7%
inv-pow68.7%
fma-define68.7%
fma-undefine68.7%
*-commutative68.7%
fma-define68.7%
fma-define68.7%
Applied egg-rr68.7%
unpow-168.7%
Simplified68.7%
Taylor expanded in F around inf 99.9%
Final simplification92.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -5.2e-150)
(- (* (/ F B) (/ 1.0 (sqrt (fma 2.0 x 2.0)))) (/ x B))
(if (<= F 2.6e-25)
(/ (* x (cos B)) (- (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 <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -5.2e-150) {
tmp = ((F / B) * (1.0 / sqrt(fma(2.0, x, 2.0)))) - (x / B);
} else if (F <= 2.6e-25) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -5.2e-150) tmp = Float64(Float64(Float64(F / B) * Float64(1.0 / sqrt(fma(2.0, x, 2.0)))) - Float64(x / B)); elseif (F <= 2.6e-25) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -5.2e-150], N[(N[(N[(F / B), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-25], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[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 -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-150}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Simplified64.5%
clear-num64.6%
inv-pow64.6%
fma-define64.6%
fma-undefine64.6%
*-commutative64.6%
fma-define64.6%
fma-define64.6%
Applied egg-rr64.6%
unpow-164.6%
Simplified64.6%
Taylor expanded in F around -inf 99.9%
if -3.1000000000000001e-16 < F < -5.1999999999999995e-150Initial program 99.3%
Simplified99.6%
Taylor expanded in B around 0 69.7%
Taylor expanded in F around 0 69.6%
mul-1-neg69.6%
+-commutative69.6%
unsub-neg69.6%
*-commutative69.6%
Simplified69.6%
sqrt-div69.9%
metadata-eval69.9%
+-commutative69.9%
fma-define69.9%
Applied egg-rr69.9%
if -5.1999999999999995e-150 < F < 2.6e-25Initial program 99.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in x around inf 74.5%
if 2.6e-25 < F Initial program 58.7%
Simplified71.6%
clear-num71.6%
inv-pow71.6%
fma-define71.6%
fma-undefine71.6%
*-commutative71.6%
fma-define71.6%
fma-define71.6%
Applied egg-rr71.6%
unpow-171.6%
Simplified71.6%
Taylor expanded in F around inf 95.1%
Final simplification86.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -9.2e-150)
(- (/ (* F (sqrt 0.5)) B) (/ x B))
(if (<= F 9.8e-30)
(/ (* x (cos B)) (- (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 <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -9.2e-150) {
tmp = ((F * sqrt(0.5)) / B) - (x / B);
} else if (F <= 9.8e-30) {
tmp = (x * cos(B)) / -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 <= (-3.1d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-9.2d-150)) then
tmp = ((f * sqrt(0.5d0)) / b) - (x / b)
else if (f <= 9.8d-30) then
tmp = (x * cos(b)) / -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 <= -3.1e-16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -9.2e-150) {
tmp = ((F * Math.sqrt(0.5)) / B) - (x / B);
} else if (F <= 9.8e-30) {
tmp = (x * Math.cos(B)) / -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 <= -3.1e-16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -9.2e-150: tmp = ((F * math.sqrt(0.5)) / B) - (x / B) elif F <= 9.8e-30: tmp = (x * math.cos(B)) / -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 <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -9.2e-150) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - Float64(x / B)); elseif (F <= 9.8e-30) tmp = Float64(Float64(x * cos(B)) / Float64(-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 <= -3.1e-16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -9.2e-150) tmp = ((F * sqrt(0.5)) / B) - (x / B); elseif (F <= 9.8e-30) tmp = (x * cos(B)) / -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, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -9.2e-150], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.8e-30], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[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 -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{-150}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.8 \cdot 10^{-30}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Simplified64.5%
clear-num64.6%
inv-pow64.6%
fma-define64.6%
fma-undefine64.6%
*-commutative64.6%
fma-define64.6%
fma-define64.6%
Applied egg-rr64.6%
unpow-164.6%
Simplified64.6%
Taylor expanded in F around -inf 99.9%
if -3.1000000000000001e-16 < F < -9.20000000000000011e-150Initial program 99.3%
Simplified99.6%
Taylor expanded in B around 0 69.7%
Taylor expanded in F around 0 69.6%
mul-1-neg69.6%
+-commutative69.6%
unsub-neg69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around 0 69.7%
if -9.20000000000000011e-150 < F < 9.79999999999999942e-30Initial program 99.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in x around inf 74.5%
if 9.79999999999999942e-30 < F Initial program 58.7%
Simplified71.6%
clear-num71.6%
inv-pow71.6%
fma-define71.6%
fma-undefine71.6%
*-commutative71.6%
fma-define71.6%
fma-define71.6%
Applied egg-rr71.6%
unpow-171.6%
Simplified71.6%
Taylor expanded in F around inf 95.1%
Final simplification86.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -6e-150)
(- (/ (* F (sqrt 0.5)) B) (/ x B))
(if (<= F 1.1e-31) (/ (* x (cos B)) (- (sin B))) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -6e-150) {
tmp = ((F * sqrt(0.5)) / B) - (x / B);
} else if (F <= 1.1e-31) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.1d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-6d-150)) then
tmp = ((f * sqrt(0.5d0)) / b) - (x / b)
else if (f <= 1.1d-31) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -6e-150) {
tmp = ((F * Math.sqrt(0.5)) / B) - (x / B);
} else if (F <= 1.1e-31) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.1e-16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -6e-150: tmp = ((F * math.sqrt(0.5)) / B) - (x / B) elif F <= 1.1e-31: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -6e-150) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - Float64(x / B)); elseif (F <= 1.1e-31) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.1e-16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -6e-150) tmp = ((F * sqrt(0.5)) / B) - (x / B); elseif (F <= 1.1e-31) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -6e-150], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-31], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -6 \cdot 10^{-150}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-31}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Simplified64.5%
clear-num64.6%
inv-pow64.6%
fma-define64.6%
fma-undefine64.6%
*-commutative64.6%
fma-define64.6%
fma-define64.6%
Applied egg-rr64.6%
unpow-164.6%
Simplified64.6%
Taylor expanded in F around -inf 99.9%
if -3.1000000000000001e-16 < F < -6.0000000000000003e-150Initial program 99.3%
Simplified99.6%
Taylor expanded in B around 0 69.7%
Taylor expanded in F around 0 69.6%
mul-1-neg69.6%
+-commutative69.6%
unsub-neg69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around 0 69.7%
if -6.0000000000000003e-150 < F < 1.10000000000000005e-31Initial program 99.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in x around inf 74.5%
if 1.10000000000000005e-31 < F Initial program 58.7%
Simplified71.6%
clear-num71.6%
inv-pow71.6%
fma-define71.6%
fma-undefine71.6%
*-commutative71.6%
fma-define71.6%
fma-define71.6%
Applied egg-rr71.6%
unpow-171.6%
Simplified71.6%
Taylor expanded in F around inf 95.1%
Taylor expanded in B around 0 71.6%
Final simplification79.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.2e-148)
(- (/ (* F (sqrt 0.5)) B) (/ x B))
(if (<= F 6.3e-28)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.2e-148) {
tmp = ((F * sqrt(0.5)) / B) - (x / B);
} else if (F <= 6.3e-28) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d-16)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.2d-148)) then
tmp = ((f * sqrt(0.5d0)) / b) - (x / b)
else if (f <= 6.3d-28) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.2e-148) {
tmp = ((F * Math.sqrt(0.5)) / B) - (x / B);
} else if (F <= 6.3e-28) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e-16: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.2e-148: tmp = ((F * math.sqrt(0.5)) / B) - (x / B) elif F <= 6.3e-28: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.2e-148) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - Float64(x / B)); elseif (F <= 6.3e-28) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e-16) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.2e-148) tmp = ((F * sqrt(0.5)) / B) - (x / B); elseif (F <= 6.3e-28) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.2e-148], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.3e-28], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.3 \cdot 10^{-28}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.9%
associate-*r/27.6%
neg-mul-127.6%
Simplified80.9%
if -3.1000000000000001e-16 < F < -6.2000000000000003e-148Initial program 99.3%
Simplified99.6%
Taylor expanded in B around 0 69.7%
Taylor expanded in F around 0 69.6%
mul-1-neg69.6%
+-commutative69.6%
unsub-neg69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around 0 69.7%
if -6.2000000000000003e-148 < F < 6.2999999999999997e-28Initial program 99.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in x around inf 74.5%
if 6.2999999999999997e-28 < F Initial program 58.7%
Simplified71.6%
clear-num71.6%
inv-pow71.6%
fma-define71.6%
fma-undefine71.6%
*-commutative71.6%
fma-define71.6%
fma-define71.6%
Applied egg-rr71.6%
unpow-171.6%
Simplified71.6%
Taylor expanded in F around inf 95.1%
Taylor expanded in B around 0 71.6%
Final simplification74.5%
(FPCore (F B x)
:precision binary64
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -7e-192)
(- (/ (* F (sqrt 0.5)) B) (/ x B))
(if (<= F 6.5e-35)
(* x (/ (cos B) (- (sin B))))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -7e-192) {
tmp = ((F * sqrt(0.5)) / B) - (x / B);
} else if (F <= 6.5e-35) {
tmp = x * (cos(B) / -sin(B));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d-16)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-7d-192)) then
tmp = ((f * sqrt(0.5d0)) / b) - (x / b)
else if (f <= 6.5d-35) then
tmp = x * (cos(b) / -sin(b))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -7e-192) {
tmp = ((F * Math.sqrt(0.5)) / B) - (x / B);
} else if (F <= 6.5e-35) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e-16: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -7e-192: tmp = ((F * math.sqrt(0.5)) / B) - (x / B) elif F <= 6.5e-35: tmp = x * (math.cos(B) / -math.sin(B)) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -7e-192) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - Float64(x / B)); elseif (F <= 6.5e-35) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e-16) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -7e-192) tmp = ((F * sqrt(0.5)) / B) - (x / B); elseif (F <= 6.5e-35) tmp = x * (cos(B) / -sin(B)); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-192], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-35], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-192}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-35}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.9%
associate-*r/27.6%
neg-mul-127.6%
Simplified80.9%
if -3.1000000000000001e-16 < F < -7.00000000000000029e-192Initial program 99.4%
Simplified99.6%
Taylor expanded in B around 0 71.9%
Taylor expanded in F around 0 71.8%
mul-1-neg71.8%
+-commutative71.8%
unsub-neg71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in x around 0 71.9%
if -7.00000000000000029e-192 < F < 6.4999999999999999e-35Initial program 99.4%
Taylor expanded in F around -inf 29.3%
Taylor expanded in x around inf 73.7%
mul-1-neg73.7%
associate-/l*73.6%
distribute-lft-neg-in73.6%
Simplified73.6%
if 6.4999999999999999e-35 < F Initial program 58.7%
Simplified71.6%
clear-num71.6%
inv-pow71.6%
fma-define71.6%
fma-undefine71.6%
*-commutative71.6%
fma-define71.6%
fma-define71.6%
Applied egg-rr71.6%
unpow-171.6%
Simplified71.6%
Taylor expanded in F around inf 95.1%
Taylor expanded in B around 0 71.6%
Final simplification74.4%
(FPCore (F B x)
:precision binary64
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.05e-217)
(- (/ (* F (sqrt 0.5)) B) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.05e-217) {
tmp = ((F * sqrt(0.5)) / B) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d-16)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.05d-217) then
tmp = ((f * sqrt(0.5d0)) / b) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.05e-217) {
tmp = ((F * Math.sqrt(0.5)) / B) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e-16: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.05e-217: tmp = ((F * math.sqrt(0.5)) / B) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.05e-217) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e-16) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.05e-217) tmp = ((F * sqrt(0.5)) / B) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-217], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-217}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.9%
associate-*r/27.6%
neg-mul-127.6%
Simplified80.9%
if -3.1000000000000001e-16 < F < 1.05e-217Initial program 99.5%
Simplified99.6%
Taylor expanded in B around 0 63.1%
Taylor expanded in F around 0 63.1%
mul-1-neg63.1%
+-commutative63.1%
unsub-neg63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in x around 0 63.2%
if 1.05e-217 < F Initial program 70.1%
Simplified79.5%
clear-num79.5%
inv-pow79.5%
fma-define79.5%
fma-undefine79.5%
*-commutative79.5%
fma-define79.5%
fma-define79.5%
Applied egg-rr79.5%
unpow-179.5%
Simplified79.5%
Taylor expanded in F around inf 75.0%
Taylor expanded in B around 0 64.5%
Final simplification68.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.1e-16)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.5e-218)
(- (* (sqrt 0.5) (/ F B)) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.5e-218) {
tmp = (sqrt(0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d-16)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.5d-218) then
tmp = (sqrt(0.5d0) * (f / b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-16) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.5e-218) {
tmp = (Math.sqrt(0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e-16: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.5e-218: tmp = (math.sqrt(0.5) * (F / B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e-16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.5e-218) tmp = Float64(Float64(sqrt(0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e-16) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.5e-218) tmp = (sqrt(0.5) * (F / B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-218], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-218}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.1000000000000001e-16Initial program 46.2%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.9%
associate-*r/27.6%
neg-mul-127.6%
Simplified80.9%
if -3.1000000000000001e-16 < F < 4.49999999999999977e-218Initial program 99.5%
Simplified99.6%
Taylor expanded in B around 0 63.1%
Taylor expanded in F around 0 63.1%
mul-1-neg63.1%
+-commutative63.1%
unsub-neg63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in x around 0 63.1%
if 4.49999999999999977e-218 < F Initial program 70.1%
Simplified79.5%
clear-num79.5%
inv-pow79.5%
fma-define79.5%
fma-undefine79.5%
*-commutative79.5%
fma-define79.5%
fma-define79.5%
Applied egg-rr79.5%
unpow-179.5%
Simplified79.5%
Taylor expanded in F around inf 75.0%
Taylor expanded in B around 0 64.5%
Final simplification68.0%
(FPCore (F B x) :precision binary64 (if (<= F -0.029) (- (/ -1.0 (sin B)) (/ x B)) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.029) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.029d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.029) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.029: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.029) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.029) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.029], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.029:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.0290000000000000015Initial program 45.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 82.2%
associate-*r/27.9%
neg-mul-127.9%
Simplified82.2%
if -0.0290000000000000015 < F Initial program 81.5%
Simplified87.3%
clear-num87.3%
inv-pow87.3%
fma-define87.3%
fma-undefine87.3%
*-commutative87.3%
fma-define87.3%
fma-define87.3%
Applied egg-rr87.3%
unpow-187.3%
Simplified87.3%
Taylor expanded in F around inf 59.1%
Taylor expanded in B around 0 55.8%
Final simplification62.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.2) (/ (- -1.0 x) B) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2) {
tmp = (-1.0 - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.2d0)) then
tmp = ((-1.0d0) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.2) {
tmp = (-1.0 - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2: tmp = (-1.0 - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.2) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.2) tmp = (-1.0 - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.19999999999999996Initial program 45.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 60.8%
associate-*r/60.8%
distribute-lft-in60.8%
metadata-eval60.8%
neg-mul-160.8%
unsub-neg60.8%
Simplified60.8%
if -1.19999999999999996 < F Initial program 81.5%
Simplified87.3%
clear-num87.3%
inv-pow87.3%
fma-define87.3%
fma-undefine87.3%
*-commutative87.3%
fma-define87.3%
fma-define87.3%
Applied egg-rr87.3%
unpow-187.3%
Simplified87.3%
Taylor expanded in F around inf 59.1%
Taylor expanded in B around 0 55.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.1e-45) (/ (- -1.0 x) B) (if (<= F 1.1e-29) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-45) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.1e-29) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.1d-45)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.1d-29) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-45) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.1e-29) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e-45: tmp = (-1.0 - x) / B elif F <= 1.1e-29: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e-45) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.1e-29) 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.1e-45) tmp = (-1.0 - x) / B; elseif (F <= 1.1e-29) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e-45], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.1e-29], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{-45}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.09999999999999997e-45Initial program 53.7%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 55.2%
associate-*r/55.2%
distribute-lft-in55.2%
metadata-eval55.2%
neg-mul-155.2%
unsub-neg55.2%
Simplified55.2%
if -1.09999999999999997e-45 < F < 1.09999999999999995e-29Initial program 99.4%
Simplified99.6%
Taylor expanded in B around 0 54.7%
Taylor expanded in F around 0 39.3%
associate-*r/39.3%
neg-mul-139.3%
Simplified39.3%
if 1.09999999999999995e-29 < F Initial program 58.7%
Simplified71.6%
Taylor expanded in B around 0 42.1%
Taylor expanded in F around inf 56.7%
Final simplification49.5%
(FPCore (F B x) :precision binary64 (if (<= F -4.1e-44) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e-44) {
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 <= (-4.1d-44)) 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 <= -4.1e-44) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.1e-44: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.1e-44) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.1e-44) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.1e-44], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.1 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -4.09999999999999992e-44Initial program 53.7%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 55.2%
associate-*r/55.2%
distribute-lft-in55.2%
metadata-eval55.2%
neg-mul-155.2%
unsub-neg55.2%
Simplified55.2%
if -4.09999999999999992e-44 < F Initial program 80.5%
Simplified86.6%
Taylor expanded in B around 0 48.8%
Taylor expanded in F around 0 34.5%
associate-*r/34.5%
neg-mul-134.5%
Simplified34.5%
Final simplification40.3%
(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(x / Float64(-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 73.0%
Simplified81.9%
Taylor expanded in B around 0 46.4%
Taylor expanded in F around 0 31.9%
associate-*r/31.9%
neg-mul-131.9%
Simplified31.9%
Final simplification31.9%
(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(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 73.0%
Simplified81.9%
Taylor expanded in B around 0 46.4%
Taylor expanded in F around 0 31.9%
associate-*r/31.9%
neg-mul-131.9%
Simplified31.9%
add-sqr-sqrt9.5%
sqrt-unprod8.8%
sqr-neg8.8%
sqrt-unprod1.4%
add-sqr-sqrt2.9%
*-un-lft-identity2.9%
Applied egg-rr2.9%
*-lft-identity2.9%
Simplified2.9%
herbie shell --seed 2024135
(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))))))