
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3700000.0)
(- (/ 1.0 (/ (/ (sin B) F) (pow (fma 2.0 x (fma F F 2.0)) -0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3700000.0) {
tmp = (1.0 / ((sin(B) / F) / pow(fma(2.0, x, fma(F, F, 2.0)), -0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3700000.0) tmp = Float64(Float64(1.0 / Float64(Float64(sin(B) / F) / (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3700000.0], N[(N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision] / N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3700000:\\
\;\;\;\;\frac{1}{\frac{\frac{\sin B}{F}}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2e16Initial program 53.2%
Simplified72.3%
Taylor expanded in F around -inf 99.9%
if -2e16 < F < 3.7e6Initial program 99.3%
Simplified99.5%
associate-*r/99.6%
clear-num99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
inv-pow99.5%
associate-/r*99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
if 3.7e6 < F Initial program 57.7%
Simplified80.5%
Taylor expanded in F around inf 100.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -10000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.15e+15)
(- (* 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 <= -10000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.15e+15) {
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 <= -10000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.15e+15) 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, -10000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.15e+15], 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 -10000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{+15}:\\
\;\;\;\;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 < -1e10Initial program 55.1%
Simplified73.4%
Taylor expanded in F around -inf 99.8%
if -1e10 < F < 2.15e15Initial program 99.4%
Simplified99.6%
if 2.15e15 < F Initial program 55.5%
Simplified79.5%
Taylor expanded in F around inf 100.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.2e+14)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.15e+15)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ -1.0 (/ (tan B) x)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.2e+14) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.15e+15) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (tan(B) / x));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.2d+14)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.15d+15) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + ((-1.0d0) / (tan(b) / x))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.2e+14) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.15e+15) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (Math.tan(B) / x));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.2e+14: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.15e+15: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (math.tan(B) / x)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.2e+14) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.15e+15) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(-1.0 / Float64(tan(B) / x))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.2e+14) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.15e+15) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (-1.0 / (tan(B) / x)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.15e+15], 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[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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 -4.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{+15}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.2e14Initial program 53.9%
Simplified72.7%
Taylor expanded in F around -inf 99.9%
if -4.2e14 < F < 2.15e15Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.4%
un-div-inv99.4%
Applied egg-rr99.4%
if 2.15e15 < F Initial program 55.5%
Simplified79.5%
Taylor expanded in F around inf 100.0%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.2e+14)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4e+15)
(+
(* (/ 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 <= -4.2e+14) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4e+15) {
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 <= (-4.2d+14)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4d+15) 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 <= -4.2e+14) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4e+15) {
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 <= -4.2e+14: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4e+15: 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 <= -4.2e+14) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4e+15) 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 <= -4.2e+14) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4e+15) 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, -4.2e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4e+15], 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 -4.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\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 < -4.2e14Initial program 53.9%
Simplified72.7%
Taylor expanded in F around -inf 99.9%
if -4.2e14 < F < 4e15Initial program 99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
if 4e15 < F Initial program 55.5%
Simplified79.5%
Taylor expanded in F around inf 100.0%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -27500000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-10)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -27500000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-10) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= (-27500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-10) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / 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 <= -27500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-10) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= -27500000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-10: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= -27500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-10) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / 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 <= -27500000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-10) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / 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, -27500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-10], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -27500000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.75e7Initial program 56.3%
Simplified74.1%
Taylor expanded in F around -inf 99.8%
if -2.75e7 < F < 1.40000000000000008e-10Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 98.2%
*-commutative98.2%
Simplified98.2%
if 1.40000000000000008e-10 < F Initial program 59.7%
Simplified81.4%
Taylor expanded in F around inf 99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -27500000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-10)
(- (/ (* 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 <= -27500000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-10) {
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 <= (-27500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-10) 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 <= -27500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-10) {
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 <= -27500000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-10: 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 <= -27500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-10) tmp = Float64(Float64(Float64(F * 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 <= -27500000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-10) 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, -27500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-10], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $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 -27500000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.75e7Initial program 56.3%
Simplified74.1%
Taylor expanded in F around -inf 99.8%
if -2.75e7 < F < 1.40000000000000008e-10Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in x around 0 98.1%
if 1.40000000000000008e-10 < F Initial program 59.7%
Simplified81.4%
Taylor expanded in F around inf 99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -27500000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-10)
(- (* 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 <= -27500000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-10) {
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 <= (-27500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-10) 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 <= -27500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-10) {
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 <= -27500000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-10: 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 <= -27500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-10) 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 <= -27500000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-10) 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, -27500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-10], 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 -27500000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.75e7Initial program 56.3%
Simplified74.1%
Taylor expanded in F around -inf 99.8%
if -2.75e7 < F < 1.40000000000000008e-10Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in x around 0 98.1%
associate-/l*98.1%
Simplified98.1%
if 1.40000000000000008e-10 < F Initial program 59.7%
Simplified81.4%
Taylor expanded in F around inf 99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* F (/ (sqrt 0.5) (sin B))) (/ x B))) (t_1 (/ x (tan B))))
(if (<= F -0.000195)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -9.5e-253)
t_0
(if (<= F 1.02e-227)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.4e-10) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F * (sqrt(0.5) / sin(B))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.000195) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -9.5e-253) {
tmp = t_0;
} else if (F <= 1.02e-227) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.4e-10) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.000195d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-9.5d-253)) then
tmp = t_0
else if (f <= 1.02d-227) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.4d-10) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.000195) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -9.5e-253) {
tmp = t_0;
} else if (F <= 1.02e-227) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.4e-10) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.000195: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -9.5e-253: tmp = t_0 elif F <= 1.02e-227: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.4e-10: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000195) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -9.5e-253) tmp = t_0; elseif (F <= 1.02e-227) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.4e-10) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F * (sqrt(0.5) / sin(B))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.000195) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -9.5e-253) tmp = t_0; elseif (F <= 1.02e-227) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.4e-10) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000195], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -9.5e-253], t$95$0, If[LessEqual[F, 1.02e-227], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.4e-10], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000195:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-253}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{-227}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.94999999999999996e-4Initial program 59.1%
Simplified75.7%
Taylor expanded in F around -inf 97.7%
if -1.94999999999999996e-4 < F < -9.5e-253 or 1.02e-227 < F < 1.40000000000000008e-10Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in B around 0 79.5%
if -9.5e-253 < F < 1.02e-227Initial program 99.3%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in F around 0 99.6%
mul-1-neg99.6%
Simplified99.6%
if 1.40000000000000008e-10 < F Initial program 59.7%
Simplified81.4%
Taylor expanded in F around inf 99.1%
Final simplification92.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.000165)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.75e-185)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0)))))) x) B)
(if (<= F 2.3e-226)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.35e-10)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ 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 <= -0.000165) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.75e-185) {
tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else if (F <= 2.3e-226) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.35e-10) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (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 <= (-0.000165d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.75d-185)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0)))))) - x) / b
else if (f <= 2.3d-226) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.35d-10) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (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 <= -0.000165) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.75e-185) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else if (F <= 2.3e-226) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.35e-10) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (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 <= -0.000165: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.75e-185: tmp = ((F * math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B elif F <= 2.3e-226: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.35e-10: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (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 <= -0.000165) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.75e-185) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0)))))) - x) / B); elseif (F <= 2.3e-226) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.35e-10) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - 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 <= -0.000165) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.75e-185) tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B; elseif (F <= 2.3e-226) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.35e-10) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (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, -0.000165], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.75e-185], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.3e-226], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.35e-10], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $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 -0.000165:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -2.75 \cdot 10^{-185}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-226}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-10}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.65e-4Initial program 59.1%
Simplified75.7%
Taylor expanded in F around -inf 97.7%
if -1.65e-4 < F < -2.7499999999999999e-185Initial program 99.5%
Simplified99.5%
Taylor expanded in B around 0 68.0%
pow268.0%
Applied egg-rr68.0%
if -2.7499999999999999e-185 < F < 2.3e-226Initial program 99.3%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.6%
Taylor expanded in F around 0 90.8%
mul-1-neg90.8%
Simplified90.8%
if 2.3e-226 < F < 1.35e-10Initial program 99.4%
Simplified99.5%
Taylor expanded in B around 0 62.2%
Taylor expanded in F around 0 62.2%
mul-1-neg62.2%
+-commutative62.2%
unsub-neg62.2%
*-commutative62.2%
Simplified62.2%
if 1.35e-10 < F Initial program 59.7%
Simplified81.4%
Taylor expanded in F around inf 99.1%
Final simplification88.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00098)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-10)
(- (/ (* F (sqrt 0.5)) 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 <= -0.00098) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-10) {
tmp = ((F * sqrt(0.5)) / 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 <= (-0.00098d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-10) then
tmp = ((f * sqrt(0.5d0)) / 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 <= -0.00098) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-10) {
tmp = ((F * Math.sqrt(0.5)) / 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 <= -0.00098: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-10: tmp = ((F * math.sqrt(0.5)) / 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 <= -0.00098) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-10) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / 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 <= -0.00098) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-10) tmp = ((F * sqrt(0.5)) / 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, -0.00098], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-10], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $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 -0.00098:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.7999999999999997e-4Initial program 58.6%
Simplified75.4%
Taylor expanded in F around -inf 97.7%
if -9.7999999999999997e-4 < F < 1.40000000000000008e-10Initial program 99.3%
Simplified99.6%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.1%
Taylor expanded in B around 0 86.8%
if 1.40000000000000008e-10 < F Initial program 59.7%
Simplified81.4%
Taylor expanded in F around inf 99.1%
(FPCore (F B x)
:precision binary64
(if (<= B 2.5e-20)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0)))))) x) B)
(if (<= B 2.3e+124)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(/ (* x (cos B)) (- (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (B <= 2.5e-20) {
tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else if (B <= 2.3e+124) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else {
tmp = (x * cos(B)) / -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 (b <= 2.5d-20) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0)))))) - x) / b
else if (b <= 2.3d+124) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else
tmp = (x * cos(b)) / -sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 2.5e-20) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else if (B <= 2.3e+124) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else {
tmp = (x * Math.cos(B)) / -Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 2.5e-20: tmp = ((F * math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B elif B <= 2.3e+124: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) else: tmp = (x * math.cos(B)) / -math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 2.5e-20) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0)))))) - x) / B); elseif (B <= 2.3e+124) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); else tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 2.5e-20) tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B; elseif (B <= 2.3e+124) tmp = (-1.0 / sin(B)) - (x / tan(B)); else tmp = (x * cos(B)) / -sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 2.5e-20], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, 2.3e+124], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{+124}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\end{array}
\end{array}
if B < 2.4999999999999999e-20Initial program 71.7%
Simplified85.5%
Taylor expanded in B around 0 64.0%
pow264.0%
Applied egg-rr64.0%
if 2.4999999999999999e-20 < B < 2.29999999999999985e124Initial program 95.8%
Simplified96.2%
Taylor expanded in F around -inf 63.8%
if 2.29999999999999985e124 < B Initial program 93.6%
Simplified93.8%
Taylor expanded in F around 0 57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in x around 0 63.2%
Taylor expanded in F around 0 64.7%
mul-1-neg64.7%
Simplified64.7%
Final simplification64.1%
(FPCore (F B x) :precision binary64 (if (<= B 2.5e-20) (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0)))))) x) B) (/ (* x (cos B)) (- (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 2.5e-20) {
tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else {
tmp = (x * cos(B)) / -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 (b <= 2.5d-20) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0)))))) - x) / b
else
tmp = (x * cos(b)) / -sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 2.5e-20) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else {
tmp = (x * Math.cos(B)) / -Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 2.5e-20: tmp = ((F * math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B else: tmp = (x * math.cos(B)) / -math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 2.5e-20) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0)))))) - x) / B); else tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 2.5e-20) tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B; else tmp = (x * cos(B)) / -sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 2.5e-20], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\end{array}
\end{array}
if B < 2.4999999999999999e-20Initial program 71.7%
Simplified85.5%
Taylor expanded in B around 0 64.0%
pow264.0%
Applied egg-rr64.0%
if 2.4999999999999999e-20 < B Initial program 94.6%
Simplified94.9%
Taylor expanded in F around 0 56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in x around 0 59.9%
Taylor expanded in F around 0 62.1%
mul-1-neg62.1%
Simplified62.1%
Final simplification63.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= F -0.00098)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -8.8e-256)
(- (* (sqrt 0.5) (/ F B)) (/ x B))
(if (<= F 2.2e-228)
(- (/ -1.0 B) (/ 1.0 (/ (tan B) x)))
(if (<= F 33.0)
(- (* (sqrt (/ 1.0 t_0)) (/ F B)) (/ x B))
(if (<= F 1.3e+249)
(/ (- (+ 1.0 (* -0.5 (/ t_0 (pow F 2.0)))) x) B)
(- (/ -1.0 B) (/ x (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -8.8e-256) {
tmp = (sqrt(0.5) * (F / B)) - (x / B);
} else if (F <= 2.2e-228) {
tmp = (-1.0 / B) - (1.0 / (tan(B) / x));
} else if (F <= 33.0) {
tmp = (sqrt((1.0 / t_0)) * (F / B)) - (x / B);
} else if (F <= 1.3e+249) {
tmp = ((1.0 + (-0.5 * (t_0 / pow(F, 2.0)))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
if (f <= (-0.00098d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-8.8d-256)) then
tmp = (sqrt(0.5d0) * (f / b)) - (x / b)
else if (f <= 2.2d-228) then
tmp = ((-1.0d0) / b) - (1.0d0 / (tan(b) / x))
else if (f <= 33.0d0) then
tmp = (sqrt((1.0d0 / t_0)) * (f / b)) - (x / b)
else if (f <= 1.3d+249) then
tmp = ((1.0d0 + ((-0.5d0) * (t_0 / (f ** 2.0d0)))) - x) / b
else
tmp = ((-1.0d0) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -8.8e-256) {
tmp = (Math.sqrt(0.5) * (F / B)) - (x / B);
} else if (F <= 2.2e-228) {
tmp = (-1.0 / B) - (1.0 / (Math.tan(B) / x));
} else if (F <= 33.0) {
tmp = (Math.sqrt((1.0 / t_0)) * (F / B)) - (x / B);
} else if (F <= 1.3e+249) {
tmp = ((1.0 + (-0.5 * (t_0 / Math.pow(F, 2.0)))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) tmp = 0 if F <= -0.00098: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -8.8e-256: tmp = (math.sqrt(0.5) * (F / B)) - (x / B) elif F <= 2.2e-228: tmp = (-1.0 / B) - (1.0 / (math.tan(B) / x)) elif F <= 33.0: tmp = (math.sqrt((1.0 / t_0)) * (F / B)) - (x / B) elif F <= 1.3e+249: tmp = ((1.0 + (-0.5 * (t_0 / math.pow(F, 2.0)))) - x) / B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -0.00098) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -8.8e-256) tmp = Float64(Float64(sqrt(0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.2e-228) tmp = Float64(Float64(-1.0 / B) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 33.0) tmp = Float64(Float64(sqrt(Float64(1.0 / t_0)) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.3e+249) tmp = Float64(Float64(Float64(1.0 + Float64(-0.5 * Float64(t_0 / (F ^ 2.0)))) - x) / B); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -0.00098) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -8.8e-256) tmp = (sqrt(0.5) * (F / B)) - (x / B); elseif (F <= 2.2e-228) tmp = (-1.0 / B) - (1.0 / (tan(B) / x)); elseif (F <= 33.0) tmp = (sqrt((1.0 / t_0)) * (F / B)) - (x / B); elseif (F <= 1.3e+249) tmp = ((1.0 + (-0.5 * (t_0 / (F ^ 2.0)))) - x) / B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00098], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.8e-256], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-228], N[(N[(-1.0 / B), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 33.0], N[(N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e+249], N[(N[(N[(1.0 + N[(-0.5 * N[(t$95$0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -0.00098:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-256}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-228}:\\
\;\;\;\;\frac{-1}{B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 33:\\
\;\;\;\;\sqrt{\frac{1}{t\_0}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{+249}:\\
\;\;\;\;\frac{\left(1 + -0.5 \cdot \frac{t\_0}{{F}^{2}}\right) - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.7999999999999997e-4Initial program 58.6%
Simplified75.4%
Taylor expanded in F around -inf 97.7%
Taylor expanded in B around 0 76.8%
if -9.7999999999999997e-4 < F < -8.80000000000000039e-256Initial program 99.3%
Simplified99.5%
Taylor expanded in B around 0 63.0%
Taylor expanded in F around 0 62.2%
mul-1-neg62.2%
+-commutative62.2%
unsub-neg62.2%
*-commutative62.2%
Simplified62.2%
Taylor expanded in x around 0 62.2%
if -8.80000000000000039e-256 < F < 2.2e-228Initial program 99.3%
Simplified99.7%
Taylor expanded in F around -inf 43.8%
clear-num43.9%
inv-pow43.9%
Applied egg-rr43.9%
unpow-143.9%
Simplified43.9%
Taylor expanded in B around 0 71.2%
if 2.2e-228 < F < 33Initial program 99.3%
Simplified99.5%
Taylor expanded in B around 0 60.8%
Taylor expanded in F around 0 60.8%
mul-1-neg60.8%
+-commutative60.8%
unsub-neg60.8%
*-commutative60.8%
Simplified60.8%
if 33 < F < 1.3000000000000001e249Initial program 60.0%
Simplified80.4%
Taylor expanded in B around 0 54.1%
Taylor expanded in F around inf 69.5%
if 1.3000000000000001e249 < F Initial program 54.7%
Simplified84.3%
Taylor expanded in F around -inf 84.1%
Taylor expanded in B around 0 84.4%
Final simplification69.9%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00098)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9.5e-256)
(- (* (sqrt 0.5) (/ F B)) (/ x B))
(if (<= F 6e-229)
(- (/ -1.0 B) (/ 1.0 (/ (tan B) x)))
(if (<= F 1.4e-10)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(if (<= F 2.35e+247)
(/ (- 1.0 x) B)
(- (/ -1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9.5e-256) {
tmp = (sqrt(0.5) * (F / B)) - (x / B);
} else if (F <= 6e-229) {
tmp = (-1.0 / B) - (1.0 / (tan(B) / x));
} else if (F <= 1.4e-10) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 2.35e+247) {
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 <= (-0.00098d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9.5d-256)) then
tmp = (sqrt(0.5d0) * (f / b)) - (x / b)
else if (f <= 6d-229) then
tmp = ((-1.0d0) / b) - (1.0d0 / (tan(b) / x))
else if (f <= 1.4d-10) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else if (f <= 2.35d+247) 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 <= -0.00098) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9.5e-256) {
tmp = (Math.sqrt(0.5) * (F / B)) - (x / B);
} else if (F <= 6e-229) {
tmp = (-1.0 / B) - (1.0 / (Math.tan(B) / x));
} else if (F <= 1.4e-10) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 2.35e+247) {
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 <= -0.00098: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9.5e-256: tmp = (math.sqrt(0.5) * (F / B)) - (x / B) elif F <= 6e-229: tmp = (-1.0 / B) - (1.0 / (math.tan(B) / x)) elif F <= 1.4e-10: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) elif F <= 2.35e+247: 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 <= -0.00098) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9.5e-256) tmp = Float64(Float64(sqrt(0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 6e-229) tmp = Float64(Float64(-1.0 / B) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 1.4e-10) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.35e+247) 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 <= -0.00098) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9.5e-256) tmp = (sqrt(0.5) * (F / B)) - (x / B); elseif (F <= 6e-229) tmp = (-1.0 / B) - (1.0 / (tan(B) / x)); elseif (F <= 1.4e-10) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); elseif (F <= 2.35e+247) 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, -0.00098], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-256], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-229], N[(N[(-1.0 / B), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-10], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e+247], 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 -0.00098:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-256}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-229}:\\
\;\;\;\;\frac{-1}{B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{+247}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.7999999999999997e-4Initial program 58.6%
Simplified75.4%
Taylor expanded in F around -inf 97.7%
Taylor expanded in B around 0 76.8%
if -9.7999999999999997e-4 < F < -9.5e-256Initial program 99.3%
Simplified99.5%
Taylor expanded in B around 0 63.0%
Taylor expanded in F around 0 62.2%
mul-1-neg62.2%
+-commutative62.2%
unsub-neg62.2%
*-commutative62.2%
Simplified62.2%
Taylor expanded in x around 0 62.2%
if -9.5e-256 < F < 6.00000000000000005e-229Initial program 99.3%
Simplified99.7%
Taylor expanded in F around -inf 43.8%
clear-num43.9%
inv-pow43.9%
Applied egg-rr43.9%
unpow-143.9%
Simplified43.9%
Taylor expanded in B around 0 71.2%
if 6.00000000000000005e-229 < F < 1.40000000000000008e-10Initial program 99.4%
Simplified99.5%
Taylor expanded in B around 0 62.2%
Taylor expanded in F around 0 62.2%
mul-1-neg62.2%
+-commutative62.2%
unsub-neg62.2%
*-commutative62.2%
Simplified62.2%
if 1.40000000000000008e-10 < F < 2.3500000000000001e247Initial program 60.7%
Simplified80.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 67.9%
if 2.3500000000000001e247 < F Initial program 54.7%
Simplified84.3%
Taylor expanded in F around -inf 84.1%
Taylor expanded in B around 0 84.4%
Final simplification69.8%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00098)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.55e-255)
(- (* (sqrt 0.5) (/ F B)) (/ x B))
(if (<= F 9.2e-230)
(- (/ -1.0 B) (/ 1.0 (/ (tan B) x)))
(if (<= F 1.4e-10)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 6.8e+247) (/ (- 1.0 x) B) (- (/ -1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.55e-255) {
tmp = (sqrt(0.5) * (F / B)) - (x / B);
} else if (F <= 9.2e-230) {
tmp = (-1.0 / B) - (1.0 / (tan(B) / x));
} else if (F <= 1.4e-10) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 6.8e+247) {
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 <= (-0.00098d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.55d-255)) then
tmp = (sqrt(0.5d0) * (f / b)) - (x / b)
else if (f <= 9.2d-230) then
tmp = ((-1.0d0) / b) - (1.0d0 / (tan(b) / x))
else if (f <= 1.4d-10) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 6.8d+247) 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 <= -0.00098) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.55e-255) {
tmp = (Math.sqrt(0.5) * (F / B)) - (x / B);
} else if (F <= 9.2e-230) {
tmp = (-1.0 / B) - (1.0 / (Math.tan(B) / x));
} else if (F <= 1.4e-10) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 6.8e+247) {
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 <= -0.00098: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.55e-255: tmp = (math.sqrt(0.5) * (F / B)) - (x / B) elif F <= 9.2e-230: tmp = (-1.0 / B) - (1.0 / (math.tan(B) / x)) elif F <= 1.4e-10: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 6.8e+247: 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 <= -0.00098) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.55e-255) tmp = Float64(Float64(sqrt(0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 9.2e-230) tmp = Float64(Float64(-1.0 / B) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 1.4e-10) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 6.8e+247) 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 <= -0.00098) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.55e-255) tmp = (sqrt(0.5) * (F / B)) - (x / B); elseif (F <= 9.2e-230) tmp = (-1.0 / B) - (1.0 / (tan(B) / x)); elseif (F <= 1.4e-10) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 6.8e+247) 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, -0.00098], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-255], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.2e-230], N[(N[(-1.0 / B), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-10], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.8e+247], 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 -0.00098:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-255}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-230}:\\
\;\;\;\;\frac{-1}{B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+247}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.7999999999999997e-4Initial program 58.6%
Simplified75.4%
Taylor expanded in F around -inf 97.7%
Taylor expanded in B around 0 76.8%
if -9.7999999999999997e-4 < F < -1.54999999999999999e-255Initial program 99.3%
Simplified99.5%
Taylor expanded in B around 0 63.0%
Taylor expanded in F around 0 62.2%
mul-1-neg62.2%
+-commutative62.2%
unsub-neg62.2%
*-commutative62.2%
Simplified62.2%
Taylor expanded in x around 0 62.2%
if -1.54999999999999999e-255 < F < 9.1999999999999991e-230Initial program 99.3%
Simplified99.7%
Taylor expanded in F around -inf 43.8%
clear-num43.9%
inv-pow43.9%
Applied egg-rr43.9%
unpow-143.9%
Simplified43.9%
Taylor expanded in B around 0 71.2%
if 9.1999999999999991e-230 < F < 1.40000000000000008e-10Initial program 99.4%
Simplified99.5%
Taylor expanded in B around 0 62.2%
Taylor expanded in F around 0 62.2%
if 1.40000000000000008e-10 < F < 6.79999999999999961e247Initial program 60.7%
Simplified80.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 67.9%
if 6.79999999999999961e247 < F Initial program 54.7%
Simplified84.3%
Taylor expanded in F around -inf 84.1%
Taylor expanded in B around 0 84.4%
Final simplification69.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (sqrt 0.5) (/ F B)) (/ x B))))
(if (<= F -0.00098)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.1e-256)
t_0
(if (<= F 1.4e-229)
(- (/ -1.0 B) (/ 1.0 (/ (tan B) x)))
(if (<= F 1.4e-10)
t_0
(if (<= F 4.4e+248)
(/ (- 1.0 x) B)
(- (/ -1.0 B) (/ x (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = (sqrt(0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.1e-256) {
tmp = t_0;
} else if (F <= 1.4e-229) {
tmp = (-1.0 / B) - (1.0 / (tan(B) / x));
} else if (F <= 1.4e-10) {
tmp = t_0;
} else if (F <= 4.4e+248) {
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) :: t_0
real(8) :: tmp
t_0 = (sqrt(0.5d0) * (f / b)) - (x / b)
if (f <= (-0.00098d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.1d-256)) then
tmp = t_0
else if (f <= 1.4d-229) then
tmp = ((-1.0d0) / b) - (1.0d0 / (tan(b) / x))
else if (f <= 1.4d-10) then
tmp = t_0
else if (f <= 4.4d+248) 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 t_0 = (Math.sqrt(0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.1e-256) {
tmp = t_0;
} else if (F <= 1.4e-229) {
tmp = (-1.0 / B) - (1.0 / (Math.tan(B) / x));
} else if (F <= 1.4e-10) {
tmp = t_0;
} else if (F <= 4.4e+248) {
tmp = (1.0 - x) / B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (math.sqrt(0.5) * (F / B)) - (x / B) tmp = 0 if F <= -0.00098: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.1e-256: tmp = t_0 elif F <= 1.4e-229: tmp = (-1.0 / B) - (1.0 / (math.tan(B) / x)) elif F <= 1.4e-10: tmp = t_0 elif F <= 4.4e+248: tmp = (1.0 - x) / B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(sqrt(0.5) * Float64(F / B)) - Float64(x / B)) tmp = 0.0 if (F <= -0.00098) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.1e-256) tmp = t_0; elseif (F <= 1.4e-229) tmp = Float64(Float64(-1.0 / B) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 1.4e-10) tmp = t_0; elseif (F <= 4.4e+248) 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) t_0 = (sqrt(0.5) * (F / B)) - (x / B); tmp = 0.0; if (F <= -0.00098) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.1e-256) tmp = t_0; elseif (F <= 1.4e-229) tmp = (-1.0 / B) - (1.0 / (tan(B) / x)); elseif (F <= 1.4e-10) tmp = t_0; elseif (F <= 4.4e+248) tmp = (1.0 - x) / B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00098], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-256], t$95$0, If[LessEqual[F, 1.4e-229], N[(N[(-1.0 / B), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-10], t$95$0, If[LessEqual[F, 4.4e+248], 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}
t_0 := \sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.00098:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-256}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-229}:\\
\;\;\;\;\frac{-1}{B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{+248}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.7999999999999997e-4Initial program 58.6%
Simplified75.4%
Taylor expanded in F around -inf 97.7%
Taylor expanded in B around 0 76.8%
if -9.7999999999999997e-4 < F < -2.10000000000000003e-256 or 1.39999999999999995e-229 < F < 1.40000000000000008e-10Initial program 99.3%
Simplified99.5%
Taylor expanded in B around 0 62.6%
Taylor expanded in F around 0 62.2%
mul-1-neg62.2%
+-commutative62.2%
unsub-neg62.2%
*-commutative62.2%
Simplified62.2%
Taylor expanded in x around 0 62.0%
if -2.10000000000000003e-256 < F < 1.39999999999999995e-229Initial program 99.3%
Simplified99.7%
Taylor expanded in F around -inf 43.8%
clear-num43.9%
inv-pow43.9%
Applied egg-rr43.9%
unpow-143.9%
Simplified43.9%
Taylor expanded in B around 0 71.2%
if 1.40000000000000008e-10 < F < 4.3999999999999999e248Initial program 60.7%
Simplified80.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 67.9%
if 4.3999999999999999e248 < F Initial program 54.7%
Simplified84.3%
Taylor expanded in F around -inf 84.1%
Taylor expanded in B around 0 84.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (sqrt 0.5) (/ F B)) (/ x B)))
(t_1 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -0.00098)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.25e-255)
t_0
(if (<= F 1.1e-229)
t_1
(if (<= F 1.4e-10) t_0 (if (<= F 1.75e+248) (/ (- 1.0 x) B) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (sqrt(0.5) * (F / B)) - (x / B);
double t_1 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.25e-255) {
tmp = t_0;
} else if (F <= 1.1e-229) {
tmp = t_1;
} else if (F <= 1.4e-10) {
tmp = t_0;
} else if (F <= 1.75e+248) {
tmp = (1.0 - x) / B;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (sqrt(0.5d0) * (f / b)) - (x / b)
t_1 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-0.00098d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.25d-255)) then
tmp = t_0
else if (f <= 1.1d-229) then
tmp = t_1
else if (f <= 1.4d-10) then
tmp = t_0
else if (f <= 1.75d+248) then
tmp = (1.0d0 - x) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.sqrt(0.5) * (F / B)) - (x / B);
double t_1 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.25e-255) {
tmp = t_0;
} else if (F <= 1.1e-229) {
tmp = t_1;
} else if (F <= 1.4e-10) {
tmp = t_0;
} else if (F <= 1.75e+248) {
tmp = (1.0 - x) / B;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (math.sqrt(0.5) * (F / B)) - (x / B) t_1 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -0.00098: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.25e-255: tmp = t_0 elif F <= 1.1e-229: tmp = t_1 elif F <= 1.4e-10: tmp = t_0 elif F <= 1.75e+248: tmp = (1.0 - x) / B else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(sqrt(0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -0.00098) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.25e-255) tmp = t_0; elseif (F <= 1.1e-229) tmp = t_1; elseif (F <= 1.4e-10) tmp = t_0; elseif (F <= 1.75e+248) tmp = Float64(Float64(1.0 - x) / B); else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (sqrt(0.5) * (F / B)) - (x / B); t_1 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -0.00098) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.25e-255) tmp = t_0; elseif (F <= 1.1e-229) tmp = t_1; elseif (F <= 1.4e-10) tmp = t_0; elseif (F <= 1.75e+248) tmp = (1.0 - x) / B; else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00098], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.25e-255], t$95$0, If[LessEqual[F, 1.1e-229], t$95$1, If[LessEqual[F, 1.4e-10], t$95$0, If[LessEqual[F, 1.75e+248], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00098:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.25 \cdot 10^{-255}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-229}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{+248}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if F < -9.7999999999999997e-4Initial program 58.6%
Simplified75.4%
Taylor expanded in F around -inf 97.7%
Taylor expanded in B around 0 76.8%
if -9.7999999999999997e-4 < F < -4.24999999999999991e-255 or 1.0999999999999999e-229 < F < 1.40000000000000008e-10Initial program 99.3%
Simplified99.5%
Taylor expanded in B around 0 62.6%
Taylor expanded in F around 0 62.2%
mul-1-neg62.2%
+-commutative62.2%
unsub-neg62.2%
*-commutative62.2%
Simplified62.2%
Taylor expanded in x around 0 62.0%
if -4.24999999999999991e-255 < F < 1.0999999999999999e-229 or 1.75000000000000011e248 < F Initial program 87.3%
Simplified95.6%
Taylor expanded in F around -inf 54.6%
Taylor expanded in B around 0 74.7%
if 1.40000000000000008e-10 < F < 1.75000000000000011e248Initial program 60.7%
Simplified80.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 67.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)) (t_1 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -0.000195)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.6e-255)
t_0
(if (<= F 1.1e-229)
t_1
(if (<= F 1.4e-10) t_0 (if (<= F 1.3e+249) (/ (- 1.0 x) B) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -0.000195) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.6e-255) {
tmp = t_0;
} else if (F <= 1.1e-229) {
tmp = t_1;
} else if (F <= 1.4e-10) {
tmp = t_0;
} else if (F <= 1.3e+249) {
tmp = (1.0 - x) / B;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-0.000195d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.6d-255)) then
tmp = t_0
else if (f <= 1.1d-229) then
tmp = t_1
else if (f <= 1.4d-10) then
tmp = t_0
else if (f <= 1.3d+249) then
tmp = (1.0d0 - x) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double t_1 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -0.000195) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.6e-255) {
tmp = t_0;
} else if (F <= 1.1e-229) {
tmp = t_1;
} else if (F <= 1.4e-10) {
tmp = t_0;
} else if (F <= 1.3e+249) {
tmp = (1.0 - x) / B;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -0.000195: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.6e-255: tmp = t_0 elif F <= 1.1e-229: tmp = t_1 elif F <= 1.4e-10: tmp = t_0 elif F <= 1.3e+249: tmp = (1.0 - x) / B else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -0.000195) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.6e-255) tmp = t_0; elseif (F <= 1.1e-229) tmp = t_1; elseif (F <= 1.4e-10) tmp = t_0; elseif (F <= 1.3e+249) tmp = Float64(Float64(1.0 - x) / B); else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -0.000195) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.6e-255) tmp = t_0; elseif (F <= 1.1e-229) tmp = t_1; elseif (F <= 1.4e-10) tmp = t_0; elseif (F <= 1.3e+249) tmp = (1.0 - x) / B; else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000195], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6e-255], t$95$0, If[LessEqual[F, 1.1e-229], t$95$1, If[LessEqual[F, 1.4e-10], t$95$0, If[LessEqual[F, 1.3e+249], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000195:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-255}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-229}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{+249}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if F < -1.94999999999999996e-4Initial program 59.1%
Simplified75.7%
Taylor expanded in F around -inf 97.7%
Taylor expanded in B around 0 75.9%
if -1.94999999999999996e-4 < F < -3.6000000000000002e-255 or 1.0999999999999999e-229 < F < 1.40000000000000008e-10Initial program 99.3%
Simplified99.5%
Taylor expanded in B around 0 63.3%
Taylor expanded in F around 0 62.9%
mul-1-neg62.9%
+-commutative62.9%
unsub-neg62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in x around 0 62.7%
Taylor expanded in B around 0 62.6%
if -3.6000000000000002e-255 < F < 1.0999999999999999e-229 or 1.3000000000000001e249 < F Initial program 87.3%
Simplified95.6%
Taylor expanded in F around -inf 54.6%
Taylor expanded in B around 0 74.7%
if 1.40000000000000008e-10 < F < 1.3000000000000001e249Initial program 60.7%
Simplified80.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in F around inf 67.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -9e-205)
t_0
(if (<= x 6.8e-205)
(* F (/ (sqrt 0.5) B))
(if (<= x 1.1e-24) (- (/ -1.0 (sin B)) (/ x B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -9e-205) {
tmp = t_0;
} else if (x <= 6.8e-205) {
tmp = F * (sqrt(0.5) / B);
} else if (x <= 1.1e-24) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = 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 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-9d-205)) then
tmp = t_0
else if (x <= 6.8d-205) then
tmp = f * (sqrt(0.5d0) / b)
else if (x <= 1.1d-24) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -9e-205) {
tmp = t_0;
} else if (x <= 6.8e-205) {
tmp = F * (Math.sqrt(0.5) / B);
} else if (x <= 1.1e-24) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -9e-205: tmp = t_0 elif x <= 6.8e-205: tmp = F * (math.sqrt(0.5) / B) elif x <= 1.1e-24: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -9e-205) tmp = t_0; elseif (x <= 6.8e-205) tmp = Float64(F * Float64(sqrt(0.5) / B)); elseif (x <= 1.1e-24) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -9e-205) tmp = t_0; elseif (x <= 6.8e-205) tmp = F * (sqrt(0.5) / B); elseif (x <= 1.1e-24) tmp = (-1.0 / sin(B)) - (x / B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9e-205], t$95$0, If[LessEqual[x, 6.8e-205], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e-24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -9 \cdot 10^{-205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-205}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-24}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -8.99999999999999912e-205 or 1.10000000000000001e-24 < x Initial program 76.5%
Simplified92.5%
Taylor expanded in F around -inf 73.7%
Taylor expanded in B around 0 77.4%
if -8.99999999999999912e-205 < x < 6.8000000000000004e-205Initial program 80.4%
Simplified83.6%
Taylor expanded in B around 0 56.9%
Taylor expanded in F around 0 42.1%
mul-1-neg42.1%
+-commutative42.1%
unsub-neg42.1%
*-commutative42.1%
Simplified42.1%
Taylor expanded in x around 0 35.3%
associate-/l*35.4%
Simplified35.4%
if 6.8000000000000004e-205 < x < 1.10000000000000001e-24Initial program 74.6%
Simplified75.1%
Taylor expanded in F around -inf 40.2%
Taylor expanded in B around 0 40.2%
(FPCore (F B x) :precision binary64 (if (<= B 2.5e-20) (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0)))))) x) B) (- (/ -1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 2.5e-20) {
tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 2.5d-20) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0)))))) - x) / b
else
tmp = ((-1.0d0) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 2.5e-20) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 2.5e-20: tmp = ((F * math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 2.5e-20) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0)))))) - x) / B); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 2.5e-20) tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 2.5e-20], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 2.4999999999999999e-20Initial program 71.7%
Simplified85.5%
Taylor expanded in B around 0 64.0%
pow264.0%
Applied egg-rr64.0%
if 2.4999999999999999e-20 < B Initial program 94.6%
Simplified94.9%
Taylor expanded in F around -inf 61.1%
Taylor expanded in B around 0 59.1%
Final simplification62.8%
(FPCore (F B x) :precision binary64 (if (or (<= F 2.0) (not (<= F 1.3e+249))) (- (/ -1.0 B) (/ x (tan B))) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if ((F <= 2.0) || !(F <= 1.3e+249)) {
tmp = (-1.0 / B) - (x / tan(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.0d0) .or. (.not. (f <= 1.3d+249))) then
tmp = ((-1.0d0) / b) - (x / tan(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.0) || !(F <= 1.3e+249)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= 2.0) or not (F <= 1.3e+249): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((F <= 2.0) || !(F <= 1.3e+249)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(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.0) || ~((F <= 1.3e+249))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, 2.0], N[Not[LessEqual[F, 1.3e+249]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2 \lor \neg \left(F \leq 1.3 \cdot 10^{+249}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 2 or 1.3000000000000001e249 < F Initial program 81.4%
Simplified89.6%
Taylor expanded in F around -inf 59.6%
Taylor expanded in B around 0 57.1%
if 2 < F < 1.3000000000000001e249Initial program 60.0%
Simplified80.4%
Taylor expanded in B around 0 54.1%
Taylor expanded in F around inf 69.2%
Final simplification59.5%
(FPCore (F B x)
:precision binary64
(if (<= F -0.000135)
(/ (- -1.0 x) B)
(if (<= F -6.5e-204)
(* F (/ (sqrt 0.5) B))
(if (<= F 3e-12) (/ (- x) B) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.000135) {
tmp = (-1.0 - x) / B;
} else if (F <= -6.5e-204) {
tmp = F * (sqrt(0.5) / B);
} else if (F <= 3e-12) {
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 <= (-0.000135d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-6.5d-204)) then
tmp = f * (sqrt(0.5d0) / b)
else if (f <= 3d-12) 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 <= -0.000135) {
tmp = (-1.0 - x) / B;
} else if (F <= -6.5e-204) {
tmp = F * (Math.sqrt(0.5) / B);
} else if (F <= 3e-12) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.000135: tmp = (-1.0 - x) / B elif F <= -6.5e-204: tmp = F * (math.sqrt(0.5) / B) elif F <= 3e-12: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.000135) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -6.5e-204) tmp = Float64(F * Float64(sqrt(0.5) / B)); elseif (F <= 3e-12) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.000135) tmp = (-1.0 - x) / B; elseif (F <= -6.5e-204) tmp = F * (sqrt(0.5) / B); elseif (F <= 3e-12) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.000135], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -6.5e-204], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-12], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.000135:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-204}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-12}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.35000000000000002e-4Initial program 59.1%
Simplified75.7%
Taylor expanded in F around -inf 97.7%
Taylor expanded in B around 0 53.9%
associate-*r/53.9%
distribute-lft-in53.9%
metadata-eval53.9%
neg-mul-153.9%
unsub-neg53.9%
Simplified53.9%
if -1.35000000000000002e-4 < F < -6.49999999999999939e-204Initial program 99.5%
Simplified99.5%
Taylor expanded in B around 0 64.7%
Taylor expanded in F around 0 63.7%
mul-1-neg63.7%
+-commutative63.7%
unsub-neg63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in x around 0 47.1%
associate-/l*47.1%
Simplified47.1%
if -6.49999999999999939e-204 < F < 3.0000000000000001e-12Initial program 99.3%
Simplified99.6%
Taylor expanded in B around 0 55.3%
Taylor expanded in F around 0 38.6%
associate-*r/38.6%
neg-mul-138.6%
Simplified38.6%
if 3.0000000000000001e-12 < F Initial program 59.7%
Simplified81.4%
Taylor expanded in B around 0 49.4%
Taylor expanded in F around inf 62.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-48) (/ (- -1.0 x) B) (if (<= F 3.1e-12) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.1e-12) {
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-48)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.1d-12) 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-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.1e-12) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-48: tmp = (-1.0 - x) / B elif F <= 3.1e-12: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-48) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.1e-12) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-48) tmp = (-1.0 - x) / B; elseif (F <= 3.1e-12) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-48], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.1e-12], 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^{-48}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-12}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.29999999999999994e-48Initial program 62.3%
Simplified77.6%
Taylor expanded in F around -inf 92.6%
Taylor expanded in B around 0 51.3%
associate-*r/51.3%
distribute-lft-in51.3%
metadata-eval51.3%
neg-mul-151.3%
unsub-neg51.3%
Simplified51.3%
if -1.29999999999999994e-48 < F < 3.1000000000000001e-12Initial program 99.4%
Simplified99.6%
Taylor expanded in B around 0 55.9%
Taylor expanded in F around 0 34.6%
associate-*r/34.6%
neg-mul-134.6%
Simplified34.6%
if 3.1000000000000001e-12 < F Initial program 59.7%
Simplified81.4%
Taylor expanded in B around 0 49.4%
Taylor expanded in F around inf 62.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.05e-50) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.05e-50) {
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 <= (-2.05d-50)) 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 <= -2.05e-50) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.05e-50: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.05e-50) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.05e-50) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.05e-50], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.05 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -2.04999999999999993e-50Initial program 62.3%
Simplified77.6%
Taylor expanded in F around -inf 92.6%
Taylor expanded in B around 0 51.3%
associate-*r/51.3%
distribute-lft-in51.3%
metadata-eval51.3%
neg-mul-151.3%
unsub-neg51.3%
Simplified51.3%
if -2.04999999999999993e-50 < F Initial program 84.6%
Simplified92.8%
Taylor expanded in B around 0 53.5%
Taylor expanded in F around 0 33.8%
associate-*r/33.8%
neg-mul-133.8%
Simplified33.8%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 77.1%
Simplified87.7%
Taylor expanded in B around 0 50.7%
Taylor expanded in F around 0 32.3%
associate-*r/32.3%
neg-mul-132.3%
Simplified32.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 / 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 77.1%
Simplified87.7%
Taylor expanded in B around 0 50.7%
Taylor expanded in F around 0 32.3%
associate-*r/32.3%
neg-mul-132.3%
Simplified32.3%
add-sqr-sqrt11.5%
sqrt-unprod10.5%
sqr-neg10.5%
sqrt-unprod1.5%
add-sqr-sqrt2.7%
*-un-lft-identity2.7%
Applied egg-rr2.7%
*-lft-identity2.7%
Simplified2.7%
herbie shell --seed 2024145
(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))))))