
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+29)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 800000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(-
(- (/ 1.0 (sin B)) (/ (+ x 1.0) (* (sin B) (pow F 2.0))))
(* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+29) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 800000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = ((1.0 / sin(B)) - ((x + 1.0) / (sin(B) * pow(F, 2.0)))) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5d+29)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 800000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = ((1.0d0 / sin(b)) - ((x + 1.0d0) / (sin(b) * (f ** 2.0d0)))) - (x * (1.0d0 / tan(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 <= -5e+29) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 800000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = ((1.0 / Math.sin(B)) - ((x + 1.0) / (Math.sin(B) * Math.pow(F, 2.0)))) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5e+29: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 800000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = ((1.0 / math.sin(B)) - ((x + 1.0) / (math.sin(B) * math.pow(F, 2.0)))) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+29) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 800000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(Float64(1.0 / sin(B)) - Float64(Float64(x + 1.0) / Float64(sin(B) * (F ^ 2.0)))) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5e+29) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 800000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = ((1.0 / sin(B)) - ((x + 1.0) / (sin(B) * (F ^ 2.0)))) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 800000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] * N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 800000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sin B} - \frac{x + 1}{\sin B \cdot {F}^{2}}\right) - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -5.0000000000000001e29Initial program 54.9%
Taylor expanded in F around -inf 99.6%
+-commutative99.6%
unsub-neg99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if -5.0000000000000001e29 < F < 8e5Initial program 99.5%
div-inv99.6%
expm1-log1p-u68.3%
expm1-udef54.3%
Applied egg-rr54.3%
expm1-def68.3%
expm1-log1p99.6%
Simplified99.6%
if 8e5 < F Initial program 55.2%
Taylor expanded in F around inf 99.7%
+-commutative99.7%
associate-*r/99.7%
distribute-lft-in99.7%
metadata-eval99.7%
associate-*r*99.7%
metadata-eval99.7%
neg-mul-199.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.6e+28)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.95e+51)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.6e+28) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.95e+51) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.6d+28)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.95d+51) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(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.6e+28) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.95e+51) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.6e+28: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.95e+51: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.6e+28) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.95e+51) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.6e+28) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.95e+51) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(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.6e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.95e+51], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.6 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{+51}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -3.5999999999999999e28Initial program 54.9%
Taylor expanded in F around -inf 99.6%
+-commutative99.6%
unsub-neg99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if -3.5999999999999999e28 < F < 1.94999999999999992e51Initial program 99.5%
div-inv99.6%
expm1-log1p-u69.9%
expm1-udef57.0%
Applied egg-rr57.0%
expm1-def69.9%
expm1-log1p99.6%
Simplified99.6%
if 1.94999999999999992e51 < F Initial program 46.7%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ 1.0 (tan B)))))
(if (<= F -0.066)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 4.2e-11)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x * (1.0 / tan(B));
double tmp;
if (F <= -0.066) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 4.2e-11) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * (1.0d0 / tan(b))
if (f <= (-0.066d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 4.2d-11) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (1.0 / Math.tan(B));
double tmp;
if (F <= -0.066) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 4.2e-11) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x * (1.0 / math.tan(B)) tmp = 0 if F <= -0.066: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 4.2e-11: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(1.0 / tan(B))) tmp = 0.0 if (F <= -0.066) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 4.2e-11) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (1.0 / tan(B)); tmp = 0.0; if (F <= -0.066) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 4.2e-11) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.066], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-11], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -0.066:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.066000000000000003Initial program 57.6%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.066000000000000003 < F < 4.1999999999999997e-11Initial program 99.5%
associate-*l/99.4%
associate-/l*99.5%
+-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.0%
if 4.1999999999999997e-11 < F Initial program 56.5%
Taylor expanded in F around inf 99.4%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.066)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 900000.0)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.066) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 900000.0) {
tmp = (x * (-1.0 / tan(B))) + (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.066d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 900000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.066) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 900000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.066: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 900000.0: tmp = (x * (-1.0 / math.tan(B))) + (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.066) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 900000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.066) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 900000.0) tmp = (x * (-1.0 / tan(B))) + (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.066], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 900000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.066:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 900000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.066000000000000003Initial program 57.6%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.066000000000000003 < F < 9e5Initial program 99.5%
Taylor expanded in B around 0 85.5%
if 9e5 < F Initial program 54.5%
Taylor expanded in F around inf 99.7%
Final simplification92.6%
(FPCore (F B x)
:precision binary64
(if (<= F -0.066)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 850000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.066) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 850000.0) {
tmp = (-1.0 / (tan(B) / x)) + (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.066d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 850000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.066) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 850000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.066: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 850000.0: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.066) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 850000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.066) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 850000.0) tmp = (-1.0 / (tan(B) / x)) + (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.066], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 850000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.066:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 850000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.066000000000000003Initial program 57.6%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.066000000000000003 < F < 8.5e5Initial program 99.5%
Taylor expanded in B around 0 85.5%
div-inv85.6%
clear-num85.5%
Applied egg-rr85.5%
if 8.5e5 < F Initial program 54.5%
Taylor expanded in F around inf 99.7%
Final simplification92.6%
(FPCore (F B x)
:precision binary64
(if (<= F -0.066)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 4.2e-11)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.066) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 4.2e-11) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.066d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 4.2d-11) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.066) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 4.2e-11) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.066: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 4.2e-11: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.066) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 4.2e-11) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.066) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 4.2e-11) tmp = (x * (-1.0 / tan(B))) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.066], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-11], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.066:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-11}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.066000000000000003Initial program 57.6%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.066000000000000003 < F < 4.1999999999999997e-11Initial program 99.5%
Taylor expanded in B around 0 85.2%
Taylor expanded in F around 0 84.7%
if 4.1999999999999997e-11 < F Initial program 56.5%
Taylor expanded in F around inf 99.4%
Final simplification92.3%
(FPCore (F B x)
:precision binary64
(if (<= F -0.055)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 4.2e-11)
(+ (/ -1.0 (/ (tan B) x)) (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.055) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 4.2e-11) {
tmp = (-1.0 / (tan(B) / x)) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.055d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 4.2d-11) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.055) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 4.2e-11) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.055: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 4.2e-11: tmp = (-1.0 / (math.tan(B) / x)) + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.055) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 4.2e-11) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.055) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 4.2e-11) tmp = (-1.0 / (tan(B) / x)) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.055], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-11], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.055:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.0550000000000000003Initial program 57.6%
Taylor expanded in F around -inf 98.7%
+-commutative98.7%
unsub-neg98.7%
un-div-inv98.7%
Applied egg-rr98.7%
if -0.0550000000000000003 < F < 4.1999999999999997e-11Initial program 99.5%
Taylor expanded in B around 0 85.2%
div-inv85.3%
clear-num85.2%
Applied egg-rr85.2%
Taylor expanded in F around 0 84.7%
if 4.1999999999999997e-11 < F Initial program 56.5%
Taylor expanded in F around inf 99.4%
Final simplification92.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -7.8e-22)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -5e-172)
(- t_0 (/ x B))
(if (<= F 9e-127)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 6.6e-14)
(- t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(- (/ 1.0 (sin B)) (* x (/ 1.0 (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -5e-172) {
tmp = t_0 - (x / B);
} else if (F <= 9e-127) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 6.6e-14) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-7.8d-22)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-5d-172)) then
tmp = t_0 - (x / b)
else if (f <= 9d-127) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 6.6d-14) then
tmp = t_0 - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else
tmp = (1.0d0 / sin(b)) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -5e-172) {
tmp = t_0 - (x / B);
} else if (F <= 9e-127) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 6.6e-14) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -7.8e-22: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -5e-172: tmp = t_0 - (x / B) elif F <= 9e-127: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 6.6e-14: tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))) else: tmp = (1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -7.8e-22) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -5e-172) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 9e-127) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 6.6e-14) tmp = Float64(t_0 - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -7.8e-22) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -5e-172) tmp = t_0 - (x / B); elseif (F <= 9e-127) tmp = (-x * cos(B)) / sin(B); elseif (F <= 6.6e-14) tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))); else tmp = (1.0 / sin(B)) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5e-172], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-127], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.6e-14], N[(t$95$0 - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-172}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-127}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-14}:\\
\;\;\;\;t_0 - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -7.79999999999999996e-22Initial program 60.0%
Taylor expanded in F around -inf 94.9%
+-commutative94.9%
unsub-neg94.9%
un-div-inv95.0%
Applied egg-rr95.0%
if -7.79999999999999996e-22 < F < -4.9999999999999999e-172Initial program 99.7%
Taylor expanded in B around 0 85.0%
Taylor expanded in B around 0 68.2%
if -4.9999999999999999e-172 < F < 8.9999999999999998e-127Initial program 99.5%
Taylor expanded in F around -inf 50.6%
Taylor expanded in x around inf 81.0%
associate-*r/81.0%
associate-*r*81.0%
neg-mul-181.0%
Simplified81.0%
if 8.9999999999999998e-127 < F < 6.5999999999999996e-14Initial program 99.2%
Taylor expanded in B around 0 81.8%
Taylor expanded in B around 0 71.2%
if 6.5999999999999996e-14 < F Initial program 56.5%
Taylor expanded in F around inf 99.4%
Final simplification87.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -7.8e-22)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -7.2e-172)
(- t_0 (/ x B))
(if (<= F 3.5e-127)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 850000.0)
(- t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -7.2e-172) {
tmp = t_0 - (x / B);
} else if (F <= 3.5e-127) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 850000.0) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-7.8d-22)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-7.2d-172)) then
tmp = t_0 - (x / b)
else if (f <= 3.5d-127) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 850000.0d0) then
tmp = t_0 - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -7.2e-172) {
tmp = t_0 - (x / B);
} else if (F <= 3.5e-127) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 850000.0) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -7.8e-22: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -7.2e-172: tmp = t_0 - (x / B) elif F <= 3.5e-127: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 850000.0: tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))) else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -7.8e-22) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -7.2e-172) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 3.5e-127) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 850000.0) tmp = Float64(t_0 - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -7.8e-22) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -7.2e-172) tmp = t_0 - (x / B); elseif (F <= 3.5e-127) tmp = -x / (sin(B) / cos(B)); elseif (F <= 850000.0) tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))); else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e-22], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.2e-172], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e-127], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 850000.0], N[(t$95$0 - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-172}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 850000:\\
\;\;\;\;t_0 - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999996e-22Initial program 60.0%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 70.0%
if -7.79999999999999996e-22 < F < -7.20000000000000029e-172Initial program 99.7%
Taylor expanded in B around 0 85.0%
Taylor expanded in B around 0 68.2%
if -7.20000000000000029e-172 < F < 3.49999999999999989e-127Initial program 99.5%
Taylor expanded in F around -inf 50.6%
Taylor expanded in x around inf 81.0%
mul-1-neg81.0%
associate-/l*80.9%
Simplified80.9%
if 3.49999999999999989e-127 < F < 8.5e5Initial program 99.3%
Taylor expanded in B around 0 83.6%
Taylor expanded in B around 0 67.7%
if 8.5e5 < F Initial program 54.5%
associate-*l/77.3%
associate-/l*77.2%
+-commutative77.2%
fma-def77.2%
fma-def77.2%
metadata-eval77.2%
metadata-eval77.2%
Applied egg-rr77.2%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 79.0%
Final simplification74.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -7.8e-22)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -7.2e-172)
(- t_0 (/ x B))
(if (<= F 1.45e-127)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 850000.0)
(- t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -7.2e-172) {
tmp = t_0 - (x / B);
} else if (F <= 1.45e-127) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 850000.0) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-7.8d-22)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-7.2d-172)) then
tmp = t_0 - (x / b)
else if (f <= 1.45d-127) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 850000.0d0) then
tmp = t_0 - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -7.2e-172) {
tmp = t_0 - (x / B);
} else if (F <= 1.45e-127) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 850000.0) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -7.8e-22: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -7.2e-172: tmp = t_0 - (x / B) elif F <= 1.45e-127: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 850000.0: tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))) else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -7.8e-22) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -7.2e-172) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 1.45e-127) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 850000.0) tmp = Float64(t_0 - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -7.8e-22) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -7.2e-172) tmp = t_0 - (x / B); elseif (F <= 1.45e-127) tmp = (-x * cos(B)) / sin(B); elseif (F <= 850000.0) tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))); else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e-22], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.2e-172], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45e-127], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 850000.0], N[(t$95$0 - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-172}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-127}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 850000:\\
\;\;\;\;t_0 - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999996e-22Initial program 60.0%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 70.0%
if -7.79999999999999996e-22 < F < -7.20000000000000029e-172Initial program 99.7%
Taylor expanded in B around 0 85.0%
Taylor expanded in B around 0 68.2%
if -7.20000000000000029e-172 < F < 1.45e-127Initial program 99.5%
Taylor expanded in F around -inf 50.6%
Taylor expanded in x around inf 81.0%
associate-*r/81.0%
associate-*r*81.0%
neg-mul-181.0%
Simplified81.0%
if 1.45e-127 < F < 8.5e5Initial program 99.3%
Taylor expanded in B around 0 83.6%
Taylor expanded in B around 0 67.7%
if 8.5e5 < F Initial program 54.5%
associate-*l/77.3%
associate-/l*77.2%
+-commutative77.2%
fma-def77.2%
fma-def77.2%
metadata-eval77.2%
metadata-eval77.2%
Applied egg-rr77.2%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 79.0%
Final simplification74.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -7.8e-22)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -5e-172)
(- t_0 (/ x B))
(if (<= F 1.12e-127)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 850000.0)
(- t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -5e-172) {
tmp = t_0 - (x / B);
} else if (F <= 1.12e-127) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 850000.0) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-7.8d-22)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-5d-172)) then
tmp = t_0 - (x / b)
else if (f <= 1.12d-127) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 850000.0d0) then
tmp = t_0 - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -5e-172) {
tmp = t_0 - (x / B);
} else if (F <= 1.12e-127) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 850000.0) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -7.8e-22: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -5e-172: tmp = t_0 - (x / B) elif F <= 1.12e-127: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 850000.0: tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))) else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -7.8e-22) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -5e-172) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 1.12e-127) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 850000.0) tmp = Float64(t_0 - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -7.8e-22) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -5e-172) tmp = t_0 - (x / B); elseif (F <= 1.12e-127) tmp = (-x * cos(B)) / sin(B); elseif (F <= 850000.0) tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))); else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5e-172], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.12e-127], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 850000.0], N[(t$95$0 - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-172}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{-127}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 850000:\\
\;\;\;\;t_0 - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999996e-22Initial program 60.0%
Taylor expanded in F around -inf 94.9%
+-commutative94.9%
unsub-neg94.9%
un-div-inv95.0%
Applied egg-rr95.0%
if -7.79999999999999996e-22 < F < -4.9999999999999999e-172Initial program 99.7%
Taylor expanded in B around 0 85.0%
Taylor expanded in B around 0 68.2%
if -4.9999999999999999e-172 < F < 1.1199999999999999e-127Initial program 99.5%
Taylor expanded in F around -inf 50.6%
Taylor expanded in x around inf 81.0%
associate-*r/81.0%
associate-*r*81.0%
neg-mul-181.0%
Simplified81.0%
if 1.1199999999999999e-127 < F < 8.5e5Initial program 99.3%
Taylor expanded in B around 0 83.6%
Taylor expanded in B around 0 67.7%
if 8.5e5 < F Initial program 54.5%
associate-*l/77.3%
associate-/l*77.2%
+-commutative77.2%
fma-def77.2%
fma-def77.2%
metadata-eval77.2%
metadata-eval77.2%
Applied egg-rr77.2%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 79.0%
Final simplification81.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B)))
(t_1 (* x (/ 1.0 (tan B)))))
(if (<= F -7.8e-22)
(- (/ -1.0 B) t_1)
(if (<= F -1.3e-172)
t_0
(if (<= F 3.5e-237)
(- (* (/ F B) (/ -1.0 F)) t_1)
(if (<= F 850000.0) t_0 (- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x * (1.0 / tan(B));
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.3e-172) {
tmp = t_0;
} else if (F <= 3.5e-237) {
tmp = ((F / B) * (-1.0 / F)) - t_1;
} else if (F <= 850000.0) {
tmp = t_0;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
t_1 = x * (1.0d0 / tan(b))
if (f <= (-7.8d-22)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-1.3d-172)) then
tmp = t_0
else if (f <= 3.5d-237) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_1
else if (f <= 850000.0d0) then
tmp = t_0
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x * (1.0 / Math.tan(B));
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.3e-172) {
tmp = t_0;
} else if (F <= 3.5e-237) {
tmp = ((F / B) * (-1.0 / F)) - t_1;
} else if (F <= 850000.0) {
tmp = t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) t_1 = x * (1.0 / math.tan(B)) tmp = 0 if F <= -7.8e-22: tmp = (-1.0 / B) - t_1 elif F <= -1.3e-172: tmp = t_0 elif F <= 3.5e-237: tmp = ((F / B) * (-1.0 / F)) - t_1 elif F <= 850000.0: tmp = t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x * Float64(1.0 / tan(B))) tmp = 0.0 if (F <= -7.8e-22) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -1.3e-172) tmp = t_0; elseif (F <= 3.5e-237) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_1); elseif (F <= 850000.0) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); t_1 = x * (1.0 / tan(B)); tmp = 0.0; if (F <= -7.8e-22) tmp = (-1.0 / B) - t_1; elseif (F <= -1.3e-172) tmp = t_0; elseif (F <= 3.5e-237) tmp = ((F / B) * (-1.0 / F)) - t_1; elseif (F <= 850000.0) tmp = t_0; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e-22], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.3e-172], t$95$0, If[LessEqual[F, 3.5e-237], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 850000.0], t$95$0, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{-172}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-237}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_1\\
\mathbf{elif}\;F \leq 850000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999996e-22Initial program 60.0%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 70.0%
if -7.79999999999999996e-22 < F < -1.2999999999999999e-172 or 3.49999999999999983e-237 < F < 8.5e5Initial program 99.4%
Taylor expanded in B around 0 83.2%
Taylor expanded in B around 0 64.6%
if -1.2999999999999999e-172 < F < 3.49999999999999983e-237Initial program 99.6%
Taylor expanded in B around 0 93.4%
Taylor expanded in F around -inf 79.0%
if 8.5e5 < F Initial program 54.5%
associate-*l/77.3%
associate-/l*77.2%
+-commutative77.2%
fma-def77.2%
fma-def77.2%
metadata-eval77.2%
metadata-eval77.2%
Applied egg-rr77.2%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 79.0%
Final simplification72.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_1 (* x (/ 1.0 (tan B)))))
(if (<= F -7.8e-22)
(- (/ -1.0 B) t_1)
(if (<= F -1.12e-172)
t_0
(if (<= F 5e-240)
(- (* (/ F B) (/ -1.0 F)) t_1)
(if (<= F 4.2e-11) t_0 (- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x * (1.0 / tan(B));
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.12e-172) {
tmp = t_0;
} else if (F <= 5e-240) {
tmp = ((F / B) * (-1.0 / F)) - t_1;
} else if (F <= 4.2e-11) {
tmp = t_0;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_1 = x * (1.0d0 / tan(b))
if (f <= (-7.8d-22)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-1.12d-172)) then
tmp = t_0
else if (f <= 5d-240) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_1
else if (f <= 4.2d-11) then
tmp = t_0
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x * (1.0 / Math.tan(B));
double tmp;
if (F <= -7.8e-22) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.12e-172) {
tmp = t_0;
} else if (F <= 5e-240) {
tmp = ((F / B) * (-1.0 / F)) - t_1;
} else if (F <= 4.2e-11) {
tmp = t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_1 = x * (1.0 / math.tan(B)) tmp = 0 if F <= -7.8e-22: tmp = (-1.0 / B) - t_1 elif F <= -1.12e-172: tmp = t_0 elif F <= 5e-240: tmp = ((F / B) * (-1.0 / F)) - t_1 elif F <= 4.2e-11: tmp = t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_1 = Float64(x * Float64(1.0 / tan(B))) tmp = 0.0 if (F <= -7.8e-22) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -1.12e-172) tmp = t_0; elseif (F <= 5e-240) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_1); elseif (F <= 4.2e-11) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_1 = x * (1.0 / tan(B)); tmp = 0.0; if (F <= -7.8e-22) tmp = (-1.0 / B) - t_1; elseif (F <= -1.12e-172) tmp = t_0; elseif (F <= 5e-240) tmp = ((F / B) * (-1.0 / F)) - t_1; elseif (F <= 4.2e-11) tmp = t_0; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e-22], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.12e-172], t$95$0, If[LessEqual[F, 5e-240], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 4.2e-11], t$95$0, N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_1 := x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq -1.12 \cdot 10^{-172}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-240}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_1\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999996e-22Initial program 60.0%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 70.0%
if -7.79999999999999996e-22 < F < -1.11999999999999996e-172 or 5.0000000000000004e-240 < F < 4.1999999999999997e-11Initial program 99.4%
Taylor expanded in B around 0 82.6%
Taylor expanded in B around 0 65.8%
Taylor expanded in F around 0 65.8%
if -1.11999999999999996e-172 < F < 5.0000000000000004e-240Initial program 99.6%
Taylor expanded in B around 0 93.4%
Taylor expanded in F around -inf 79.0%
if 4.1999999999999997e-11 < F Initial program 56.5%
associate-*l/78.3%
associate-/l*78.2%
+-commutative78.2%
fma-def78.2%
fma-def78.2%
metadata-eval78.2%
metadata-eval78.2%
Applied egg-rr78.2%
Taylor expanded in F around inf 99.3%
Taylor expanded in B around 0 76.8%
Final simplification72.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.35e-184) (not (<= x 7.4e-82))) (- (/ -1.0 B) (* x (/ 1.0 (tan B)))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.35e-184) || !(x <= 7.4e-82)) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2.35d-184)) .or. (.not. (x <= 7.4d-82))) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.35e-184) || !(x <= 7.4e-82)) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.35e-184) or not (x <= 7.4e-82): tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.35e-184) || !(x <= 7.4e-82)) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.35e-184) || ~((x <= 7.4e-82))) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.35e-184], N[Not[LessEqual[x, 7.4e-82]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{-184} \lor \neg \left(x \leq 7.4 \cdot 10^{-82}\right):\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -2.3500000000000001e-184 or 7.4000000000000002e-82 < x Initial program 79.7%
Taylor expanded in F around -inf 72.1%
Taylor expanded in B around 0 74.2%
if -2.3500000000000001e-184 < x < 7.4000000000000002e-82Initial program 72.1%
Taylor expanded in F around -inf 25.1%
Taylor expanded in B around 0 25.1%
Taylor expanded in x around 0 25.1%
Final simplification57.3%
(FPCore (F B x) :precision binary64 (let* ((t_0 (* x (/ 1.0 (tan B))))) (if (<= F 9.5e-189) (- (/ -1.0 B) t_0) (- (/ 1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = x * (1.0 / tan(B));
double tmp;
if (F <= 9.5e-189) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * (1.0d0 / tan(b))
if (f <= 9.5d-189) then
tmp = ((-1.0d0) / b) - t_0
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (1.0 / Math.tan(B));
double tmp;
if (F <= 9.5e-189) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x * (1.0 / math.tan(B)) tmp = 0 if F <= 9.5e-189: tmp = (-1.0 / B) - t_0 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(1.0 / tan(B))) tmp = 0.0 if (F <= 9.5e-189) tmp = Float64(Float64(-1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (1.0 / tan(B)); tmp = 0.0; if (F <= 9.5e-189) tmp = (-1.0 / B) - t_0; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 9.5e-189], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq 9.5 \cdot 10^{-189}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < 9.499999999999999e-189Initial program 81.0%
Taylor expanded in F around -inf 68.1%
Taylor expanded in B around 0 61.0%
if 9.499999999999999e-189 < F Initial program 71.8%
Taylor expanded in B around 0 54.4%
Taylor expanded in F around inf 59.1%
Final simplification60.2%
(FPCore (F B x) :precision binary64 (if (<= F 0.039) (- (/ -1.0 B) (* x (/ 1.0 (tan B)))) (- (/ F (* F (sin B))) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= 0.039) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 0.039d0) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 0.039) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 0.039: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 0.039) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 0.039) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 0.039], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 0.039:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < 0.0389999999999999999Initial program 85.0%
Taylor expanded in F around -inf 58.9%
Taylor expanded in B around 0 54.8%
if 0.0389999999999999999 < F Initial program 55.2%
associate-*l/77.6%
associate-/l*77.6%
+-commutative77.6%
fma-def77.6%
fma-def77.6%
metadata-eval77.6%
metadata-eval77.6%
Applied egg-rr77.6%
Taylor expanded in F around inf 99.3%
Taylor expanded in B around 0 79.0%
Final simplification61.2%
(FPCore (F B x) :precision binary64 (if (<= F -3e-32) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.3e-47) (- (/ x B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-32) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.3e-47) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3d-32)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.3d-47) then
tmp = -(x / b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3e-32) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.3e-47) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e-32: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.3e-47: tmp = -(x / B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e-32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.3e-47) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3e-32) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.3e-47) tmp = -(x / B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e-32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-47], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-47}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3e-32Initial program 62.7%
Taylor expanded in F around -inf 90.3%
Taylor expanded in B around 0 65.6%
if -3e-32 < F < 1.3e-47Initial program 99.5%
Taylor expanded in F around -inf 37.6%
Taylor expanded in B around 0 21.3%
associate-*r/21.3%
distribute-lft-in21.3%
metadata-eval21.3%
neg-mul-121.3%
Simplified21.3%
Taylor expanded in x around inf 36.8%
associate-*r/36.8%
mul-1-neg36.8%
Simplified36.8%
if 1.3e-47 < F Initial program 59.8%
Taylor expanded in B around 0 44.8%
Taylor expanded in B around 0 24.5%
Taylor expanded in F around inf 50.6%
Final simplification49.2%
(FPCore (F B x) :precision binary64 (if (<= F -9.6e-29) (/ (- -1.0 x) B) (if (<= F 1.75e-47) (- (/ x B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e-29) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.75e-47) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.6d-29)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.75d-47) then
tmp = -(x / b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e-29) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.75e-47) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.6e-29: tmp = (-1.0 - x) / B elif F <= 1.75e-47: tmp = -(x / B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.6e-29) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.75e-47) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.6e-29) tmp = (-1.0 - x) / B; elseif (F <= 1.75e-47) tmp = -(x / B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.6e-29], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.75e-47], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.6 \cdot 10^{-29}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-47}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.59999999999999968e-29Initial program 61.7%
Taylor expanded in F around -inf 91.3%
Taylor expanded in B around 0 43.5%
associate-*r/43.5%
distribute-lft-in43.5%
metadata-eval43.5%
neg-mul-143.5%
Simplified43.5%
if -9.59999999999999968e-29 < F < 1.7499999999999999e-47Initial program 99.5%
Taylor expanded in F around -inf 37.9%
Taylor expanded in B around 0 21.9%
associate-*r/21.9%
distribute-lft-in21.9%
metadata-eval21.9%
neg-mul-121.9%
Simplified21.9%
Taylor expanded in x around inf 37.1%
associate-*r/37.1%
mul-1-neg37.1%
Simplified37.1%
if 1.7499999999999999e-47 < F Initial program 59.8%
Taylor expanded in B around 0 44.8%
Taylor expanded in B around 0 24.5%
Taylor expanded in F around inf 50.6%
Final simplification42.9%
(FPCore (F B x) :precision binary64 (if (<= F -2.05e-28) (- (* B -0.16666666666666666) (/ (+ x 1.0) B)) (if (<= F 1.7e-47) (- (/ x B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.05e-28) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 1.7e-47) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.05d-28)) then
tmp = (b * (-0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 1.7d-47) then
tmp = -(x / b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.05e-28) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 1.7e-47) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.05e-28: tmp = (B * -0.16666666666666666) - ((x + 1.0) / B) elif F <= 1.7e-47: tmp = -(x / B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.05e-28) tmp = Float64(Float64(B * -0.16666666666666666) - Float64(Float64(x + 1.0) / B)); elseif (F <= 1.7e-47) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.05e-28) tmp = (B * -0.16666666666666666) - ((x + 1.0) / B); elseif (F <= 1.7e-47) tmp = -(x / B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.05e-28], N[(N[(B * -0.16666666666666666), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-47], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.05 \cdot 10^{-28}:\\
\;\;\;\;B \cdot -0.16666666666666666 - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-47}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.0500000000000001e-28Initial program 61.7%
Taylor expanded in F around -inf 91.3%
Taylor expanded in B around 0 65.9%
Taylor expanded in B around 0 44.3%
+-commutative44.3%
mul-1-neg44.3%
unsub-neg44.3%
*-commutative44.3%
+-commutative44.3%
Simplified44.3%
if -2.0500000000000001e-28 < F < 1.7000000000000001e-47Initial program 99.5%
Taylor expanded in F around -inf 37.9%
Taylor expanded in B around 0 21.9%
associate-*r/21.9%
distribute-lft-in21.9%
metadata-eval21.9%
neg-mul-121.9%
Simplified21.9%
Taylor expanded in x around inf 37.1%
associate-*r/37.1%
mul-1-neg37.1%
Simplified37.1%
if 1.7000000000000001e-47 < F Initial program 59.8%
Taylor expanded in B around 0 44.8%
Taylor expanded in B around 0 24.5%
Taylor expanded in F around inf 50.6%
Final simplification43.2%
(FPCore (F B x) :precision binary64 (if (<= F -1.16e-27) (/ (- -1.0 x) B) (- (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.16e-27) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.16d-27)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -(x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.16e-27) {
tmp = (-1.0 - x) / B;
} else {
tmp = -(x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.16e-27: tmp = (-1.0 - x) / B else: tmp = -(x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.16e-27) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(-Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.16e-27) tmp = (-1.0 - x) / B; else tmp = -(x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.16e-27], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.16 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x}{B}\\
\end{array}
\end{array}
if F < -1.16000000000000005e-27Initial program 61.7%
Taylor expanded in F around -inf 91.3%
Taylor expanded in B around 0 43.5%
associate-*r/43.5%
distribute-lft-in43.5%
metadata-eval43.5%
neg-mul-143.5%
Simplified43.5%
if -1.16000000000000005e-27 < F Initial program 83.1%
Taylor expanded in F around -inf 42.2%
Taylor expanded in B around 0 24.7%
associate-*r/24.7%
distribute-lft-in24.7%
metadata-eval24.7%
neg-mul-124.7%
Simplified24.7%
Taylor expanded in x around inf 33.8%
associate-*r/33.8%
mul-1-neg33.8%
Simplified33.8%
Final simplification36.5%
(FPCore (F B x) :precision binary64 (- (/ x B)))
double code(double F, double B, double x) {
return -(x / B);
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x / b)
end function
public static double code(double F, double B, double x) {
return -(x / B);
}
def code(F, B, x): return -(x / B)
function code(F, B, x) return Float64(-Float64(x / B)) end
function tmp = code(F, B, x) tmp = -(x / B); end
code[F_, B_, x_] := (-N[(x / B), $MachinePrecision])
\begin{array}{l}
\\
-\frac{x}{B}
\end{array}
Initial program 77.1%
Taylor expanded in F around -inf 56.0%
Taylor expanded in B around 0 30.0%
associate-*r/30.0%
distribute-lft-in30.0%
metadata-eval30.0%
neg-mul-130.0%
Simplified30.0%
Taylor expanded in x around inf 31.2%
associate-*r/31.2%
mul-1-neg31.2%
Simplified31.2%
Final simplification31.2%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 77.1%
Taylor expanded in F around -inf 56.0%
Taylor expanded in B around 0 30.0%
associate-*r/30.0%
distribute-lft-in30.0%
metadata-eval30.0%
neg-mul-130.0%
Simplified30.0%
Taylor expanded in x around 0 8.6%
Final simplification8.6%
herbie shell --seed 2023335
(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))))))