
(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+30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 500000.0)
(- (/ (* F (pow (fma F F 2.0) -0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 500000.0) {
tmp = ((F * pow(fma(F, F, 2.0), -0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 500000.0) tmp = Float64(Float64(Float64(F * (fma(F, F, 2.0) ^ -0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 500000.0], N[(N[(N[(F * N[Power[N[(F * F + 2.0), $MachinePrecision], -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 -2 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 500000:\\
\;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2e30Initial program 59.7%
Simplified72.6%
Taylor expanded in x around 0 72.6%
associate-*l/72.6%
*-lft-identity72.6%
+-commutative72.6%
unpow272.6%
fma-udef72.6%
Simplified72.6%
Taylor expanded in F around -inf 99.8%
if -2e30 < F < 5e5Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
associate-*r/99.7%
inv-pow99.7%
sqrt-pow199.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 5e5 < F Initial program 57.5%
Simplified75.5%
Taylor expanded in x around 0 75.5%
associate-*l/75.5%
*-lft-identity75.5%
+-commutative75.5%
unpow275.5%
fma-udef75.5%
Simplified75.5%
Taylor expanded in F around inf 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.000102)
(- (/ (* F (/ 1.0 (- (/ -1.0 F) F))) (sin B)) t_0)
(if (<= F 28000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.000102) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0;
} else if (F <= 28000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.000102d0)) then
tmp = ((f * (1.0d0 / (((-1.0d0) / f) - f))) / sin(b)) - t_0
else if (f <= 28000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.000102) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / Math.sin(B)) - t_0;
} else if (F <= 28000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.000102: tmp = ((F * (1.0 / ((-1.0 / F) - F))) / math.sin(B)) - t_0 elif F <= 28000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000102) tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(Float64(-1.0 / F) - F))) / sin(B)) - t_0); elseif (F <= 28000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.000102) tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0; elseif (F <= 28000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000102], N[(N[(N[(F * N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 28000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000102:\\
\;\;\;\;\frac{F \cdot \frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 28000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.01999999999999999e-4Initial program 61.3%
Simplified73.7%
Taylor expanded in x around 0 73.7%
associate-*l/73.7%
*-lft-identity73.7%
+-commutative73.7%
unpow273.7%
fma-udef73.7%
Simplified73.7%
associate-*r/73.7%
inv-pow73.7%
sqrt-pow173.7%
metadata-eval73.7%
Applied egg-rr73.7%
add-sqr-sqrt73.7%
unpow-prod-down73.6%
Applied egg-rr73.6%
pow-sqr73.8%
metadata-eval73.8%
unpow-173.8%
Simplified73.8%
Taylor expanded in F around -inf 99.8%
neg-mul-199.8%
Simplified99.8%
if -1.01999999999999999e-4 < F < 2.8e7Initial program 99.5%
if 2.8e7 < F Initial program 57.5%
Simplified75.5%
Taylor expanded in x around 0 75.5%
associate-*l/75.5%
*-lft-identity75.5%
+-commutative75.5%
unpow275.5%
fma-udef75.5%
Simplified75.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 215000000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 215000000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5d+21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 215000000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5e+21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 215000000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5e+21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 215000000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 215000000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5e+21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 215000000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 215000000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 215000000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5e21Initial program 59.7%
Simplified72.6%
Taylor expanded in x around 0 72.6%
associate-*l/72.6%
*-lft-identity72.6%
+-commutative72.6%
unpow272.6%
fma-udef72.6%
Simplified72.6%
Taylor expanded in F around -inf 99.8%
if -5e21 < F < 2.15e11Initial program 99.4%
div-inv38.8%
clear-num38.8%
Applied egg-rr99.6%
if 2.15e11 < F Initial program 57.1%
Simplified75.3%
Taylor expanded in x around 0 75.2%
associate-*l/75.2%
*-lft-identity75.2%
+-commutative75.2%
unpow275.2%
fma-udef75.2%
Simplified75.2%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.93)
(- (/ (* F (/ 1.0 (- (/ -1.0 F) F))) (sin B)) t_0)
(if (<= F 0.08)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (* F (/ 1.0 (+ F (/ 1.0 F)))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.93) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0;
} else if (F <= 0.08) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.93d0)) then
tmp = ((f * (1.0d0 / (((-1.0d0) / f) - f))) / sin(b)) - t_0
else if (f <= 0.08d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f * (1.0d0 / (f + (1.0d0 / f)))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.93) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / Math.sin(B)) - t_0;
} else if (F <= 0.08) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.93: tmp = ((F * (1.0 / ((-1.0 / F) - F))) / math.sin(B)) - t_0 elif F <= 0.08: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F * (1.0 / (F + (1.0 / F)))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.93) tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(Float64(-1.0 / F) - F))) / sin(B)) - t_0); elseif (F <= 0.08) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(F + Float64(1.0 / F)))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.93) tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0; elseif (F <= 0.08) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.93], N[(N[(N[(F * N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.08], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[(1.0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.93:\\
\;\;\;\;\frac{F \cdot \frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.08:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \frac{1}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.930000000000000049Initial program 60.8%
Simplified73.3%
Taylor expanded in x around 0 73.3%
associate-*l/73.3%
*-lft-identity73.3%
+-commutative73.3%
unpow273.3%
fma-udef73.3%
Simplified73.3%
associate-*r/73.3%
inv-pow73.3%
sqrt-pow173.4%
metadata-eval73.4%
Applied egg-rr73.4%
add-sqr-sqrt73.4%
unpow-prod-down73.3%
Applied egg-rr73.3%
pow-sqr73.4%
metadata-eval73.4%
unpow-173.4%
Simplified73.4%
Taylor expanded in F around -inf 99.8%
neg-mul-199.8%
Simplified99.8%
if -0.930000000000000049 < F < 0.0800000000000000017Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.4%
if 0.0800000000000000017 < F Initial program 58.9%
Simplified76.3%
Taylor expanded in x around 0 76.3%
associate-*l/76.3%
*-lft-identity76.3%
+-commutative76.3%
unpow276.3%
fma-udef76.3%
Simplified76.3%
associate-*r/76.4%
inv-pow76.4%
sqrt-pow176.4%
metadata-eval76.4%
Applied egg-rr76.4%
add-sqr-sqrt76.4%
unpow-prod-down76.1%
Applied egg-rr76.1%
pow-sqr76.4%
metadata-eval76.4%
unpow-176.4%
Simplified76.4%
Taylor expanded in F around inf 99.3%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.93)
(- (/ (* F (/ 1.0 (- (/ -1.0 F) F))) (sin B)) t_0)
(if (<= F 0.08)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ (* F (/ 1.0 (+ F (/ 1.0 F)))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.93) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0;
} else if (F <= 0.08) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.93d0)) then
tmp = ((f * (1.0d0 / (((-1.0d0) / f) - f))) / sin(b)) - t_0
else if (f <= 0.08d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = ((f * (1.0d0 / (f + (1.0d0 / f)))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.93) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / Math.sin(B)) - t_0;
} else if (F <= 0.08) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.93: tmp = ((F * (1.0 / ((-1.0 / F) - F))) / math.sin(B)) - t_0 elif F <= 0.08: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = ((F * (1.0 / (F + (1.0 / F)))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.93) tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(Float64(-1.0 / F) - F))) / sin(B)) - t_0); elseif (F <= 0.08) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(F + Float64(1.0 / F)))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.93) tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0; elseif (F <= 0.08) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.93], N[(N[(N[(F * N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.08], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[(1.0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.93:\\
\;\;\;\;\frac{F \cdot \frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.08:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \frac{1}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.930000000000000049Initial program 60.8%
Simplified73.3%
Taylor expanded in x around 0 73.3%
associate-*l/73.3%
*-lft-identity73.3%
+-commutative73.3%
unpow273.3%
fma-udef73.3%
Simplified73.3%
associate-*r/73.3%
inv-pow73.3%
sqrt-pow173.4%
metadata-eval73.4%
Applied egg-rr73.4%
add-sqr-sqrt73.4%
unpow-prod-down73.3%
Applied egg-rr73.3%
pow-sqr73.4%
metadata-eval73.4%
unpow-173.4%
Simplified73.4%
Taylor expanded in F around -inf 99.8%
neg-mul-199.8%
Simplified99.8%
if -0.930000000000000049 < F < 0.0800000000000000017Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.5%
if 0.0800000000000000017 < F Initial program 58.9%
Simplified76.3%
Taylor expanded in x around 0 76.3%
associate-*l/76.3%
*-lft-identity76.3%
+-commutative76.3%
unpow276.3%
fma-udef76.3%
Simplified76.3%
associate-*r/76.4%
inv-pow76.4%
sqrt-pow176.4%
metadata-eval76.4%
Applied egg-rr76.4%
add-sqr-sqrt76.4%
unpow-prod-down76.1%
Applied egg-rr76.1%
pow-sqr76.4%
metadata-eval76.4%
unpow-176.4%
Simplified76.4%
Taylor expanded in F around inf 99.3%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.000102)
(- (/ (* F (/ 1.0 (- (/ -1.0 F) F))) (sin B)) t_0)
(if (<= F -6e-189)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 5.8e-18)
(- (* F (* (/ 1.0 B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_0)
(- (/ (* F (/ 1.0 (+ F (/ 1.0 F)))) (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.000102) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0;
} else if (F <= -6e-189) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 5.8e-18) {
tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.000102d0)) then
tmp = ((f * (1.0d0 / (((-1.0d0) / f) - f))) / sin(b)) - t_0
else if (f <= (-6d-189)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 5.8d-18) then
tmp = (f * ((1.0d0 / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_0
else
tmp = ((f * (1.0d0 / (f + (1.0d0 / f)))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.000102) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / Math.sin(B)) - t_0;
} else if (F <= -6e-189) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 5.8e-18) {
tmp = (F * ((1.0 / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.000102: tmp = ((F * (1.0 / ((-1.0 / F) - F))) / math.sin(B)) - t_0 elif F <= -6e-189: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 5.8e-18: tmp = (F * ((1.0 / B) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0 else: tmp = ((F * (1.0 / (F + (1.0 / F)))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000102) tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(Float64(-1.0 / F) - F))) / sin(B)) - t_0); elseif (F <= -6e-189) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 5.8e-18) tmp = Float64(Float64(F * Float64(Float64(1.0 / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_0); else tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(F + Float64(1.0 / F)))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.000102) tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0; elseif (F <= -6e-189) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 5.8e-18) tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0; else tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000102], N[(N[(N[(F * N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -6e-189], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-18], N[(N[(F * N[(N[(1.0 / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[(1.0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000102:\\
\;\;\;\;\frac{F \cdot \frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -6 \cdot 10^{-189}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;F \cdot \left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \frac{1}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.01999999999999999e-4Initial program 61.3%
Simplified73.7%
Taylor expanded in x around 0 73.7%
associate-*l/73.7%
*-lft-identity73.7%
+-commutative73.7%
unpow273.7%
fma-udef73.7%
Simplified73.7%
associate-*r/73.7%
inv-pow73.7%
sqrt-pow173.7%
metadata-eval73.7%
Applied egg-rr73.7%
add-sqr-sqrt73.7%
unpow-prod-down73.6%
Applied egg-rr73.6%
pow-sqr73.8%
metadata-eval73.8%
unpow-173.8%
Simplified73.8%
Taylor expanded in F around -inf 99.8%
neg-mul-199.8%
Simplified99.8%
if -1.01999999999999999e-4 < F < -6e-189Initial program 99.6%
Taylor expanded in B around 0 86.6%
if -6e-189 < F < 5.8e-18Initial program 99.4%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 90.7%
if 5.8e-18 < F Initial program 60.2%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.1%
*-lft-identity77.1%
+-commutative77.1%
unpow277.1%
fma-udef77.1%
Simplified77.1%
associate-*r/77.1%
inv-pow77.1%
sqrt-pow177.2%
metadata-eval77.2%
Applied egg-rr77.2%
add-sqr-sqrt77.1%
unpow-prod-down76.9%
Applied egg-rr76.9%
pow-sqr77.1%
metadata-eval77.1%
unpow-177.1%
Simplified77.1%
Taylor expanded in F around inf 97.4%
Final simplification95.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.7e-95)
(- (/ (* F (/ 1.0 (- (/ -1.0 F) F))) (sin B)) t_0)
(if (<= F 5.8e-18)
(- (* F (* (/ 1.0 B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_0)
(- (/ (* F (/ 1.0 (+ F (/ 1.0 F)))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.7e-95) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.7d-95)) then
tmp = ((f * (1.0d0 / (((-1.0d0) / f) - f))) / sin(b)) - t_0
else if (f <= 5.8d-18) then
tmp = (f * ((1.0d0 / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_0
else
tmp = ((f * (1.0d0 / (f + (1.0d0 / f)))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.7e-95) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / Math.sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (F * ((1.0 / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.7e-95: tmp = ((F * (1.0 / ((-1.0 / F) - F))) / math.sin(B)) - t_0 elif F <= 5.8e-18: tmp = (F * ((1.0 / B) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0 else: tmp = ((F * (1.0 / (F + (1.0 / F)))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.7e-95) tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(Float64(-1.0 / F) - F))) / sin(B)) - t_0); elseif (F <= 5.8e-18) tmp = Float64(Float64(F * Float64(Float64(1.0 / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_0); else tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(F + Float64(1.0 / F)))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.7e-95) tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0; elseif (F <= 5.8e-18) tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0; else tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.7e-95], N[(N[(N[(F * N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-18], N[(N[(F * N[(N[(1.0 / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[(1.0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{F \cdot \frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;F \cdot \left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \frac{1}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.6999999999999998e-95Initial program 66.5%
Simplified77.2%
Taylor expanded in x around 0 77.2%
associate-*l/77.2%
*-lft-identity77.2%
+-commutative77.2%
unpow277.2%
fma-udef77.2%
Simplified77.2%
associate-*r/77.2%
inv-pow77.2%
sqrt-pow177.3%
metadata-eval77.3%
Applied egg-rr77.3%
add-sqr-sqrt77.2%
unpow-prod-down77.1%
Applied egg-rr77.1%
pow-sqr77.2%
metadata-eval77.2%
unpow-177.2%
Simplified77.2%
Taylor expanded in F around -inf 91.9%
neg-mul-191.9%
Simplified91.9%
if -4.6999999999999998e-95 < F < 5.8e-18Initial program 99.4%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 89.1%
if 5.8e-18 < F Initial program 60.2%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.1%
*-lft-identity77.1%
+-commutative77.1%
unpow277.1%
fma-udef77.1%
Simplified77.1%
associate-*r/77.1%
inv-pow77.1%
sqrt-pow177.2%
metadata-eval77.2%
Applied egg-rr77.2%
add-sqr-sqrt77.1%
unpow-prod-down76.9%
Applied egg-rr76.9%
pow-sqr77.1%
metadata-eval77.1%
unpow-177.1%
Simplified77.1%
Taylor expanded in F around inf 97.4%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.62e-46)
(- (/ (* F (/ -1.0 F)) (sin B)) t_0)
(if (<= F 5.8e-18)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.62e-46) {
tmp = ((F * (-1.0 / F)) / sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.62d-46)) then
tmp = ((f * ((-1.0d0) / f)) / sin(b)) - t_0
else if (f <= 5.8d-18) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.62e-46) {
tmp = ((F * (-1.0 / F)) / Math.sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.62e-46: tmp = ((F * (-1.0 / F)) / math.sin(B)) - t_0 elif F <= 5.8e-18: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.62e-46) tmp = Float64(Float64(Float64(F * Float64(-1.0 / F)) / sin(B)) - t_0); elseif (F <= 5.8e-18) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.62e-46) tmp = ((F * (-1.0 / F)) / sin(B)) - t_0; elseif (F <= 5.8e-18) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.62e-46], N[(N[(N[(F * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-18], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / 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 -1.62 \cdot 10^{-46}:\\
\;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.6200000000000001e-46Initial program 63.4%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
associate-*r/75.1%
inv-pow75.1%
sqrt-pow175.1%
metadata-eval75.1%
Applied egg-rr75.1%
Taylor expanded in F around -inf 96.0%
if -1.6200000000000001e-46 < F < 5.8e-18Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 85.6%
if 5.8e-18 < F Initial program 60.2%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.1%
*-lft-identity77.1%
+-commutative77.1%
unpow277.1%
fma-udef77.1%
Simplified77.1%
Taylor expanded in F around inf 97.0%
Final simplification92.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.62e-46)
(- (/ (* F (/ -1.0 F)) (sin B)) t_0)
(if (<= F 5.8e-18)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ (* F (/ 1.0 (+ F (/ 1.0 F)))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.62e-46) {
tmp = ((F * (-1.0 / F)) / sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.62d-46)) then
tmp = ((f * ((-1.0d0) / f)) / sin(b)) - t_0
else if (f <= 5.8d-18) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = ((f * (1.0d0 / (f + (1.0d0 / f)))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.62e-46) {
tmp = ((F * (-1.0 / F)) / Math.sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.62e-46: tmp = ((F * (-1.0 / F)) / math.sin(B)) - t_0 elif F <= 5.8e-18: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = ((F * (1.0 / (F + (1.0 / F)))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.62e-46) tmp = Float64(Float64(Float64(F * Float64(-1.0 / F)) / sin(B)) - t_0); elseif (F <= 5.8e-18) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(F + Float64(1.0 / F)))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.62e-46) tmp = ((F * (-1.0 / F)) / sin(B)) - t_0; elseif (F <= 5.8e-18) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.62e-46], N[(N[(N[(F * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-18], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[(1.0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.62 \cdot 10^{-46}:\\
\;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \frac{1}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.6200000000000001e-46Initial program 63.4%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
associate-*r/75.1%
inv-pow75.1%
sqrt-pow175.1%
metadata-eval75.1%
Applied egg-rr75.1%
Taylor expanded in F around -inf 96.0%
if -1.6200000000000001e-46 < F < 5.8e-18Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 85.6%
if 5.8e-18 < F Initial program 60.2%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.1%
*-lft-identity77.1%
+-commutative77.1%
unpow277.1%
fma-udef77.1%
Simplified77.1%
associate-*r/77.1%
inv-pow77.1%
sqrt-pow177.2%
metadata-eval77.2%
Applied egg-rr77.2%
add-sqr-sqrt77.1%
unpow-prod-down76.9%
Applied egg-rr76.9%
pow-sqr77.1%
metadata-eval77.1%
unpow-177.1%
Simplified77.1%
Taylor expanded in F around inf 97.4%
Final simplification92.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.7e-95)
(- (/ (* F (/ 1.0 (- (/ -1.0 F) F))) (sin B)) t_0)
(if (<= F 5.8e-18)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ (* F (/ 1.0 (+ F (/ 1.0 F)))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.7e-95) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.7d-95)) then
tmp = ((f * (1.0d0 / (((-1.0d0) / f) - f))) / sin(b)) - t_0
else if (f <= 5.8d-18) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = ((f * (1.0d0 / (f + (1.0d0 / f)))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.7e-95) {
tmp = ((F * (1.0 / ((-1.0 / F) - F))) / Math.sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = ((F * (1.0 / (F + (1.0 / F)))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.7e-95: tmp = ((F * (1.0 / ((-1.0 / F) - F))) / math.sin(B)) - t_0 elif F <= 5.8e-18: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = ((F * (1.0 / (F + (1.0 / F)))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.7e-95) tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(Float64(-1.0 / F) - F))) / sin(B)) - t_0); elseif (F <= 5.8e-18) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(Float64(F * Float64(1.0 / Float64(F + Float64(1.0 / F)))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.7e-95) tmp = ((F * (1.0 / ((-1.0 / F) - F))) / sin(B)) - t_0; elseif (F <= 5.8e-18) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = ((F * (1.0 / (F + (1.0 / F)))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.7e-95], N[(N[(N[(F * N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-18], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F * N[(1.0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{F \cdot \frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \frac{1}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.6999999999999998e-95Initial program 66.5%
Simplified77.2%
Taylor expanded in x around 0 77.2%
associate-*l/77.2%
*-lft-identity77.2%
+-commutative77.2%
unpow277.2%
fma-udef77.2%
Simplified77.2%
associate-*r/77.2%
inv-pow77.2%
sqrt-pow177.3%
metadata-eval77.3%
Applied egg-rr77.3%
add-sqr-sqrt77.2%
unpow-prod-down77.1%
Applied egg-rr77.1%
pow-sqr77.2%
metadata-eval77.2%
unpow-177.2%
Simplified77.2%
Taylor expanded in F around -inf 91.9%
neg-mul-191.9%
Simplified91.9%
if -4.6999999999999998e-95 < F < 5.8e-18Initial program 99.4%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 89.1%
if 5.8e-18 < F Initial program 60.2%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.1%
*-lft-identity77.1%
+-commutative77.1%
unpow277.1%
fma-udef77.1%
Simplified77.1%
associate-*r/77.1%
inv-pow77.1%
sqrt-pow177.2%
metadata-eval77.2%
Applied egg-rr77.2%
add-sqr-sqrt77.1%
unpow-prod-down76.9%
Applied egg-rr76.9%
pow-sqr77.1%
metadata-eval77.1%
unpow-177.1%
Simplified77.1%
Taylor expanded in F around inf 97.4%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.15e-50)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7.5e-132)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 1.7e-21)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.15e-50) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7.5e-132) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 1.7e-21) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.15d-50)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7.5d-132) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 1.7d-21) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.15e-50) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7.5e-132) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.7e-21) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.15e-50: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7.5e-132: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 1.7e-21: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.15e-50) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7.5e-132) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.7e-21) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - 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 <= -2.15e-50) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7.5e-132) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 1.7e-21) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.15e-50], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.5e-132], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 1.7e-21], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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.15 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-132}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-21}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.14999999999999999e-50Initial program 63.4%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 96.0%
if -2.14999999999999999e-50 < F < 7.49999999999999989e-132Initial program 99.4%
Taylor expanded in F around -inf 35.1%
Taylor expanded in x around inf 74.5%
if 7.49999999999999989e-132 < F < 1.7e-21Initial program 99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 69.5%
*-commutative69.5%
Simplified69.5%
if 1.7e-21 < F Initial program 60.2%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.1%
*-lft-identity77.1%
+-commutative77.1%
unpow277.1%
fma-udef77.1%
Simplified77.1%
Taylor expanded in F around inf 97.0%
Final simplification88.5%
(FPCore (F B x)
:precision binary64
(if (<= F -5.4e+267)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -0.041)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 6.5e-132)
(* x (/ (- (cos B)) (sin B)))
(if (<= F 0.00165)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e+267) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -0.041) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6.5e-132) {
tmp = x * (-cos(B) / sin(B));
} else if (F <= 0.00165) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.4d+267)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-0.041d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 6.5d-132) then
tmp = x * (-cos(b) / sin(b))
else if (f <= 0.00165d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e+267) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -0.041) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 6.5e-132) {
tmp = x * (-Math.cos(B) / Math.sin(B));
} else if (F <= 0.00165) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.4e+267: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -0.041: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 6.5e-132: tmp = x * (-math.cos(B) / math.sin(B)) elif F <= 0.00165: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.4e+267) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -0.041) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6.5e-132) tmp = Float64(x * Float64(Float64(-cos(B)) / sin(B))); elseif (F <= 0.00165) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.4e+267) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -0.041) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 6.5e-132) tmp = x * (-cos(B) / sin(B)); elseif (F <= 0.00165) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.4e+267], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.041], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-132], N[(x * N[((-N[Cos[B], $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00165], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.4 \cdot 10^{+267}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -0.041:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-132}:\\
\;\;\;\;x \cdot \frac{-\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 0.00165:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.4000000000000002e267Initial program 46.4%
Taylor expanded in F around -inf 99.5%
Taylor expanded in B around 0 93.0%
if -5.4000000000000002e267 < F < -0.0410000000000000017Initial program 64.7%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 80.8%
if -0.0410000000000000017 < F < 6.49999999999999991e-132Initial program 99.4%
Taylor expanded in F around -inf 35.8%
Taylor expanded in x around inf 72.2%
mul-1-neg72.2%
associate-*r/72.0%
distribute-rgt-neg-in72.0%
distribute-neg-frac72.0%
Simplified72.0%
if 6.49999999999999991e-132 < F < 0.00165Initial program 99.7%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 65.4%
*-commutative65.4%
Simplified65.4%
if 0.00165 < F Initial program 58.9%
Simplified76.3%
Taylor expanded in F around inf 98.6%
associate-/r*98.7%
Simplified98.7%
Taylor expanded in B around 0 73.7%
Final simplification75.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.5e+267)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -6.9)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.5e-132)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 5e-5)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e+267) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -6.9) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.5e-132) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 5e-5) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d+267)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-6.9d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.5d-132) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 5d-5) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e+267) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -6.9) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.5e-132) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 5e-5) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e+267: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -6.9: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.5e-132: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 5e-5: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e+267) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -6.9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.5e-132) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 5e-5) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e+267) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -6.9) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.5e-132) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 5e-5) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e+267], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-132], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 5e-5], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{+267}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -6.9:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-132}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.5e267Initial program 46.4%
Taylor expanded in F around -inf 99.5%
Taylor expanded in B around 0 93.0%
if -1.5e267 < F < -6.9000000000000004Initial program 64.7%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 80.8%
if -6.9000000000000004 < F < 4.4999999999999999e-132Initial program 99.4%
Taylor expanded in F around -inf 35.8%
Taylor expanded in x around inf 72.2%
if 4.4999999999999999e-132 < F < 5.00000000000000024e-5Initial program 99.7%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 65.4%
*-commutative65.4%
Simplified65.4%
if 5.00000000000000024e-5 < F Initial program 58.9%
Simplified76.3%
Taylor expanded in F around inf 98.6%
associate-/r*98.7%
Simplified98.7%
Taylor expanded in B around 0 73.7%
Final simplification75.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.62e-46)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.8e-18)
(- (/ F (/ B (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.62e-46) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.62d-46)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.8d-18) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.62e-46) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.62e-46: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.8e-18: tmp = (F / (B / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.62e-46) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.8e-18) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.62e-46) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.8e-18) tmp = (F / (B / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.62e-46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-18], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.62 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.6200000000000001e-46Initial program 63.4%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 96.0%
if -1.6200000000000001e-46 < F < 5.8e-18Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 85.6%
associate-/l*85.5%
Simplified85.5%
if 5.8e-18 < F Initial program 60.2%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.1%
*-lft-identity77.1%
+-commutative77.1%
unpow277.1%
fma-udef77.1%
Simplified77.1%
Taylor expanded in F around inf 97.0%
Final simplification92.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.62e-46)
(- (/ (* F (/ -1.0 F)) (sin B)) t_0)
(if (<= F 5.8e-18)
(- (/ F (/ B (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.62e-46) {
tmp = ((F * (-1.0 / F)) / sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.62d-46)) then
tmp = ((f * ((-1.0d0) / f)) / sin(b)) - t_0
else if (f <= 5.8d-18) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.62e-46) {
tmp = ((F * (-1.0 / F)) / Math.sin(B)) - t_0;
} else if (F <= 5.8e-18) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.62e-46: tmp = ((F * (-1.0 / F)) / math.sin(B)) - t_0 elif F <= 5.8e-18: tmp = (F / (B / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.62e-46) tmp = Float64(Float64(Float64(F * Float64(-1.0 / F)) / sin(B)) - t_0); elseif (F <= 5.8e-18) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.62e-46) tmp = ((F * (-1.0 / F)) / sin(B)) - t_0; elseif (F <= 5.8e-18) tmp = (F / (B / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.62e-46], N[(N[(N[(F * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-18], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.62 \cdot 10^{-46}:\\
\;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.6200000000000001e-46Initial program 63.4%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
associate-*r/75.1%
inv-pow75.1%
sqrt-pow175.1%
metadata-eval75.1%
Applied egg-rr75.1%
Taylor expanded in F around -inf 96.0%
if -1.6200000000000001e-46 < F < 5.8e-18Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 85.6%
associate-/l*85.5%
Simplified85.5%
if 5.8e-18 < F Initial program 60.2%
Simplified77.1%
Taylor expanded in x around 0 77.0%
associate-*l/77.1%
*-lft-identity77.1%
+-commutative77.1%
unpow277.1%
fma-udef77.1%
Simplified77.1%
Taylor expanded in F around inf 97.0%
Final simplification92.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.06e-52)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.35e-132)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 0.000102) (/ (- (* F (sqrt 0.5)) x) B) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.06e-52) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.35e-132) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 0.000102) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.06d-52)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.35d-132) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 0.000102d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.06e-52) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.35e-132) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 0.000102) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.06e-52: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.35e-132: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 0.000102: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.06e-52) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.35e-132) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 0.000102) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.06e-52) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.35e-132) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 0.000102) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.06e-52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35e-132], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 0.000102], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.06 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-132}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 0.000102:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.06e-52Initial program 63.4%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 96.0%
if -1.06e-52 < F < 1.34999999999999995e-132Initial program 99.4%
Taylor expanded in F around -inf 35.1%
Taylor expanded in x around inf 74.5%
if 1.34999999999999995e-132 < F < 1.01999999999999999e-4Initial program 99.7%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 65.4%
*-commutative65.4%
Simplified65.4%
if 1.01999999999999999e-4 < F Initial program 58.9%
Simplified76.3%
Taylor expanded in F around inf 98.6%
associate-/r*98.7%
Simplified98.7%
Taylor expanded in B around 0 73.7%
Final simplification79.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1e+263)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -0.104)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 3.5e-132) (not (<= F 0.0021)))
(- (/ 1.0 B) (/ x (tan B)))
(/ (- (* F (sqrt 0.5)) x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e+263) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -0.104) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 3.5e-132) || !(F <= 0.0021)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F * sqrt(0.5)) - 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 <= (-1d+263)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-0.104d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 3.5d-132) .or. (.not. (f <= 0.0021d0))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1e+263) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -0.104) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 3.5e-132) || !(F <= 0.0021)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e+263: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -0.104: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 3.5e-132) or not (F <= 0.0021): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e+263) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -0.104) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 3.5e-132) || !(F <= 0.0021)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1e+263) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -0.104) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 3.5e-132) || ~((F <= 0.0021))) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e+263], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.104], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.5e-132], N[Not[LessEqual[F, 0.0021]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{+263}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -0.104:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-132} \lor \neg \left(F \leq 0.0021\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
if F < -1.00000000000000002e263Initial program 46.4%
Taylor expanded in F around -inf 99.5%
Taylor expanded in B around 0 93.0%
if -1.00000000000000002e263 < F < -0.103999999999999995Initial program 64.7%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 80.8%
if -0.103999999999999995 < F < 3.5e-132 or 0.00209999999999999987 < F Initial program 76.8%
Simplified86.7%
Taylor expanded in F around inf 65.9%
associate-/r*65.9%
Simplified65.9%
Taylor expanded in B around 0 64.3%
if 3.5e-132 < F < 0.00209999999999999987Initial program 99.7%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 65.4%
*-commutative65.4%
Simplified65.4%
Final simplification69.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.9e+267)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -53000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.6e-132)
(- (/ -1.0 B) (/ 1.0 (/ (tan B) x)))
(if (<= F 0.0015)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e+267) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -53000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.6e-132) {
tmp = (-1.0 / B) - (1.0 / (tan(B) / x));
} else if (F <= 0.0015) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.9d+267)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-53000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.6d-132) then
tmp = ((-1.0d0) / b) - (1.0d0 / (tan(b) / x))
else if (f <= 0.0015d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e+267) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -53000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.6e-132) {
tmp = (-1.0 / B) - (1.0 / (Math.tan(B) / x));
} else if (F <= 0.0015) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e+267: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -53000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.6e-132: tmp = (-1.0 / B) - (1.0 / (math.tan(B) / x)) elif F <= 0.0015: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e+267) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -53000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.6e-132) tmp = Float64(Float64(-1.0 / B) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 0.0015) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e+267) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -53000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.6e-132) tmp = (-1.0 / B) - (1.0 / (tan(B) / x)); elseif (F <= 0.0015) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e+267], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -53000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-132], N[(N[(-1.0 / B), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0015], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{+267}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -53000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{-1}{B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 0.0015:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.90000000000000009e267Initial program 46.4%
Taylor expanded in F around -inf 99.5%
Taylor expanded in B around 0 93.0%
if -1.90000000000000009e267 < F < -53000Initial program 64.7%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 80.8%
if -53000 < F < 5.60000000000000005e-132Initial program 99.4%
Taylor expanded in F around -inf 35.8%
div-inv36.0%
clear-num36.0%
Applied egg-rr36.0%
Taylor expanded in B around 0 52.4%
if 5.60000000000000005e-132 < F < 0.0015Initial program 99.7%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 65.4%
*-commutative65.4%
Simplified65.4%
if 0.0015 < F Initial program 58.9%
Simplified76.3%
Taylor expanded in F around inf 98.6%
associate-/r*98.7%
Simplified98.7%
Taylor expanded in B around 0 73.7%
Final simplification69.6%
(FPCore (F B x)
:precision binary64
(if (<= F -18.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 1.36e-132) (not (<= F 0.00125)))
(- (/ 1.0 B) (/ x (tan B)))
(/ (- (* F (sqrt 0.5)) x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -18.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 1.36e-132) || !(F <= 0.00125)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F * sqrt(0.5)) - 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 <= (-18.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 1.36d-132) .or. (.not. (f <= 0.00125d0))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -18.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 1.36e-132) || !(F <= 0.00125)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -18.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 1.36e-132) or not (F <= 0.00125): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -18.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 1.36e-132) || !(F <= 0.00125)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -18.0) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 1.36e-132) || ~((F <= 0.00125))) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -18.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.36e-132], N[Not[LessEqual[F, 0.00125]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -18:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.36 \cdot 10^{-132} \lor \neg \left(F \leq 0.00125\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
if F < -18Initial program 60.8%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 75.2%
if -18 < F < 1.36000000000000002e-132 or 0.00125000000000000003 < F Initial program 76.8%
Simplified86.7%
Taylor expanded in F around inf 65.9%
associate-/r*65.9%
Simplified65.9%
Taylor expanded in B around 0 64.3%
if 1.36000000000000002e-132 < F < 0.00125000000000000003Initial program 99.7%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.6%
Taylor expanded in B around 0 65.4%
*-commutative65.4%
Simplified65.4%
Final simplification67.4%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.9e-185) (not (<= x 2.35e-79))) (- (/ 1.0 B) (/ x (tan B))) (/ (- (* F (sqrt 0.5)) x) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.9e-185) || !(x <= 2.35e-79)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F * sqrt(0.5)) - 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 ((x <= (-1.9d-185)) .or. (.not. (x <= 2.35d-79))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.9e-185) || !(x <= 2.35e-79)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.9e-185) or not (x <= 2.35e-79): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.9e-185) || !(x <= 2.35e-79)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.9e-185) || ~((x <= 2.35e-79))) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.9e-185], N[Not[LessEqual[x, 2.35e-79]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{-185} \lor \neg \left(x \leq 2.35 \cdot 10^{-79}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
if x < -1.9e-185 or 2.3500000000000001e-79 < x Initial program 75.0%
Simplified88.1%
Taylor expanded in F around inf 71.9%
associate-/r*72.0%
Simplified72.0%
Taylor expanded in B around 0 78.5%
if -1.9e-185 < x < 2.3500000000000001e-79Initial program 73.9%
Simplified76.2%
Taylor expanded in x around 0 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
fma-udef76.2%
Simplified76.2%
Taylor expanded in F around 0 48.6%
Taylor expanded in B around 0 27.8%
*-commutative27.8%
Simplified27.8%
Final simplification62.0%
(FPCore (F B x) :precision binary64 (- (/ 1.0 B) (/ x (tan B))))
double code(double F, double B, double x) {
return (1.0 / B) - (x / tan(B));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (1.0d0 / b) - (x / tan(b))
end function
public static double code(double F, double B, double x) {
return (1.0 / B) - (x / Math.tan(B));
}
def code(F, B, x): return (1.0 / B) - (x / math.tan(B))
function code(F, B, x) return Float64(Float64(1.0 / B) - Float64(x / tan(B))) end
function tmp = code(F, B, x) tmp = (1.0 / B) - (x / tan(B)); end
code[F_, B_, x_] := N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B} - \frac{x}{\tan B}
\end{array}
Initial program 74.6%
Simplified84.3%
Taylor expanded in F around inf 59.1%
associate-/r*59.1%
Simplified59.1%
Taylor expanded in B around 0 58.6%
Final simplification58.6%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e-59) (/ (- -1.0 x) B) (if (<= F 1.55e-118) (/ (- x) B) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-59) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.55e-118) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.6d-59)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.55d-118) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-59) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.55e-118) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-59: tmp = (-1.0 - x) / B elif F <= 1.55e-118: tmp = -x / B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-59) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.55e-118) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-59) tmp = (-1.0 - x) / B; elseif (F <= 1.55e-118) tmp = -x / B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-59], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55e-118], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-59}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-118}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.6e-59Initial program 63.9%
Taylor expanded in F around -inf 94.6%
Taylor expanded in B around 0 49.3%
associate-*r/49.3%
distribute-lft-in49.3%
metadata-eval49.3%
neg-mul-149.3%
Simplified49.3%
if -3.6e-59 < F < 1.5500000000000001e-118Initial program 99.4%
Simplified99.8%
Taylor expanded in F around inf 22.8%
associate-/r*22.8%
Simplified22.8%
Taylor expanded in B around 0 19.8%
Taylor expanded in x around inf 35.4%
neg-mul-135.4%
distribute-neg-frac35.4%
Simplified35.4%
if 1.5500000000000001e-118 < F Initial program 67.2%
Simplified81.1%
Taylor expanded in F around inf 87.3%
associate-/r*87.4%
Simplified87.4%
Taylor expanded in B around 0 45.7%
div-sub45.7%
Applied egg-rr45.7%
Final simplification44.1%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-59) (/ (- -1.0 x) B) (if (<= F 1.55e-118) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-59) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.55e-118) {
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-59)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.55d-118) 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-59) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.55e-118) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-59: tmp = (-1.0 - x) / B elif F <= 1.55e-118: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-59) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.55e-118) 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-59) tmp = (-1.0 - x) / B; elseif (F <= 1.55e-118) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-59], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55e-118], 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^{-59}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-118}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.29999999999999999e-59Initial program 63.9%
Taylor expanded in F around -inf 94.6%
Taylor expanded in B around 0 49.3%
associate-*r/49.3%
distribute-lft-in49.3%
metadata-eval49.3%
neg-mul-149.3%
Simplified49.3%
if -1.29999999999999999e-59 < F < 1.5500000000000001e-118Initial program 99.4%
Simplified99.8%
Taylor expanded in F around inf 22.8%
associate-/r*22.8%
Simplified22.8%
Taylor expanded in B around 0 19.8%
Taylor expanded in x around inf 35.4%
neg-mul-135.4%
distribute-neg-frac35.4%
Simplified35.4%
if 1.5500000000000001e-118 < F Initial program 67.2%
Simplified81.1%
Taylor expanded in F around inf 87.3%
associate-/r*87.4%
Simplified87.4%
Taylor expanded in B around 0 45.7%
Final simplification44.1%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.05e-10) (not (<= x 3.3e-15))) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.05e-10) || !(x <= 3.3e-15)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2.05d-10)) .or. (.not. (x <= 3.3d-15))) then
tmp = -x / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.05e-10) || !(x <= 3.3e-15)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.05e-10) or not (x <= 3.3e-15): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.05e-10) || !(x <= 3.3e-15)) tmp = Float64(Float64(-x) / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.05e-10) || ~((x <= 3.3e-15))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.05e-10], N[Not[LessEqual[x, 3.3e-15]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.05 \cdot 10^{-10} \lor \neg \left(x \leq 3.3 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -2.0499999999999999e-10 or 3.3e-15 < x Initial program 80.5%
Simplified96.4%
Taylor expanded in F around inf 85.9%
associate-/r*85.9%
Simplified85.9%
Taylor expanded in B around 0 46.4%
Taylor expanded in x around inf 47.8%
neg-mul-147.8%
distribute-neg-frac47.8%
Simplified47.8%
if -2.0499999999999999e-10 < x < 3.3e-15Initial program 69.7%
Simplified74.0%
Taylor expanded in F around inf 36.5%
associate-/r*36.5%
Simplified36.5%
Taylor expanded in B around 0 22.4%
Taylor expanded in x around 0 22.2%
Final simplification33.9%
(FPCore (F B x) :precision binary64 (if (<= F 1.8e-118) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.8e-118) {
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.8d-118) 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.8e-118) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.8e-118: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.8e-118) 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.8e-118) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.8e-118], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.8 \cdot 10^{-118}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.8000000000000001e-118Initial program 80.5%
Simplified86.8%
Taylor expanded in F around inf 36.8%
associate-/r*36.8%
Simplified36.8%
Taylor expanded in B around 0 23.6%
Taylor expanded in x around inf 31.1%
neg-mul-131.1%
distribute-neg-frac31.1%
Simplified31.1%
if 1.8000000000000001e-118 < F Initial program 67.2%
Simplified81.1%
Taylor expanded in F around inf 87.3%
associate-/r*87.4%
Simplified87.4%
Taylor expanded in B around 0 45.7%
Final simplification37.5%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 74.6%
Simplified84.3%
Taylor expanded in F around inf 59.1%
associate-/r*59.1%
Simplified59.1%
Taylor expanded in B around 0 33.4%
Taylor expanded in x around 0 13.5%
Final simplification13.5%
herbie shell --seed 2024014
(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))))))