
(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 -500000000.0)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 100000000.0)
(- (/ F (* (sin B) (sqrt (fma 2.0 x (fma F F 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -500000000.0) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 100000000.0) {
tmp = (F / (sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -500000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 100000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(2.0, x, fma(F, F, 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -500000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -500000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5e8Initial program 63.1%
Simplified73.1%
Taylor expanded in F around -inf 99.9%
if -5e8 < F < 1e8Initial program 99.4%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
un-div-inv99.6%
div-inv99.5%
pow-flip99.6%
metadata-eval99.6%
pow1/299.6%
Applied egg-rr99.6%
if 1e8 < F Initial program 52.9%
Simplified74.2%
Taylor expanded in x around 0 74.2%
associate-*l/74.2%
*-lft-identity74.2%
+-commutative74.2%
unpow274.2%
fma-undefine74.2%
Simplified74.2%
Taylor expanded in F around inf 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+25)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 1e+92)
(- (* 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 <= -1e+25) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 1e+92) {
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 <= -1e+25) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1e+92) 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, -1e+25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+92], 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 -1 \cdot 10^{+25}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 10^{+92}:\\
\;\;\;\;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 < -1.00000000000000009e25Initial program 60.9%
Simplified71.5%
Taylor expanded in F around -inf 99.9%
if -1.00000000000000009e25 < F < 1e92Initial program 96.8%
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 1e92 < F Initial program 38.7%
Simplified62.0%
Taylor expanded in x around 0 62.0%
associate-*l/62.0%
*-lft-identity62.0%
+-commutative62.0%
unpow262.0%
fma-undefine62.0%
Simplified62.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -21000000000000.0)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 31000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -21000000000000.0) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 31000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(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 <= (-21000000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 31000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -21000000000000.0) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 31000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -21000000000000.0: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 31000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -21000000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 31000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -21000000000000.0) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 31000000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -21000000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 31000000.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[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -21000000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 31000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.1e13Initial program 62.6%
Simplified72.7%
Taylor expanded in F around -inf 99.9%
if -2.1e13 < F < 3.1e7Initial program 99.4%
if 3.1e7 < F Initial program 53.5%
Simplified74.6%
Taylor expanded in x around 0 74.6%
associate-*l/74.6%
*-lft-identity74.6%
+-commutative74.6%
unpow274.6%
fma-undefine74.6%
Simplified74.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 -1.4)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 1.45)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) t_0)
(- (* F (/ (/ (- 1.0 (/ 1.0 (pow F 2.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 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 1.45) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (F * (((1.0 - (1.0 / pow(F, 2.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) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 1.45d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (f * (((1.0d0 - (1.0d0 / (f ** 2.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.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.45) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (F * (((1.0 - (1.0 / Math.pow(F, 2.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.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 1.45: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (F * (((1.0 - (1.0 / math.pow(F, 2.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(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.45) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(F * Float64(Float64(Float64(1.0 - Float64(1.0 / (F ^ 2.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 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 1.45) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (F * (((1.0 - (1.0 / (F ^ 2.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[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(N[(1.0 - N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1 - \frac{1}{{F}^{2}}}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 63.6%
Simplified73.5%
Taylor expanded in F around -inf 99.9%
if -1.3999999999999999 < F < 1.44999999999999996Initial program 99.4%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
un-div-inv99.6%
div-inv99.5%
pow-flip99.7%
metadata-eval99.7%
pow1/299.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 98.5%
*-commutative98.5%
Simplified98.5%
if 1.44999999999999996 < F Initial program 54.8%
Simplified75.3%
Taylor expanded in x around 0 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
fma-undefine75.3%
Simplified75.3%
Taylor expanded in F around inf 99.5%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 1.45)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.5) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 1.45) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.5d0)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 1.45d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.5) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.45) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.5: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 1.45: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.45) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.5) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 1.45) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.5Initial program 63.6%
Simplified73.5%
Taylor expanded in F around -inf 99.9%
if -1.5 < F < 1.44999999999999996Initial program 99.4%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
un-div-inv99.6%
div-inv99.5%
pow-flip99.7%
metadata-eval99.7%
pow1/299.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 98.5%
*-commutative98.5%
Simplified98.5%
if 1.44999999999999996 < F Initial program 54.8%
Simplified75.3%
Taylor expanded in x around 0 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
fma-undefine75.3%
Simplified75.3%
Taylor expanded in F around inf 98.6%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 1.45)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 1.45) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 1.45d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.45) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 1.45: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.45) 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 <= -1.4) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 1.45) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45], 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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 63.6%
Simplified73.5%
Taylor expanded in F around -inf 99.9%
if -1.3999999999999999 < F < 1.44999999999999996Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.4%
*-commutative98.4%
Simplified98.4%
if 1.44999999999999996 < F Initial program 54.8%
Simplified75.3%
Taylor expanded in x around 0 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
fma-undefine75.3%
Simplified75.3%
Taylor expanded in F around inf 98.6%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) 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 <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], 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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 63.6%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
+-commutative73.5%
unpow273.5%
fma-undefine73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.9%
if -1.3999999999999999 < F < 1.44999999999999996Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.4%
*-commutative98.4%
Simplified98.4%
if 1.44999999999999996 < F Initial program 54.8%
Simplified75.3%
Taylor expanded in x around 0 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
fma-undefine75.3%
Simplified75.3%
Taylor expanded in F around inf 98.6%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 63.6%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
+-commutative73.5%
unpow273.5%
fma-undefine73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.9%
if -1.3999999999999999 < F < 1.44999999999999996Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.4%
if 1.44999999999999996 < F Initial program 54.8%
Simplified75.3%
Taylor expanded in x around 0 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
fma-undefine75.3%
Simplified75.3%
Taylor expanded in F around inf 98.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -21000000000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.35e-102)
t_0
(if (<= F 8.8e-104)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) B)) t_1)
(if (<= F 60000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -21000000000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.35e-102) {
tmp = t_0;
} else if (F <= 8.8e-104) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / B)) - t_1;
} else if (F <= 60000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-21000000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.35d-102)) then
tmp = t_0
else if (f <= 8.8d-104) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / b)) - t_1
else if (f <= 60000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -21000000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.35e-102) {
tmp = t_0;
} else if (F <= 8.8e-104) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / B)) - t_1;
} else if (F <= 60000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -21000000000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.35e-102: tmp = t_0 elif F <= 8.8e-104: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / B)) - t_1 elif F <= 60000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -21000000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.35e-102) tmp = t_0; elseif (F <= 8.8e-104) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / B)) - t_1); elseif (F <= 60000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -21000000000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.35e-102) tmp = t_0; elseif (F <= 8.8e-104) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / B)) - t_1; elseif (F <= 60000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -21000000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.35e-102], t$95$0, If[LessEqual[F, 8.8e-104], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 60000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -21000000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{-102}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-104}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{B} - t\_1\\
\mathbf{elif}\;F \leq 60000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -2.1e13Initial program 62.6%
Simplified72.7%
Taylor expanded in x around 0 72.7%
associate-*l/72.8%
*-lft-identity72.8%
+-commutative72.8%
unpow272.8%
fma-undefine72.8%
Simplified72.8%
Taylor expanded in F around -inf 99.9%
if -2.1e13 < F < -1.35e-102 or 8.80000000000000047e-104 < F < 6e4Initial program 99.5%
Taylor expanded in B around 0 90.2%
associate-*r/90.2%
neg-mul-190.2%
Simplified90.2%
metadata-eval90.2%
metadata-eval90.2%
Applied egg-rr90.2%
if -1.35e-102 < F < 8.80000000000000047e-104Initial program 99.3%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in B around 0 89.0%
Taylor expanded in F around 0 88.9%
associate-*l/89.0%
*-lft-identity89.0%
Simplified89.0%
if 6e4 < F Initial program 53.5%
Simplified74.6%
Taylor expanded in x around 0 74.6%
associate-*l/74.6%
*-lft-identity74.6%
+-commutative74.6%
unpow274.6%
fma-undefine74.6%
Simplified74.6%
Taylor expanded in F around inf 99.8%
Final simplification95.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (fma F F 2.0)))) x) B))
(t_1 (/ x (tan B))))
(if (<= F -0.1)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -5.5e-191)
t_0
(if (<= F 2.7e-152)
(/ x (- (tan B)))
(if (<= F 8.5e-39) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / fma(F, F, 2.0)))) - x) / B;
double t_1 = x / tan(B);
double tmp;
if (F <= -0.1) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -5.5e-191) {
tmp = t_0;
} else if (F <= 2.7e-152) {
tmp = x / -tan(B);
} else if (F <= 8.5e-39) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / fma(F, F, 2.0)))) - x) / B) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.1) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -5.5e-191) tmp = t_0; elseif (F <= 2.7e-152) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 8.5e-39) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.1], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.5e-191], t$95$0, If[LessEqual[F, 2.7e-152], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 8.5e-39], 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 \cdot \sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.1:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-191}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-152}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -0.10000000000000001Initial program 64.1%
Simplified73.8%
Taylor expanded in x around 0 73.8%
associate-*l/73.9%
*-lft-identity73.9%
+-commutative73.9%
unpow273.9%
fma-undefine73.9%
Simplified73.9%
Taylor expanded in F around -inf 98.7%
if -0.10000000000000001 < F < -5.5000000000000001e-191 or 2.69999999999999999e-152 < F < 8.5000000000000005e-39Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.4%
*-lft-identity99.4%
+-commutative99.4%
unpow299.4%
fma-undefine99.4%
Simplified99.4%
Taylor expanded in B around 0 59.7%
+-commutative59.7%
unpow259.7%
fma-undefine59.7%
Simplified59.7%
if -5.5000000000000001e-191 < F < 2.69999999999999999e-152Initial program 99.4%
Taylor expanded in F around -inf 50.7%
Taylor expanded in x around inf 88.5%
associate-/l*88.4%
clear-num88.3%
tan-quot88.4%
neg-mul-188.4%
neg-sub088.4%
div-inv88.7%
Applied egg-rr88.7%
neg-sub088.7%
distribute-neg-frac88.7%
Simplified88.7%
if 8.5000000000000005e-39 < F Initial program 60.3%
Simplified78.2%
Taylor expanded in x around 0 78.2%
associate-*l/78.2%
*-lft-identity78.2%
+-commutative78.2%
unpow278.2%
fma-undefine78.2%
Simplified78.2%
Taylor expanded in F around inf 92.0%
Final simplification85.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (t_1 (/ x (tan B))))
(if (<= F -0.085)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 6.2e-103)
(- (* F (/ t_0 B)) t_1)
(if (<= F 0.002)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / tan(B);
double tmp;
if (F <= -0.085) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 6.2e-103) {
tmp = (F * (t_0 / B)) - t_1;
} else if (F <= 0.002) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} 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 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x / tan(b)
if (f <= (-0.085d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 6.2d-103) then
tmp = (f * (t_0 / b)) - t_1
else if (f <= 0.002d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
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 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.085) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 6.2e-103) {
tmp = (F * (t_0 / B)) - t_1;
} else if (F <= 0.002) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x / math.tan(B) tmp = 0 if F <= -0.085: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 6.2e-103: tmp = (F * (t_0 / B)) - t_1 elif F <= 0.002: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.085) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 6.2e-103) tmp = Float64(Float64(F * Float64(t_0 / B)) - t_1); elseif (F <= 0.002) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.085) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 6.2e-103) tmp = (F * (t_0 / B)) - t_1; elseif (F <= 0.002) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.085], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 6.2e-103], N[(N[(F * N[(t$95$0 / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 0.002], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.085:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-103}:\\
\;\;\;\;F \cdot \frac{t\_0}{B} - t\_1\\
\mathbf{elif}\;F \leq 0.002:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -0.0850000000000000061Initial program 64.1%
Simplified73.8%
Taylor expanded in x around 0 73.8%
associate-*l/73.9%
*-lft-identity73.9%
+-commutative73.9%
unpow273.9%
fma-undefine73.9%
Simplified73.9%
Taylor expanded in F around -inf 98.7%
if -0.0850000000000000061 < F < 6.2000000000000003e-103Initial program 99.4%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in B around 0 85.5%
Taylor expanded in F around 0 84.9%
associate-*l/85.0%
*-lft-identity85.0%
Simplified85.0%
if 6.2000000000000003e-103 < F < 2e-3Initial program 99.6%
Taylor expanded in B around 0 90.6%
associate-*r/90.6%
neg-mul-190.6%
Simplified90.6%
Taylor expanded in F around 0 89.9%
+-commutative89.9%
neg-mul-189.9%
unsub-neg89.9%
*-commutative89.9%
Simplified89.9%
if 2e-3 < F Initial program 54.8%
Simplified75.3%
Taylor expanded in x around 0 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
fma-undefine75.3%
Simplified75.3%
Taylor expanded in F around inf 98.6%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -0.0112)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -8.4e-190)
t_0
(if (<= F 1.15e-152)
(/ x (- (tan B)))
(if (<= F 2.5e-39) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.0112) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -8.4e-190) {
tmp = t_0;
} else if (F <= 1.15e-152) {
tmp = x / -tan(B);
} else if (F <= 2.5e-39) {
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 = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.0112d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-8.4d-190)) then
tmp = t_0
else if (f <= 1.15d-152) then
tmp = x / -tan(b)
else if (f <= 2.5d-39) 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 = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.0112) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -8.4e-190) {
tmp = t_0;
} else if (F <= 1.15e-152) {
tmp = x / -Math.tan(B);
} else if (F <= 2.5e-39) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.0112: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -8.4e-190: tmp = t_0 elif F <= 1.15e-152: tmp = x / -math.tan(B) elif F <= 2.5e-39: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0112) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -8.4e-190) tmp = t_0; elseif (F <= 1.15e-152) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.5e-39) 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 = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.0112) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -8.4e-190) tmp = t_0; elseif (F <= 1.15e-152) tmp = x / -tan(B); elseif (F <= 2.5e-39) 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[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0112], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -8.4e-190], t$95$0, If[LessEqual[F, 1.15e-152], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.5e-39], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0112:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -8.4 \cdot 10^{-190}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-152}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -0.0111999999999999999Initial program 64.1%
Simplified73.8%
Taylor expanded in x around 0 73.8%
associate-*l/73.9%
*-lft-identity73.9%
+-commutative73.9%
unpow273.9%
fma-undefine73.9%
Simplified73.9%
Taylor expanded in F around -inf 98.7%
if -0.0111999999999999999 < F < -8.39999999999999966e-190 or 1.1500000000000001e-152 < F < 2.4999999999999999e-39Initial program 99.4%
Taylor expanded in B around 0 79.1%
associate-*r/79.1%
neg-mul-179.1%
Simplified79.1%
Taylor expanded in B around 0 59.6%
if -8.39999999999999966e-190 < F < 1.1500000000000001e-152Initial program 99.4%
Taylor expanded in F around -inf 50.7%
Taylor expanded in x around inf 88.5%
associate-/l*88.4%
clear-num88.3%
tan-quot88.4%
neg-mul-188.4%
neg-sub088.4%
div-inv88.7%
Applied egg-rr88.7%
neg-sub088.7%
distribute-neg-frac88.7%
Simplified88.7%
if 2.4999999999999999e-39 < F Initial program 60.3%
Simplified78.2%
Taylor expanded in x around 0 78.2%
associate-*l/78.2%
*-lft-identity78.2%
+-commutative78.2%
unpow278.2%
fma-undefine78.2%
Simplified78.2%
Taylor expanded in F around inf 92.0%
Final simplification85.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.114)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.09)
(- (* F (/ 1.0 (* B (sqrt (+ 2.0 (* x 2.0)))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.114) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.09) {
tmp = (F * (1.0 / (B * sqrt((2.0 + (x * 2.0)))))) - 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.114d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.09d0) then
tmp = (f * (1.0d0 / (b * sqrt((2.0d0 + (x * 2.0d0)))))) - 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.114) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.09) {
tmp = (F * (1.0 / (B * Math.sqrt((2.0 + (x * 2.0)))))) - 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.114: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.09: tmp = (F * (1.0 / (B * math.sqrt((2.0 + (x * 2.0)))))) - 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.114) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.09) tmp = Float64(Float64(F * Float64(1.0 / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0)))))) - 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.114) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.09) tmp = (F * (1.0 / (B * sqrt((2.0 + (x * 2.0)))))) - 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.114], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.09], N[(N[(F * N[(1.0 / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.114:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.09:\\
\;\;\;\;F \cdot \frac{1}{B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.114000000000000004Initial program 64.1%
Simplified73.8%
Taylor expanded in x around 0 73.8%
associate-*l/73.9%
*-lft-identity73.9%
+-commutative73.9%
unpow273.9%
fma-undefine73.9%
Simplified73.9%
Taylor expanded in F around -inf 98.7%
if -0.114000000000000004 < F < 0.089999999999999997Initial program 99.4%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in B around 0 82.2%
Taylor expanded in F around 0 81.6%
*-commutative81.6%
Simplified81.6%
if 0.089999999999999997 < F Initial program 54.8%
Simplified75.3%
Taylor expanded in x around 0 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
fma-undefine75.3%
Simplified75.3%
Taylor expanded in F around inf 98.6%
Final simplification91.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.108)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -8.4e-190)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.5e-12)
(/ x (- (tan B)))
(if (<= F 1.35e+34)
(- (/ F (* F (sin B))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.108) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -8.4e-190) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.5e-12) {
tmp = x / -tan(B);
} else if (F <= 1.35e+34) {
tmp = (F / (F * sin(B))) - (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 (f <= (-0.108d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-8.4d-190)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.5d-12) then
tmp = x / -tan(b)
else if (f <= 1.35d+34) then
tmp = (f / (f * sin(b))) - (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 (F <= -0.108) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -8.4e-190) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.5e-12) {
tmp = x / -Math.tan(B);
} else if (F <= 1.35e+34) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.108: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -8.4e-190: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.5e-12: tmp = x / -math.tan(B) elif F <= 1.35e+34: tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.108) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -8.4e-190) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.5e-12) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1.35e+34) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(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 (F <= -0.108) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -8.4e-190) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.5e-12) tmp = x / -tan(B); elseif (F <= 1.35e+34) tmp = (F / (F * sin(B))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.108], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.4e-190], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-12], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.35e+34], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $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}\;F \leq -0.108:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -8.4 \cdot 10^{-190}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{+34}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -0.107999999999999999Initial program 64.1%
Simplified73.8%
Taylor expanded in x around 0 73.8%
associate-*l/73.9%
*-lft-identity73.9%
+-commutative73.9%
unpow273.9%
fma-undefine73.9%
Simplified73.9%
Taylor expanded in F around -inf 98.7%
if -0.107999999999999999 < F < -8.39999999999999966e-190Initial program 99.4%
Taylor expanded in B around 0 77.6%
associate-*r/77.6%
neg-mul-177.6%
Simplified77.6%
Taylor expanded in B around 0 57.5%
if -8.39999999999999966e-190 < F < 4.49999999999999981e-12Initial program 99.4%
Taylor expanded in F around -inf 42.4%
Taylor expanded in x around inf 71.3%
associate-/l*71.2%
clear-num71.2%
tan-quot71.2%
neg-mul-171.2%
neg-sub071.2%
div-inv71.4%
Applied egg-rr71.4%
neg-sub071.4%
distribute-neg-frac71.4%
Simplified71.4%
if 4.49999999999999981e-12 < F < 1.35e34Initial program 94.1%
Taylor expanded in F around inf 78.7%
frac-times84.0%
Applied egg-rr84.0%
Taylor expanded in B around 0 78.6%
associate-*r/88.8%
neg-mul-188.8%
Simplified78.6%
if 1.35e34 < F Initial program 44.5%
Taylor expanded in F around inf 70.4%
Taylor expanded in B around 0 88.6%
Final simplification81.3%
(FPCore (F B x)
:precision binary64
(if (<= F -0.118)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.5e-191)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.5e-12)
(/ x (- (tan B)))
(if (<= F 9.1e+33)
(- (/ F (* F (sin B))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.118) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.5e-191) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.5e-12) {
tmp = x / -tan(B);
} else if (F <= 9.1e+33) {
tmp = (F / (F * sin(B))) - (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 (f <= (-0.118d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.5d-191)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.5d-12) then
tmp = x / -tan(b)
else if (f <= 9.1d+33) then
tmp = (f / (f * sin(b))) - (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 (F <= -0.118) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.5e-191) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.5e-12) {
tmp = x / -Math.tan(B);
} else if (F <= 9.1e+33) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.118: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.5e-191: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.5e-12: tmp = x / -math.tan(B) elif F <= 9.1e+33: tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.118) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.5e-191) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.5e-12) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 9.1e+33) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(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 (F <= -0.118) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.5e-191) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.5e-12) tmp = x / -tan(B); elseif (F <= 9.1e+33) tmp = (F / (F * sin(B))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.118], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.5e-191], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-12], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 9.1e+33], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $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}\;F \leq -0.118:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-191}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 9.1 \cdot 10^{+33}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -0.11799999999999999Initial program 64.1%
Taylor expanded in F around -inf 98.7%
Taylor expanded in B around 0 71.1%
associate-*r/37.2%
neg-mul-137.2%
Simplified71.1%
if -0.11799999999999999 < F < -5.5000000000000001e-191Initial program 99.4%
Taylor expanded in B around 0 77.6%
associate-*r/77.6%
neg-mul-177.6%
Simplified77.6%
Taylor expanded in B around 0 57.5%
if -5.5000000000000001e-191 < F < 4.49999999999999981e-12Initial program 99.4%
Taylor expanded in F around -inf 42.4%
Taylor expanded in x around inf 71.3%
associate-/l*71.2%
clear-num71.2%
tan-quot71.2%
neg-mul-171.2%
neg-sub071.2%
div-inv71.4%
Applied egg-rr71.4%
neg-sub071.4%
distribute-neg-frac71.4%
Simplified71.4%
if 4.49999999999999981e-12 < F < 9.0999999999999997e33Initial program 94.1%
Taylor expanded in F around inf 78.7%
frac-times84.0%
Applied egg-rr84.0%
Taylor expanded in B around 0 78.6%
associate-*r/88.8%
neg-mul-188.8%
Simplified78.6%
if 9.0999999999999997e33 < F Initial program 44.5%
Taylor expanded in F around inf 70.4%
Taylor expanded in B around 0 88.6%
Final simplification73.4%
(FPCore (F B x)
:precision binary64
(if (<= F -3.8e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4e-12)
(/ x (- (tan B)))
(if (<= F 2.35e+32)
(- (/ F (* F (sin B))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4e-12) {
tmp = x / -tan(B);
} else if (F <= 2.35e+32) {
tmp = (F / (F * sin(B))) - (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 (f <= (-3.8d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4d-12) then
tmp = x / -tan(b)
else if (f <= 2.35d+32) then
tmp = (f / (f * sin(b))) - (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 (F <= -3.8e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4e-12) {
tmp = x / -Math.tan(B);
} else if (F <= 2.35e+32) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4e-12: tmp = x / -math.tan(B) elif F <= 2.35e+32: tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4e-12) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.35e+32) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(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 (F <= -3.8e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4e-12) tmp = x / -tan(B); elseif (F <= 2.35e+32) tmp = (F / (F * sin(B))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-12], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.35e+32], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $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}\;F \leq -3.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{+32}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.8e-13Initial program 65.9%
Taylor expanded in F around -inf 95.3%
Taylor expanded in B around 0 69.2%
associate-*r/40.5%
neg-mul-140.5%
Simplified69.2%
if -3.8e-13 < F < 3.99999999999999992e-12Initial program 99.4%
Taylor expanded in F around -inf 39.4%
Taylor expanded in x around inf 63.6%
associate-/l*63.5%
clear-num63.5%
tan-quot63.5%
neg-mul-163.5%
neg-sub063.5%
div-inv63.7%
Applied egg-rr63.7%
neg-sub063.7%
distribute-neg-frac63.7%
Simplified63.7%
if 3.99999999999999992e-12 < F < 2.35000000000000012e32Initial program 94.1%
Taylor expanded in F around inf 78.7%
frac-times84.0%
Applied egg-rr84.0%
Taylor expanded in B around 0 78.6%
associate-*r/88.8%
neg-mul-188.8%
Simplified78.6%
if 2.35000000000000012e32 < F Initial program 44.5%
Taylor expanded in F around inf 70.4%
Taylor expanded in B around 0 88.6%
Final simplification71.8%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-13) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 2.9e-16) (/ x (- (tan B))) (+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.9e-16) {
tmp = x / -tan(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 (f <= (-3.8d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.9d-16) then
tmp = x / -tan(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 (F <= -3.8e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.9e-16) {
tmp = x / -Math.tan(B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.9e-16: tmp = x / -math.tan(B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.9e-16) tmp = Float64(x / Float64(-tan(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 (F <= -3.8e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.9e-16) tmp = x / -tan(B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-16], N[(x / (-N[Tan[B], $MachinePrecision])), $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}\;F \leq -3.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.8e-13Initial program 65.9%
Taylor expanded in F around -inf 95.3%
Taylor expanded in B around 0 69.2%
associate-*r/40.5%
neg-mul-140.5%
Simplified69.2%
if -3.8e-13 < F < 2.8999999999999998e-16Initial program 99.4%
Taylor expanded in F around -inf 38.8%
Taylor expanded in x around inf 63.3%
associate-/l*63.2%
clear-num63.1%
tan-quot63.2%
neg-mul-163.2%
neg-sub063.2%
div-inv63.4%
Applied egg-rr63.4%
neg-sub063.4%
distribute-neg-frac63.4%
Simplified63.4%
if 2.8999999999999998e-16 < F Initial program 56.6%
Taylor expanded in F around inf 72.7%
Taylor expanded in B around 0 80.6%
Final simplification70.1%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-13) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 24000000000000.0) (/ x (- (tan B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 24000000000000.0) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.8d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 24000000000000.0d0) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 24000000000000.0) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 24000000000000.0: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 24000000000000.0) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.8e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 24000000000000.0) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 24000000000000.0], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 24000000000000:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.8e-13Initial program 65.9%
Taylor expanded in F around -inf 95.3%
Taylor expanded in B around 0 69.2%
associate-*r/40.5%
neg-mul-140.5%
Simplified69.2%
if -3.8e-13 < F < 2.4e13Initial program 99.4%
Taylor expanded in F around -inf 37.6%
Taylor expanded in x around inf 60.2%
associate-/l*60.1%
clear-num60.0%
tan-quot60.1%
neg-mul-160.1%
neg-sub060.1%
div-inv60.3%
Applied egg-rr60.3%
neg-sub060.3%
distribute-neg-frac60.3%
Simplified60.3%
if 2.4e13 < F Initial program 50.8%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 67.1%
Final simplification64.7%
(FPCore (F B x) :precision binary64 (if (<= F 1.15e+14) (/ x (- (tan B))) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.15e+14) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.15d+14) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.15e+14) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.15e+14: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.15e+14) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.15e+14) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.15e+14], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.15 \cdot 10^{+14}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.15e14Initial program 85.9%
Taylor expanded in F around -inf 60.8%
Taylor expanded in x around inf 55.8%
associate-/l*55.7%
clear-num55.6%
tan-quot55.7%
neg-mul-155.7%
neg-sub055.7%
div-inv55.8%
Applied egg-rr55.8%
neg-sub055.8%
distribute-neg-frac55.8%
Simplified55.8%
if 1.15e14 < F Initial program 50.8%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 67.1%
Final simplification58.7%
(FPCore (F B x) :precision binary64 (if (<= F -5.2e-30) (/ (- -1.0 x) B) (if (<= F 3.1e-16) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e-30) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.1e-16) {
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 <= (-5.2d-30)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.1d-16) 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 <= -5.2e-30) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.1e-16) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2e-30: tmp = (-1.0 - x) / B elif F <= 3.1e-16: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2e-30) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.1e-16) 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 <= -5.2e-30) tmp = (-1.0 - x) / B; elseif (F <= 3.1e-16) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2e-30], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.1e-16], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.19999999999999973e-30Initial program 66.8%
Taylor expanded in F around -inf 94.2%
Taylor expanded in B around 0 37.5%
associate-*r/37.5%
distribute-lft-in37.5%
metadata-eval37.5%
neg-mul-137.5%
unsub-neg37.5%
Simplified37.5%
if -5.19999999999999973e-30 < F < 3.1000000000000001e-16Initial program 99.4%
Taylor expanded in F around -inf 38.5%
Taylor expanded in B around 0 22.3%
associate-*r/22.3%
distribute-lft-in22.3%
metadata-eval22.3%
neg-mul-122.3%
unsub-neg22.3%
Simplified22.3%
Taylor expanded in x around inf 35.6%
neg-mul-135.6%
Simplified35.6%
if 3.1000000000000001e-16 < F Initial program 56.6%
Taylor expanded in F around inf 72.7%
Taylor expanded in B around 0 60.4%
(FPCore (F B x) :precision binary64 (if (<= F -5.5e-30) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e-30) {
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 <= (-5.5d-30)) 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 <= -5.5e-30) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e-30: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e-30) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.5e-30) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e-30], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -5.49999999999999976e-30Initial program 66.8%
Taylor expanded in F around -inf 94.2%
Taylor expanded in B around 0 37.5%
associate-*r/37.5%
distribute-lft-in37.5%
metadata-eval37.5%
neg-mul-137.5%
unsub-neg37.5%
Simplified37.5%
if -5.49999999999999976e-30 < F Initial program 81.5%
Taylor expanded in F around -inf 43.4%
Taylor expanded in B around 0 25.7%
associate-*r/25.7%
distribute-lft-in25.7%
metadata-eval25.7%
neg-mul-125.7%
unsub-neg25.7%
Simplified25.7%
Taylor expanded in x around inf 33.6%
neg-mul-133.6%
Simplified33.6%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 77.0%
Taylor expanded in F around -inf 59.1%
Taylor expanded in B around 0 29.4%
associate-*r/29.4%
distribute-lft-in29.4%
metadata-eval29.4%
neg-mul-129.4%
unsub-neg29.4%
Simplified29.4%
Taylor expanded in x around inf 30.3%
neg-mul-130.3%
Simplified30.3%
(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 77.0%
Taylor expanded in F around -inf 59.1%
Taylor expanded in B around 0 29.4%
associate-*r/29.4%
distribute-lft-in29.4%
metadata-eval29.4%
neg-mul-129.4%
unsub-neg29.4%
Simplified29.4%
Taylor expanded in x around 0 7.9%
herbie shell --seed 2024131
(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))))))