
(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 26 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 -8e+139)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e+38)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8e+139) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e+38) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8e+139) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e+38) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e+139], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e+38], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8 \cdot 10^{+139}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 10^{+38}:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -8.00000000000000026e139Initial program 24.0%
+-commutative24.0%
unsub-neg24.0%
associate-*l/53.2%
associate-*r/53.1%
*-commutative53.1%
Simplified53.2%
Taylor expanded in x around 0 53.2%
associate-*l/53.2%
*-lft-identity53.2%
unpow253.2%
fma-udef53.2%
Simplified53.2%
Taylor expanded in F around -inf 99.9%
if -8.00000000000000026e139 < F < 9.99999999999999977e37Initial program 96.8%
+-commutative96.8%
unsub-neg96.8%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
if 9.99999999999999977e37 < F Initial program 63.1%
+-commutative63.1%
unsub-neg63.1%
associate-*l/74.8%
associate-*r/74.7%
*-commutative74.7%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1000000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5e+127)
(- (/ (* F (pow (fma F F 2.0) -0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1000000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5e+127) {
tmp = ((F * pow(fma(F, F, 2.0), -0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1000000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5e+127) tmp = Float64(Float64(Float64(F * (fma(F, F, 2.0) ^ -0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1000000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5e+127], N[(N[(N[(F * N[Power[N[(F * F + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1000000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+127}:\\
\;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1e12Initial program 50.7%
+-commutative50.7%
unsub-neg50.7%
associate-*l/73.4%
associate-*r/73.4%
*-commutative73.4%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.8%
if -1e12 < F < 5.0000000000000004e127Initial program 96.1%
+-commutative96.1%
unsub-neg96.1%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
associate-*r/99.6%
pow1/299.6%
inv-pow99.6%
pow-pow99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 5.0000000000000004e127 < F Initial program 57.6%
+-commutative57.6%
unsub-neg57.6%
associate-*l/65.1%
associate-*r/65.1%
*-commutative65.1%
Simplified65.2%
Taylor expanded in x around 0 65.3%
associate-*l/65.3%
*-lft-identity65.3%
unpow265.3%
fma-udef65.3%
Simplified65.3%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -50000000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2e+37)
(+
(* x (/ -1.0 (tan B)))
(* (/ 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 <= -50000000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2e+37) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - 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 <= (-50000000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2d+37) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - 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 <= -50000000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2e+37) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -50000000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2e+37: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -50000000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2e+37) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -50000000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2e+37) tmp = (x * (-1.0 / tan(B))) + ((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, -50000000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2e+37], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -50000000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+37}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5e13Initial program 49.1%
+-commutative49.1%
unsub-neg49.1%
associate-*l/72.6%
associate-*r/72.5%
*-commutative72.5%
Simplified72.6%
Taylor expanded in x around 0 72.6%
associate-*l/72.6%
*-lft-identity72.6%
unpow272.6%
fma-udef72.6%
Simplified72.6%
Taylor expanded in F around -inf 99.8%
if -5e13 < F < 1.99999999999999991e37Initial program 99.5%
if 1.99999999999999991e37 < F Initial program 63.1%
+-commutative63.1%
unsub-neg63.1%
associate-*l/74.8%
associate-*r/74.7%
*-commutative74.7%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.48)
(- (* F (* (/ 1.0 (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_0)
(- (/ (+ 1.0 (/ -1.0 (* F F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.48) {
tmp = (F * ((1.0 / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.48d0) then
tmp = (f * ((1.0d0 / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_0
else
tmp = ((1.0d0 + ((-1.0d0) / (f * f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.48) {
tmp = (F * ((1.0 / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.48: tmp = (F * ((1.0 / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0 else: tmp = ((1.0 + (-1.0 / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.48) tmp = Float64(Float64(F * Float64(Float64(1.0 / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_0); else tmp = Float64(Float64(Float64(1.0 + Float64(-1.0 / Float64(F * F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.48) tmp = (F * ((1.0 / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0; else tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.48], N[(N[(F * N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 + N[(-1.0 / N[(F * 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.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.48:\\
\;\;\;\;F \cdot \left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 50.7%
+-commutative50.7%
unsub-neg50.7%
associate-*l/73.4%
associate-*r/73.4%
*-commutative73.4%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.8%
if -1.3999999999999999 < F < 1.48Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 97.3%
if 1.48 < F Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.3%
*-lft-identity76.3%
unpow276.3%
fma-udef76.3%
Simplified76.3%
associate-*r/76.3%
pow1/276.3%
inv-pow76.3%
pow-pow76.3%
metadata-eval76.3%
Applied egg-rr76.3%
Taylor expanded in F around inf 98.1%
unpow298.1%
Simplified98.1%
Final simplification98.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.38)
(- (/ (sqrt 0.5) (/ (sin B) F)) t_0)
(- (/ (+ 1.0 (/ -1.0 (* F F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.38) {
tmp = (sqrt(0.5) / (sin(B) / F)) - t_0;
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.38d0) then
tmp = (sqrt(0.5d0) / (sin(b) / f)) - t_0
else
tmp = ((1.0d0 + ((-1.0d0) / (f * f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.38) {
tmp = (Math.sqrt(0.5) / (Math.sin(B) / F)) - t_0;
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.38: tmp = (math.sqrt(0.5) / (math.sin(B) / F)) - t_0 else: tmp = ((1.0 + (-1.0 / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.38) tmp = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - t_0); else tmp = Float64(Float64(Float64(1.0 + Float64(-1.0 / Float64(F * F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.38) tmp = (sqrt(0.5) / (sin(B) / F)) - t_0; else tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.38], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 + N[(-1.0 / N[(F * 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.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.38:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 50.7%
+-commutative50.7%
unsub-neg50.7%
associate-*l/73.4%
associate-*r/73.4%
*-commutative73.4%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.8%
if -1.3999999999999999 < F < 1.3799999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 97.3%
associate-/l*97.3%
Simplified97.3%
if 1.3799999999999999 < F Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.3%
*-lft-identity76.3%
unpow276.3%
fma-udef76.3%
Simplified76.3%
associate-*r/76.3%
pow1/276.3%
inv-pow76.3%
pow-pow76.3%
metadata-eval76.3%
Applied egg-rr76.3%
Taylor expanded in F around inf 98.1%
unpow298.1%
Simplified98.1%
Final simplification98.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.35)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ (+ 1.0 (/ -1.0 (* F F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.35) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.35d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = ((1.0d0 + ((-1.0d0) / (f * f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.35) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.35: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = ((1.0 + (-1.0 / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.35) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(1.0 + Float64(-1.0 / Float64(F * F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.35) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 + N[(-1.0 / N[(F * 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.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.35:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 50.7%
+-commutative50.7%
unsub-neg50.7%
associate-*l/73.4%
associate-*r/73.4%
*-commutative73.4%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 99.8%
if -1.3999999999999999 < F < 1.3500000000000001Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 97.3%
if 1.3500000000000001 < F Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.3%
*-lft-identity76.3%
unpow276.3%
fma-udef76.3%
Simplified76.3%
associate-*r/76.3%
pow1/276.3%
inv-pow76.3%
pow-pow76.3%
metadata-eval76.3%
Applied egg-rr76.3%
Taylor expanded in F around inf 98.1%
unpow298.1%
Simplified98.1%
Final simplification98.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.04e-13)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.55e-152)
(- (* F (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ 1.0 B))) t_0)
(if (<= F 1700.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(- (/ (+ 1.0 (/ -1.0 (* F F))) (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.55e-152) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0;
} else if (F <= 1700.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.04d-13)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.55d-152) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (1.0d0 / b))) - t_0
else if (f <= 1700.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = ((1.0d0 + ((-1.0d0) / (f * f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.55e-152) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0;
} else if (F <= 1700.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.04e-13: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.55e-152: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0 elif F <= 1700.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) else: tmp = ((1.0 + (-1.0 / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.04e-13) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.55e-152) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(1.0 / B))) - t_0); elseif (F <= 1700.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(Float64(Float64(1.0 + Float64(-1.0 / Float64(F * F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.04e-13) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.55e-152) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0; elseif (F <= 1700.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.04e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.55e-152], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1700.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + N[(-1.0 / N[(F * 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.04 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-152}:\\
\;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{elif}\;F \leq 1700:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.03999999999999999e-13Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
if -1.03999999999999999e-13 < F < 1.5499999999999999e-152Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in B around 0 88.8%
unpow288.8%
+-commutative88.8%
fma-def88.8%
Simplified88.8%
Taylor expanded in F around 0 88.8%
if 1.5499999999999999e-152 < F < 1700Initial program 99.3%
Taylor expanded in B around 0 80.7%
if 1700 < F Initial program 64.1%
+-commutative64.1%
unsub-neg64.1%
associate-*l/75.5%
associate-*r/75.4%
*-commutative75.4%
Simplified75.5%
Taylor expanded in x around 0 75.5%
associate-*l/75.5%
*-lft-identity75.5%
unpow275.5%
fma-udef75.5%
Simplified75.5%
associate-*r/75.5%
pow1/275.5%
inv-pow75.5%
pow-pow75.6%
metadata-eval75.6%
Applied egg-rr75.6%
Taylor expanded in F around inf 99.7%
unpow299.7%
Simplified99.7%
Final simplification92.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.04e-13)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 450.0)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(- (/ (+ 1.0 (/ -1.0 (* F F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 450.0) {
tmp = (x * (-1.0 / tan(B))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.04d-13)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 450.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = ((1.0d0 + ((-1.0d0) / (f * f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 450.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.04e-13: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 450.0: tmp = (x * (-1.0 / math.tan(B))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) else: tmp = ((1.0 + (-1.0 / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.04e-13) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 450.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(Float64(1.0 + Float64(-1.0 / Float64(F * F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.04e-13) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 450.0) tmp = (x * (-1.0 / tan(B))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.04e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 450.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $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[(1.0 + N[(-1.0 / N[(F * 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.04 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 450:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.03999999999999999e-13Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
if -1.03999999999999999e-13 < F < 450Initial program 99.4%
Taylor expanded in B around 0 84.0%
if 450 < F Initial program 64.1%
+-commutative64.1%
unsub-neg64.1%
associate-*l/75.5%
associate-*r/75.4%
*-commutative75.4%
Simplified75.5%
Taylor expanded in x around 0 75.5%
associate-*l/75.5%
*-lft-identity75.5%
unpow275.5%
fma-udef75.5%
Simplified75.5%
associate-*r/75.5%
pow1/275.5%
inv-pow75.5%
pow-pow75.6%
metadata-eval75.6%
Applied egg-rr75.6%
Taylor expanded in F around inf 99.7%
unpow299.7%
Simplified99.7%
Final simplification91.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.04e-13)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.1e-15)
(- (* F (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ 1.0 B))) t_0)
(- (* F (/ (/ 1.0 (+ 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 <= -1.04e-13) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.1e-15) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0;
} else {
tmp = (F * ((1.0 / (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 <= (-1.04d-13)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.1d-15) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (1.0d0 / b))) - t_0
else
tmp = (f * ((1.0d0 / (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 <= -1.04e-13) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.1e-15) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0;
} else {
tmp = (F * ((1.0 / (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 <= -1.04e-13: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.1e-15: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0 else: tmp = (F * ((1.0 / (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 <= -1.04e-13) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.1e-15) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / 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 <= -1.04e-13) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.1e-15) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0; else tmp = (F * ((1.0 / (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, -1.04e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.1e-15], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.04 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-15}:\\
\;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.03999999999999999e-13Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
if -1.03999999999999999e-13 < F < 3.0999999999999999e-15Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in B around 0 85.8%
unpow285.8%
+-commutative85.8%
fma-def85.8%
Simplified85.8%
Taylor expanded in F around 0 85.8%
if 3.0999999999999999e-15 < F Initial program 67.8%
+-commutative67.8%
unsub-neg67.8%
associate-*l/78.0%
associate-*r/77.9%
*-commutative77.9%
Simplified78.0%
Taylor expanded in x around 0 77.9%
associate-*l/77.9%
*-lft-identity77.9%
unpow277.9%
fma-udef77.9%
Simplified77.9%
sqrt-div77.9%
metadata-eval77.9%
Applied egg-rr77.9%
Taylor expanded in F around inf 94.1%
Final simplification90.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.04e-13)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.1e-15)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (* F (/ (/ 1.0 (+ 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 <= -1.04e-13) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.1e-15) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (F * ((1.0 / (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 <= (-1.04d-13)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.1d-15) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (f * ((1.0d0 / (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 <= -1.04e-13) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.1e-15) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (F * ((1.0 / (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 <= -1.04e-13: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.1e-15: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (F * ((1.0 / (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 <= -1.04e-13) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.1e-15) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / 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 <= -1.04e-13) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.1e-15) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (F * ((1.0 / (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, -1.04e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.1e-15], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.04 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-15}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.03999999999999999e-13Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
if -1.03999999999999999e-13 < F < 3.0999999999999999e-15Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in B around 0 85.8%
associate-*r/85.7%
*-rgt-identity85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
Taylor expanded in F around 0 85.7%
associate-/l*85.7%
associate-/r/85.7%
Simplified85.7%
if 3.0999999999999999e-15 < F Initial program 67.8%
+-commutative67.8%
unsub-neg67.8%
associate-*l/78.0%
associate-*r/77.9%
*-commutative77.9%
Simplified78.0%
Taylor expanded in x around 0 77.9%
associate-*l/77.9%
*-lft-identity77.9%
unpow277.9%
fma-udef77.9%
Simplified77.9%
sqrt-div77.9%
metadata-eval77.9%
Applied egg-rr77.9%
Taylor expanded in F around inf 94.1%
Final simplification90.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.04e-13)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.06)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (+ 1.0 (/ -1.0 (* F F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.06) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.04d-13)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.06d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((1.0d0 + ((-1.0d0) / (f * f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.06) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((1.0 + (-1.0 / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.04e-13: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.06: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((1.0 + (-1.0 / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.04e-13) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.06) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(1.0 + Float64(-1.0 / Float64(F * F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.04e-13) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.06) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((1.0 + (-1.0 / (F * F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.04e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.06], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 + N[(-1.0 / N[(F * 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.04 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.06:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1}{F \cdot F}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.03999999999999999e-13Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
if -1.03999999999999999e-13 < F < 1.0600000000000001Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in B around 0 83.9%
associate-*r/83.8%
*-rgt-identity83.8%
unpow283.8%
fma-udef83.8%
Simplified83.8%
Taylor expanded in F around 0 83.2%
associate-/l*83.2%
associate-/r/83.2%
Simplified83.2%
if 1.0600000000000001 < F Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.3%
*-lft-identity76.3%
unpow276.3%
fma-udef76.3%
Simplified76.3%
associate-*r/76.3%
pow1/276.3%
inv-pow76.3%
pow-pow76.3%
metadata-eval76.3%
Applied egg-rr76.3%
Taylor expanded in F around inf 98.1%
unpow298.1%
Simplified98.1%
Final simplification90.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.04e-13)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.1e-15)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.1e-15) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.04d-13)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.1d-15) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.1e-15) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.04e-13: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.1e-15: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.04e-13) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.1e-15) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.04e-13) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.1e-15) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.04e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.1e-15], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.04 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-15}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.03999999999999999e-13Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
if -1.03999999999999999e-13 < F < 3.0999999999999999e-15Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in B around 0 85.8%
associate-*r/85.7%
*-rgt-identity85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
Taylor expanded in F around 0 85.7%
associate-/l*85.7%
associate-/r/85.7%
Simplified85.7%
if 3.0999999999999999e-15 < F Initial program 67.8%
+-commutative67.8%
unsub-neg67.8%
associate-*l/78.0%
associate-*r/77.9%
*-commutative77.9%
Simplified78.0%
Taylor expanded in x around 0 77.9%
associate-*l/77.9%
*-lft-identity77.9%
unpow277.9%
fma-udef77.9%
Simplified77.9%
Taylor expanded in F around inf 93.4%
Final simplification90.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.8e-21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7e-20) (/ (* (- x) (cos B)) (sin B)) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.8e-21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7e-20) {
tmp = (-x * cos(B)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.8d-21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7d-20) then
tmp = (-x * cos(b)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.8e-21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7e-20) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.8e-21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7e-20: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.8e-21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7e-20) tmp = Float64(Float64(Float64(-x) * cos(B)) / 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.8e-21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7e-20) tmp = (-x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7e-20], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-20}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.8e-21Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
if -6.8e-21 < F < 7.00000000000000007e-20Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 31.4%
*-commutative31.4%
associate-/r*31.4%
Simplified31.4%
Taylor expanded in x around inf 72.6%
associate-*r/72.6%
*-commutative72.6%
associate-*r*72.6%
neg-mul-172.6%
Simplified72.6%
if 7.00000000000000007e-20 < F Initial program 68.1%
+-commutative68.1%
unsub-neg68.1%
associate-*l/78.2%
associate-*r/78.2%
*-commutative78.2%
Simplified78.3%
Taylor expanded in x around 0 78.1%
associate-*l/78.2%
*-lft-identity78.2%
unpow278.2%
fma-udef78.2%
Simplified78.2%
Taylor expanded in F around inf 92.4%
Final simplification85.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.04e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.5e-39)
(/ (- (cos B)) (/ (sin B) x))
(- (+ (/ 1.0 B) (/ -1.0 (* F (* F B)))) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.5e-39) {
tmp = -cos(B) / (sin(B) / x);
} else {
tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.04d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.5d-39) then
tmp = -cos(b) / (sin(b) / x)
else
tmp = ((1.0d0 / b) + ((-1.0d0) / (f * (f * b)))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.5e-39) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else {
tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.04e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.5e-39: tmp = -math.cos(B) / (math.sin(B) / x) else: tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.04e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.5e-39) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(-1.0 / Float64(F * Float64(F * B)))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.04e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.5e-39) tmp = -cos(B) / (sin(B) / x); else tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.04e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-39], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(-1.0 / N[(F * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.04 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-39}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + \frac{-1}{F \cdot \left(F \cdot B\right)}\right) - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.03999999999999999e-13Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
Taylor expanded in B around 0 74.5%
if -1.03999999999999999e-13 < F < 4.5000000000000001e-39Initial program 99.4%
Taylor expanded in F around -inf 44.9%
Taylor expanded in x around inf 73.7%
mul-1-neg73.7%
associate-/l*73.5%
distribute-neg-frac73.5%
Simplified73.5%
if 4.5000000000000001e-39 < F Initial program 69.2%
+-commutative69.2%
unsub-neg69.2%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in B around 0 63.9%
unpow263.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in F around inf 70.8%
Taylor expanded in x around 0 71.8%
unpow-171.8%
sub-neg71.8%
unpow-171.8%
*-commutative71.8%
unpow271.8%
distribute-neg-frac71.8%
metadata-eval71.8%
associate-*r*71.8%
*-commutative71.8%
*-commutative71.8%
Simplified71.8%
Final simplification73.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.02e-17)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.6e-39)
(/ (* (- x) (cos B)) (sin B))
(- (+ (/ 1.0 B) (/ -1.0 (* F (* F B)))) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.02e-17) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.6e-39) {
tmp = (-x * cos(B)) / sin(B);
} else {
tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.02d-17)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.6d-39) then
tmp = (-x * cos(b)) / sin(b)
else
tmp = ((1.0d0 / b) + ((-1.0d0) / (f * (f * b)))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.02e-17) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.6e-39) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.02e-17: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.6e-39: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.02e-17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.6e-39) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(-1.0 / Float64(F * Float64(F * B)))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.02e-17) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.6e-39) tmp = (-x * cos(B)) / sin(B); else tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.02e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-39], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(-1.0 / N[(F * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.02 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-39}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + \frac{-1}{F \cdot \left(F \cdot B\right)}\right) - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.01999999999999997e-17Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
Taylor expanded in B around 0 74.5%
if -1.01999999999999997e-17 < F < 1.5999999999999999e-39Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 31.9%
*-commutative31.9%
associate-/r*31.9%
Simplified31.9%
Taylor expanded in x around inf 73.7%
associate-*r/73.7%
*-commutative73.7%
associate-*r*73.7%
neg-mul-173.7%
Simplified73.7%
if 1.5999999999999999e-39 < F Initial program 69.2%
+-commutative69.2%
unsub-neg69.2%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in B around 0 63.9%
unpow263.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in F around inf 70.8%
Taylor expanded in x around 0 71.8%
unpow-171.8%
sub-neg71.8%
unpow-171.8%
*-commutative71.8%
unpow271.8%
distribute-neg-frac71.8%
metadata-eval71.8%
associate-*r*71.8%
*-commutative71.8%
*-commutative71.8%
Simplified71.8%
Final simplification73.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.05e-17)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.5e-39)
(/ (* (- x) (cos B)) (sin B))
(- (+ (/ 1.0 B) (/ -1.0 (* F (* F B)))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.05e-17) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.5e-39) {
tmp = (-x * cos(B)) / sin(B);
} else {
tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.05d-17)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.5d-39) then
tmp = (-x * cos(b)) / sin(b)
else
tmp = ((1.0d0 / b) + ((-1.0d0) / (f * (f * b)))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.05e-17) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.5e-39) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.05e-17: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.5e-39: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.05e-17) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.5e-39) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(-1.0 / Float64(F * Float64(F * B)))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.05e-17) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.5e-39) tmp = (-x * cos(B)) / sin(B); else tmp = ((1.0 / B) + (-1.0 / (F * (F * B)))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.05e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.5e-39], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(-1.0 / N[(F * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-39}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + \frac{-1}{F \cdot \left(F \cdot B\right)}\right) - t_0\\
\end{array}
\end{array}
if F < -1.04999999999999996e-17Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
if -1.04999999999999996e-17 < F < 4.5000000000000001e-39Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 31.9%
*-commutative31.9%
associate-/r*31.9%
Simplified31.9%
Taylor expanded in x around inf 73.7%
associate-*r/73.7%
*-commutative73.7%
associate-*r*73.7%
neg-mul-173.7%
Simplified73.7%
if 4.5000000000000001e-39 < F Initial program 69.2%
+-commutative69.2%
unsub-neg69.2%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in B around 0 63.9%
unpow263.9%
+-commutative63.9%
fma-def63.9%
Simplified63.9%
Taylor expanded in F around inf 70.8%
Taylor expanded in x around 0 71.8%
unpow-171.8%
sub-neg71.8%
unpow-171.8%
*-commutative71.8%
unpow271.8%
distribute-neg-frac71.8%
metadata-eval71.8%
associate-*r*71.8%
*-commutative71.8%
*-commutative71.8%
Simplified71.8%
Final simplification78.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.04e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -9.6e-275) (not (<= F 9.5e-281)))
(- (/ 1.0 B) (/ x (tan B)))
(/ (- x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -9.6e-275) || !(F <= 9.5e-281)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.04d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-9.6d-275)) .or. (.not. (f <= 9.5d-281))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.04e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -9.6e-275) || !(F <= 9.5e-281)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.04e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -9.6e-275) or not (F <= 9.5e-281): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.04e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -9.6e-275) || !(F <= 9.5e-281)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.04e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -9.6e-275) || ~((F <= 9.5e-281))) tmp = (1.0 / B) - (x / tan(B)); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.04e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -9.6e-275], N[Not[LessEqual[F, 9.5e-281]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.04 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.6 \cdot 10^{-275} \lor \neg \left(F \leq 9.5 \cdot 10^{-281}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.03999999999999999e-13Initial program 53.7%
+-commutative53.7%
unsub-neg53.7%
associate-*l/75.0%
associate-*r/75.0%
*-commutative75.0%
Simplified75.1%
Taylor expanded in x around 0 75.1%
associate-*l/75.1%
*-lft-identity75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 94.6%
Taylor expanded in B around 0 74.5%
if -1.03999999999999999e-13 < F < -9.59999999999999962e-275 or 9.5000000000000003e-281 < F Initial program 83.9%
+-commutative83.9%
unsub-neg83.9%
associate-*l/89.0%
associate-*r/88.9%
*-commutative88.9%
Simplified89.1%
Taylor expanded in F around inf 63.2%
*-commutative63.2%
associate-/r*63.3%
Simplified63.3%
Taylor expanded in B around 0 65.0%
if -9.59999999999999962e-275 < F < 9.5000000000000003e-281Initial program 99.7%
Taylor expanded in F around -inf 30.3%
Taylor expanded in B around 0 26.1%
associate-*r/26.1%
distribute-lft-in26.1%
metadata-eval26.1%
neg-mul-126.1%
Simplified26.1%
Taylor expanded in x around inf 88.7%
mul-1-neg88.7%
distribute-neg-frac88.7%
Simplified88.7%
Final simplification68.7%
(FPCore (F B x) :precision binary64 (if (<= F -4.8e-270) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)) (if (<= F 2.6e-280) (/ (- x) B) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-270) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 2.6e-280) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.8d-270)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 2.6d-280) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-270) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 2.6e-280) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e-270: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 2.6e-280: tmp = -x / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e-270) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 2.6e-280) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.8e-270) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 2.6e-280) tmp = -x / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e-270], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-280], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{-270}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-280}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4.80000000000000003e-270Initial program 71.7%
Taylor expanded in F around -inf 76.1%
Taylor expanded in B around 0 67.0%
if -4.80000000000000003e-270 < F < 2.6e-280Initial program 99.7%
Taylor expanded in F around -inf 28.6%
Taylor expanded in B around 0 24.5%
associate-*r/24.5%
distribute-lft-in24.5%
metadata-eval24.5%
neg-mul-124.5%
Simplified24.5%
Taylor expanded in x around inf 83.2%
mul-1-neg83.2%
distribute-neg-frac83.2%
Simplified83.2%
if 2.6e-280 < F Initial program 78.8%
+-commutative78.8%
unsub-neg78.8%
associate-*l/85.5%
associate-*r/85.4%
*-commutative85.4%
Simplified85.6%
Taylor expanded in F around inf 72.8%
*-commutative72.8%
associate-/r*72.9%
Simplified72.9%
Taylor expanded in B around 0 67.3%
Final simplification68.1%
(FPCore (F B x) :precision binary64 (if (<= F -1.25e-272) (+ (/ -1.0 (/ (tan B) x)) (/ -1.0 B)) (if (<= F 3.7e-280) (/ (- x) B) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-272) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / B);
} else if (F <= 3.7e-280) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.25d-272)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / b)
else if (f <= 3.7d-280) then
tmp = -x / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-272) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / B);
} else if (F <= 3.7e-280) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e-272: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / B) elif F <= 3.7e-280: tmp = -x / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e-272) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / B)); elseif (F <= 3.7e-280) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.25e-272) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / B); elseif (F <= 3.7e-280) tmp = -x / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e-272], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-280], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-272}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-280}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.24999999999999995e-272Initial program 71.7%
Taylor expanded in F around -inf 76.1%
Taylor expanded in B around 0 67.0%
div-inv67.1%
clear-num67.1%
Applied egg-rr67.1%
if -1.24999999999999995e-272 < F < 3.6999999999999998e-280Initial program 99.7%
Taylor expanded in F around -inf 28.6%
Taylor expanded in B around 0 24.5%
associate-*r/24.5%
distribute-lft-in24.5%
metadata-eval24.5%
neg-mul-124.5%
Simplified24.5%
Taylor expanded in x around inf 83.2%
mul-1-neg83.2%
distribute-neg-frac83.2%
Simplified83.2%
if 3.6999999999999998e-280 < F Initial program 78.8%
+-commutative78.8%
unsub-neg78.8%
associate-*l/85.5%
associate-*r/85.4%
*-commutative85.4%
Simplified85.6%
Taylor expanded in F around inf 72.8%
*-commutative72.8%
associate-/r*72.9%
Simplified72.9%
Taylor expanded in B around 0 67.3%
Final simplification68.1%
(FPCore (F B x)
:precision binary64
(if (<= F -8.5e-109)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7e-37)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-109) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7e-37) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((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 <= (-8.5d-109)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7d-37) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-109) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7e-37) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-109: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7e-37: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-109) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7e-37) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.5e-109) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7e-37) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-109], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-37], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-37}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.50000000000000005e-109Initial program 62.2%
+-commutative62.2%
unsub-neg62.2%
associate-*l/79.5%
associate-*r/79.5%
*-commutative79.5%
Simplified79.6%
Taylor expanded in x around 0 79.7%
associate-*l/79.6%
*-lft-identity79.6%
unpow279.6%
fma-udef79.6%
Simplified79.6%
Taylor expanded in F around -inf 84.7%
Taylor expanded in B around 0 64.1%
if -8.50000000000000005e-109 < F < 7.0000000000000003e-37Initial program 99.4%
Taylor expanded in F around -inf 45.0%
Taylor expanded in B around 0 25.4%
associate-*r/25.4%
distribute-lft-in25.4%
metadata-eval25.4%
neg-mul-125.4%
Simplified25.4%
Taylor expanded in x around inf 43.9%
mul-1-neg43.9%
distribute-neg-frac43.9%
Simplified43.9%
if 7.0000000000000003e-37 < F Initial program 68.8%
+-commutative68.8%
unsub-neg68.8%
associate-*l/78.7%
associate-*r/78.7%
*-commutative78.7%
Simplified78.8%
Taylor expanded in F around inf 90.6%
*-commutative90.6%
associate-/r*90.7%
Simplified90.7%
Taylor expanded in B around 0 46.9%
associate--l+46.9%
*-commutative46.9%
*-commutative46.9%
div-sub46.9%
Simplified46.9%
Final simplification51.3%
(FPCore (F B x)
:precision binary64
(if (<= F -3e-80)
(+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B))
(if (<= F 1.42e-37)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-80) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.42e-37) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((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 <= (-3d-80)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 1.42d-37) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3e-80) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.42e-37) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e-80: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 1.42e-37: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e-80) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 1.42e-37) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3e-80) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 1.42e-37) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e-80], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42e-37], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-80}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.42 \cdot 10^{-37}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.00000000000000007e-80Initial program 60.3%
Taylor expanded in F around -inf 86.3%
Taylor expanded in B around 0 68.3%
Taylor expanded in B around 0 46.8%
+-commutative46.8%
mul-1-neg46.8%
unsub-neg46.8%
*-commutative46.8%
associate-*l*46.8%
Simplified46.8%
if -3.00000000000000007e-80 < F < 1.42e-37Initial program 99.4%
Taylor expanded in F around -inf 45.3%
Taylor expanded in B around 0 25.6%
associate-*r/25.6%
distribute-lft-in25.6%
metadata-eval25.6%
neg-mul-125.6%
Simplified25.6%
Taylor expanded in x around inf 43.2%
mul-1-neg43.2%
distribute-neg-frac43.2%
Simplified43.2%
if 1.42e-37 < F Initial program 68.8%
+-commutative68.8%
unsub-neg68.8%
associate-*l/78.7%
associate-*r/78.7%
*-commutative78.7%
Simplified78.8%
Taylor expanded in F around inf 90.6%
*-commutative90.6%
associate-/r*90.7%
Simplified90.7%
Taylor expanded in B around 0 46.9%
associate--l+46.9%
*-commutative46.9%
*-commutative46.9%
div-sub46.9%
Simplified46.9%
Final simplification45.6%
(FPCore (F B x) :precision binary64 (if (<= F -2.1e-77) (+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B)) (if (<= F 5.5e-38) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-77) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 5.5e-38) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.1d-77)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 5.5d-38) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-77) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 5.5e-38) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-77: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 5.5e-38: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-77) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 5.5e-38) 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 <= -2.1e-77) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 5.5e-38) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-77], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-38], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-77}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.10000000000000015e-77Initial program 60.3%
Taylor expanded in F around -inf 86.3%
Taylor expanded in B around 0 68.3%
Taylor expanded in B around 0 46.8%
+-commutative46.8%
mul-1-neg46.8%
unsub-neg46.8%
*-commutative46.8%
associate-*l*46.8%
Simplified46.8%
if -2.10000000000000015e-77 < F < 5.50000000000000005e-38Initial program 99.4%
Taylor expanded in F around -inf 45.3%
Taylor expanded in B around 0 25.6%
associate-*r/25.6%
distribute-lft-in25.6%
metadata-eval25.6%
neg-mul-125.6%
Simplified25.6%
Taylor expanded in x around inf 43.2%
mul-1-neg43.2%
distribute-neg-frac43.2%
Simplified43.2%
if 5.50000000000000005e-38 < F Initial program 68.8%
+-commutative68.8%
unsub-neg68.8%
associate-*l/78.7%
associate-*r/78.7%
*-commutative78.7%
Simplified78.8%
Taylor expanded in F around inf 90.6%
*-commutative90.6%
associate-/r*90.7%
Simplified90.7%
Taylor expanded in B around 0 45.6%
Final simplification45.1%
(FPCore (F B x) :precision binary64 (if (<= F -8.5e-109) (/ (- -1.0 x) B) (if (<= F 7e-37) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-109) {
tmp = (-1.0 - x) / B;
} else if (F <= 7e-37) {
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 <= (-8.5d-109)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 7d-37) 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 <= -8.5e-109) {
tmp = (-1.0 - x) / B;
} else if (F <= 7e-37) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-109: tmp = (-1.0 - x) / B elif F <= 7e-37: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-109) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 7e-37) 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 <= -8.5e-109) tmp = (-1.0 - x) / B; elseif (F <= 7e-37) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-109], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7e-37], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-37}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.50000000000000005e-109Initial program 62.2%
Taylor expanded in F around -inf 84.6%
Taylor expanded in B around 0 45.5%
associate-*r/45.5%
distribute-lft-in45.5%
metadata-eval45.5%
neg-mul-145.5%
Simplified45.5%
Taylor expanded in x around 0 45.5%
sub-neg45.5%
mul-1-neg45.5%
+-commutative45.5%
distribute-neg-frac45.5%
metadata-eval45.5%
sub-neg45.5%
div-sub45.5%
Simplified45.5%
if -8.50000000000000005e-109 < F < 7.0000000000000003e-37Initial program 99.4%
Taylor expanded in F around -inf 45.0%
Taylor expanded in B around 0 25.4%
associate-*r/25.4%
distribute-lft-in25.4%
metadata-eval25.4%
neg-mul-125.4%
Simplified25.4%
Taylor expanded in x around inf 43.9%
mul-1-neg43.9%
distribute-neg-frac43.9%
Simplified43.9%
if 7.0000000000000003e-37 < F Initial program 68.8%
+-commutative68.8%
unsub-neg68.8%
associate-*l/78.7%
associate-*r/78.7%
*-commutative78.7%
Simplified78.8%
Taylor expanded in F around inf 90.6%
*-commutative90.6%
associate-/r*90.7%
Simplified90.7%
Taylor expanded in B around 0 45.6%
Final simplification45.0%
(FPCore (F B x) :precision binary64 (if (<= F -8.5e-109) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-109) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.5d-109)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-109) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-109: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-109) 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 <= -8.5e-109) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-109], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -8.50000000000000005e-109Initial program 62.2%
Taylor expanded in F around -inf 84.6%
Taylor expanded in B around 0 45.5%
associate-*r/45.5%
distribute-lft-in45.5%
metadata-eval45.5%
neg-mul-145.5%
Simplified45.5%
Taylor expanded in x around 0 45.5%
sub-neg45.5%
mul-1-neg45.5%
+-commutative45.5%
distribute-neg-frac45.5%
metadata-eval45.5%
sub-neg45.5%
div-sub45.5%
Simplified45.5%
if -8.50000000000000005e-109 < F Initial program 83.9%
Taylor expanded in F around -inf 45.2%
Taylor expanded in B around 0 23.0%
associate-*r/23.0%
distribute-lft-in23.0%
metadata-eval23.0%
neg-mul-123.0%
Simplified23.0%
Taylor expanded in x around inf 32.3%
mul-1-neg32.3%
distribute-neg-frac32.3%
Simplified32.3%
Final simplification36.5%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 77.0%
Taylor expanded in F around -inf 57.7%
Taylor expanded in B around 0 30.1%
associate-*r/30.1%
distribute-lft-in30.1%
metadata-eval30.1%
neg-mul-130.1%
Simplified30.1%
Taylor expanded in x around inf 31.4%
mul-1-neg31.4%
distribute-neg-frac31.4%
Simplified31.4%
Final simplification31.4%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 77.0%
Taylor expanded in F around -inf 57.7%
Taylor expanded in B around 0 30.1%
associate-*r/30.1%
distribute-lft-in30.1%
metadata-eval30.1%
neg-mul-130.1%
Simplified30.1%
Taylor expanded in x around 0 7.8%
Final simplification7.8%
herbie shell --seed 2023252
(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))))))