
(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 28 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 -1e+26)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7700.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+26) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7700.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+26) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7700.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7700.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7700:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.00000000000000005e26Initial program 60.4%
+-commutative60.4%
unsub-neg60.4%
associate-*l/74.7%
associate-*r/74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in x around 0 74.6%
associate-*l/74.6%
*-lft-identity74.6%
unpow274.6%
fma-udef74.6%
Simplified74.6%
Taylor expanded in F around -inf 99.8%
if -1.00000000000000005e26 < F < 7700Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
if 7700 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/67.5%
associate-*r/67.4%
*-commutative67.4%
Simplified67.6%
Taylor expanded in x around 0 66.1%
associate-*l/67.5%
*-lft-identity67.5%
unpow267.5%
fma-udef67.5%
Simplified67.5%
associate-*r/67.6%
sqrt-div67.6%
metadata-eval67.6%
un-div-inv67.7%
Applied egg-rr67.7%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+155)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+155) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+155) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+155}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.00000000000000001e155Initial program 39.2%
+-commutative39.2%
unsub-neg39.2%
associate-*l/52.0%
associate-*r/52.0%
*-commutative52.0%
Simplified52.0%
Taylor expanded in x around 0 52.0%
associate-*l/52.0%
*-lft-identity52.0%
unpow252.0%
fma-udef52.0%
Simplified52.0%
Taylor expanded in F around -inf 99.8%
if -2.00000000000000001e155 < F < 1e8Initial program 96.5%
+-commutative96.5%
unsub-neg96.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if 1e8 < F Initial program 56.1%
+-commutative56.1%
unsub-neg56.1%
associate-*l/67.0%
associate-*r/67.0%
*-commutative67.0%
Simplified67.1%
Taylor expanded in x around 0 65.6%
associate-*l/67.1%
*-lft-identity67.1%
unpow267.1%
fma-udef67.1%
Simplified67.1%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.7e+44)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 33000000.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 <= -5.7e+44) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 33000000.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 <= (-5.7d+44)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 33000000.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 <= -5.7e+44) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 33000000.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 <= -5.7e+44: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 33000000.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 <= -5.7e+44) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 33000000.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 <= -5.7e+44) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 33000000.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, -5.7e+44], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 33000000.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 -5.7 \cdot 10^{+44}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 33000000:\\
\;\;\;\;\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 < -5.7000000000000003e44Initial program 56.9%
+-commutative56.9%
unsub-neg56.9%
associate-*l/72.4%
associate-*r/72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in x around 0 72.4%
associate-*l/72.4%
*-lft-identity72.4%
unpow272.4%
fma-udef72.4%
Simplified72.4%
Taylor expanded in F around -inf 99.8%
if -5.7000000000000003e44 < F < 3.3e7Initial program 99.5%
if 3.3e7 < F Initial program 56.1%
+-commutative56.1%
unsub-neg56.1%
associate-*l/67.0%
associate-*r/67.0%
*-commutative67.0%
Simplified67.1%
Taylor expanded in x around 0 65.6%
associate-*l/67.1%
*-lft-identity67.1%
unpow267.1%
fma-udef67.1%
Simplified67.1%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.6e+44)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 10500000.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.6e+44) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 10500000.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.6d+44)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 10500000.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.6e+44) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 10500000.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.6e+44: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 10500000.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.6e+44) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 10500000.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.6e+44) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 10500000.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.6e+44], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 10500000.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.6 \cdot 10^{+44}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 10500000:\\
\;\;\;\;\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.5999999999999999e44Initial program 56.9%
+-commutative56.9%
unsub-neg56.9%
associate-*l/72.4%
associate-*r/72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in x around 0 72.4%
associate-*l/72.4%
*-lft-identity72.4%
unpow272.4%
fma-udef72.4%
Simplified72.4%
Taylor expanded in F around -inf 99.8%
if -2.5999999999999999e44 < F < 1.05e7Initial program 99.5%
div-inv99.7%
clear-num99.6%
Applied egg-rr99.6%
if 1.05e7 < F Initial program 56.1%
+-commutative56.1%
unsub-neg56.1%
associate-*l/67.0%
associate-*r/67.0%
*-commutative67.0%
Simplified67.1%
Taylor expanded in x around 0 65.6%
associate-*l/67.1%
*-lft-identity67.1%
unpow267.1%
fma-udef67.1%
Simplified67.1%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -66000.0)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F 0.9)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -66000.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-66000.0d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= 0.9d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -66000.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -66000.0: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= 0.9: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -66000.0) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 0.9) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -66000.0) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= 0.9) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -66000.0], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.9], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -66000:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.9:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -66000Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/75.8%
associate-*r/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in x around 0 75.8%
associate-*l/75.8%
*-lft-identity75.8%
unpow275.8%
fma-udef75.8%
Simplified75.8%
associate-*r/75.8%
sqrt-div75.9%
metadata-eval75.9%
un-div-inv75.9%
Applied egg-rr75.9%
Taylor expanded in F around -inf 99.8%
sub-neg99.8%
unpow299.8%
metadata-eval99.8%
Simplified99.8%
if -66000 < F < 0.900000000000000022Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.0%
if 0.900000000000000022 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/67.5%
associate-*r/67.4%
*-commutative67.4%
Simplified67.6%
Taylor expanded in x around 0 66.1%
associate-*l/67.5%
*-lft-identity67.5%
unpow267.5%
fma-udef67.5%
Simplified67.5%
associate-*r/67.6%
sqrt-div67.6%
metadata-eval67.6%
un-div-inv67.7%
Applied egg-rr67.7%
Taylor expanded in F around inf 99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8e-12)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 26.0)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8e-12) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 26.0) {
tmp = (-1.0 / (tan(B) / x)) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-8d-12)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 26.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8e-12) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 26.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8e-12: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 26.0: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8e-12) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 26.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8e-12) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 26.0) tmp = (-1.0 / (tan(B) / x)) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e-12], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 26.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 26:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.99999999999999984e-12Initial program 63.4%
+-commutative63.4%
unsub-neg63.4%
associate-*l/76.6%
associate-*r/76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in x around 0 76.5%
associate-*l/76.5%
*-lft-identity76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
associate-*r/76.6%
sqrt-div76.6%
metadata-eval76.6%
un-div-inv76.6%
Applied egg-rr76.6%
Taylor expanded in F around -inf 98.4%
mul-1-neg98.4%
Simplified98.4%
if -7.99999999999999984e-12 < F < 26Initial program 99.4%
div-inv99.7%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 85.7%
if 26 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/67.5%
associate-*r/67.4%
*-commutative67.4%
Simplified67.6%
Taylor expanded in x around 0 66.1%
associate-*l/67.5%
*-lft-identity67.5%
unpow267.5%
fma-udef67.5%
Simplified67.5%
associate-*r/67.6%
sqrt-div67.6%
metadata-eval67.6%
un-div-inv67.7%
Applied egg-rr67.7%
Taylor expanded in F around inf 99.8%
Final simplification92.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -66000.0)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F 0.175)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -66000.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= 0.175) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-66000.0d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= 0.175d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -66000.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 0.175) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -66000.0: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= 0.175: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -66000.0) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 0.175) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -66000.0) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= 0.175) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -66000.0], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.175], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -66000:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.175:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -66000Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/75.8%
associate-*r/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in x around 0 75.8%
associate-*l/75.8%
*-lft-identity75.8%
unpow275.8%
fma-udef75.8%
Simplified75.8%
associate-*r/75.8%
sqrt-div75.9%
metadata-eval75.9%
un-div-inv75.9%
Applied egg-rr75.9%
Taylor expanded in F around -inf 99.8%
sub-neg99.8%
unpow299.8%
metadata-eval99.8%
Simplified99.8%
if -66000 < F < 0.17499999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in B around 0 84.6%
if 0.17499999999999999 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/67.5%
associate-*r/67.4%
*-commutative67.4%
Simplified67.6%
Taylor expanded in x around 0 66.1%
associate-*l/67.5%
*-lft-identity67.5%
unpow267.5%
fma-udef67.5%
Simplified67.5%
associate-*r/67.6%
sqrt-div67.6%
metadata-eval67.6%
un-div-inv67.7%
Applied egg-rr67.7%
Taylor expanded in F around inf 99.8%
Final simplification92.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8e-12)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.14)
(- (/ (sqrt 0.5) (/ B F)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8e-12) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.14) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-8d-12)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.14d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8e-12) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.14) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8e-12: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.14: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8e-12) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.14) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8e-12) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.14) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e-12], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.99999999999999984e-12Initial program 63.4%
+-commutative63.4%
unsub-neg63.4%
associate-*l/76.6%
associate-*r/76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in x around 0 76.5%
associate-*l/76.5%
*-lft-identity76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
associate-*r/76.6%
sqrt-div76.6%
metadata-eval76.6%
un-div-inv76.6%
Applied egg-rr76.6%
Taylor expanded in F around -inf 98.4%
mul-1-neg98.4%
Simplified98.4%
if -7.99999999999999984e-12 < F < 0.14000000000000001Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in B around 0 85.1%
if 0.14000000000000001 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/67.5%
associate-*r/67.4%
*-commutative67.4%
Simplified67.6%
Taylor expanded in x around 0 66.1%
associate-*l/67.5%
*-lft-identity67.5%
unpow267.5%
fma-udef67.5%
Simplified67.5%
associate-*r/67.6%
sqrt-div67.6%
metadata-eval67.6%
un-div-inv67.7%
Applied egg-rr67.7%
Taylor expanded in F around inf 99.8%
Final simplification92.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -66000.0)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F 0.29) (- (/ (sqrt 0.5) (/ B F)) 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 <= -66000.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= 0.29) {
tmp = (sqrt(0.5) / (B / F)) - 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 <= (-66000.0d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= 0.29d0) then
tmp = (sqrt(0.5d0) / (b / f)) - 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 <= -66000.0) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 0.29) {
tmp = (Math.sqrt(0.5) / (B / F)) - 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 <= -66000.0: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= 0.29: tmp = (math.sqrt(0.5) / (B / F)) - 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 <= -66000.0) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 0.29) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - 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 <= -66000.0) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= 0.29) tmp = (sqrt(0.5) / (B / F)) - 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, -66000.0], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.29], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $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 -66000:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.29:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -66000Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/75.8%
associate-*r/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in x around 0 75.8%
associate-*l/75.8%
*-lft-identity75.8%
unpow275.8%
fma-udef75.8%
Simplified75.8%
associate-*r/75.8%
sqrt-div75.9%
metadata-eval75.9%
un-div-inv75.9%
Applied egg-rr75.9%
Taylor expanded in F around -inf 99.8%
sub-neg99.8%
unpow299.8%
metadata-eval99.8%
Simplified99.8%
if -66000 < F < 0.28999999999999998Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in B around 0 84.6%
if 0.28999999999999998 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/67.5%
associate-*r/67.4%
*-commutative67.4%
Simplified67.6%
Taylor expanded in x around 0 66.1%
associate-*l/67.5%
*-lft-identity67.5%
unpow267.5%
fma-udef67.5%
Simplified67.5%
Taylor expanded in F around inf 99.3%
Final simplification92.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8e-12)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.445)
(- (/ (sqrt 0.5) (/ B F)) 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 <= -8e-12) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.445) {
tmp = (sqrt(0.5) / (B / F)) - 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 <= (-8d-12)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.445d0) then
tmp = (sqrt(0.5d0) / (b / f)) - 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 <= -8e-12) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.445) {
tmp = (Math.sqrt(0.5) / (B / F)) - 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 <= -8e-12: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.445: tmp = (math.sqrt(0.5) / (B / F)) - 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 <= -8e-12) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.445) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - 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 <= -8e-12) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.445) tmp = (sqrt(0.5) / (B / F)) - 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, -8e-12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.445], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $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 -8 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.445:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.99999999999999984e-12Initial program 63.4%
+-commutative63.4%
unsub-neg63.4%
associate-*l/76.6%
associate-*r/76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in x around 0 76.5%
associate-*l/76.5%
*-lft-identity76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
Taylor expanded in F around -inf 98.1%
if -7.99999999999999984e-12 < F < 0.445000000000000007Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.9%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in B around 0 85.1%
if 0.445000000000000007 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/67.5%
associate-*r/67.4%
*-commutative67.4%
Simplified67.6%
Taylor expanded in x around 0 66.1%
associate-*l/67.5%
*-lft-identity67.5%
unpow267.5%
fma-udef67.5%
Simplified67.5%
Taylor expanded in F around inf 99.3%
Final simplification92.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.2e+248)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -35000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.115)
(- (/ (cos B) (/ (sin B) x)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e+248) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -35000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.115) {
tmp = -(cos(B) / (sin(B) / x));
} else {
tmp = (1.0 / 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 <= (-1.2d+248)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-35000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.115d0) then
tmp = -(cos(b) / (sin(b) / x))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e+248) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -35000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.115) {
tmp = -(Math.cos(B) / (Math.sin(B) / x));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2e+248: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -35000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.115: tmp = -(math.cos(B) / (math.sin(B) / x)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.2e+248) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -35000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.115) tmp = Float64(-Float64(cos(B) / Float64(sin(B) / x))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.2e+248) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -35000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.115) tmp = -(cos(B) / (sin(B) / x)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2e+248], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -35000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.115], (-N[(N[Cos[B], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2 \cdot 10^{+248}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -35000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.115:\\
\;\;\;\;-\frac{\cos B}{\frac{\sin B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.2e248Initial program 57.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.6%
if -1.2e248 < F < -3.5e10Initial program 62.2%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 85.4%
if -3.5e10 < F < 0.115000000000000005Initial program 99.4%
Taylor expanded in F around -inf 41.4%
Taylor expanded in x around inf 69.7%
mul-1-neg69.7%
associate-/l*69.6%
Simplified69.6%
if 0.115000000000000005 < F Initial program 57.3%
Taylor expanded in F around -inf 49.2%
Taylor expanded in B around 0 29.2%
+-commutative29.2%
unsub-neg29.2%
add-sqr-sqrt12.1%
sqrt-unprod50.7%
frac-times50.7%
metadata-eval50.7%
metadata-eval50.7%
frac-times50.7%
rgt-mult-inverse50.7%
associate-*r/50.7%
rgt-mult-inverse50.7%
associate-*r/50.7%
sqrt-unprod48.2%
add-sqr-sqrt77.7%
associate-*r/77.8%
rgt-mult-inverse77.9%
Applied egg-rr77.9%
Final simplification75.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.95e+248)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -35000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.08)
(* (cos B) (/ (- x) (sin B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.95e+248) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -35000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.08) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (1.0 / 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 <= (-1.95d+248)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-35000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.08d0) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.95e+248) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -35000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.08) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.95e+248: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -35000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.08: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.95e+248) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -35000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.08) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.95e+248) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -35000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.08) tmp = cos(B) * (-x / sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.95e+248], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -35000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.08], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.95 \cdot 10^{+248}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -35000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.08:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.9499999999999999e248Initial program 57.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.6%
if -1.9499999999999999e248 < F < -3.5e10Initial program 62.2%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 85.4%
if -3.5e10 < F < 0.0800000000000000017Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in F around inf 37.2%
*-commutative37.2%
associate-/r*37.2%
Simplified37.2%
Taylor expanded in x around inf 69.7%
mul-1-neg69.7%
associate-*r/69.6%
distribute-rgt-neg-in69.6%
Simplified69.6%
if 0.0800000000000000017 < F Initial program 57.3%
Taylor expanded in F around -inf 49.2%
Taylor expanded in B around 0 29.2%
+-commutative29.2%
unsub-neg29.2%
add-sqr-sqrt12.1%
sqrt-unprod50.7%
frac-times50.7%
metadata-eval50.7%
metadata-eval50.7%
frac-times50.7%
rgt-mult-inverse50.7%
associate-*r/50.7%
rgt-mult-inverse50.7%
associate-*r/50.7%
sqrt-unprod48.2%
add-sqr-sqrt77.7%
associate-*r/77.8%
rgt-mult-inverse77.9%
Applied egg-rr77.9%
Final simplification75.4%
(FPCore (F B x)
:precision binary64
(if (<= F -2e+248)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -35000000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.115)
(/ (* (cos B) (- x)) (sin B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e+248) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -35000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.115) {
tmp = (cos(B) * -x) / sin(B);
} else {
tmp = (1.0 / 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 <= (-2d+248)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-35000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.115d0) then
tmp = (cos(b) * -x) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2e+248) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -35000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.115) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e+248: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -35000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.115: tmp = (math.cos(B) * -x) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e+248) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -35000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.115) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2e+248) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -35000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.115) tmp = (cos(B) * -x) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e+248], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -35000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.115], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{+248}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -35000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.115:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.00000000000000009e248Initial program 57.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.6%
if -2.00000000000000009e248 < F < -3.5e10Initial program 62.2%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 85.4%
if -3.5e10 < F < 0.115000000000000005Initial program 99.4%
Taylor expanded in F around -inf 41.4%
Taylor expanded in x around inf 69.7%
associate-*r/69.7%
mul-1-neg69.7%
Simplified69.7%
if 0.115000000000000005 < F Initial program 57.3%
Taylor expanded in F around -inf 49.2%
Taylor expanded in B around 0 29.2%
+-commutative29.2%
unsub-neg29.2%
add-sqr-sqrt12.1%
sqrt-unprod50.7%
frac-times50.7%
metadata-eval50.7%
metadata-eval50.7%
frac-times50.7%
rgt-mult-inverse50.7%
associate-*r/50.7%
rgt-mult-inverse50.7%
associate-*r/50.7%
sqrt-unprod48.2%
add-sqr-sqrt77.7%
associate-*r/77.8%
rgt-mult-inverse77.9%
Applied egg-rr77.9%
Final simplification75.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.2e-75)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.5e-60)
(/ (* (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 <= -6.2e-75) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.5e-60) {
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 <= (-6.2d-75)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.5d-60) 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 <= -6.2e-75) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.5e-60) {
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 <= -6.2e-75: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.5e-60: 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 <= -6.2e-75) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.5e-60) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.2e-75) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.5e-60) 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, -6.2e-75], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.5e-60], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.2 \cdot 10^{-75}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.20000000000000013e-75Initial program 69.3%
+-commutative69.3%
unsub-neg69.3%
associate-*l/80.3%
associate-*r/80.2%
*-commutative80.2%
Simplified80.3%
Taylor expanded in x around 0 80.3%
associate-*l/80.3%
*-lft-identity80.3%
unpow280.3%
fma-udef80.3%
Simplified80.3%
Taylor expanded in F around -inf 93.7%
if -6.20000000000000013e-75 < F < 2.5000000000000001e-60Initial program 99.4%
Taylor expanded in F around -inf 33.8%
Taylor expanded in x around inf 72.9%
associate-*r/72.9%
mul-1-neg72.9%
Simplified72.9%
if 2.5000000000000001e-60 < F Initial program 64.7%
+-commutative64.7%
unsub-neg64.7%
associate-*l/73.4%
associate-*r/73.4%
*-commutative73.4%
Simplified73.5%
Taylor expanded in x around 0 72.3%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around inf 91.0%
Final simplification85.4%
(FPCore (F B x)
:precision binary64
(if (<= F -6.2e-75)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 0.102)
(/ (* (cos B) (- x)) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-75) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 0.102) {
tmp = (cos(B) * -x) / sin(B);
} else {
tmp = (1.0 / 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 <= (-6.2d-75)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 0.102d0) then
tmp = (cos(b) * -x) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e-75) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 0.102) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e-75: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 0.102: tmp = (math.cos(B) * -x) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e-75) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 0.102) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.2e-75) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 0.102) tmp = (cos(B) * -x) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e-75], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.102], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{-75}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.102:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.20000000000000013e-75Initial program 69.3%
+-commutative69.3%
unsub-neg69.3%
associate-*l/80.3%
associate-*r/80.2%
*-commutative80.2%
Simplified80.3%
Taylor expanded in x around 0 80.3%
associate-*l/80.3%
*-lft-identity80.3%
unpow280.3%
fma-udef80.3%
Simplified80.3%
Taylor expanded in F around -inf 93.7%
if -6.20000000000000013e-75 < F < 0.101999999999999993Initial program 99.5%
Taylor expanded in F around -inf 36.6%
Taylor expanded in x around inf 70.3%
associate-*r/70.3%
mul-1-neg70.3%
Simplified70.3%
if 0.101999999999999993 < F Initial program 57.3%
Taylor expanded in F around -inf 49.2%
Taylor expanded in B around 0 29.2%
+-commutative29.2%
unsub-neg29.2%
add-sqr-sqrt12.1%
sqrt-unprod50.7%
frac-times50.7%
metadata-eval50.7%
metadata-eval50.7%
frac-times50.7%
rgt-mult-inverse50.7%
associate-*r/50.7%
rgt-mult-inverse50.7%
associate-*r/50.7%
sqrt-unprod48.2%
add-sqr-sqrt77.7%
associate-*r/77.8%
rgt-mult-inverse77.9%
Applied egg-rr77.9%
Final simplification79.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= F -3.5e+247)
t_0
(if (<= F -35000000000.0)
(/ -1.0 (sin B))
(if (<= F -3.7e-240)
t_0
(if (<= F 1.2e-276)
(- (/ (cos B) (/ B x)))
(if (<= F 6e+98) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (F <= -3.5e+247) {
tmp = t_0;
} else if (F <= -35000000000.0) {
tmp = -1.0 / sin(B);
} else if (F <= -3.7e-240) {
tmp = t_0;
} else if (F <= 1.2e-276) {
tmp = -(cos(B) / (B / x));
} else if (F <= 6e+98) {
tmp = t_0;
} else {
tmp = (1.0 / 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 = (1.0d0 / b) - (x / tan(b))
if (f <= (-3.5d+247)) then
tmp = t_0
else if (f <= (-35000000000.0d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-3.7d-240)) then
tmp = t_0
else if (f <= 1.2d-276) then
tmp = -(cos(b) / (b / x))
else if (f <= 6d+98) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (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 <= -3.5e+247) {
tmp = t_0;
} else if (F <= -35000000000.0) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -3.7e-240) {
tmp = t_0;
} else if (F <= 1.2e-276) {
tmp = -(Math.cos(B) / (B / x));
} else if (F <= 6e+98) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -3.5e+247: tmp = t_0 elif F <= -35000000000.0: tmp = -1.0 / math.sin(B) elif F <= -3.7e-240: tmp = t_0 elif F <= 1.2e-276: tmp = -(math.cos(B) / (B / x)) elif F <= 6e+98: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (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 <= -3.5e+247) tmp = t_0; elseif (F <= -35000000000.0) tmp = Float64(-1.0 / sin(B)); elseif (F <= -3.7e-240) tmp = t_0; elseif (F <= 1.2e-276) tmp = Float64(-Float64(cos(B) / Float64(B / x))); elseif (F <= 6e+98) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(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 <= -3.5e+247) tmp = t_0; elseif (F <= -35000000000.0) tmp = -1.0 / sin(B); elseif (F <= -3.7e-240) tmp = t_0; elseif (F <= 1.2e-276) tmp = -(cos(B) / (B / x)); elseif (F <= 6e+98) tmp = t_0; else tmp = (1.0 / sin(B)) - (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, -3.5e+247], t$95$0, If[LessEqual[F, -35000000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.7e-240], t$95$0, If[LessEqual[F, 1.2e-276], (-N[(N[Cos[B], $MachinePrecision] / N[(B / x), $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 6e+98], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+247}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -35000000000:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-240}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-276}:\\
\;\;\;\;-\frac{\cos B}{\frac{B}{x}}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+98}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.5000000000000002e247 or -3.5e10 < F < -3.7000000000000002e-240 or 1.19999999999999991e-276 < F < 6.0000000000000003e98Initial program 93.5%
+-commutative93.5%
unsub-neg93.5%
associate-*l/95.0%
associate-*r/95.0%
*-commutative95.0%
Simplified95.2%
Taylor expanded in F around inf 51.5%
*-commutative51.5%
associate-/r*51.5%
Simplified51.5%
Taylor expanded in B around 0 58.7%
if -3.5000000000000002e247 < F < -3.5e10Initial program 63.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 85.1%
Taylor expanded in x around 0 72.1%
if -3.7000000000000002e-240 < F < 1.19999999999999991e-276Initial program 99.3%
Taylor expanded in F around -inf 17.9%
Taylor expanded in x around inf 80.0%
mul-1-neg80.0%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in B around 0 50.2%
if 6.0000000000000003e98 < F Initial program 46.9%
Taylor expanded in F around -inf 50.6%
Taylor expanded in B around 0 29.1%
+-commutative29.1%
unsub-neg29.1%
add-sqr-sqrt13.2%
sqrt-unprod50.5%
frac-times50.5%
metadata-eval50.5%
metadata-eval50.5%
frac-times50.5%
rgt-mult-inverse50.5%
associate-*r/50.4%
rgt-mult-inverse50.4%
associate-*r/50.5%
sqrt-unprod47.5%
add-sqr-sqrt77.9%
associate-*r/78.0%
rgt-mult-inverse78.0%
Applied egg-rr78.0%
Final simplification64.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -1.4e+248)
t_0
(if (<= F -8e+26)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.85e-81)
t_0
(if (<= F 3.6e-143)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1.95e+97)
(- (/ 1.0 B) (/ x (tan B)))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -1.4e+248) {
tmp = t_0;
} else if (F <= -8e+26) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.85e-81) {
tmp = t_0;
} else if (F <= 3.6e-143) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1.95e+97) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (1.0 / 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 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
if (f <= (-1.4d+248)) then
tmp = t_0
else if (f <= (-8d+26)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.85d-81)) then
tmp = t_0
else if (f <= 3.6d-143) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1.95d+97) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (1.0d0 / sin(b)) - (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 * (1.0 / Math.tan(B)));
double tmp;
if (F <= -1.4e+248) {
tmp = t_0;
} else if (F <= -8e+26) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.85e-81) {
tmp = t_0;
} else if (F <= 3.6e-143) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1.95e+97) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -1.4e+248: tmp = t_0 elif F <= -8e+26: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.85e-81: tmp = t_0 elif F <= 3.6e-143: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1.95e+97: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -1.4e+248) tmp = t_0; elseif (F <= -8e+26) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.85e-81) tmp = t_0; elseif (F <= 3.6e-143) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1.95e+97) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -1.4e+248) tmp = t_0; elseif (F <= -8e+26) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.85e-81) tmp = t_0; elseif (F <= 3.6e-143) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1.95e+97) tmp = (1.0 / B) - (x / tan(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4e+248], t$95$0, If[LessEqual[F, -8e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.85e-81], t$95$0, If[LessEqual[F, 3.6e-143], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.95e+97], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{+248}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -8 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.85 \cdot 10^{-81}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-143}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{+97}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.4000000000000001e248 or -8.00000000000000038e26 < F < -1.84999999999999993e-81Initial program 80.9%
Taylor expanded in F around -inf 86.3%
Taylor expanded in B around 0 77.4%
if -1.4000000000000001e248 < F < -8.00000000000000038e26Initial program 61.4%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 85.1%
if -1.84999999999999993e-81 < F < 3.5999999999999998e-143Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 54.4%
if 3.5999999999999998e-143 < F < 1.95e97Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around inf 59.9%
*-commutative59.9%
associate-/r*60.0%
Simplified60.0%
Taylor expanded in B around 0 65.6%
if 1.95e97 < F Initial program 46.9%
Taylor expanded in F around -inf 50.6%
Taylor expanded in B around 0 29.1%
+-commutative29.1%
unsub-neg29.1%
add-sqr-sqrt13.2%
sqrt-unprod50.5%
frac-times50.5%
metadata-eval50.5%
metadata-eval50.5%
frac-times50.5%
rgt-mult-inverse50.5%
associate-*r/50.4%
rgt-mult-inverse50.4%
associate-*r/50.5%
sqrt-unprod47.5%
add-sqr-sqrt77.9%
associate-*r/78.0%
rgt-mult-inverse78.0%
Applied egg-rr78.0%
Final simplification69.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))))
(if (<= F -4.6e-17)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.65e-92)
t_0
(if (<= F 1e-143)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 2e+99) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double tmp;
if (F <= -4.6e-17) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.65e-92) {
tmp = t_0;
} else if (F <= 1e-143) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 2e+99) {
tmp = t_0;
} else {
tmp = (1.0 / 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 = (1.0d0 / b) - (x / tan(b))
if (f <= (-4.6d-17)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.65d-92)) then
tmp = t_0
else if (f <= 1d-143) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 2d+99) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (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 <= -4.6e-17) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.65e-92) {
tmp = t_0;
} else if (F <= 1e-143) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 2e+99) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -4.6e-17: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.65e-92: tmp = t_0 elif F <= 1e-143: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 2e+99: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (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 <= -4.6e-17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.65e-92) tmp = t_0; elseif (F <= 1e-143) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 2e+99) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(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 <= -4.6e-17) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.65e-92) tmp = t_0; elseif (F <= 1e-143) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 2e+99) tmp = t_0; else tmp = (1.0 / sin(B)) - (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, -4.6e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.65e-92], t$95$0, If[LessEqual[F, 1e-143], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2e+99], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.6 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-92}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 10^{-143}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+99}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.60000000000000018e-17Initial program 65.0%
Taylor expanded in F around -inf 95.6%
Taylor expanded in B around 0 73.4%
if -4.60000000000000018e-17 < F < -1.64999999999999999e-92 or 9.9999999999999995e-144 < F < 1.9999999999999999e99Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 65.6%
*-commutative65.6%
associate-/r*65.7%
Simplified65.7%
Taylor expanded in B around 0 69.7%
if -1.64999999999999999e-92 < F < 9.9999999999999995e-144Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 53.9%
if 1.9999999999999999e99 < F Initial program 46.9%
Taylor expanded in F around -inf 50.6%
Taylor expanded in B around 0 29.1%
+-commutative29.1%
unsub-neg29.1%
add-sqr-sqrt13.2%
sqrt-unprod50.5%
frac-times50.5%
metadata-eval50.5%
metadata-eval50.5%
frac-times50.5%
rgt-mult-inverse50.5%
associate-*r/50.4%
rgt-mult-inverse50.4%
associate-*r/50.5%
sqrt-unprod47.5%
add-sqr-sqrt77.9%
associate-*r/78.0%
rgt-mult-inverse78.0%
Applied egg-rr78.0%
Final simplification67.8%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.5e-112) (not (<= x 1.4e-15))) (- (/ 1.0 B) (/ x (tan B))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.5e-112) || !(x <= 1.4e-15)) {
tmp = (1.0 / B) - (x / 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 <= (-3.5d-112)) .or. (.not. (x <= 1.4d-15))) then
tmp = (1.0d0 / b) - (x / 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 <= -3.5e-112) || !(x <= 1.4e-15)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.5e-112) or not (x <= 1.4e-15): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.5e-112) || !(x <= 1.4e-15)) tmp = Float64(Float64(1.0 / B) - Float64(x / 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 <= -3.5e-112) || ~((x <= 1.4e-15))) tmp = (1.0 / B) - (x / tan(B)); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.5e-112], N[Not[LessEqual[x, 1.4e-15]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-112} \lor \neg \left(x \leq 1.4 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -3.49999999999999994e-112 or 1.40000000000000007e-15 < x Initial program 83.3%
+-commutative83.3%
unsub-neg83.3%
associate-*l/92.1%
associate-*r/92.1%
*-commutative92.1%
Simplified92.3%
Taylor expanded in F around inf 84.3%
*-commutative84.3%
associate-/r*84.3%
Simplified84.3%
Taylor expanded in B around 0 87.6%
if -3.49999999999999994e-112 < x < 1.40000000000000007e-15Initial program 73.4%
Taylor expanded in F around -inf 29.9%
Taylor expanded in B around 0 29.9%
Taylor expanded in x around 0 29.9%
Final simplification59.4%
(FPCore (F B x) :precision binary64 (if (or (<= B -5.8e-194) (not (<= B 2.45e-67))) (- (/ 1.0 B) (/ x (tan B))) (/ (- (* F (sqrt 0.5)) x) B)))
double code(double F, double B, double x) {
double tmp;
if ((B <= -5.8e-194) || !(B <= 2.45e-67)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F * sqrt(0.5)) - 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 ((b <= (-5.8d-194)) .or. (.not. (b <= 2.45d-67))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((B <= -5.8e-194) || !(B <= 2.45e-67)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (B <= -5.8e-194) or not (B <= 2.45e-67): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((B <= -5.8e-194) || !(B <= 2.45e-67)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((B <= -5.8e-194) || ~((B <= 2.45e-67))) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[B, -5.8e-194], N[Not[LessEqual[B, 2.45e-67]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.8 \cdot 10^{-194} \lor \neg \left(B \leq 2.45 \cdot 10^{-67}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
if B < -5.7999999999999994e-194 or 2.44999999999999997e-67 < B Initial program 79.6%
+-commutative79.6%
unsub-neg79.6%
associate-*l/80.2%
associate-*r/80.2%
*-commutative80.2%
Simplified80.3%
Taylor expanded in F around inf 62.0%
*-commutative62.0%
associate-/r*62.0%
Simplified62.0%
Taylor expanded in B around 0 56.0%
if -5.7999999999999994e-194 < B < 2.44999999999999997e-67Initial program 75.8%
+-commutative75.8%
unsub-neg75.8%
associate-*l/95.1%
associate-*r/95.2%
*-commutative95.2%
Simplified95.3%
Taylor expanded in x around 0 94.0%
associate-*l/95.3%
*-lft-identity95.3%
unpow295.3%
fma-udef95.3%
Simplified95.3%
Taylor expanded in F around 0 73.1%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in B around 0 74.4%
Final simplification61.6%
(FPCore (F B x)
:precision binary64
(if (<= F -66000.0)
(/ -1.0 (sin B))
(if (<= F 1.2e-139)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -66000.0) {
tmp = -1.0 / sin(B);
} else if (F <= 1.2e-139) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} 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 <= (-66000.0d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.2d-139) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
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 <= -66000.0) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.2e-139) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -66000.0: tmp = -1.0 / math.sin(B) elif F <= 1.2e-139: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -66000.0) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.2e-139) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -66000.0) tmp = -1.0 / sin(B); elseif (F <= 1.2e-139) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -66000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-139], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -66000:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-139}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -66000Initial program 62.2%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 75.6%
Taylor expanded in x around 0 60.9%
if -66000 < F < 1.20000000000000007e-139Initial program 99.4%
Taylor expanded in F around -inf 40.1%
Taylor expanded in x around inf 74.5%
mul-1-neg74.5%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in B around 0 39.0%
*-commutative39.0%
distribute-rgt-out--39.0%
metadata-eval39.0%
Simplified39.0%
if 1.20000000000000007e-139 < F Initial program 68.0%
+-commutative68.0%
unsub-neg68.0%
associate-*l/75.9%
associate-*r/75.9%
*-commutative75.9%
Simplified76.0%
Taylor expanded in F around inf 83.8%
*-commutative83.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in B around 0 42.9%
Final simplification45.9%
(FPCore (F B x)
:precision binary64
(if (<= F -4.3e-19)
(- (/ -1.0 B) (/ x B))
(if (<= F 6.5e-139)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.3e-19) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 6.5e-139) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} 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.3d-19)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 6.5d-139) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
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.3e-19) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 6.5e-139) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.3e-19: tmp = (-1.0 / B) - (x / B) elif F <= 6.5e-139: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.3e-19) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 6.5e-139) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); 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.3e-19) tmp = (-1.0 / B) - (x / B); elseif (F <= 6.5e-139) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.3e-19], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-139], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.3 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-139}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.3e-19Initial program 65.5%
Taylor expanded in F around -inf 95.6%
Taylor expanded in B around 0 45.4%
associate-*r/45.4%
distribute-lft-in45.4%
metadata-eval45.4%
neg-mul-145.4%
Simplified45.4%
unsub-neg45.4%
div-sub45.4%
Applied egg-rr45.4%
if -4.3e-19 < F < 6.5e-139Initial program 99.4%
Taylor expanded in F around -inf 39.2%
Taylor expanded in x around inf 76.0%
mul-1-neg76.0%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in B around 0 39.2%
*-commutative39.2%
distribute-rgt-out--39.2%
metadata-eval39.2%
Simplified39.2%
if 6.5e-139 < F Initial program 68.0%
+-commutative68.0%
unsub-neg68.0%
associate-*l/75.9%
associate-*r/75.9%
*-commutative75.9%
Simplified76.0%
Taylor expanded in F around inf 83.8%
*-commutative83.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in B around 0 42.9%
Final simplification42.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.56e-18)
(- (* B -0.16666666666666666) (/ (+ x 1.0) B))
(if (<= F 4.3e-138)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.56e-18) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 4.3e-138) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} 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.56d-18)) then
tmp = (b * (-0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 4.3d-138) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
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.56e-18) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 4.3e-138) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.56e-18: tmp = (B * -0.16666666666666666) - ((x + 1.0) / B) elif F <= 4.3e-138: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.56e-18) tmp = Float64(Float64(B * -0.16666666666666666) - Float64(Float64(x + 1.0) / B)); elseif (F <= 4.3e-138) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); 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.56e-18) tmp = (B * -0.16666666666666666) - ((x + 1.0) / B); elseif (F <= 4.3e-138) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.56e-18], N[(N[(B * -0.16666666666666666), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-138], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.56 \cdot 10^{-18}:\\
\;\;\;\;B \cdot -0.16666666666666666 - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-138}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.55999999999999998e-18Initial program 65.5%
Taylor expanded in F around -inf 95.6%
Taylor expanded in B around 0 72.4%
Taylor expanded in B around 0 46.1%
if -1.55999999999999998e-18 < F < 4.3e-138Initial program 99.4%
Taylor expanded in F around -inf 39.2%
Taylor expanded in x around inf 76.0%
mul-1-neg76.0%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in B around 0 39.2%
*-commutative39.2%
distribute-rgt-out--39.2%
metadata-eval39.2%
Simplified39.2%
if 4.3e-138 < F Initial program 68.0%
+-commutative68.0%
unsub-neg68.0%
associate-*l/75.9%
associate-*r/75.9%
*-commutative75.9%
Simplified76.0%
Taylor expanded in F around inf 83.8%
*-commutative83.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in B around 0 42.9%
Final simplification42.4%
(FPCore (F B x) :precision binary64 (if (<= F -3.2e-77) (/ (- -1.0 x) B) (if (<= F 4.3e-138) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-77) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.3e-138) {
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 <= (-3.2d-77)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.3d-138) 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 <= -3.2e-77) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.3e-138) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.2e-77: tmp = (-1.0 - x) / B elif F <= 4.3e-138: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.2e-77) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.3e-138) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.2e-77) tmp = (-1.0 - x) / B; elseif (F <= 4.3e-138) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.2e-77], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.3e-138], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.2 \cdot 10^{-77}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-138}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.2e-77Initial program 69.7%
Taylor expanded in F around -inf 93.7%
Taylor expanded in B around 0 65.0%
Taylor expanded in B around 0 41.3%
associate-*r/41.3%
distribute-lft-in41.3%
metadata-eval41.3%
neg-mul-141.3%
sub-neg41.3%
Simplified41.3%
if -3.2e-77 < F < 4.3e-138Initial program 99.4%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 15.3%
associate-*r/15.3%
distribute-lft-in15.3%
metadata-eval15.3%
neg-mul-115.3%
Simplified15.3%
Taylor expanded in x around inf 41.9%
mul-1-neg41.9%
distribute-neg-frac41.9%
Simplified41.9%
if 4.3e-138 < F Initial program 68.0%
+-commutative68.0%
unsub-neg68.0%
associate-*l/75.9%
associate-*r/75.9%
*-commutative75.9%
Simplified76.0%
Taylor expanded in F around inf 83.8%
*-commutative83.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in B around 0 42.9%
Final simplification42.1%
(FPCore (F B x) :precision binary64 (if (<= F -1.35e-77) (- (/ -1.0 B) (/ x B)) (if (<= F 4.3e-138) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-77) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 4.3e-138) {
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 <= (-1.35d-77)) then
tmp = ((-1.0d0) / b) - (x / b)
else if (f <= 4.3d-138) 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 <= -1.35e-77) {
tmp = (-1.0 / B) - (x / B);
} else if (F <= 4.3e-138) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-77: tmp = (-1.0 / B) - (x / B) elif F <= 4.3e-138: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-77) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); elseif (F <= 4.3e-138) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.35e-77) tmp = (-1.0 / B) - (x / B); elseif (F <= 4.3e-138) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-77], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e-138], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{-77}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-138}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.35e-77Initial program 69.7%
Taylor expanded in F around -inf 93.7%
Taylor expanded in B around 0 41.3%
associate-*r/41.3%
distribute-lft-in41.3%
metadata-eval41.3%
neg-mul-141.3%
Simplified41.3%
unsub-neg41.3%
div-sub41.3%
Applied egg-rr41.3%
if -1.35e-77 < F < 4.3e-138Initial program 99.4%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 15.3%
associate-*r/15.3%
distribute-lft-in15.3%
metadata-eval15.3%
neg-mul-115.3%
Simplified15.3%
Taylor expanded in x around inf 41.9%
mul-1-neg41.9%
distribute-neg-frac41.9%
Simplified41.9%
if 4.3e-138 < F Initial program 68.0%
+-commutative68.0%
unsub-neg68.0%
associate-*l/75.9%
associate-*r/75.9%
*-commutative75.9%
Simplified76.0%
Taylor expanded in F around inf 83.8%
*-commutative83.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in B around 0 42.9%
Final simplification42.1%
(FPCore (F B x) :precision binary64 (if (<= F -4.4e-75) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.4e-75) {
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 <= (-4.4d-75)) 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 <= -4.4e-75) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.4e-75: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.4e-75) 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 <= -4.4e-75) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.4e-75], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.4 \cdot 10^{-75}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -4.40000000000000011e-75Initial program 69.7%
Taylor expanded in F around -inf 93.7%
Taylor expanded in B around 0 65.0%
Taylor expanded in B around 0 41.3%
associate-*r/41.3%
distribute-lft-in41.3%
metadata-eval41.3%
neg-mul-141.3%
sub-neg41.3%
Simplified41.3%
if -4.40000000000000011e-75 < F Initial program 82.5%
Taylor expanded in F around -inf 41.3%
Taylor expanded in B around 0 21.7%
associate-*r/21.7%
distribute-lft-in21.7%
metadata-eval21.7%
neg-mul-121.7%
Simplified21.7%
Taylor expanded in x around inf 34.1%
mul-1-neg34.1%
distribute-neg-frac34.1%
Simplified34.1%
Final simplification36.3%
(FPCore (F B x) :precision binary64 (if (<= F -125000.0) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -125000.0) {
tmp = -1.0 / 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 <= (-125000.0d0)) then
tmp = (-1.0d0) / 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 <= -125000.0) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -125000.0: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -125000.0) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -125000.0) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -125000.0], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -125000:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -125000Initial program 62.2%
Taylor expanded in F around -inf 99.4%
Taylor expanded in B around 0 46.2%
associate-*r/46.2%
distribute-lft-in46.2%
metadata-eval46.2%
neg-mul-146.2%
Simplified46.2%
Taylor expanded in x around 0 31.5%
if -125000 < F Initial program 83.9%
Taylor expanded in F around -inf 43.8%
Taylor expanded in B around 0 21.7%
associate-*r/21.7%
distribute-lft-in21.7%
metadata-eval21.7%
neg-mul-121.7%
Simplified21.7%
Taylor expanded in x around inf 33.0%
mul-1-neg33.0%
distribute-neg-frac33.0%
Simplified33.0%
Final simplification32.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 78.5%
Taylor expanded in F around -inf 57.7%
Taylor expanded in B around 0 27.8%
associate-*r/27.8%
distribute-lft-in27.8%
metadata-eval27.8%
neg-mul-127.8%
Simplified27.8%
Taylor expanded in x around 0 10.5%
Final simplification10.5%
herbie shell --seed 2023214
(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))))))