
(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 25 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 -2.7e+72)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1250000.0)
(fma
(/ F (sin B))
(pow (fma x 2.0 (fma F F 2.0)) -0.5)
(/ x (- (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e+72) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1250000.0) {
tmp = fma((F / sin(B)), pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), (x / -tan(B)));
} 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 <= -2.7e+72) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1250000.0) tmp = fma(Float64(F / sin(B)), (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5), Float64(x / Float64(-tan(B)))); 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, -2.7e+72], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1250000.0], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] + N[(x / (-N[Tan[B], $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 -2.7 \cdot 10^{+72}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1250000:\\
\;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{x}{-\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.7000000000000001e72Initial program 47.6%
distribute-lft-neg-in47.6%
+-commutative47.6%
associate-*l/61.1%
associate-/l*61.1%
fma-define61.1%
/-rgt-identity61.1%
remove-double-neg61.1%
fma-neg61.1%
Simplified61.1%
Taylor expanded in x around 0 61.1%
associate-*l/61.1%
*-lft-identity61.1%
+-commutative61.1%
unpow261.1%
fma-undefine61.1%
Simplified61.1%
Taylor expanded in F around -inf 99.8%
if -2.7000000000000001e72 < F < 1.25e6Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
if 1.25e6 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.1e+100)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1250000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.1e+100) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1250000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.1e+100) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1250000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.1e+100], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1250000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{+100}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1250000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.0999999999999999e100Initial program 44.7%
distribute-lft-neg-in44.7%
+-commutative44.7%
associate-*l/57.6%
associate-/l*57.6%
fma-define57.6%
/-rgt-identity57.6%
remove-double-neg57.6%
fma-neg57.6%
Simplified57.6%
Taylor expanded in x around 0 57.6%
associate-*l/57.6%
*-lft-identity57.6%
+-commutative57.6%
unpow257.6%
fma-undefine57.6%
Simplified57.6%
Taylor expanded in F around -inf 99.7%
if -2.0999999999999999e100 < F < 1.25e6Initial program 98.9%
distribute-lft-neg-in98.9%
+-commutative98.9%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.7%
if 1.25e6 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+24)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1250000.0)
(- (/ F (/ (sin B) (pow (fma F F 2.0) -0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+24) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1250000.0) {
tmp = (F / (sin(B) / pow(fma(F, F, 2.0), -0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+24) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1250000.0) tmp = Float64(Float64(F / Float64(sin(B) / (fma(F, F, 2.0) ^ -0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1250000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(F * F + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1250000:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2e24Initial program 57.5%
distribute-lft-neg-in57.5%
+-commutative57.5%
associate-*l/68.4%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.4%
Taylor expanded in x around 0 68.4%
associate-*l/68.3%
*-lft-identity68.3%
+-commutative68.3%
unpow268.3%
fma-undefine68.3%
Simplified68.3%
Taylor expanded in F around -inf 99.7%
if -2e24 < F < 1.25e6Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
inv-pow99.6%
sqrt-pow199.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 1.25e6 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+73)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1250000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e+73) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1250000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4d+73)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1250000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4e+73) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1250000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4e+73: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1250000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e+73) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1250000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4e+73) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1250000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+73], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1250000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+73}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1250000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.99999999999999993e73Initial program 47.6%
distribute-lft-neg-in47.6%
+-commutative47.6%
associate-*l/61.1%
associate-/l*61.1%
fma-define61.1%
/-rgt-identity61.1%
remove-double-neg61.1%
fma-neg61.1%
Simplified61.1%
Taylor expanded in x around 0 61.1%
associate-*l/61.1%
*-lft-identity61.1%
+-commutative61.1%
unpow261.1%
fma-undefine61.1%
Simplified61.1%
Taylor expanded in F around -inf 99.8%
if -3.99999999999999993e73 < F < 1.25e6Initial program 99.6%
if 1.25e6 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e+72)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1250000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e+72) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1250000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.7d+72)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1250000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.7e+72) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1250000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.7e+72: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1250000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.7e+72) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1250000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.7e+72) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1250000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.7e+72], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1250000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{+72}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1250000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.7000000000000001e72Initial program 47.6%
distribute-lft-neg-in47.6%
+-commutative47.6%
associate-*l/61.1%
associate-/l*61.1%
fma-define61.1%
/-rgt-identity61.1%
remove-double-neg61.1%
fma-neg61.1%
Simplified61.1%
Taylor expanded in x around 0 61.1%
associate-*l/61.1%
*-lft-identity61.1%
+-commutative61.1%
unpow261.1%
fma-undefine61.1%
Simplified61.1%
Taylor expanded in F around -inf 99.8%
if -2.7000000000000001e72 < F < 1.25e6Initial program 99.6%
div-inv81.0%
clear-num80.9%
Applied egg-rr99.6%
if 1.25e6 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -215000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 2.6)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -215000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 2.6) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - 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 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-215000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 2.6d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -215000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 2.6) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -215000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 2.6: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -215000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 2.6) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -215000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 2.6) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -215000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.6], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -215000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 2.6:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -215000Initial program 58.1%
distribute-lft-neg-in58.1%
+-commutative58.1%
associate-*l/68.8%
associate-/l*68.8%
fma-define68.8%
/-rgt-identity68.8%
remove-double-neg68.8%
fma-neg68.8%
Simplified68.8%
Taylor expanded in x around 0 68.8%
associate-*l/68.7%
*-lft-identity68.7%
+-commutative68.7%
unpow268.7%
fma-undefine68.7%
Simplified68.7%
Taylor expanded in F around -inf 99.5%
if -215000 < F < 2.60000000000000009Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.7%
Taylor expanded in F around 0 98.9%
if 2.60000000000000009 < F Initial program 53.1%
distribute-lft-neg-in53.1%
+-commutative53.1%
associate-*l/67.2%
associate-/l*67.1%
fma-define67.1%
/-rgt-identity67.1%
remove-double-neg67.1%
fma-neg67.1%
Simplified67.1%
Taylor expanded in x around 0 67.1%
associate-*l/67.1%
*-lft-identity67.1%
+-commutative67.1%
unpow267.1%
fma-undefine67.1%
Simplified67.1%
Taylor expanded in F around inf 96.7%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -215000.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 <= -215000.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 <= (-215000.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 <= -215000.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 <= -215000.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 <= -215000.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 <= -215000.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, -215000.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 -215000:\\
\;\;\;\;\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 < -215000Initial program 58.1%
distribute-lft-neg-in58.1%
+-commutative58.1%
associate-*l/68.8%
associate-/l*68.8%
fma-define68.8%
/-rgt-identity68.8%
remove-double-neg68.8%
fma-neg68.8%
Simplified68.8%
Taylor expanded in x around 0 68.8%
associate-*l/68.7%
*-lft-identity68.7%
+-commutative68.7%
unpow268.7%
fma-undefine68.7%
Simplified68.7%
Taylor expanded in F around -inf 99.5%
if -215000 < F < 1.3999999999999999Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
associate-*l/99.5%
associate-/l*99.5%
fma-define99.5%
/-rgt-identity99.5%
remove-double-neg99.5%
fma-neg99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 98.9%
if 1.3999999999999999 < F Initial program 53.1%
distribute-lft-neg-in53.1%
+-commutative53.1%
associate-*l/67.2%
associate-/l*67.1%
fma-define67.1%
/-rgt-identity67.1%
remove-double-neg67.1%
fma-neg67.1%
Simplified67.1%
Taylor expanded in x around 0 67.1%
associate-*l/67.1%
*-lft-identity67.1%
+-commutative67.1%
unpow267.1%
fma-undefine67.1%
Simplified67.1%
Taylor expanded in F around inf 96.7%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (cos B) (/ x (- (sin B)))))
(t_1
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -9.5e+32)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -1.7e-121)
t_1
(if (<= F 1.2e-273)
t_0
(if (<= F 2.1e-160)
t_1
(if (<= F 3.7e-143)
t_0
(if (<= F 15000.0) t_1 (- (/ 1.0 (sin B)) t_2)))))))))
double code(double F, double B, double x) {
double t_0 = cos(B) * (x / -sin(B));
double t_1 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -1.7e-121) {
tmp = t_1;
} else if (F <= 1.2e-273) {
tmp = t_0;
} else if (F <= 2.1e-160) {
tmp = t_1;
} else if (F <= 3.7e-143) {
tmp = t_0;
} else if (F <= 15000.0) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = cos(b) * (x / -sin(b))
t_1 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_2 = x / tan(b)
if (f <= (-9.5d+32)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-1.7d-121)) then
tmp = t_1
else if (f <= 1.2d-273) then
tmp = t_0
else if (f <= 2.1d-160) then
tmp = t_1
else if (f <= 3.7d-143) then
tmp = t_0
else if (f <= 15000.0d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.cos(B) * (x / -Math.sin(B));
double t_1 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -1.7e-121) {
tmp = t_1;
} else if (F <= 1.2e-273) {
tmp = t_0;
} else if (F <= 2.1e-160) {
tmp = t_1;
} else if (F <= 3.7e-143) {
tmp = t_0;
} else if (F <= 15000.0) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.cos(B) * (x / -math.sin(B)) t_1 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -9.5e+32: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -1.7e-121: tmp = t_1 elif F <= 1.2e-273: tmp = t_0 elif F <= 2.1e-160: tmp = t_1 elif F <= 3.7e-143: tmp = t_0 elif F <= 15000.0: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(cos(B) * Float64(x / Float64(-sin(B)))) t_1 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.5e+32) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -1.7e-121) tmp = t_1; elseif (F <= 1.2e-273) tmp = t_0; elseif (F <= 2.1e-160) tmp = t_1; elseif (F <= 3.7e-143) tmp = t_0; elseif (F <= 15000.0) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = cos(B) * (x / -sin(B)); t_1 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -9.5e+32) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -1.7e-121) tmp = t_1; elseif (F <= 1.2e-273) tmp = t_0; elseif (F <= 2.1e-160) tmp = t_1; elseif (F <= 3.7e-143) tmp = t_0; elseif (F <= 15000.0) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -1.7e-121], t$95$1, If[LessEqual[F, 1.2e-273], t$95$0, If[LessEqual[F, 2.1e-160], t$95$1, If[LessEqual[F, 3.7e-143], t$95$0, If[LessEqual[F, 15000.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos B \cdot \frac{x}{-\sin B}\\
t_1 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-273}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-143}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 15000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_2\\
\end{array}
\end{array}
if F < -9.50000000000000006e32Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
associate-*l/67.5%
associate-/l*67.5%
fma-define67.5%
/-rgt-identity67.5%
remove-double-neg67.5%
fma-neg67.5%
Simplified67.5%
Taylor expanded in x around 0 67.5%
associate-*l/67.5%
*-lft-identity67.5%
+-commutative67.5%
unpow267.5%
fma-undefine67.5%
Simplified67.5%
Taylor expanded in F around -inf 99.7%
if -9.50000000000000006e32 < F < -1.70000000000000001e-121 or 1.19999999999999991e-273 < F < 2.1e-160 or 3.7e-143 < F < 15000Initial program 99.5%
Taylor expanded in B around 0 87.4%
if -1.70000000000000001e-121 < F < 1.19999999999999991e-273 or 2.1e-160 < F < 3.7e-143Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 88.6%
mul-1-neg88.6%
associate-*l/88.7%
*-commutative88.7%
Simplified88.7%
if 15000 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -9.5e+32)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.15e-52)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 1.85e-143)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 420000.0)
(- (* t_0 (/ 1.0 (/ (sin B) F))) (/ x B))
(- (/ 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);
double t_1 = x / tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.15e-52) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 1.85e-143) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 420000.0) {
tmp = (t_0 * (1.0 / (sin(B) / F))) - (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 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-9.5d+32)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.15d-52)) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 1.85d-143) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 420000.0d0) then
tmp = (t_0 * (1.0d0 / (sin(b) / f))) - (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.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.15e-52) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 1.85e-143) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 420000.0) {
tmp = (t_0 * (1.0 / (Math.sin(B) / F))) - (x / B);
} 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) t_1 = x / math.tan(B) tmp = 0 if F <= -9.5e+32: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.15e-52: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 1.85e-143: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 420000.0: tmp = (t_0 * (1.0 / (math.sin(B) / F))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.5e+32) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.15e-52) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 1.85e-143) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 420000.0) tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(sin(B) / F))) - 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 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -9.5e+32) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.15e-52) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 1.85e-143) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 420000.0) tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.15e-52], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-143], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 420000.0], N[(N[(t$95$0 * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $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 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-52}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-143}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 420000:\\
\;\;\;\;t\_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -9.50000000000000006e32Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
associate-*l/67.5%
associate-/l*67.5%
fma-define67.5%
/-rgt-identity67.5%
remove-double-neg67.5%
fma-neg67.5%
Simplified67.5%
Taylor expanded in x around 0 67.5%
associate-*l/67.5%
*-lft-identity67.5%
+-commutative67.5%
unpow267.5%
fma-undefine67.5%
Simplified67.5%
Taylor expanded in F around -inf 99.7%
if -9.50000000000000006e32 < F < -2.1500000000000002e-52Initial program 99.8%
Taylor expanded in B around 0 99.8%
if -2.1500000000000002e-52 < F < 1.85e-143Initial program 99.5%
Taylor expanded in B around 0 90.1%
div-inv90.3%
clear-num90.2%
Applied egg-rr90.2%
if 1.85e-143 < F < 4.2e5Initial program 99.4%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in B around 0 86.7%
if 4.2e5 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification95.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (- (* (/ F (sin B)) t_0) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -9.5e+32)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -9.5e-53)
t_1
(if (<= F 6.5e-143)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(if (<= F 86000.0) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = ((F / sin(B)) * t_0) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -9.5e-53) {
tmp = t_1;
} else if (F <= 6.5e-143) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else if (F <= 86000.0) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = ((f / sin(b)) * t_0) - (x / b)
t_2 = x / tan(b)
if (f <= (-9.5d+32)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-9.5d-53)) then
tmp = t_1
else if (f <= 6.5d-143) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else if (f <= 86000.0d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - t_2
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);
double t_1 = ((F / Math.sin(B)) * t_0) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -9.5e-53) {
tmp = t_1;
} else if (F <= 6.5e-143) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else if (F <= 86000.0) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = ((F / math.sin(B)) * t_0) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -9.5e+32: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -9.5e-53: tmp = t_1 elif F <= 6.5e-143: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) elif F <= 86000.0: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.5e+32) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -9.5e-53) tmp = t_1; elseif (F <= 6.5e-143) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); elseif (F <= 86000.0) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = ((F / sin(B)) * t_0) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -9.5e+32) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -9.5e-53) tmp = t_1; elseif (F <= 6.5e-143) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); elseif (F <= 86000.0) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -9.5e-53], t$95$1, If[LessEqual[F, 6.5e-143], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 86000.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-143}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 86000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_2\\
\end{array}
\end{array}
if F < -9.50000000000000006e32Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
associate-*l/67.5%
associate-/l*67.5%
fma-define67.5%
/-rgt-identity67.5%
remove-double-neg67.5%
fma-neg67.5%
Simplified67.5%
Taylor expanded in x around 0 67.5%
associate-*l/67.5%
*-lft-identity67.5%
+-commutative67.5%
unpow267.5%
fma-undefine67.5%
Simplified67.5%
Taylor expanded in F around -inf 99.7%
if -9.50000000000000006e32 < F < -9.5000000000000008e-53 or 6.4999999999999999e-143 < F < 86000Initial program 99.5%
Taylor expanded in B around 0 91.7%
if -9.5000000000000008e-53 < F < 6.4999999999999999e-143Initial program 99.5%
Taylor expanded in B around 0 90.1%
if 86000 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification95.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (- (* (/ F (sin B)) t_0) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -9.5e+32)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -7e-52)
t_1
(if (<= F 3e-143)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 72000.0) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = ((F / sin(B)) * t_0) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -7e-52) {
tmp = t_1;
} else if (F <= 3e-143) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 72000.0) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = ((f / sin(b)) * t_0) - (x / b)
t_2 = x / tan(b)
if (f <= (-9.5d+32)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-7d-52)) then
tmp = t_1
else if (f <= 3d-143) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 72000.0d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - t_2
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);
double t_1 = ((F / Math.sin(B)) * t_0) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -7e-52) {
tmp = t_1;
} else if (F <= 3e-143) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 72000.0) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = ((F / math.sin(B)) * t_0) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -9.5e+32: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -7e-52: tmp = t_1 elif F <= 3e-143: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 72000.0: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.5e+32) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -7e-52) tmp = t_1; elseif (F <= 3e-143) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 72000.0) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = ((F / sin(B)) * t_0) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -9.5e+32) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -7e-52) tmp = t_1; elseif (F <= 3e-143) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 72000.0) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -7e-52], t$95$1, If[LessEqual[F, 3e-143], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 72000.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-143}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 72000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_2\\
\end{array}
\end{array}
if F < -9.50000000000000006e32Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
associate-*l/67.5%
associate-/l*67.5%
fma-define67.5%
/-rgt-identity67.5%
remove-double-neg67.5%
fma-neg67.5%
Simplified67.5%
Taylor expanded in x around 0 67.5%
associate-*l/67.5%
*-lft-identity67.5%
+-commutative67.5%
unpow267.5%
fma-undefine67.5%
Simplified67.5%
Taylor expanded in F around -inf 99.7%
if -9.50000000000000006e32 < F < -7.0000000000000001e-52 or 2.99999999999999985e-143 < F < 72000Initial program 99.5%
Taylor expanded in B around 0 91.7%
if -7.0000000000000001e-52 < F < 2.99999999999999985e-143Initial program 99.5%
Taylor expanded in B around 0 90.1%
div-inv90.3%
clear-num90.2%
Applied egg-rr90.2%
if 72000 < F Initial program 50.8%
distribute-lft-neg-in50.8%
+-commutative50.8%
associate-*l/65.5%
associate-/l*65.5%
fma-define65.5%
/-rgt-identity65.5%
remove-double-neg65.5%
fma-neg65.5%
Simplified65.5%
Taylor expanded in x around 0 65.5%
associate-*l/65.5%
*-lft-identity65.5%
+-commutative65.5%
unpow265.5%
fma-undefine65.5%
Simplified65.5%
Taylor expanded in F around inf 99.7%
Final simplification95.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e-65)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.2e-94)
(* (cos B) (/ x (- (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 <= -4e-65) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.2e-94) {
tmp = cos(B) * (x / -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 <= (-4d-65)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.2d-94) then
tmp = cos(b) * (x / -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 <= -4e-65) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.2e-94) {
tmp = Math.cos(B) * (x / -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 <= -4e-65: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.2e-94: tmp = math.cos(B) * (x / -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 <= -4e-65) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.2e-94) tmp = Float64(cos(B) * Float64(x / 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 <= -4e-65) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.2e-94) tmp = cos(B) * (x / -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, -4e-65], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.2e-94], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{-65}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-94}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.99999999999999969e-65Initial program 64.3%
distribute-lft-neg-in64.3%
+-commutative64.3%
associate-*l/73.3%
associate-/l*73.3%
fma-define73.3%
/-rgt-identity73.3%
remove-double-neg73.3%
fma-neg73.3%
Simplified73.3%
Taylor expanded in x around 0 73.3%
associate-*l/73.3%
*-lft-identity73.3%
+-commutative73.3%
unpow273.3%
fma-undefine73.3%
Simplified73.3%
Taylor expanded in F around -inf 91.3%
if -3.99999999999999969e-65 < F < 3.19999999999999997e-94Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 75.5%
mul-1-neg75.5%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
if 3.19999999999999997e-94 < F Initial program 61.0%
distribute-lft-neg-in61.0%
+-commutative61.0%
associate-*l/72.7%
associate-/l*72.7%
fma-define72.7%
/-rgt-identity72.7%
remove-double-neg72.7%
fma-neg72.7%
Simplified72.7%
Taylor expanded in x around 0 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-undefine72.7%
Simplified72.7%
Taylor expanded in F around inf 88.8%
Final simplification84.9%
(FPCore (F B x)
:precision binary64
(if (<= F -4.4e-64)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 7.5e-96)
(* (cos B) (/ x (- (sin B))))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.4e-64) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 7.5e-96) {
tmp = cos(B) * (x / -sin(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 <= (-4.4d-64)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 7.5d-96) then
tmp = cos(b) * (x / -sin(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 <= -4.4e-64) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 7.5e-96) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.4e-64: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 7.5e-96: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.4e-64) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 7.5e-96) tmp = Float64(cos(B) * Float64(x / Float64(-sin(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 <= -4.4e-64) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 7.5e-96) tmp = cos(B) * (x / -sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.4e-64], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-96], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $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 -4.4 \cdot 10^{-64}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-96}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -4.3999999999999999e-64Initial program 64.3%
distribute-lft-neg-in64.3%
+-commutative64.3%
associate-*l/73.3%
associate-/l*73.3%
fma-define73.3%
/-rgt-identity73.3%
remove-double-neg73.3%
fma-neg73.3%
Simplified73.3%
Taylor expanded in F around -inf 91.2%
associate-/r*91.2%
Simplified91.2%
Taylor expanded in B around 0 70.8%
if -4.3999999999999999e-64 < F < 7.5e-96Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 75.5%
mul-1-neg75.5%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
if 7.5e-96 < F Initial program 61.0%
Taylor expanded in B around 0 38.8%
Taylor expanded in F around inf 59.1%
Final simplification69.0%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e-64)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 3e-94)
(* (cos B) (/ x (- (sin B))))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-64) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3e-94) {
tmp = cos(B) * (x / -sin(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 <= (-9.5d-64)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 3d-94) then
tmp = cos(b) * (x / -sin(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 <= -9.5e-64) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 3e-94) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-64: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 3e-94: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-64) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3e-94) tmp = Float64(cos(B) * Float64(x / Float64(-sin(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 <= -9.5e-64) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 3e-94) tmp = cos(B) * (x / -sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-64], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-94], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $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 -9.5 \cdot 10^{-64}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-94}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -9.50000000000000043e-64Initial program 64.3%
distribute-lft-neg-in64.3%
+-commutative64.3%
associate-*l/73.3%
associate-/l*73.3%
fma-define73.3%
/-rgt-identity73.3%
remove-double-neg73.3%
fma-neg73.3%
Simplified73.3%
Taylor expanded in x around 0 73.3%
associate-*l/73.3%
*-lft-identity73.3%
+-commutative73.3%
unpow273.3%
fma-undefine73.3%
Simplified73.3%
Taylor expanded in F around -inf 91.3%
if -9.50000000000000043e-64 < F < 3.0000000000000001e-94Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 75.5%
mul-1-neg75.5%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
if 3.0000000000000001e-94 < F Initial program 61.0%
Taylor expanded in B around 0 38.8%
Taylor expanded in F around inf 59.1%
Final simplification76.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.5e+32)
(- (/ -1.0 B) t_0)
(if (<= F -3.8e-119)
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(+ (/ x B) (* -0.3333333333333333 (* B x))))
(if (<= F -9e-302)
(- (/ 1.0 (* (/ B F) (/ F -1.0))) t_0)
(if (<= F 5e-28)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.8e-119) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= -9e-302) {
tmp = (1.0 / ((B / F) * (F / -1.0))) - t_0;
} else if (F <= 5e-28) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - 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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9.5d+32)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-3.8d-119)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else if (f <= (-9d-302)) then
tmp = (1.0d0 / ((b / f) * (f / (-1.0d0)))) - t_0
else if (f <= 5d-28) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - 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 t_0 = x / Math.tan(B);
double tmp;
if (F <= -9.5e+32) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.8e-119) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= -9e-302) {
tmp = (1.0 / ((B / F) * (F / -1.0))) - t_0;
} else if (F <= 5e-28) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.5e+32: tmp = (-1.0 / B) - t_0 elif F <= -3.8e-119: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (B * x))) elif F <= -9e-302: tmp = (1.0 / ((B / F) * (F / -1.0))) - t_0 elif F <= 5e-28: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.5e+32) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -3.8e-119) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); elseif (F <= -9e-302) tmp = Float64(Float64(1.0 / Float64(Float64(B / F) * Float64(F / -1.0))) - t_0); elseif (F <= 5e-28) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - 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) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.5e+32) tmp = (-1.0 / B) - t_0; elseif (F <= -3.8e-119) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (B * x))); elseif (F <= -9e-302) tmp = (1.0 / ((B / F) * (F / -1.0))) - t_0; elseif (F <= 5e-28) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+32], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.8e-119], 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[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9e-302], N[(N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F / -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5e-28], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-119}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-302}:\\
\;\;\;\;\frac{1}{\frac{B}{F} \cdot \frac{F}{-1}} - t\_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-28}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -9.50000000000000006e32Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
associate-*l/67.5%
associate-/l*67.5%
fma-define67.5%
/-rgt-identity67.5%
remove-double-neg67.5%
fma-neg67.5%
Simplified67.5%
Taylor expanded in F around -inf 99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 76.2%
if -9.50000000000000006e32 < F < -3.79999999999999975e-119Initial program 99.5%
Taylor expanded in B around 0 66.9%
Taylor expanded in B around 0 56.6%
if -3.79999999999999975e-119 < F < -9.00000000000000018e-302Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
associate-*l/99.6%
associate-/l*99.6%
fma-define99.6%
/-rgt-identity99.6%
remove-double-neg99.6%
fma-neg99.6%
Simplified99.7%
Taylor expanded in F around -inf 46.2%
associate-/r*46.2%
Simplified46.2%
Taylor expanded in B around 0 68.6%
*-commutative68.6%
Simplified68.6%
associate-*r/68.6%
Applied egg-rr68.6%
clear-num68.6%
inv-pow68.6%
*-commutative68.6%
Applied egg-rr68.6%
unpow-168.6%
times-frac68.8%
Simplified68.8%
if -9.00000000000000018e-302 < F < 5.0000000000000002e-28Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in B around 0 64.3%
Taylor expanded in F around 0 64.3%
if 5.0000000000000002e-28 < F Initial program 57.2%
Taylor expanded in B around 0 35.5%
Taylor expanded in F around inf 61.8%
Final simplification66.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ x (tan B))))
(if (<= F -0.000104)
(- (/ -1.0 B) t_1)
(if (<= F -2.7e-126)
t_0
(if (<= F -7e-303)
(- (/ 1.0 (* (/ B F) (/ F -1.0))) t_1)
(if (<= F 2.2e-26) t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / tan(B);
double tmp;
if (F <= -0.000104) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.7e-126) {
tmp = t_0;
} else if (F <= -7e-303) {
tmp = (1.0 / ((B / F) * (F / -1.0))) - t_1;
} else if (F <= 2.2e-26) {
tmp = t_0;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x / tan(b)
if (f <= (-0.000104d0)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-2.7d-126)) then
tmp = t_0
else if (f <= (-7d-303)) then
tmp = (1.0d0 / ((b / f) * (f / (-1.0d0)))) - t_1
else if (f <= 2.2d-26) then
tmp = t_0
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 t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.000104) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.7e-126) {
tmp = t_0;
} else if (F <= -7e-303) {
tmp = (1.0 / ((B / F) * (F / -1.0))) - t_1;
} else if (F <= 2.2e-26) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x / math.tan(B) tmp = 0 if F <= -0.000104: tmp = (-1.0 / B) - t_1 elif F <= -2.7e-126: tmp = t_0 elif F <= -7e-303: tmp = (1.0 / ((B / F) * (F / -1.0))) - t_1 elif F <= 2.2e-26: tmp = t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000104) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -2.7e-126) tmp = t_0; elseif (F <= -7e-303) tmp = Float64(Float64(1.0 / Float64(Float64(B / F) * Float64(F / -1.0))) - t_1); elseif (F <= 2.2e-26) tmp = t_0; 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) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x / tan(B); tmp = 0.0; if (F <= -0.000104) tmp = (-1.0 / B) - t_1; elseif (F <= -2.7e-126) tmp = t_0; elseif (F <= -7e-303) tmp = (1.0 / ((B / F) * (F / -1.0))) - t_1; elseif (F <= 2.2e-26) tmp = t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000104], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.7e-126], t$95$0, If[LessEqual[F, -7e-303], N[(N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F / -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.2e-26], t$95$0, N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000104:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -2.7 \cdot 10^{-126}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-303}:\\
\;\;\;\;\frac{1}{\frac{B}{F} \cdot \frac{F}{-1}} - t\_1\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-26}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.03999999999999994e-4Initial program 59.2%
distribute-lft-neg-in59.2%
+-commutative59.2%
associate-*l/69.6%
associate-/l*69.6%
fma-define69.6%
/-rgt-identity69.6%
remove-double-neg69.6%
fma-neg69.6%
Simplified69.6%
Taylor expanded in F around -inf 98.3%
associate-/r*98.3%
Simplified98.3%
Taylor expanded in B around 0 75.1%
if -1.03999999999999994e-4 < F < -2.69999999999999995e-126 or -7e-303 < F < 2.2000000000000001e-26Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in B around 0 61.2%
Taylor expanded in F around 0 61.2%
if -2.69999999999999995e-126 < F < -7e-303Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
associate-*l/99.6%
associate-/l*99.6%
fma-define99.6%
/-rgt-identity99.6%
remove-double-neg99.6%
fma-neg99.6%
Simplified99.7%
Taylor expanded in F around -inf 46.2%
associate-/r*46.2%
Simplified46.2%
Taylor expanded in B around 0 68.6%
*-commutative68.6%
Simplified68.6%
associate-*r/68.6%
Applied egg-rr68.6%
clear-num68.6%
inv-pow68.6%
*-commutative68.6%
Applied egg-rr68.6%
unpow-168.6%
times-frac68.8%
Simplified68.8%
if 2.2000000000000001e-26 < F Initial program 57.2%
Taylor expanded in B around 0 35.5%
Taylor expanded in F around inf 61.8%
Final simplification66.7%
(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.000185)
(- (/ -1.0 B) t_1)
(if (<= F -2.3e-120)
(- (* t_0 (/ F B)) (/ x B))
(if (<= F -5.1e-303)
(- (/ 1.0 (* (/ B F) (/ F -1.0))) t_1)
(if (<= F 4.4e-55)
(/ (- (* F t_0) x) B)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
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.000185) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.3e-120) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= -5.1e-303) {
tmp = (1.0 / ((B / F) * (F / -1.0))) - t_1;
} else if (F <= 4.4e-55) {
tmp = ((F * t_0) - 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) :: 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.000185d0)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-2.3d-120)) then
tmp = (t_0 * (f / b)) - (x / b)
else if (f <= (-5.1d-303)) then
tmp = (1.0d0 / ((b / f) * (f / (-1.0d0)))) - t_1
else if (f <= 4.4d-55) then
tmp = ((f * t_0) - 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 t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.000185) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.3e-120) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= -5.1e-303) {
tmp = (1.0 / ((B / F) * (F / -1.0))) - t_1;
} else if (F <= 4.4e-55) {
tmp = ((F * t_0) - x) / B;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
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.000185: tmp = (-1.0 / B) - t_1 elif F <= -2.3e-120: tmp = (t_0 * (F / B)) - (x / B) elif F <= -5.1e-303: tmp = (1.0 / ((B / F) * (F / -1.0))) - t_1 elif F <= 4.4e-55: tmp = ((F * t_0) - x) / B else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) 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.000185) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -2.3e-120) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); elseif (F <= -5.1e-303) tmp = Float64(Float64(1.0 / Float64(Float64(B / F) * Float64(F / -1.0))) - t_1); elseif (F <= 4.4e-55) tmp = Float64(Float64(Float64(F * t_0) - 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) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.000185) tmp = (-1.0 / B) - t_1; elseif (F <= -2.3e-120) tmp = (t_0 * (F / B)) - (x / B); elseif (F <= -5.1e-303) tmp = (1.0 / ((B / F) * (F / -1.0))) - t_1; elseif (F <= 4.4e-55) tmp = ((F * t_0) - x) / B; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); 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.000185], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.3e-120], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.1e-303], N[(N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F / -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 4.4e-55], N[(N[(N[(F * t$95$0), $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}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000185:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-120}:\\
\;\;\;\;t\_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.1 \cdot 10^{-303}:\\
\;\;\;\;\frac{1}{\frac{B}{F} \cdot \frac{F}{-1}} - t\_1\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{F \cdot t\_0 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.85e-4Initial program 59.2%
distribute-lft-neg-in59.2%
+-commutative59.2%
associate-*l/69.6%
associate-/l*69.6%
fma-define69.6%
/-rgt-identity69.6%
remove-double-neg69.6%
fma-neg69.6%
Simplified69.6%
Taylor expanded in F around -inf 98.3%
associate-/r*98.3%
Simplified98.3%
Taylor expanded in B around 0 75.1%
if -1.85e-4 < F < -2.29999999999999986e-120Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-define99.4%
+-commutative99.4%
*-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in B around 0 54.1%
Taylor expanded in F around 0 54.3%
if -2.29999999999999986e-120 < F < -5.1e-303Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
associate-*l/99.6%
associate-/l*99.6%
fma-define99.6%
/-rgt-identity99.6%
remove-double-neg99.6%
fma-neg99.6%
Simplified99.7%
Taylor expanded in F around -inf 46.2%
associate-/r*46.2%
Simplified46.2%
Taylor expanded in B around 0 68.6%
*-commutative68.6%
Simplified68.6%
associate-*r/68.6%
Applied egg-rr68.6%
clear-num68.6%
inv-pow68.6%
*-commutative68.6%
Applied egg-rr68.6%
unpow-168.6%
times-frac68.8%
Simplified68.8%
if -5.1e-303 < F < 4.3999999999999999e-55Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in B around 0 64.3%
Taylor expanded in F around 0 64.3%
if 4.3999999999999999e-55 < F Initial program 57.2%
Taylor expanded in B around 0 35.5%
Taylor expanded in F around inf 61.8%
Final simplification66.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.4e+24)
(- (/ -1.0 B) t_0)
(if (<= F -4.5e-119)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F -7.5e-302)
(- (/ 1.0 (* (/ B F) (/ F -1.0))) t_0)
(if (<= F 3.8e-25)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.4e+24) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -4.5e-119) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= -7.5e-302) {
tmp = (1.0 / ((B / F) * (F / -1.0))) - t_0;
} else if (F <= 3.8e-25) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - 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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.4d+24)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-4.5d-119)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= (-7.5d-302)) then
tmp = (1.0d0 / ((b / f) * (f / (-1.0d0)))) - t_0
else if (f <= 3.8d-25) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - 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 t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.4e+24) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -4.5e-119) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= -7.5e-302) {
tmp = (1.0 / ((B / F) * (F / -1.0))) - t_0;
} else if (F <= 3.8e-25) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.4e+24: tmp = (-1.0 / B) - t_0 elif F <= -4.5e-119: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= -7.5e-302: tmp = (1.0 / ((B / F) * (F / -1.0))) - t_0 elif F <= 3.8e-25: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.4e+24) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -4.5e-119) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= -7.5e-302) tmp = Float64(Float64(1.0 / Float64(Float64(B / F) * Float64(F / -1.0))) - t_0); elseif (F <= 3.8e-25) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - 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) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.4e+24) tmp = (-1.0 / B) - t_0; elseif (F <= -4.5e-119) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= -7.5e-302) tmp = (1.0 / ((B / F) * (F / -1.0))) - t_0; elseif (F <= 3.8e-25) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.4e+24], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.5e-119], 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, -7.5e-302], N[(N[(1.0 / N[(N[(B / F), $MachinePrecision] * N[(F / -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.8e-25], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.4 \cdot 10^{+24}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-119}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-302}:\\
\;\;\;\;\frac{1}{\frac{B}{F} \cdot \frac{F}{-1}} - t\_0\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.4000000000000001e24Initial program 57.0%
distribute-lft-neg-in57.0%
+-commutative57.0%
associate-*l/68.0%
associate-/l*68.0%
fma-define68.0%
/-rgt-identity68.0%
remove-double-neg68.0%
fma-neg68.0%
Simplified68.0%
Taylor expanded in F around -inf 99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 75.2%
if -3.4000000000000001e24 < F < -4.5000000000000003e-119Initial program 99.5%
Taylor expanded in B around 0 69.3%
Taylor expanded in B around 0 57.8%
if -4.5000000000000003e-119 < F < -7.49999999999999998e-302Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
associate-*l/99.6%
associate-/l*99.6%
fma-define99.6%
/-rgt-identity99.6%
remove-double-neg99.6%
fma-neg99.6%
Simplified99.7%
Taylor expanded in F around -inf 46.2%
associate-/r*46.2%
Simplified46.2%
Taylor expanded in B around 0 68.6%
*-commutative68.6%
Simplified68.6%
associate-*r/68.6%
Applied egg-rr68.6%
clear-num68.6%
inv-pow68.6%
*-commutative68.6%
Applied egg-rr68.6%
unpow-168.6%
times-frac68.8%
Simplified68.8%
if -7.49999999999999998e-302 < F < 3.7999999999999998e-25Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in B around 0 64.3%
Taylor expanded in F around 0 64.3%
if 3.7999999999999998e-25 < F Initial program 57.2%
Taylor expanded in B around 0 35.5%
Taylor expanded in F around inf 61.8%
Final simplification66.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -5.8e-302)
t_0
(if (<= F 9e-193)
(/ x (- (sin B)))
(if (<= F 1.25e+15) t_0 (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -5.8e-302) {
tmp = t_0;
} else if (F <= 9e-193) {
tmp = x / -sin(B);
} else if (F <= 1.25e+15) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-5.8d-302)) then
tmp = t_0
else if (f <= 9d-193) then
tmp = x / -sin(b)
else if (f <= 1.25d+15) then
tmp = t_0
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -5.8e-302) {
tmp = t_0;
} else if (F <= 9e-193) {
tmp = x / -Math.sin(B);
} else if (F <= 1.25e+15) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -5.8e-302: tmp = t_0 elif F <= 9e-193: tmp = x / -math.sin(B) elif F <= 1.25e+15: tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -5.8e-302) tmp = t_0; elseif (F <= 9e-193) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 1.25e+15) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -5.8e-302) tmp = t_0; elseif (F <= 9e-193) tmp = x / -sin(B); elseif (F <= 1.25e+15) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e-302], t$95$0, If[LessEqual[F, 9e-193], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.25e+15], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{-302}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-193}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{+15}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.79999999999999989e-302 or 8.9999999999999997e-193 < F < 1.25e15Initial program 82.2%
distribute-lft-neg-in82.2%
+-commutative82.2%
associate-*l/86.7%
associate-/l*86.7%
fma-define86.7%
/-rgt-identity86.7%
remove-double-neg86.7%
fma-neg86.7%
Simplified86.7%
Taylor expanded in F around -inf 65.5%
associate-/r*65.5%
Simplified65.5%
Taylor expanded in B around 0 62.0%
if -5.79999999999999989e-302 < F < 8.9999999999999997e-193Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-define99.4%
+-commutative99.4%
*-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 79.7%
mul-1-neg79.7%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in B around 0 68.3%
if 1.25e15 < F Initial program 47.3%
distribute-lft-neg-in47.3%
+-commutative47.3%
fma-define47.4%
+-commutative47.4%
*-commutative47.4%
fma-define47.4%
fma-define47.4%
metadata-eval47.4%
metadata-eval47.4%
associate-*r/47.4%
*-rgt-identity47.4%
Simplified47.4%
Taylor expanded in B around 0 34.2%
Taylor expanded in F around inf 51.0%
mul-1-neg51.0%
unsub-neg51.0%
Simplified51.0%
Final simplification60.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1e-299)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 3.9e-190)
(/ x (- (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e-299) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 3.9e-190) {
tmp = x / -sin(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 <= (-1d-299)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 3.9d-190) then
tmp = x / -sin(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 <= -1e-299) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 3.9e-190) {
tmp = x / -Math.sin(B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e-299: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 3.9e-190: tmp = x / -math.sin(B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e-299) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 3.9e-190) tmp = Float64(x / Float64(-sin(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 <= -1e-299) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 3.9e-190) tmp = x / -sin(B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e-299], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e-190], N[(x / (-N[Sin[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 -1 \cdot 10^{-299}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-190}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -9.99999999999999992e-300Initial program 77.2%
distribute-lft-neg-in77.2%
+-commutative77.2%
associate-*l/82.9%
associate-/l*83.0%
fma-define83.0%
/-rgt-identity83.0%
remove-double-neg83.0%
fma-neg83.0%
Simplified83.0%
Taylor expanded in F around -inf 73.2%
associate-/r*73.2%
Simplified73.2%
Taylor expanded in B around 0 66.9%
if -9.99999999999999992e-300 < F < 3.89999999999999995e-190Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-define99.4%
+-commutative99.4%
*-commutative99.4%
fma-define99.4%
fma-define99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 79.7%
mul-1-neg79.7%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in B around 0 68.3%
if 3.89999999999999995e-190 < F Initial program 69.1%
Taylor expanded in B around 0 47.9%
Taylor expanded in F around inf 57.1%
Final simplification63.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.05e-48) (/ (- -1.0 x) B) (if (<= F 1.15e+15) (/ x (- (sin B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.05e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e+15) {
tmp = x / -sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.05d-48)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.15d+15) then
tmp = x / -sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.05e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e+15) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.05e-48: tmp = (-1.0 - x) / B elif F <= 1.15e+15: tmp = x / -math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.05e-48) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.15e+15) tmp = Float64(x / Float64(-sin(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.05e-48) tmp = (-1.0 - x) / B; elseif (F <= 1.15e+15) tmp = x / -sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.05e-48], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.15e+15], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.05 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.04999999999999994e-48Initial program 63.0%
distribute-lft-neg-in63.0%
+-commutative63.0%
associate-*l/72.4%
associate-/l*72.4%
fma-define72.4%
/-rgt-identity72.4%
remove-double-neg72.4%
fma-neg72.4%
Simplified72.4%
Taylor expanded in F around -inf 92.0%
associate-/r*92.0%
Simplified92.0%
Taylor expanded in B around 0 48.2%
associate-*r/48.2%
mul-1-neg48.2%
Simplified48.2%
if -1.04999999999999994e-48 < F < 1.15e15Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 69.4%
mul-1-neg69.4%
associate-*l/69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in B around 0 38.6%
if 1.15e15 < F Initial program 47.3%
distribute-lft-neg-in47.3%
+-commutative47.3%
fma-define47.4%
+-commutative47.4%
*-commutative47.4%
fma-define47.4%
fma-define47.4%
metadata-eval47.4%
metadata-eval47.4%
associate-*r/47.4%
*-rgt-identity47.4%
Simplified47.4%
Taylor expanded in B around 0 34.2%
Taylor expanded in F around inf 51.0%
mul-1-neg51.0%
unsub-neg51.0%
Simplified51.0%
Final simplification44.5%
(FPCore (F B x) :precision binary64 (if (<= F -4.5e-49) (/ (- -1.0 x) B) (if (<= F 2.45e-186) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e-49) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.45e-186) {
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 <= (-4.5d-49)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.45d-186) 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 <= -4.5e-49) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.45e-186) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.5e-49: tmp = (-1.0 - x) / B elif F <= 2.45e-186: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.5e-49) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.45e-186) 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 <= -4.5e-49) tmp = (-1.0 - x) / B; elseif (F <= 2.45e-186) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.5e-49], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.45e-186], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.5 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{-186}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.5000000000000002e-49Initial program 63.0%
distribute-lft-neg-in63.0%
+-commutative63.0%
associate-*l/72.4%
associate-/l*72.4%
fma-define72.4%
/-rgt-identity72.4%
remove-double-neg72.4%
fma-neg72.4%
Simplified72.4%
Taylor expanded in F around -inf 92.0%
associate-/r*92.0%
Simplified92.0%
Taylor expanded in B around 0 48.2%
associate-*r/48.2%
mul-1-neg48.2%
Simplified48.2%
if -4.5000000000000002e-49 < F < 2.4499999999999998e-186Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 79.2%
mul-1-neg79.2%
associate-*l/79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in B around 0 41.5%
if 2.4499999999999998e-186 < F Initial program 68.1%
distribute-lft-neg-in68.1%
+-commutative68.1%
fma-define68.1%
+-commutative68.1%
*-commutative68.1%
fma-define68.1%
fma-define68.1%
metadata-eval68.1%
metadata-eval68.1%
associate-*r/68.1%
*-rgt-identity68.1%
Simplified68.1%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 40.7%
mul-1-neg40.7%
unsub-neg40.7%
Simplified40.7%
Final simplification43.4%
(FPCore (F B x) :precision binary64 (if (<= F 2.45e-186) (/ x (- B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 2.45e-186) {
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 <= 2.45d-186) 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 <= 2.45e-186) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 2.45e-186: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 2.45e-186) 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 <= 2.45e-186) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 2.45e-186], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.45 \cdot 10^{-186}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 2.4499999999999998e-186Initial program 80.5%
distribute-lft-neg-in80.5%
+-commutative80.5%
fma-define80.5%
+-commutative80.5%
*-commutative80.5%
fma-define80.5%
fma-define80.5%
metadata-eval80.5%
metadata-eval80.5%
associate-*r/80.6%
*-rgt-identity80.6%
Simplified80.6%
Taylor expanded in F around 0 59.5%
mul-1-neg59.5%
associate-*l/59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in B around 0 29.6%
if 2.4499999999999998e-186 < F Initial program 68.1%
distribute-lft-neg-in68.1%
+-commutative68.1%
fma-define68.1%
+-commutative68.1%
*-commutative68.1%
fma-define68.1%
fma-define68.1%
metadata-eval68.1%
metadata-eval68.1%
associate-*r/68.1%
*-rgt-identity68.1%
Simplified68.1%
Taylor expanded in B around 0 37.6%
Taylor expanded in F around inf 40.7%
mul-1-neg40.7%
unsub-neg40.7%
Simplified40.7%
Final simplification33.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(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 76.0%
distribute-lft-neg-in76.0%
+-commutative76.0%
fma-define76.0%
+-commutative76.0%
*-commutative76.0%
fma-define76.0%
fma-define76.0%
metadata-eval76.0%
metadata-eval76.0%
associate-*r/76.0%
*-rgt-identity76.0%
Simplified76.0%
Taylor expanded in F around 0 53.3%
mul-1-neg53.3%
associate-*l/53.2%
*-commutative53.2%
Simplified53.2%
Taylor expanded in B around 0 27.6%
Final simplification27.6%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 76.0%
distribute-lft-neg-in76.0%
+-commutative76.0%
fma-define76.0%
+-commutative76.0%
*-commutative76.0%
fma-define76.0%
fma-define76.0%
metadata-eval76.0%
metadata-eval76.0%
associate-*r/76.0%
*-rgt-identity76.0%
Simplified76.0%
Taylor expanded in B around 0 41.4%
Taylor expanded in F around inf 26.8%
mul-1-neg26.8%
unsub-neg26.8%
Simplified26.8%
Taylor expanded in x around 0 8.5%
Final simplification8.5%
herbie shell --seed 2024045
(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))))))