
(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 23 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 -14000.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 3350000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -14000.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 3350000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / 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 <= -14000.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 3350000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / 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, -14000.0], N[(N[(N[(N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3350000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -14000:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3350000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -14000Initial program 57.6%
Simplified70.1%
Taylor expanded in x around 0 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
associate-*r/70.1%
sqrt-div70.1%
metadata-eval70.1%
un-div-inv70.2%
Applied egg-rr70.2%
Taylor expanded in F around -inf 99.7%
if -14000 < F < 3.35e6Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
if 3.35e6 < F Initial program 63.3%
Simplified77.6%
Taylor expanded in x around 0 77.6%
associate-*l/77.6%
*-lft-identity77.6%
+-commutative77.6%
unpow277.6%
fma-undefine77.6%
Simplified77.6%
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.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 3.6e-13)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ 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.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 3.6e-13) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (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.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 3.6d-13) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (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.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 3.6e-13) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (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.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 3.6e-13: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (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.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 3.6e-13) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / 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.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 3.6e-13) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (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.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.6e-13], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $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.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-13}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 57.6%
Simplified70.1%
Taylor expanded in x around 0 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
associate-*r/70.1%
sqrt-div70.1%
metadata-eval70.1%
un-div-inv70.2%
Applied egg-rr70.2%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
Simplified99.7%
if -0.900000000000000022 < F < 3.5999999999999998e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
*-rgt-identity99.5%
times-frac99.6%
/-rgt-identity99.6%
Simplified99.6%
if 3.5999999999999998e-13 < F Initial program 64.7%
Simplified78.4%
Taylor expanded in x around 0 78.5%
associate-*l/78.4%
*-lft-identity78.4%
+-commutative78.4%
unpow278.4%
fma-undefine78.4%
Simplified78.4%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 3.6e-13)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ 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.4) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 3.6e-13) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (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.4d0)) then
tmp = (((1.0d0 / (f ** 2.0d0)) + (-1.0d0)) / sin(b)) - t_0
else if (f <= 3.6d-13) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (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.4) {
tmp = (((1.0 / Math.pow(F, 2.0)) + -1.0) / Math.sin(B)) - t_0;
} else if (F <= 3.6e-13) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (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.4: tmp = (((1.0 / math.pow(F, 2.0)) + -1.0) / math.sin(B)) - t_0 elif F <= 3.6e-13: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (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.4) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 3.6e-13) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / 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.4) tmp = (((1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0; elseif (F <= 3.6e-13) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (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.4], N[(N[(N[(N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.6e-13], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $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.4:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-13}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 57.6%
Simplified70.1%
Taylor expanded in x around 0 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
associate-*r/70.1%
sqrt-div70.1%
metadata-eval70.1%
un-div-inv70.2%
Applied egg-rr70.2%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 3.5999999999999998e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
*-rgt-identity99.5%
times-frac99.6%
/-rgt-identity99.6%
Simplified99.6%
if 3.5999999999999998e-13 < F Initial program 64.7%
Simplified78.4%
Taylor expanded in x around 0 78.5%
associate-*l/78.4%
*-lft-identity78.4%
+-commutative78.4%
unpow278.4%
fma-undefine78.4%
Simplified78.4%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* 2.0 x))))))
(t_1 (/ x (tan B)))
(t_2 (- (* F (/ (sqrt 0.5) B)) t_1)))
(if (<= F -6e-21)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_1)
(if (<= F -1.62e-52)
t_0
(if (<= F -6.4e-112)
t_2
(if (<= F -5.5e-142)
t_0
(if (<= F 3.6e-13)
t_2
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_1))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt((1.0 / (2.0 + (2.0 * x))));
double t_1 = x / tan(B);
double t_2 = (F * (sqrt(0.5) / B)) - t_1;
double tmp;
if (F <= -6e-21) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1;
} else if (F <= -1.62e-52) {
tmp = t_0;
} else if (F <= -6.4e-112) {
tmp = t_2;
} else if (F <= -5.5e-142) {
tmp = t_0;
} else if (F <= 3.6e-13) {
tmp = t_2;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (2.0d0 * x))))
t_1 = x / tan(b)
t_2 = (f * (sqrt(0.5d0) / b)) - t_1
if (f <= (-6d-21)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_1
else if (f <= (-1.62d-52)) then
tmp = t_0
else if (f <= (-6.4d-112)) then
tmp = t_2
else if (f <= (-5.5d-142)) then
tmp = t_0
else if (f <= 3.6d-13) then
tmp = t_2
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (2.0 * x))));
double t_1 = x / Math.tan(B);
double t_2 = (F * (Math.sqrt(0.5) / B)) - t_1;
double tmp;
if (F <= -6e-21) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_1;
} else if (F <= -1.62e-52) {
tmp = t_0;
} else if (F <= -6.4e-112) {
tmp = t_2;
} else if (F <= -5.5e-142) {
tmp = t_0;
} else if (F <= 3.6e-13) {
tmp = t_2;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (2.0 * x)))) t_1 = x / math.tan(B) t_2 = (F * (math.sqrt(0.5) / B)) - t_1 tmp = 0 if F <= -6e-21: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_1 elif F <= -1.62e-52: tmp = t_0 elif F <= -6.4e-112: tmp = t_2 elif F <= -5.5e-142: tmp = t_0 elif F <= 3.6e-13: tmp = t_2 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(2.0 * x))))) t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_1) tmp = 0.0 if (F <= -6e-21) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_1); elseif (F <= -1.62e-52) tmp = t_0; elseif (F <= -6.4e-112) tmp = t_2; elseif (F <= -5.5e-142) tmp = t_0; elseif (F <= 3.6e-13) tmp = t_2; else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt((1.0 / (2.0 + (2.0 * x)))); t_1 = x / tan(B); t_2 = (F * (sqrt(0.5) / B)) - t_1; tmp = 0.0; if (F <= -6e-21) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1; elseif (F <= -1.62e-52) tmp = t_0; elseif (F <= -6.4e-112) tmp = t_2; elseif (F <= -5.5e-142) tmp = t_0; elseif (F <= 3.6e-13) tmp = t_2; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -6e-21], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.62e-52], t$95$0, If[LessEqual[F, -6.4e-112], t$95$2, If[LessEqual[F, -5.5e-142], t$95$0, If[LessEqual[F, 3.6e-13], t$95$2, N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\\
t_1 := \frac{x}{\tan B}\\
t_2 := F \cdot \frac{\sqrt{0.5}}{B} - t\_1\\
\mathbf{if}\;F \leq -6 \cdot 10^{-21}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.62 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-112}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-142}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -5.99999999999999982e-21Initial program 59.7%
Simplified71.6%
Taylor expanded in x around 0 71.6%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
associate-*r/71.6%
sqrt-div71.7%
metadata-eval71.7%
un-div-inv71.7%
Applied egg-rr71.7%
Taylor expanded in F around -inf 98.6%
neg-mul-198.6%
Simplified98.6%
if -5.99999999999999982e-21 < F < -1.61999999999999995e-52 or -6.39999999999999986e-112 < F < -5.50000000000000023e-142Initial program 99.5%
Simplified99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in F around inf 91.7%
if -1.61999999999999995e-52 < F < -6.39999999999999986e-112 or -5.50000000000000023e-142 < F < 3.5999999999999998e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.5%
Taylor expanded in x around 0 88.5%
if 3.5999999999999998e-13 < F Initial program 64.7%
Simplified78.4%
Taylor expanded in x around 0 78.5%
associate-*l/78.4%
*-lft-identity78.4%
+-commutative78.4%
unpow278.4%
fma-undefine78.4%
Simplified78.4%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in F around inf 99.7%
Final simplification95.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* 2.0 x)))))
(t_1 (* (/ F (sin B)) t_0))
(t_2 (/ x (tan B))))
(if (<= F -2.2e-20)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_2)
(if (<= F -1.46e-52)
t_1
(if (<= F -4.2e-112)
(- (* t_0 (/ F B)) t_2)
(if (<= F -5.5e-142)
t_1
(if (<= F 3.6e-13)
(- (* F (/ (sqrt 0.5) B)) t_2)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_2))))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (2.0 * x))));
double t_1 = (F / sin(B)) * t_0;
double t_2 = x / tan(B);
double tmp;
if (F <= -2.2e-20) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_2;
} else if (F <= -1.46e-52) {
tmp = t_1;
} else if (F <= -4.2e-112) {
tmp = (t_0 * (F / B)) - t_2;
} else if (F <= -5.5e-142) {
tmp = t_1;
} else if (F <= 3.6e-13) {
tmp = (F * (sqrt(0.5) / B)) - t_2;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (2.0d0 * x))))
t_1 = (f / sin(b)) * t_0
t_2 = x / tan(b)
if (f <= (-2.2d-20)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_2
else if (f <= (-1.46d-52)) then
tmp = t_1
else if (f <= (-4.2d-112)) then
tmp = (t_0 * (f / b)) - t_2
else if (f <= (-5.5d-142)) then
tmp = t_1
else if (f <= 3.6d-13) then
tmp = (f * (sqrt(0.5d0) / b)) - t_2
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (2.0 * x))));
double t_1 = (F / Math.sin(B)) * t_0;
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -2.2e-20) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_2;
} else if (F <= -1.46e-52) {
tmp = t_1;
} else if (F <= -4.2e-112) {
tmp = (t_0 * (F / B)) - t_2;
} else if (F <= -5.5e-142) {
tmp = t_1;
} else if (F <= 3.6e-13) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_2;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (2.0 * x)))) t_1 = (F / math.sin(B)) * t_0 t_2 = x / math.tan(B) tmp = 0 if F <= -2.2e-20: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_2 elif F <= -1.46e-52: tmp = t_1 elif F <= -4.2e-112: tmp = (t_0 * (F / B)) - t_2 elif F <= -5.5e-142: tmp = t_1 elif F <= 3.6e-13: tmp = (F * (math.sqrt(0.5) / B)) - t_2 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(2.0 * x)))) t_1 = Float64(Float64(F / sin(B)) * t_0) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.2e-20) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_2); elseif (F <= -1.46e-52) tmp = t_1; elseif (F <= -4.2e-112) tmp = Float64(Float64(t_0 * Float64(F / B)) - t_2); elseif (F <= -5.5e-142) tmp = t_1; elseif (F <= 3.6e-13) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_2); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (2.0 * x)))); t_1 = (F / sin(B)) * t_0; t_2 = x / tan(B); tmp = 0.0; if (F <= -2.2e-20) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_2; elseif (F <= -1.46e-52) tmp = t_1; elseif (F <= -4.2e-112) tmp = (t_0 * (F / B)) - t_2; elseif (F <= -5.5e-142) tmp = t_1; elseif (F <= 3.6e-13) tmp = (F * (sqrt(0.5) / B)) - t_2; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.2e-20], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -1.46e-52], t$95$1, If[LessEqual[F, -4.2e-112], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -5.5e-142], t$95$1, If[LessEqual[F, 3.6e-13], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + 2 \cdot x}}\\
t_1 := \frac{F}{\sin B} \cdot t\_0\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq -1.46 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-112}:\\
\;\;\;\;t\_0 \cdot \frac{F}{B} - t\_2\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-13}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_2\\
\end{array}
\end{array}
if F < -2.19999999999999991e-20Initial program 59.7%
Simplified71.6%
Taylor expanded in x around 0 71.6%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
associate-*r/71.6%
sqrt-div71.7%
metadata-eval71.7%
un-div-inv71.7%
Applied egg-rr71.7%
Taylor expanded in F around -inf 98.6%
neg-mul-198.6%
Simplified98.6%
if -2.19999999999999991e-20 < F < -1.46000000000000003e-52 or -4.2000000000000001e-112 < F < -5.50000000000000023e-142Initial program 99.5%
Simplified99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in F around inf 91.7%
if -1.46000000000000003e-52 < F < -4.2000000000000001e-112Initial program 99.6%
Simplified99.3%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 75.6%
if -5.50000000000000023e-142 < F < 3.5999999999999998e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 90.6%
Taylor expanded in x around 0 90.6%
if 3.5999999999999998e-13 < F Initial program 64.7%
Simplified78.4%
Taylor expanded in x around 0 78.5%
associate-*l/78.4%
*-lft-identity78.4%
+-commutative78.4%
unpow278.4%
fma-undefine78.4%
Simplified78.4%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in F around inf 99.7%
Final simplification95.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (/ 1.0 F) (/ (sin B) F)) (/ x B))))
(if (<= F -25500000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7.6e-23)
(/ (- x) (tan B))
(if (<= F 4.5e+102)
t_0
(if (<= F 6e+215)
(- (/ 1.0 B) (/ x (tan B)))
(if (<= F 8.5e+296) t_0 (* (/ x (sin B)) (- (cos B))))))))))
double code(double F, double B, double x) {
double t_0 = ((1.0 / F) / (sin(B) / F)) - (x / B);
double tmp;
if (F <= -25500000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7.6e-23) {
tmp = -x / tan(B);
} else if (F <= 4.5e+102) {
tmp = t_0;
} else if (F <= 6e+215) {
tmp = (1.0 / B) - (x / tan(B));
} else if (F <= 8.5e+296) {
tmp = t_0;
} else {
tmp = (x / sin(B)) * -cos(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((1.0d0 / f) / (sin(b) / f)) - (x / b)
if (f <= (-25500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7.6d-23) then
tmp = -x / tan(b)
else if (f <= 4.5d+102) then
tmp = t_0
else if (f <= 6d+215) then
tmp = (1.0d0 / b) - (x / tan(b))
else if (f <= 8.5d+296) then
tmp = t_0
else
tmp = (x / sin(b)) * -cos(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((1.0 / F) / (Math.sin(B) / F)) - (x / B);
double tmp;
if (F <= -25500000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7.6e-23) {
tmp = -x / Math.tan(B);
} else if (F <= 4.5e+102) {
tmp = t_0;
} else if (F <= 6e+215) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else if (F <= 8.5e+296) {
tmp = t_0;
} else {
tmp = (x / Math.sin(B)) * -Math.cos(B);
}
return tmp;
}
def code(F, B, x): t_0 = ((1.0 / F) / (math.sin(B) / F)) - (x / B) tmp = 0 if F <= -25500000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7.6e-23: tmp = -x / math.tan(B) elif F <= 4.5e+102: tmp = t_0 elif F <= 6e+215: tmp = (1.0 / B) - (x / math.tan(B)) elif F <= 8.5e+296: tmp = t_0 else: tmp = (x / math.sin(B)) * -math.cos(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(1.0 / F) / Float64(sin(B) / F)) - Float64(x / B)) tmp = 0.0 if (F <= -25500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7.6e-23) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 4.5e+102) tmp = t_0; elseif (F <= 6e+215) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); elseif (F <= 8.5e+296) tmp = t_0; else tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((1.0 / F) / (sin(B) / F)) - (x / B); tmp = 0.0; if (F <= -25500000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7.6e-23) tmp = -x / tan(B); elseif (F <= 4.5e+102) tmp = t_0; elseif (F <= 6e+215) tmp = (1.0 / B) - (x / tan(B)); elseif (F <= 8.5e+296) tmp = t_0; else tmp = (x / sin(B)) * -cos(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(1.0 / F), $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -25500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e-23], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e+102], t$95$0, If[LessEqual[F, 6e+215], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e+296], t$95$0, N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{1}{F}}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -25500000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{-23}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+215}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+296}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\end{array}
\end{array}
if F < -2.55e7Initial program 55.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 74.7%
if -2.55e7 < F < 7.60000000000000023e-23Initial program 99.5%
Taylor expanded in F around -inf 36.8%
Taylor expanded in x around inf 69.2%
associate-/l*69.2%
tan-quot69.2%
div-inv69.2%
Applied egg-rr69.2%
associate-*r/69.2%
*-rgt-identity69.2%
Simplified69.2%
if 7.60000000000000023e-23 < F < 4.50000000000000021e102 or 5.9999999999999998e215 < F < 8.5000000000000003e296Initial program 66.4%
Taylor expanded in F around inf 86.5%
*-commutative86.5%
clear-num86.6%
un-div-inv89.1%
Applied egg-rr89.1%
Taylor expanded in B around 0 82.6%
if 4.50000000000000021e102 < F < 5.9999999999999998e215Initial program 62.6%
Taylor expanded in F around inf 74.4%
Taylor expanded in B around 0 82.1%
+-commutative82.1%
div-inv82.2%
unsub-neg82.2%
Applied egg-rr82.2%
if 8.5000000000000003e296 < F Initial program 98.4%
Taylor expanded in F around -inf 98.4%
Taylor expanded in x around inf 98.4%
mul-1-neg98.4%
associate-*l/99.2%
distribute-rgt-neg-in99.2%
Simplified99.2%
Final simplification75.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (/ 1.0 F) (/ (sin B) F)) (/ x B))) (t_1 (/ x (tan B))))
(if (<= F -0.000155)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.42e-24)
(/ (- x) (tan B))
(if (<= F 3.8e+102)
t_0
(if (<= F 1.36e+216)
(- (/ 1.0 B) t_1)
(if (<= F 1.7e+296) t_0 (* (/ x (sin B)) (- (cos B))))))))))
double code(double F, double B, double x) {
double t_0 = ((1.0 / F) / (sin(B) / F)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.000155) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.42e-24) {
tmp = -x / tan(B);
} else if (F <= 3.8e+102) {
tmp = t_0;
} else if (F <= 1.36e+216) {
tmp = (1.0 / B) - t_1;
} else if (F <= 1.7e+296) {
tmp = t_0;
} else {
tmp = (x / sin(B)) * -cos(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((1.0d0 / f) / (sin(b) / f)) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.000155d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.42d-24) then
tmp = -x / tan(b)
else if (f <= 3.8d+102) then
tmp = t_0
else if (f <= 1.36d+216) then
tmp = (1.0d0 / b) - t_1
else if (f <= 1.7d+296) then
tmp = t_0
else
tmp = (x / sin(b)) * -cos(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((1.0 / F) / (Math.sin(B) / F)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.000155) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.42e-24) {
tmp = -x / Math.tan(B);
} else if (F <= 3.8e+102) {
tmp = t_0;
} else if (F <= 1.36e+216) {
tmp = (1.0 / B) - t_1;
} else if (F <= 1.7e+296) {
tmp = t_0;
} else {
tmp = (x / Math.sin(B)) * -Math.cos(B);
}
return tmp;
}
def code(F, B, x): t_0 = ((1.0 / F) / (math.sin(B) / F)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.000155: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.42e-24: tmp = -x / math.tan(B) elif F <= 3.8e+102: tmp = t_0 elif F <= 1.36e+216: tmp = (1.0 / B) - t_1 elif F <= 1.7e+296: tmp = t_0 else: tmp = (x / math.sin(B)) * -math.cos(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(1.0 / F) / Float64(sin(B) / F)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000155) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.42e-24) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 3.8e+102) tmp = t_0; elseif (F <= 1.36e+216) tmp = Float64(Float64(1.0 / B) - t_1); elseif (F <= 1.7e+296) tmp = t_0; else tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((1.0 / F) / (sin(B) / F)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.000155) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.42e-24) tmp = -x / tan(B); elseif (F <= 3.8e+102) tmp = t_0; elseif (F <= 1.36e+216) tmp = (1.0 / B) - t_1; elseif (F <= 1.7e+296) tmp = t_0; else tmp = (x / sin(B)) * -cos(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(1.0 / F), $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.42e-24], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e+102], t$95$0, If[LessEqual[F, 1.36e+216], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.7e+296], t$95$0, N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{1}{F}}{\frac{\sin B}{F}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000155:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.42 \cdot 10^{-24}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.36 \cdot 10^{+216}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{+296}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\end{array}
\end{array}
if F < -1.55e-4Initial program 57.6%
Simplified70.1%
Taylor expanded in x around 0 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around -inf 99.5%
if -1.55e-4 < F < 1.42e-24Initial program 99.5%
Taylor expanded in F around -inf 35.1%
Taylor expanded in x around inf 69.2%
associate-/l*69.2%
tan-quot69.3%
div-inv69.3%
Applied egg-rr69.3%
associate-*r/69.3%
*-rgt-identity69.3%
Simplified69.3%
if 1.42e-24 < F < 3.79999999999999979e102 or 1.36000000000000007e216 < F < 1.7000000000000001e296Initial program 66.4%
Taylor expanded in F around inf 86.5%
*-commutative86.5%
clear-num86.6%
un-div-inv89.1%
Applied egg-rr89.1%
Taylor expanded in B around 0 82.6%
if 3.79999999999999979e102 < F < 1.36000000000000007e216Initial program 62.6%
Taylor expanded in F around inf 74.4%
Taylor expanded in B around 0 82.1%
+-commutative82.1%
div-inv82.2%
unsub-neg82.2%
Applied egg-rr82.2%
if 1.7000000000000001e296 < F Initial program 98.4%
Taylor expanded in F around -inf 98.4%
Taylor expanded in x around inf 98.4%
mul-1-neg98.4%
associate-*l/99.2%
distribute-rgt-neg-in99.2%
Simplified99.2%
Final simplification82.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e-20)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F -4.4e-196)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5)) (/ x B))
(if (<= F 3.6e-13)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (/ F (+ 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 <= -2.7e-20) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= -4.4e-196) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (2.0 * x)), -0.5)) - (x / B);
} else if (F <= 3.6e-13) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (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 <= (-2.7d-20)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= (-4.4d-196)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0))) - (x / b)
else if (f <= 3.6d-13) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((f / (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 <= -2.7e-20) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= -4.4e-196) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5)) - (x / B);
} else if (F <= 3.6e-13) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (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 <= -2.7e-20: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= -4.4e-196: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5)) - (x / B) elif F <= 3.6e-13: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((F / (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 <= -2.7e-20) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= -4.4e-196) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -0.5)) - Float64(x / B)); elseif (F <= 3.6e-13) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(F / 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 <= -2.7e-20) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= -4.4e-196) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (2.0 * x)) ^ -0.5)) - (x / B); elseif (F <= 3.6e-13) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((F / (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, -2.7e-20], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.4e-196], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.6e-13], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $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 -2.7 \cdot 10^{-20}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -4.4 \cdot 10^{-196}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-13}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.7e-20Initial program 59.7%
Simplified71.6%
Taylor expanded in x around 0 71.6%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
associate-*r/71.6%
sqrt-div71.7%
metadata-eval71.7%
un-div-inv71.7%
Applied egg-rr71.7%
Taylor expanded in F around -inf 98.6%
neg-mul-198.6%
Simplified98.6%
if -2.7e-20 < F < -4.4000000000000003e-196Initial program 99.5%
Taylor expanded in B around 0 80.5%
if -4.4000000000000003e-196 < F < 3.5999999999999998e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 94.8%
Taylor expanded in x around 0 94.8%
if 3.5999999999999998e-13 < F Initial program 64.7%
Simplified78.4%
Taylor expanded in x around 0 78.5%
associate-*l/78.4%
*-lft-identity78.4%
+-commutative78.4%
unpow278.4%
fma-undefine78.4%
Simplified78.4%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in F around inf 99.7%
Final simplification95.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.115)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.6e-13)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (/ F (+ 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.115) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.6e-13) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (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.115d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.6d-13) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((f / (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.115) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.6e-13) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (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.115: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.6e-13: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((F / (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.115) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.6e-13) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(F / 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.115) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.6e-13) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((F / (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.115], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.6e-13], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $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.115:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-13}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.115000000000000005Initial program 57.6%
Simplified70.1%
Taylor expanded in x around 0 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around -inf 99.5%
if -0.115000000000000005 < F < 3.5999999999999998e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 82.8%
Taylor expanded in x around 0 82.9%
if 3.5999999999999998e-13 < F Initial program 64.7%
Simplified78.4%
Taylor expanded in x around 0 78.5%
associate-*l/78.4%
*-lft-identity78.4%
+-commutative78.4%
unpow278.4%
fma-undefine78.4%
Simplified78.4%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in F around inf 99.7%
Final simplification92.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.17)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.6e-13)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.17) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.6e-13) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.17d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.6d-13) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.17) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.6e-13) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.17: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.6e-13: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.17) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.6e-13) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.17) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.6e-13) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.6e-13], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / 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 -0.17:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-13}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.170000000000000012Initial program 57.6%
Simplified70.1%
Taylor expanded in x around 0 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around -inf 99.5%
if -0.170000000000000012 < F < 3.5999999999999998e-13Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 82.8%
Taylor expanded in x around 0 82.9%
if 3.5999999999999998e-13 < F Initial program 64.7%
Simplified78.4%
Taylor expanded in x around 0 78.5%
associate-*l/78.4%
*-lft-identity78.4%
+-commutative78.4%
unpow278.4%
fma-undefine78.4%
Simplified78.4%
Taylor expanded in F around inf 99.5%
Final simplification92.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.000155)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.58e-86) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.000155) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.58e-86) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.000155d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.58d-86) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.000155) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.58e-86) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.000155: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.58e-86: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000155) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.58e-86) tmp = Float64(Float64(-x) / 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.000155) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.58e-86) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.58e-86], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000155:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.58 \cdot 10^{-86}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.55e-4Initial program 57.6%
Simplified70.1%
Taylor expanded in x around 0 70.1%
associate-*l/70.1%
*-lft-identity70.1%
+-commutative70.1%
unpow270.1%
fma-undefine70.1%
Simplified70.1%
Taylor expanded in F around -inf 99.5%
if -1.55e-4 < F < 1.58000000000000007e-86Initial program 99.4%
Taylor expanded in F around -inf 32.4%
Taylor expanded in x around inf 69.0%
associate-/l*69.0%
tan-quot69.1%
div-inv69.0%
Applied egg-rr69.0%
associate-*r/69.1%
*-rgt-identity69.1%
Simplified69.1%
if 1.58000000000000007e-86 < F Initial program 68.4%
Simplified80.6%
Taylor expanded in x around 0 80.7%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 95.3%
Final simplification86.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))) (t_1 (- (/ (/ 1.0 F) (/ (sin B) F)) (/ x B))))
(if (<= F -25500000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7.6e-23)
t_0
(if (<= F 7.5e+102)
t_1
(if (<= F 4.05e+217)
(- (/ 1.0 B) (/ x (tan B)))
(if (<= F 8.5e+296) t_1 t_0)))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = ((1.0 / F) / (sin(B) / F)) - (x / B);
double tmp;
if (F <= -25500000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7.6e-23) {
tmp = t_0;
} else if (F <= 7.5e+102) {
tmp = t_1;
} else if (F <= 4.05e+217) {
tmp = (1.0 / B) - (x / tan(B));
} else if (F <= 8.5e+296) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = ((1.0d0 / f) / (sin(b) / f)) - (x / b)
if (f <= (-25500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7.6d-23) then
tmp = t_0
else if (f <= 7.5d+102) then
tmp = t_1
else if (f <= 4.05d+217) then
tmp = (1.0d0 / b) - (x / tan(b))
else if (f <= 8.5d+296) then
tmp = t_1
else
tmp = 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 t_1 = ((1.0 / F) / (Math.sin(B) / F)) - (x / B);
double tmp;
if (F <= -25500000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7.6e-23) {
tmp = t_0;
} else if (F <= 7.5e+102) {
tmp = t_1;
} else if (F <= 4.05e+217) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else if (F <= 8.5e+296) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = ((1.0 / F) / (math.sin(B) / F)) - (x / B) tmp = 0 if F <= -25500000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7.6e-23: tmp = t_0 elif F <= 7.5e+102: tmp = t_1 elif F <= 4.05e+217: tmp = (1.0 / B) - (x / math.tan(B)) elif F <= 8.5e+296: tmp = t_1 else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(Float64(1.0 / F) / Float64(sin(B) / F)) - Float64(x / B)) tmp = 0.0 if (F <= -25500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7.6e-23) tmp = t_0; elseif (F <= 7.5e+102) tmp = t_1; elseif (F <= 4.05e+217) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); elseif (F <= 8.5e+296) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = ((1.0 / F) / (sin(B) / F)) - (x / B); tmp = 0.0; if (F <= -25500000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7.6e-23) tmp = t_0; elseif (F <= 7.5e+102) tmp = t_1; elseif (F <= 4.05e+217) tmp = (1.0 / B) - (x / tan(B)); elseif (F <= 8.5e+296) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(1.0 / F), $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -25500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e-23], t$95$0, If[LessEqual[F, 7.5e+102], t$95$1, If[LessEqual[F, 4.05e+217], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e+296], t$95$1, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{\frac{1}{F}}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -25500000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{-23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 4.05 \cdot 10^{+217}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+296}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -2.55e7Initial program 55.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 74.7%
if -2.55e7 < F < 7.60000000000000023e-23 or 8.5000000000000003e296 < F Initial program 99.4%
Taylor expanded in F around -inf 38.0%
Taylor expanded in x around inf 69.7%
associate-/l*69.7%
tan-quot69.8%
div-inv69.7%
Applied egg-rr69.7%
associate-*r/69.8%
*-rgt-identity69.8%
Simplified69.8%
if 7.60000000000000023e-23 < F < 7.5e102 or 4.0499999999999998e217 < F < 8.5000000000000003e296Initial program 66.4%
Taylor expanded in F around inf 86.5%
*-commutative86.5%
clear-num86.6%
un-div-inv89.1%
Applied egg-rr89.1%
Taylor expanded in B around 0 82.6%
if 7.5e102 < F < 4.0499999999999998e217Initial program 62.6%
Taylor expanded in F around inf 74.4%
Taylor expanded in B around 0 82.1%
+-commutative82.1%
div-inv82.2%
unsub-neg82.2%
Applied egg-rr82.2%
Final simplification75.0%
(FPCore (F B x)
:precision binary64
(if (<= F -25500000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7.6e-23)
(/ (- x) (tan B))
(if (<= F 7.4e+102)
(- (* (/ 1.0 F) (/ F (sin B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -25500000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7.6e-23) {
tmp = -x / tan(B);
} else if (F <= 7.4e+102) {
tmp = ((1.0 / F) * (F / sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-25500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7.6d-23) then
tmp = -x / tan(b)
else if (f <= 7.4d+102) then
tmp = ((1.0d0 / f) * (f / sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -25500000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7.6e-23) {
tmp = -x / Math.tan(B);
} else if (F <= 7.4e+102) {
tmp = ((1.0 / F) * (F / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -25500000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7.6e-23: tmp = -x / math.tan(B) elif F <= 7.4e+102: tmp = ((1.0 / F) * (F / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -25500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7.6e-23) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 7.4e+102) tmp = Float64(Float64(Float64(1.0 / F) * Float64(F / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -25500000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7.6e-23) tmp = -x / tan(B); elseif (F <= 7.4e+102) tmp = ((1.0 / F) * (F / sin(B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -25500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e-23], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.4e+102], N[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -25500000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{-23}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 7.4 \cdot 10^{+102}:\\
\;\;\;\;\frac{1}{F} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.55e7Initial program 55.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 74.7%
if -2.55e7 < F < 7.60000000000000023e-23Initial program 99.5%
Taylor expanded in F around -inf 36.8%
Taylor expanded in x around inf 69.2%
associate-/l*69.2%
tan-quot69.2%
div-inv69.2%
Applied egg-rr69.2%
associate-*r/69.2%
*-rgt-identity69.2%
Simplified69.2%
if 7.60000000000000023e-23 < F < 7.40000000000000045e102Initial program 96.2%
Taylor expanded in F around inf 88.8%
Taylor expanded in B around 0 81.9%
if 7.40000000000000045e102 < F Initial program 50.0%
Taylor expanded in F around inf 78.0%
Taylor expanded in B around 0 73.8%
+-commutative73.8%
div-inv73.9%
unsub-neg73.9%
Applied egg-rr73.9%
Final simplification73.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- 1.0 x) B)))
(if (<= B 1.1e-174)
t_0
(if (<= B 1.606e-74)
(- (/ x B))
(if (<= B 8.8e-21) t_0 (* x (/ -1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = (1.0 - x) / B;
double tmp;
if (B <= 1.1e-174) {
tmp = t_0;
} else if (B <= 1.606e-74) {
tmp = -(x / B);
} else if (B <= 8.8e-21) {
tmp = t_0;
} else {
tmp = x * (-1.0 / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 - x) / b
if (b <= 1.1d-174) then
tmp = t_0
else if (b <= 1.606d-74) then
tmp = -(x / b)
else if (b <= 8.8d-21) then
tmp = t_0
else
tmp = x * ((-1.0d0) / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 - x) / B;
double tmp;
if (B <= 1.1e-174) {
tmp = t_0;
} else if (B <= 1.606e-74) {
tmp = -(x / B);
} else if (B <= 8.8e-21) {
tmp = t_0;
} else {
tmp = x * (-1.0 / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 - x) / B tmp = 0 if B <= 1.1e-174: tmp = t_0 elif B <= 1.606e-74: tmp = -(x / B) elif B <= 8.8e-21: tmp = t_0 else: tmp = x * (-1.0 / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 - x) / B) tmp = 0.0 if (B <= 1.1e-174) tmp = t_0; elseif (B <= 1.606e-74) tmp = Float64(-Float64(x / B)); elseif (B <= 8.8e-21) tmp = t_0; else tmp = Float64(x * Float64(-1.0 / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 - x) / B; tmp = 0.0; if (B <= 1.1e-174) tmp = t_0; elseif (B <= 1.606e-74) tmp = -(x / B); elseif (B <= 8.8e-21) tmp = t_0; else tmp = x * (-1.0 / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 1.1e-174], t$95$0, If[LessEqual[B, 1.606e-74], (-N[(x / B), $MachinePrecision]), If[LessEqual[B, 8.8e-21], t$95$0, N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1 - x}{B}\\
\mathbf{if}\;B \leq 1.1 \cdot 10^{-174}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.606 \cdot 10^{-74}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{elif}\;B \leq 8.8 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if B < 1.10000000000000011e-174 or 1.6060000000000001e-74 < B < 8.8000000000000002e-21Initial program 75.3%
Taylor expanded in F around inf 48.4%
Taylor expanded in B around 0 58.0%
Taylor expanded in B around 0 39.9%
if 1.10000000000000011e-174 < B < 1.6060000000000001e-74Initial program 86.4%
Taylor expanded in F around -inf 67.7%
Taylor expanded in x around inf 74.7%
Taylor expanded in B around 0 74.7%
if 8.8000000000000002e-21 < B Initial program 77.9%
Taylor expanded in F around -inf 57.5%
Taylor expanded in x around inf 47.5%
associate-/l*47.4%
tan-quot47.6%
clear-num47.6%
associate-/r/47.7%
Applied egg-rr47.7%
Final simplification44.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- 1.0 x) B)))
(if (<= B 6.2e-174)
t_0
(if (<= B 1.606e-74)
(- (/ x B))
(if (<= B 1.4e-20) t_0 (/ (- x) (tan B)))))))
double code(double F, double B, double x) {
double t_0 = (1.0 - x) / B;
double tmp;
if (B <= 6.2e-174) {
tmp = t_0;
} else if (B <= 1.606e-74) {
tmp = -(x / B);
} else if (B <= 1.4e-20) {
tmp = t_0;
} else {
tmp = -x / tan(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 - x) / b
if (b <= 6.2d-174) then
tmp = t_0
else if (b <= 1.606d-74) then
tmp = -(x / b)
else if (b <= 1.4d-20) then
tmp = t_0
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 - x) / B;
double tmp;
if (B <= 6.2e-174) {
tmp = t_0;
} else if (B <= 1.606e-74) {
tmp = -(x / B);
} else if (B <= 1.4e-20) {
tmp = t_0;
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 - x) / B tmp = 0 if B <= 6.2e-174: tmp = t_0 elif B <= 1.606e-74: tmp = -(x / B) elif B <= 1.4e-20: tmp = t_0 else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 - x) / B) tmp = 0.0 if (B <= 6.2e-174) tmp = t_0; elseif (B <= 1.606e-74) tmp = Float64(-Float64(x / B)); elseif (B <= 1.4e-20) tmp = t_0; else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 - x) / B; tmp = 0.0; if (B <= 6.2e-174) tmp = t_0; elseif (B <= 1.606e-74) tmp = -(x / B); elseif (B <= 1.4e-20) tmp = t_0; else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 6.2e-174], t$95$0, If[LessEqual[B, 1.606e-74], (-N[(x / B), $MachinePrecision]), If[LessEqual[B, 1.4e-20], t$95$0, N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1 - x}{B}\\
\mathbf{if}\;B \leq 6.2 \cdot 10^{-174}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.606 \cdot 10^{-74}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-20}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if B < 6.1999999999999998e-174 or 1.6060000000000001e-74 < B < 1.4000000000000001e-20Initial program 75.3%
Taylor expanded in F around inf 48.4%
Taylor expanded in B around 0 58.0%
Taylor expanded in B around 0 39.9%
if 6.1999999999999998e-174 < B < 1.6060000000000001e-74Initial program 86.4%
Taylor expanded in F around -inf 67.7%
Taylor expanded in x around inf 74.7%
Taylor expanded in B around 0 74.7%
if 1.4000000000000001e-20 < B Initial program 77.9%
Taylor expanded in F around -inf 57.5%
Taylor expanded in x around inf 47.5%
associate-/l*47.4%
tan-quot47.6%
div-inv47.7%
Applied egg-rr47.7%
associate-*r/47.6%
*-rgt-identity47.6%
Simplified47.6%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (<= F -25500000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 4.3e-83) (/ (- x) (tan B)) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -25500000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.3e-83) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-25500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.3d-83) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -25500000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.3e-83) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -25500000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.3e-83: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -25500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.3e-83) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -25500000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.3e-83) tmp = -x / tan(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -25500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-83], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -25500000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-83}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.55e7Initial program 55.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 74.7%
if -2.55e7 < F < 4.30000000000000033e-83Initial program 99.4%
Taylor expanded in F around -inf 34.3%
Taylor expanded in x around inf 68.9%
associate-/l*68.9%
tan-quot69.0%
div-inv68.9%
Applied egg-rr68.9%
associate-*r/69.0%
*-rgt-identity69.0%
Simplified69.0%
if 4.30000000000000033e-83 < F Initial program 68.4%
Taylor expanded in F around inf 81.0%
Taylor expanded in B around 0 70.7%
+-commutative70.7%
div-inv70.7%
unsub-neg70.7%
Applied egg-rr70.7%
Final simplification71.2%
(FPCore (F B x) :precision binary64 (if (<= F -0.008) (/ (- -1.0 x) B) (if (<= F 6.5e-77) (/ (- x) (sin B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.008) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.5e-77) {
tmp = -x / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.008d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6.5d-77) then
tmp = -x / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.008) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.5e-77) {
tmp = -x / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.008: tmp = (-1.0 - x) / B elif F <= 6.5e-77: tmp = -x / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.008) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6.5e-77) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.008) tmp = (-1.0 - x) / B; elseif (F <= 6.5e-77) tmp = -x / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.008], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.5e-77], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.008:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-77}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.0080000000000000002Initial program 57.6%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 41.7%
associate-*r/41.7%
distribute-lft-in41.7%
metadata-eval41.7%
neg-mul-141.7%
Simplified41.7%
if -0.0080000000000000002 < F < 6.4999999999999999e-77Initial program 99.4%
Taylor expanded in F around -inf 32.4%
Taylor expanded in x around inf 69.0%
Taylor expanded in B around 0 37.9%
if 6.4999999999999999e-77 < F Initial program 68.4%
Taylor expanded in F around inf 81.0%
Taylor expanded in B around 0 70.7%
Taylor expanded in B around 0 51.3%
Final simplification43.6%
(FPCore (F B x) :precision binary64 (if (<= F 1.32e-83) (/ (- x) (tan B)) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.32e-83) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.32d-83) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.32e-83) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.32e-83: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.32e-83) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.32e-83) tmp = -x / tan(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.32e-83], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.32 \cdot 10^{-83}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < 1.31999999999999994e-83Initial program 80.9%
Taylor expanded in F around -inf 62.1%
Taylor expanded in x around inf 58.9%
associate-/l*58.8%
tan-quot58.9%
div-inv58.8%
Applied egg-rr58.8%
associate-*r/58.9%
*-rgt-identity58.9%
Simplified58.9%
if 1.31999999999999994e-83 < F Initial program 68.4%
Taylor expanded in F around inf 81.0%
Taylor expanded in B around 0 70.7%
+-commutative70.7%
div-inv70.7%
unsub-neg70.7%
Applied egg-rr70.7%
Final simplification62.9%
(FPCore (F B x) :precision binary64 (if (<= F -2e-12) (+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666))) (if (<= F 6.4e-78) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-12) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 6.4e-78) {
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 <= (-2d-12)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 6.4d-78) 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 <= -2e-12) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 6.4e-78) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-12: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 6.4e-78: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-12) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 6.4e-78) 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 <= -2e-12) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 6.4e-78) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-12], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.4e-78], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 6.4 \cdot 10^{-78}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.99999999999999996e-12Initial program 58.2%
Taylor expanded in F around -inf 99.3%
Taylor expanded in B around 0 41.3%
if -1.99999999999999996e-12 < F < 6.4e-78Initial program 99.5%
Taylor expanded in F around -inf 31.7%
Taylor expanded in x around inf 68.7%
Taylor expanded in B around 0 35.3%
if 6.4e-78 < F Initial program 68.4%
Taylor expanded in F around inf 81.0%
Taylor expanded in B around 0 70.7%
Taylor expanded in B around 0 51.3%
Final simplification42.5%
(FPCore (F B x) :precision binary64 (if (<= F -0.000155) (/ (- -1.0 x) B) (if (<= F 3.65e-79) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.000155) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.65e-79) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.000155d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.65d-79) then
tmp = -(x / b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.000155) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.65e-79) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.000155: tmp = (-1.0 - x) / B elif F <= 3.65e-79: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.000155) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.65e-79) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.000155) tmp = (-1.0 - x) / B; elseif (F <= 3.65e-79) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.000155], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.65e-79], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.000155:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.65 \cdot 10^{-79}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.55e-4Initial program 57.6%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 41.7%
associate-*r/41.7%
distribute-lft-in41.7%
metadata-eval41.7%
neg-mul-141.7%
Simplified41.7%
if -1.55e-4 < F < 3.6499999999999999e-79Initial program 99.4%
Taylor expanded in F around -inf 32.4%
Taylor expanded in x around inf 69.0%
Taylor expanded in B around 0 34.9%
if 3.6499999999999999e-79 < F Initial program 68.4%
Taylor expanded in F around inf 81.0%
Taylor expanded in B around 0 70.7%
Taylor expanded in B around 0 51.3%
Final simplification42.5%
(FPCore (F B x) :precision binary64 (if (or (<= x -6.6e-144) (not (<= x 8.8e-69))) (- (/ x B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -6.6e-144) || !(x <= 8.8e-69)) {
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 <= (-6.6d-144)) .or. (.not. (x <= 8.8d-69))) 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 <= -6.6e-144) || !(x <= 8.8e-69)) {
tmp = -(x / B);
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -6.6e-144) or not (x <= 8.8e-69): tmp = -(x / B) else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -6.6e-144) || !(x <= 8.8e-69)) 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 <= -6.6e-144) || ~((x <= 8.8e-69))) tmp = -(x / B); else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -6.6e-144], N[Not[LessEqual[x, 8.8e-69]], $MachinePrecision]], (-N[(x / B), $MachinePrecision]), N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{-144} \lor \neg \left(x \leq 8.8 \cdot 10^{-69}\right):\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -6.5999999999999999e-144 or 8.8000000000000001e-69 < x Initial program 81.8%
Taylor expanded in F around -inf 78.9%
Taylor expanded in x around inf 82.1%
Taylor expanded in B around 0 44.5%
if -6.5999999999999999e-144 < x < 8.8000000000000001e-69Initial program 69.9%
Taylor expanded in F around inf 27.9%
Taylor expanded in B around 0 25.6%
Taylor expanded in x around 0 20.3%
Final simplification34.0%
(FPCore (F B x) :precision binary64 (if (<= F 6.2e-89) (- (/ x B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 6.2e-89) {
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 <= 6.2d-89) 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 <= 6.2e-89) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 6.2e-89: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 6.2e-89) 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 <= 6.2e-89) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 6.2e-89], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 6.2 \cdot 10^{-89}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 6.19999999999999993e-89Initial program 80.9%
Taylor expanded in F around -inf 62.1%
Taylor expanded in x around inf 58.9%
Taylor expanded in B around 0 29.4%
if 6.19999999999999993e-89 < F Initial program 68.4%
Taylor expanded in F around inf 81.0%
Taylor expanded in B around 0 70.7%
Taylor expanded in B around 0 51.3%
Final simplification36.9%
(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 76.6%
Taylor expanded in F around inf 50.5%
Taylor expanded in B around 0 54.3%
Taylor expanded in x around 0 11.1%
Final simplification11.1%
herbie shell --seed 2024034
(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))))))