
(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 22 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))) (t_1 (/ 1.0 (pow F 2.0))))
(if (<= F -9500.0)
(- (/ (+ t_1 -1.0) (sin B)) t_0)
(if (<= F 130.0)
(- (* F (/ (/ 1.0 (sqrt (fma F F 2.0))) (sin B))) t_0)
(-
(/
(- (+ 1.0 (/ 1.5 (pow F 4.0))) (+ t_1 (* 2.5 (/ 1.0 (pow F 6.0)))))
(sin B))
t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 1.0 / pow(F, 2.0);
double tmp;
if (F <= -9500.0) {
tmp = ((t_1 + -1.0) / sin(B)) - t_0;
} else if (F <= 130.0) {
tmp = (F * ((1.0 / sqrt(fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (((1.0 + (1.5 / pow(F, 4.0))) - (t_1 + (2.5 * (1.0 / pow(F, 6.0))))) / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(1.0 / (F ^ 2.0)) tmp = 0.0 if (F <= -9500.0) tmp = Float64(Float64(Float64(t_1 + -1.0) / sin(B)) - t_0); elseif (F <= 130.0) tmp = Float64(Float64(F * Float64(Float64(1.0 / sqrt(fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(Float64(1.0 + Float64(1.5 / (F ^ 4.0))) - Float64(t_1 + Float64(2.5 * Float64(1.0 / (F ^ 6.0))))) / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9500.0], N[(N[(N[(t$95$1 + -1.0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 130.0], N[(N[(F * N[(N[(1.0 / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(N[(1.0 + N[(1.5 / N[Power[F, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 + N[(2.5 * N[(1.0 / N[Power[F, 6.0], $MachinePrecision]), $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}\\
t_1 := \frac{1}{{F}^{2}}\\
\mathbf{if}\;F \leq -9500:\\
\;\;\;\;\frac{t\_1 + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 130:\\
\;\;\;\;F \cdot \frac{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \frac{1.5}{{F}^{4}}\right) - \left(t\_1 + 2.5 \cdot \frac{1}{{F}^{6}}\right)}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9500Initial program 51.7%
Simplified63.5%
Taylor expanded in x around 0 63.5%
associate-*l/63.5%
*-lft-identity63.5%
+-commutative63.5%
unpow263.5%
fma-undefine63.5%
Simplified63.5%
associate-*r/63.6%
inv-pow63.6%
sqrt-pow163.6%
metadata-eval63.6%
Applied egg-rr63.6%
Taylor expanded in F around -inf 99.6%
if -9500 < F < 130Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
sqrt-div99.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 130 < F Initial program 45.1%
Simplified71.0%
Taylor expanded in x around 0 71.1%
associate-*l/71.0%
*-lft-identity71.0%
+-commutative71.0%
unpow271.0%
fma-undefine71.0%
Simplified71.0%
associate-*r/71.1%
inv-pow71.1%
sqrt-pow171.1%
metadata-eval71.1%
Applied egg-rr71.1%
Taylor expanded in F around inf 99.9%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -11000.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 100000000.0)
(- (* F (/ (/ 1.0 (sqrt (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 <= -11000.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (F * ((1.0 / sqrt(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 <= -11000.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(F * Float64(Float64(1.0 / sqrt(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, -11000.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, 100000000.0], N[(N[(F * N[(N[(1.0 / N[Sqrt[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 -11000:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;F \cdot \frac{\frac{1}{\sqrt{\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 < -11000Initial program 51.7%
Simplified63.5%
Taylor expanded in x around 0 63.5%
associate-*l/63.5%
*-lft-identity63.5%
+-commutative63.5%
unpow263.5%
fma-undefine63.5%
Simplified63.5%
associate-*r/63.6%
inv-pow63.6%
sqrt-pow163.6%
metadata-eval63.6%
Applied egg-rr63.6%
Taylor expanded in F around -inf 99.6%
if -11000 < F < 1e8Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
sqrt-div99.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 1e8 < F Initial program 44.2%
Simplified70.6%
Taylor expanded in x around 0 70.7%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-undefine70.6%
Simplified70.6%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.5e+142)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.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 <= -4.5e+142) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.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 <= -4.5e+142) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.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, -4.5e+142], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.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 -4.5 \cdot 10^{+142}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\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 < -4.4999999999999999e142Initial program 33.2%
Simplified44.7%
Taylor expanded in x around 0 44.7%
associate-*l/44.7%
*-lft-identity44.7%
+-commutative44.7%
unpow244.7%
fma-undefine44.7%
Simplified44.7%
Taylor expanded in F around -inf 99.6%
if -4.4999999999999999e142 < F < 1e8Initial program 97.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.5%
inv-pow99.5%
sqrt-pow199.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 1e8 < F Initial program 44.2%
Simplified70.6%
Taylor expanded in x around 0 70.7%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-undefine70.6%
Simplified70.6%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -55.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 96000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -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 <= -55.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 96000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= (-55.0d0)) then
tmp = (((1.0d0 / (f ** 2.0d0)) + (-1.0d0)) / sin(b)) - t_0
else if (f <= 96000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-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 <= -55.0) {
tmp = (((1.0 / Math.pow(F, 2.0)) + -1.0) / Math.sin(B)) - t_0;
} else if (F <= 96000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= -55.0: tmp = (((1.0 / math.pow(F, 2.0)) + -1.0) / math.sin(B)) - t_0 elif F <= 96000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (2.0 * x)), -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 <= -55.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 96000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -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 <= -55.0) tmp = (((1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0; elseif (F <= 96000000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (2.0 * x)) ^ -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, -55.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, 96000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 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]), $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 -55:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 96000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -55Initial program 52.4%
Simplified64.0%
Taylor expanded in x around 0 64.0%
associate-*l/64.0%
*-lft-identity64.0%
+-commutative64.0%
unpow264.0%
fma-undefine64.0%
Simplified64.0%
associate-*r/64.1%
inv-pow64.1%
sqrt-pow164.1%
metadata-eval64.1%
Applied egg-rr64.1%
Taylor expanded in F around -inf 99.6%
if -55 < F < 9.6e7Initial program 99.4%
if 9.6e7 < F Initial program 44.2%
Simplified70.6%
Taylor expanded in x around 0 70.7%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-undefine70.6%
Simplified70.6%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (/ 1.0 (sin B))))
(if (<= F -56.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 1.8)
(- (* F (* t_1 (sqrt (/ 1.0 (+ 2.0 (* 2.0 x)))))) t_0)
(- t_1 t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 1.0 / sin(B);
double tmp;
if (F <= -56.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 1.8) {
tmp = (F * (t_1 * sqrt((1.0 / (2.0 + (2.0 * x)))))) - t_0;
} else {
tmp = t_1 - 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 / sin(b)
if (f <= (-56.0d0)) then
tmp = (((1.0d0 / (f ** 2.0d0)) + (-1.0d0)) / sin(b)) - t_0
else if (f <= 1.8d0) then
tmp = (f * (t_1 * sqrt((1.0d0 / (2.0d0 + (2.0d0 * x)))))) - t_0
else
tmp = t_1 - 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 / Math.sin(B);
double tmp;
if (F <= -56.0) {
tmp = (((1.0 / Math.pow(F, 2.0)) + -1.0) / Math.sin(B)) - t_0;
} else if (F <= 1.8) {
tmp = (F * (t_1 * Math.sqrt((1.0 / (2.0 + (2.0 * x)))))) - t_0;
} else {
tmp = t_1 - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = 1.0 / math.sin(B) tmp = 0 if F <= -56.0: tmp = (((1.0 / math.pow(F, 2.0)) + -1.0) / math.sin(B)) - t_0 elif F <= 1.8: tmp = (F * (t_1 * math.sqrt((1.0 / (2.0 + (2.0 * x)))))) - t_0 else: tmp = t_1 - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -56.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 1.8) tmp = Float64(Float64(F * Float64(t_1 * sqrt(Float64(1.0 / Float64(2.0 + Float64(2.0 * x)))))) - t_0); else tmp = Float64(t_1 - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = 1.0 / sin(B); tmp = 0.0; if (F <= -56.0) tmp = (((1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0; elseif (F <= 1.8) tmp = (F * (t_1 * sqrt((1.0 / (2.0 + (2.0 * x)))))) - t_0; else tmp = t_1 - 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -56.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, 1.8], N[(N[(F * N[(t$95$1 * N[Sqrt[N[(1.0 / N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(t$95$1 - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -56:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.8:\\
\;\;\;\;F \cdot \left(t\_1 \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_0\\
\end{array}
\end{array}
if F < -56Initial program 51.7%
Simplified63.5%
Taylor expanded in x around 0 63.5%
associate-*l/63.5%
*-lft-identity63.5%
+-commutative63.5%
unpow263.5%
fma-undefine63.5%
Simplified63.5%
associate-*r/63.6%
inv-pow63.6%
sqrt-pow163.6%
metadata-eval63.6%
Applied egg-rr63.6%
Taylor expanded in F around -inf 99.6%
if -56 < F < 1.80000000000000004Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.3%
if 1.80000000000000004 < F Initial program 45.1%
Simplified71.0%
Taylor expanded in x around 0 71.1%
associate-*l/71.0%
*-lft-identity71.0%
+-commutative71.0%
unpow271.0%
fma-undefine71.0%
Simplified71.0%
Taylor expanded in F around inf 98.9%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -56.0)
(- (/ (+ (/ 1.0 (pow F 2.0)) -1.0) (sin B)) t_0)
(if (<= F 1.4)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -56.0) {
tmp = (((1.0 / pow(F, 2.0)) + -1.0) / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-56.0d0)) then
tmp = (((1.0d0 / (f ** 2.0d0)) + (-1.0d0)) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -56.0) {
tmp = (((1.0 / Math.pow(F, 2.0)) + -1.0) / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -56.0: tmp = (((1.0 / math.pow(F, 2.0)) + -1.0) / math.sin(B)) - t_0 elif F <= 1.4: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -56.0) tmp = Float64(Float64(Float64(Float64(1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -56.0) tmp = (((1.0 / (F ^ 2.0)) + -1.0) / sin(B)) - t_0; elseif (F <= 1.4) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -56.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, 1.4], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -56:\\
\;\;\;\;\frac{\frac{1}{{F}^{2}} + -1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -56Initial program 51.7%
Simplified63.5%
Taylor expanded in x around 0 63.5%
associate-*l/63.5%
*-lft-identity63.5%
+-commutative63.5%
unpow263.5%
fma-undefine63.5%
Simplified63.5%
associate-*r/63.6%
inv-pow63.6%
sqrt-pow163.6%
metadata-eval63.6%
Applied egg-rr63.6%
Taylor expanded in F around -inf 99.6%
if -56 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
if 1.3999999999999999 < F Initial program 45.1%
Simplified71.0%
Taylor expanded in x around 0 71.1%
associate-*l/71.0%
*-lft-identity71.0%
+-commutative71.0%
unpow271.0%
fma-undefine71.0%
Simplified71.0%
Taylor expanded in F around inf 98.9%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -56.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -56.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-56.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -56.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -56.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -56.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -56.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -56.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -56:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -56Initial program 51.7%
Simplified63.5%
Taylor expanded in x around 0 63.5%
associate-*l/63.5%
*-lft-identity63.5%
+-commutative63.5%
unpow263.5%
fma-undefine63.5%
Simplified63.5%
Taylor expanded in F around -inf 99.3%
if -56 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
if 1.3999999999999999 < F Initial program 45.1%
Simplified71.0%
Taylor expanded in x around 0 71.1%
associate-*l/71.0%
*-lft-identity71.0%
+-commutative71.0%
unpow271.0%
fma-undefine71.0%
Simplified71.0%
Taylor expanded in F around inf 98.9%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -56.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -56.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-56.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -56.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -56.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -56.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -56.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -56.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -56:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -56Initial program 51.7%
Simplified63.5%
Taylor expanded in x around 0 63.5%
associate-*l/63.5%
*-lft-identity63.5%
+-commutative63.5%
unpow263.5%
fma-undefine63.5%
Simplified63.5%
Taylor expanded in F around -inf 99.3%
if -56 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.3%
if 1.3999999999999999 < F Initial program 45.1%
Simplified71.0%
Taylor expanded in x around 0 71.1%
associate-*l/71.0%
*-lft-identity71.0%
+-commutative71.0%
unpow271.0%
fma-undefine71.0%
Simplified71.0%
Taylor expanded in F around inf 98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 2.0 x)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -55.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.2e-131)
t_0
(if (<= F 2.95e-92)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1400000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (2.0 * x)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -55.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.2e-131) {
tmp = t_0;
} else if (F <= 2.95e-92) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1400000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (2.0d0 * x)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-55.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.2d-131)) then
tmp = t_0
else if (f <= 2.95d-92) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1400000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -55.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.2e-131) {
tmp = t_0;
} else if (F <= 2.95e-92) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1400000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (2.0 * x)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -55.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.2e-131: tmp = t_0 elif F <= 2.95e-92: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1400000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(2.0 * x)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -55.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.2e-131) tmp = t_0; elseif (F <= 2.95e-92) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1400000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (2.0 * x)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -55.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.2e-131) tmp = t_0; elseif (F <= 2.95e-92) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1400000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -55.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.2e-131], t$95$0, If[LessEqual[F, 2.95e-92], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1400000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + 2 \cdot x\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -55:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-131}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-92}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1400000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -55Initial program 52.4%
Simplified64.0%
Taylor expanded in x around 0 64.0%
associate-*l/64.0%
*-lft-identity64.0%
+-commutative64.0%
unpow264.0%
fma-undefine64.0%
Simplified64.0%
Taylor expanded in F around -inf 99.3%
if -55 < F < -2.2e-131 or 2.95e-92 < F < 1.4e6Initial program 99.2%
Taylor expanded in B around 0 75.1%
associate-*r/75.1%
neg-mul-175.1%
Simplified75.1%
if -2.2e-131 < F < 2.95e-92Initial program 99.5%
Taylor expanded in F around -inf 35.7%
Taylor expanded in x around inf 81.7%
if 1.4e6 < F Initial program 44.2%
Simplified70.6%
Taylor expanded in x around 0 70.7%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-undefine70.6%
Simplified70.6%
Taylor expanded in F around inf 99.8%
Final simplification89.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.2e-74)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.18e-46)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.2e-74) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.18e-46) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.2d-74)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.18d-46) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.2e-74) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.18e-46) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.2e-74: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.18e-46: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.2e-74) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.18e-46) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.2e-74) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.18e-46) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.2e-74], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.18e-46], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.2 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.18 \cdot 10^{-46}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.2000000000000003e-74Initial program 60.4%
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 91.7%
if -6.2000000000000003e-74 < F < 1.17999999999999995e-46Initial program 99.4%
Taylor expanded in F around -inf 32.5%
Taylor expanded in x around inf 71.5%
if 1.17999999999999995e-46 < F Initial program 49.1%
Simplified73.1%
Taylor expanded in x around 0 73.2%
associate-*l/73.2%
*-lft-identity73.2%
+-commutative73.2%
unpow273.2%
fma-undefine73.2%
Simplified73.2%
Taylor expanded in F around inf 92.3%
Final simplification83.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.2e-74)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.18e-141) (/ (* x (cos B)) (- (sin B))) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.2e-74) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.18e-141) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.2d-74)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.18d-141) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.2e-74) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.18e-141) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.2e-74: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.18e-141: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.2e-74) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.18e-141) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.2e-74) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.18e-141) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.2e-74], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.18e-141], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.2 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.18 \cdot 10^{-141}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -6.2000000000000003e-74Initial program 60.4%
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 91.7%
if -6.2000000000000003e-74 < F < 1.17999999999999993e-141Initial program 99.4%
Taylor expanded in F around -inf 29.7%
Taylor expanded in x around inf 74.2%
if 1.17999999999999993e-141 < F Initial program 60.1%
Simplified78.9%
Taylor expanded in x around 0 78.9%
associate-*l/78.9%
*-lft-identity78.9%
+-commutative78.9%
unpow278.9%
fma-undefine78.9%
Simplified78.9%
Taylor expanded in F around inf 82.3%
Taylor expanded in B around 0 72.0%
Final simplification79.1%
(FPCore (F B x)
:precision binary64
(if (<= F -72.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.18e-141)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -72.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.18e-141) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-72.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.18d-141) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -72.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.18e-141) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -72.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.18e-141: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -72.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.18e-141) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -72.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.18e-141) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -72.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.18e-141], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -72:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.18 \cdot 10^{-141}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -72Initial program 51.7%
Taylor expanded in F around -inf 99.2%
Taylor expanded in B around 0 71.9%
associate-*r/25.6%
neg-mul-125.6%
Simplified71.9%
if -72 < F < 1.17999999999999993e-141Initial program 99.4%
Taylor expanded in F around -inf 33.8%
Taylor expanded in x around inf 71.3%
if 1.17999999999999993e-141 < F Initial program 60.1%
Simplified78.9%
Taylor expanded in x around 0 78.9%
associate-*l/78.9%
*-lft-identity78.9%
+-commutative78.9%
unpow278.9%
fma-undefine78.9%
Simplified78.9%
Taylor expanded in F around inf 82.3%
Taylor expanded in B around 0 72.0%
Final simplification71.7%
(FPCore (F B x)
:precision binary64
(if (<= F -14500.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.4e-82)
(* x (/ (cos B) (- (sin B))))
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -14500.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.4e-82) {
tmp = x * (cos(B) / -sin(B));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-14500.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.4d-82) then
tmp = x * (cos(b) / -sin(b))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -14500.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.4e-82) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -14500.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.4e-82: tmp = x * (math.cos(B) / -math.sin(B)) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -14500.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.4e-82) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -14500.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.4e-82) tmp = x * (cos(B) / -sin(B)); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -14500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-82], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -14500:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-82}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -14500Initial program 51.7%
Taylor expanded in F around -inf 99.2%
Taylor expanded in B around 0 71.9%
associate-*r/25.6%
neg-mul-125.6%
Simplified71.9%
if -14500 < F < 1.40000000000000012e-82Initial program 99.4%
Taylor expanded in F around -inf 35.1%
Taylor expanded in x around inf 70.7%
mul-1-neg70.7%
associate-/l*70.6%
distribute-rgt-neg-in70.6%
distribute-neg-frac70.6%
Simplified70.6%
if 1.40000000000000012e-82 < F Initial program 54.3%
Simplified75.9%
Taylor expanded in x around 0 75.9%
associate-*l/75.9%
*-lft-identity75.9%
+-commutative75.9%
unpow275.9%
fma-undefine75.9%
Simplified75.9%
Taylor expanded in F around inf 87.3%
Taylor expanded in B around 0 73.1%
Final simplification71.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1e-215)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 5.6e-192)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* 2.0 x))))) x) B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e-215) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 5.6e-192) {
tmp = ((F * sqrt((1.0 / (2.0 + (2.0 * x))))) - 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 <= (-1d-215)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 5.6d-192) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (2.0d0 * x))))) - 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 <= -1e-215) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 5.6e-192) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e-215: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 5.6e-192: tmp = ((F * math.sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e-215) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 5.6e-192) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(2.0 * x))))) - 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 <= -1e-215) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 5.6e-192) tmp = ((F * sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e-215], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-192], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-215}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-192}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.00000000000000004e-215Initial program 71.8%
Taylor expanded in F around -inf 72.7%
Taylor expanded in B around 0 61.5%
if -1.00000000000000004e-215 < F < 5.60000000000000007e-192Initial program 99.5%
Simplified99.5%
Taylor expanded in B around 0 67.4%
Taylor expanded in F around 0 67.4%
if 5.60000000000000007e-192 < F Initial program 65.8%
Simplified81.9%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-undefine81.9%
Simplified81.9%
Taylor expanded in F around inf 75.5%
Taylor expanded in B around 0 71.4%
Final simplification66.3%
(FPCore (F B x)
:precision binary64
(if (<= F -112.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -6.5e-258) (not (<= F 1.25e-222)))
(- (/ 1.0 B) (/ x (tan B)))
(/ x (- B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -112.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -6.5e-258) || !(F <= 1.25e-222)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-112.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-6.5d-258)) .or. (.not. (f <= 1.25d-222))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -112.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -6.5e-258) || !(F <= 1.25e-222)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -112.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -6.5e-258) or not (F <= 1.25e-222): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -112.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -6.5e-258) || !(F <= 1.25e-222)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -112.0) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -6.5e-258) || ~((F <= 1.25e-222))) tmp = (1.0 / B) - (x / tan(B)); else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -112.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -6.5e-258], N[Not[LessEqual[F, 1.25e-222]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -112:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-258} \lor \neg \left(F \leq 1.25 \cdot 10^{-222}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -112Initial program 51.7%
Taylor expanded in F around -inf 99.2%
Taylor expanded in B around 0 71.9%
associate-*r/25.6%
neg-mul-125.6%
Simplified71.9%
if -112 < F < -6.5000000000000002e-258 or 1.25000000000000002e-222 < F Initial program 79.0%
Simplified88.8%
Taylor expanded in x around 0 88.8%
associate-*l/88.8%
*-lft-identity88.8%
+-commutative88.8%
unpow288.8%
fma-undefine88.8%
Simplified88.8%
Taylor expanded in F around inf 60.9%
Taylor expanded in B around 0 63.4%
if -6.5000000000000002e-258 < F < 1.25000000000000002e-222Initial program 99.6%
Simplified99.6%
Taylor expanded in B around 0 68.3%
Taylor expanded in F around 0 63.7%
associate-*r/63.7%
neg-mul-163.7%
Simplified63.7%
Final simplification65.6%
(FPCore (F B x)
:precision binary64
(if (<= F -9.2e+194)
(/ (- -1.0 x) B)
(if (or (<= F -1.26e-264) (not (<= F 1.45e-221)))
(- (/ 1.0 B) (/ x (tan B)))
(/ x (- B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.2e+194) {
tmp = (-1.0 - x) / B;
} else if ((F <= -1.26e-264) || !(F <= 1.45e-221)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.2d+194)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= (-1.26d-264)) .or. (.not. (f <= 1.45d-221))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.2e+194) {
tmp = (-1.0 - x) / B;
} else if ((F <= -1.26e-264) || !(F <= 1.45e-221)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.2e+194: tmp = (-1.0 - x) / B elif (F <= -1.26e-264) or not (F <= 1.45e-221): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.2e+194) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= -1.26e-264) || !(F <= 1.45e-221)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.2e+194) tmp = (-1.0 - x) / B; elseif ((F <= -1.26e-264) || ~((F <= 1.45e-221))) tmp = (1.0 / B) - (x / tan(B)); else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.2e+194], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, -1.26e-264], N[Not[LessEqual[F, 1.45e-221]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.2 \cdot 10^{+194}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -1.26 \cdot 10^{-264} \lor \neg \left(F \leq 1.45 \cdot 10^{-221}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -9.2000000000000002e194Initial program 25.4%
Taylor expanded in F around -inf 99.5%
Taylor expanded in B around 0 55.0%
associate-*r/55.0%
distribute-lft-in55.0%
metadata-eval55.0%
neg-mul-155.0%
unsub-neg55.0%
Simplified55.0%
if -9.2000000000000002e194 < F < -1.26000000000000008e-264 or 1.44999999999999997e-221 < F Initial program 77.9%
Simplified87.8%
Taylor expanded in x around 0 87.9%
associate-*l/87.8%
*-lft-identity87.8%
+-commutative87.8%
unpow287.8%
fma-undefine87.8%
Simplified87.8%
Taylor expanded in F around inf 58.0%
Taylor expanded in B around 0 60.1%
if -1.26000000000000008e-264 < F < 1.44999999999999997e-221Initial program 99.6%
Simplified99.6%
Taylor expanded in B around 0 68.3%
Taylor expanded in F around 0 63.7%
associate-*r/63.7%
neg-mul-163.7%
Simplified63.7%
Final simplification59.8%
(FPCore (F B x) :precision binary64 (if (<= B 1.4e-10) (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* 2.0 x)))))) x) B) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (B <= 1.4e-10) {
tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (2.0 * x)))))) - x) / B;
} else {
tmp = (x * (-1.0 / tan(B))) + (-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 (b <= 1.4d-10) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((f * f) + (2.0d0 * x)))))) - x) / b
else
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 1.4e-10) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((F * F) + (2.0 * x)))))) - x) / B;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 1.4e-10: tmp = ((F * math.sqrt((1.0 / (2.0 + ((F * F) + (2.0 * x)))))) - x) / B else: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 1.4e-10) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(2.0 * x)))))) - x) / B); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 1.4e-10) tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (2.0 * x)))))) - x) / B; else tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 1.4e-10], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\end{array}
\end{array}
if B < 1.40000000000000008e-10Initial program 68.2%
Simplified81.6%
Taylor expanded in B around 0 50.2%
unpow250.2%
Applied egg-rr50.2%
if 1.40000000000000008e-10 < B Initial program 86.4%
Taylor expanded in F around -inf 58.3%
Taylor expanded in B around 0 58.1%
Final simplification52.5%
(FPCore (F B x) :precision binary64 (if (<= F -6.8e-264) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)) (if (<= F 6e-224) (/ x (- B)) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.8e-264) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 6e-224) {
tmp = 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 <= (-6.8d-264)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 6d-224) then
tmp = 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 <= -6.8e-264) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 6e-224) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.8e-264: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 6e-224: tmp = x / -B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.8e-264) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 6e-224) tmp = Float64(x / Float64(-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 <= -6.8e-264) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 6e-224) tmp = x / -B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.8e-264], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-224], N[(x / (-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 -6.8 \cdot 10^{-264}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-224}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.7999999999999997e-264Initial program 74.4%
Taylor expanded in F around -inf 71.4%
Taylor expanded in B around 0 62.1%
if -6.7999999999999997e-264 < F < 5.99999999999999963e-224Initial program 99.6%
Simplified99.6%
Taylor expanded in B around 0 68.3%
Taylor expanded in F around 0 63.7%
associate-*r/63.7%
neg-mul-163.7%
Simplified63.7%
if 5.99999999999999963e-224 < F Initial program 67.4%
Simplified82.7%
Taylor expanded in x around 0 82.8%
associate-*l/82.7%
*-lft-identity82.7%
+-commutative82.7%
unpow282.7%
fma-undefine82.7%
Simplified82.7%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 70.1%
Final simplification65.6%
(FPCore (F B x) :precision binary64 (if (<= F -6e-44) (/ (- -1.0 x) B) (if (<= F 1.4e-82) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.4e-82) {
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 <= (-6d-44)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.4d-82) 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 <= -6e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.4e-82) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-44: tmp = (-1.0 - x) / B elif F <= 1.4e-82: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-44) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.4e-82) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6e-44) tmp = (-1.0 - x) / B; elseif (F <= 1.4e-82) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-44], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.4e-82], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-82}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.0000000000000005e-44Initial program 58.4%
Taylor expanded in F around -inf 91.1%
Taylor expanded in B around 0 39.3%
associate-*r/39.3%
distribute-lft-in39.3%
metadata-eval39.3%
neg-mul-139.3%
unsub-neg39.3%
Simplified39.3%
if -6.0000000000000005e-44 < F < 1.40000000000000012e-82Initial program 99.5%
Simplified99.5%
Taylor expanded in B around 0 46.0%
Taylor expanded in F around 0 36.9%
associate-*r/36.9%
neg-mul-136.9%
Simplified36.9%
if 1.40000000000000012e-82 < F Initial program 54.3%
Simplified75.9%
Taylor expanded in B around 0 34.2%
Taylor expanded in F around inf 48.1%
Final simplification41.0%
(FPCore (F B x) :precision binary64 (if (<= F -8.7e-44) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.7e-44) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.7d-44)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.7e-44) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.7e-44: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.7e-44) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.7e-44) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.7e-44], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.7 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -8.7000000000000004e-44Initial program 58.4%
Taylor expanded in F around -inf 91.1%
Taylor expanded in B around 0 39.3%
associate-*r/39.3%
distribute-lft-in39.3%
metadata-eval39.3%
neg-mul-139.3%
unsub-neg39.3%
Simplified39.3%
if -8.7000000000000004e-44 < F Initial program 80.2%
Simplified89.4%
Taylor expanded in B around 0 41.0%
Taylor expanded in F around 0 31.4%
associate-*r/31.4%
neg-mul-131.4%
Simplified31.4%
Final simplification33.8%
(FPCore (F B x) :precision binary64 (/ x (- B)))
double code(double F, double B, double x) {
return x / -B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / -b
end function
public static double code(double F, double B, double x) {
return x / -B;
}
def code(F, B, x): return x / -B
function code(F, B, x) return Float64(x / Float64(-B)) end
function tmp = code(F, B, x) tmp = x / -B; end
code[F_, B_, x_] := N[(x / (-B)), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-B}
\end{array}
Initial program 73.5%
Simplified83.1%
Taylor expanded in B around 0 36.9%
Taylor expanded in F around 0 26.3%
associate-*r/26.3%
neg-mul-126.3%
Simplified26.3%
Final simplification26.3%
(FPCore (F B x) :precision binary64 (/ x B))
double code(double F, double B, double x) {
return x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / b
end function
public static double code(double F, double B, double x) {
return x / B;
}
def code(F, B, x): return x / B
function code(F, B, x) return Float64(x / B) end
function tmp = code(F, B, x) tmp = x / B; end
code[F_, B_, x_] := N[(x / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{B}
\end{array}
Initial program 73.5%
Simplified83.1%
Taylor expanded in B around 0 36.9%
Taylor expanded in F around 0 26.3%
associate-*r/26.3%
neg-mul-126.3%
Simplified26.3%
add-sqr-sqrt7.8%
sqrt-unprod8.3%
sqr-neg8.3%
sqrt-unprod1.7%
add-sqr-sqrt2.6%
*-un-lft-identity2.6%
Applied egg-rr2.6%
*-lft-identity2.6%
Simplified2.6%
herbie shell --seed 2024113
(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))))))