
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 120000000.0)
(- (/ F (/ (sin B) (pow (fma 2.0 x (fma F F 2.0)) -0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 120000000.0) {
tmp = (F / (sin(B) / pow(fma(2.0, x, fma(F, F, 2.0)), -0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 120000000.0) tmp = Float64(Float64(F / Float64(sin(B) / (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 120000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.00000000000000022e47Initial program 58.9%
Simplified73.0%
Taylor expanded in F around -inf 99.9%
if -5.00000000000000022e47 < F < 1.2e8Initial program 98.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
if 1.2e8 < F Initial program 68.2%
Simplified82.6%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.55e+47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 120000000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.55e+47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 120000000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.55e+47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 120000000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.55e+47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 120000000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.55 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.5500000000000001e47Initial program 58.9%
Simplified73.0%
Taylor expanded in F around -inf 99.9%
if -2.5500000000000001e47 < F < 1.2e8Initial program 98.7%
Simplified99.7%
if 1.2e8 < F Initial program 68.2%
Simplified82.6%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+44)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 60000000.0)
(- (/ (/ F (sin B)) (sqrt (fma 2.0 x (fma F F 2.0)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+44) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 60000000.0) {
tmp = ((F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+44) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 60000000.0) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+44], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 60000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+44}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 60000000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.0000000000000001e44Initial program 57.9%
Simplified73.5%
Taylor expanded in F around -inf 99.9%
if -1.0000000000000001e44 < F < 6e7Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
div-inv99.7%
div-inv99.6%
fma-define99.6%
fma-undefine99.6%
+-commutative99.6%
pow-flip99.7%
metadata-eval99.7%
pow1/299.7%
+-commutative99.7%
fma-undefine99.7%
fma-define99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
associate-/r*99.6%
Simplified99.6%
if 6e7 < F Initial program 68.2%
Simplified82.6%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7e+43)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 125000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7e+43) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 125000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7d+43)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 125000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7e+43) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 125000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7e+43: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 125000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7e+43) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 125000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7e+43) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 125000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7e+43], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 125000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{+43}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 125000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7.0000000000000002e43Initial program 57.9%
Simplified73.5%
Taylor expanded in F around -inf 99.9%
if -7.0000000000000002e43 < F < 1.25e8Initial program 99.5%
div-inv99.7%
neg-mul-199.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 1.25e8 < F Initial program 68.2%
Simplified82.6%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -3.35e+37)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.5e-104)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(if (<= F 6.2e-6)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(- (/ 1.0 (sin B)) (* (cos B) (/ x (sin B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.35e+37) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.5e-104) {
tmp = (-1.0 / (tan(B) / x)) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else if (F <= 6.2e-6) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.35d+37)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.5d-104) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else if (f <= 6.2d-6) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (cos(b) * (x / sin(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.35e+37) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.5e-104) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else if (F <= 6.2e-6) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (Math.cos(B) * (x / Math.sin(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.35e+37: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.5e-104: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) elif F <= 6.2e-6: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) else: tmp = (1.0 / math.sin(B)) - (math.cos(B) * (x / math.sin(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.35e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.5e-104) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); elseif (F <= 6.2e-6) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.35e+37) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.5e-104) tmp = (-1.0 / (tan(B) / x)) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); elseif (F <= 6.2e-6) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); else tmp = (1.0 / sin(B)) - (cos(B) * (x / sin(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.35e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e-104], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.35 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\end{array}
\end{array}
if F < -3.34999999999999984e37Initial program 58.6%
Simplified73.9%
Taylor expanded in F around -inf 99.9%
if -3.34999999999999984e37 < F < 1.5000000000000001e-104Initial program 99.5%
div-inv99.7%
neg-mul-199.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 89.9%
if 1.5000000000000001e-104 < F < 6.1999999999999999e-6Initial program 99.7%
Taylor expanded in B around 0 98.6%
associate-*r/98.6%
neg-mul-198.6%
Simplified98.6%
Taylor expanded in F around 0 98.6%
+-commutative98.6%
neg-mul-198.6%
unsub-neg98.6%
*-commutative98.6%
*-commutative98.6%
Simplified98.6%
if 6.1999999999999999e-6 < F Initial program 70.1%
Simplified83.7%
Taylor expanded in F around inf 98.0%
associate-*l/98.1%
*-commutative98.1%
Simplified98.1%
Final simplification95.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (/ F (* (sin B) (sqrt 2.0))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (F / (sin(B) * sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = (F / (sin(B) * sqrt(2.0))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.6%
Simplified75.8%
Taylor expanded in F around -inf 99.6%
if -1.3999999999999999 < F < 1.44999999999999996Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 99.2%
if 1.44999999999999996 < F Initial program 69.0%
Simplified83.1%
Taylor expanded in F around inf 99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.35e+37)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.58e-108)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(if (<= F 6.2e-6)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x 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 <= -3.35e+37) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.58e-108) {
tmp = (-1.0 / (tan(B) / x)) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else if (F <= 6.2e-6) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / 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 <= (-3.35d+37)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.58d-108) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else if (f <= 6.2d-6) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / 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 <= -3.35e+37) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.58e-108) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else if (F <= 6.2e-6) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / 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 <= -3.35e+37: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.58e-108: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) elif F <= 6.2e-6: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / 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 <= -3.35e+37) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.58e-108) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); elseif (F <= 6.2e-6) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / 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 <= -3.35e+37) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.58e-108) tmp = (-1.0 / (tan(B) / x)) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); elseif (F <= 6.2e-6) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / 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, -3.35e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.58e-108], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / 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 -3.35 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.58 \cdot 10^{-108}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.34999999999999984e37Initial program 58.6%
Simplified73.9%
Taylor expanded in F around -inf 99.9%
if -3.34999999999999984e37 < F < 1.5799999999999999e-108Initial program 99.5%
div-inv99.7%
neg-mul-199.7%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 89.9%
if 1.5799999999999999e-108 < F < 6.1999999999999999e-6Initial program 99.7%
Taylor expanded in B around 0 98.6%
associate-*r/98.6%
neg-mul-198.6%
Simplified98.6%
Taylor expanded in F around 0 98.6%
+-commutative98.6%
neg-mul-198.6%
unsub-neg98.6%
*-commutative98.6%
*-commutative98.6%
Simplified98.6%
if 6.1999999999999999e-6 < F Initial program 70.1%
Simplified83.7%
Taylor expanded in F around inf 98.1%
Final simplification95.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -3.5e-11)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 6.6e-106)
(- (/ F (* B (sqrt t_0))) t_1)
(if (<= F 4.6e-6)
(- (* (/ F (sin B)) (sqrt (/ 1.0 t_0))) (/ x B))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -3.5e-11) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 6.6e-106) {
tmp = (F / (B * sqrt(t_0))) - t_1;
} else if (F <= 4.6e-6) {
tmp = ((F / sin(B)) * sqrt((1.0 / t_0))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
t_1 = x / tan(b)
if (f <= (-3.5d-11)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 6.6d-106) then
tmp = (f / (b * sqrt(t_0))) - t_1
else if (f <= 4.6d-6) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / t_0))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3.5e-11) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 6.6e-106) {
tmp = (F / (B * Math.sqrt(t_0))) - t_1;
} else if (F <= 4.6e-6) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / t_0))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -3.5e-11: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 6.6e-106: tmp = (F / (B * math.sqrt(t_0))) - t_1 elif F <= 4.6e-6: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / t_0))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e-11) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 6.6e-106) tmp = Float64(Float64(F / Float64(B * sqrt(t_0))) - t_1); elseif (F <= 4.6e-6) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / t_0))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -3.5e-11) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 6.6e-106) tmp = (F / (B * sqrt(t_0))) - t_1; elseif (F <= 4.6e-6) tmp = ((F / sin(B)) * sqrt((1.0 / t_0))) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 6.6e-106], N[(N[(F / N[(B * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 4.6e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-106}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{t\_0}} - t\_1\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{t\_0}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3.50000000000000019e-11Initial program 62.2%
Simplified76.2%
Taylor expanded in F around -inf 98.3%
if -3.50000000000000019e-11 < F < 6.60000000000000031e-106Initial program 99.5%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 90.4%
if 6.60000000000000031e-106 < F < 4.6e-6Initial program 99.7%
Taylor expanded in B around 0 98.6%
associate-*r/98.6%
neg-mul-198.6%
Simplified98.6%
Taylor expanded in F around 0 98.6%
+-commutative98.6%
neg-mul-198.6%
unsub-neg98.6%
*-commutative98.6%
*-commutative98.6%
Simplified98.6%
if 4.6e-6 < F Initial program 70.1%
Simplified83.7%
Taylor expanded in F around inf 98.1%
Final simplification95.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (+ 2.0 (* x 2.0)))) (t_1 (/ x (tan B))))
(if (<= F -3.5e-11)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.6e-104)
(- (/ F (* B t_0)) t_1)
(if (<= F 3.4e-6)
(- (/ F (* (sin B) t_0)) (/ x B))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = sqrt((2.0 + (x * 2.0)));
double t_1 = x / tan(B);
double tmp;
if (F <= -3.5e-11) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.6e-104) {
tmp = (F / (B * t_0)) - t_1;
} else if (F <= 3.4e-6) {
tmp = (F / (sin(B) * t_0)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt((2.0d0 + (x * 2.0d0)))
t_1 = x / tan(b)
if (f <= (-3.5d-11)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.6d-104) then
tmp = (f / (b * t_0)) - t_1
else if (f <= 3.4d-6) then
tmp = (f / (sin(b) * t_0)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((2.0 + (x * 2.0)));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3.5e-11) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.6e-104) {
tmp = (F / (B * t_0)) - t_1;
} else if (F <= 3.4e-6) {
tmp = (F / (Math.sin(B) * t_0)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((2.0 + (x * 2.0))) t_1 = x / math.tan(B) tmp = 0 if F <= -3.5e-11: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.6e-104: tmp = (F / (B * t_0)) - t_1 elif F <= 3.4e-6: tmp = (F / (math.sin(B) * t_0)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = sqrt(Float64(2.0 + Float64(x * 2.0))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e-11) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.6e-104) tmp = Float64(Float64(F / Float64(B * t_0)) - t_1); elseif (F <= 3.4e-6) tmp = Float64(Float64(F / Float64(sin(B) * t_0)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((2.0 + (x * 2.0))); t_1 = x / tan(B); tmp = 0.0; if (F <= -3.5e-11) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.6e-104) tmp = (F / (B * t_0)) - t_1; elseif (F <= 3.4e-6) tmp = (F / (sin(B) * t_0)) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.6e-104], N[(N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 3.4e-6], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{2 + x \cdot 2}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-104}:\\
\;\;\;\;\frac{F}{B \cdot t\_0} - t\_1\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B \cdot t\_0} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3.50000000000000019e-11Initial program 62.2%
Simplified76.2%
Taylor expanded in F around -inf 98.3%
if -3.50000000000000019e-11 < F < 1.59999999999999994e-104Initial program 99.5%
Simplified99.8%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 90.4%
if 1.59999999999999994e-104 < F < 3.40000000000000006e-6Initial program 99.7%
Simplified99.4%
clear-num99.4%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 98.4%
if 3.40000000000000006e-6 < F Initial program 70.1%
Simplified83.7%
Taylor expanded in F around inf 98.1%
Final simplification95.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.5e-11)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.2e-6)
(- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.5e-11) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.2e-6) {
tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.5d-11)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6.2d-6) then
tmp = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.5e-11) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6.2e-6) {
tmp = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.5e-11: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6.2e-6: tmp = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e-11) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.2e-6) tmp = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.5e-11) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6.2e-6) tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.2e-6], N[(N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.50000000000000019e-11Initial program 62.2%
Simplified76.2%
Taylor expanded in F around -inf 98.3%
if -3.50000000000000019e-11 < F < 6.1999999999999999e-6Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 86.7%
if 6.1999999999999999e-6 < F Initial program 70.1%
Simplified83.7%
Taylor expanded in F around inf 98.1%
Final simplification93.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.55e-62)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7.5e-120)
(* (cos B) (/ x (- (sin B))))
(if (<= F 5.8e-6)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x 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 <= -1.55e-62) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7.5e-120) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 5.8e-6) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / 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 <= (-1.55d-62)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7.5d-120) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 5.8d-6) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / 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 <= -1.55e-62) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7.5e-120) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 5.8e-6) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / 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 <= -1.55e-62: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7.5e-120: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 5.8e-6: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / 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 <= -1.55e-62) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7.5e-120) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 5.8e-6) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / 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 <= -1.55e-62) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7.5e-120) tmp = cos(B) * (x / -sin(B)); elseif (F <= 5.8e-6) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / 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, -1.55e-62], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.5e-120], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-6], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], 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.55 \cdot 10^{-62}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-120}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-6}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.55e-62Initial program 66.9%
Simplified79.1%
Taylor expanded in F around -inf 90.3%
if -1.55e-62 < F < 7.5000000000000004e-120Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 35.2%
Taylor expanded in x around inf 84.0%
*-commutative84.0%
associate-*r/84.1%
neg-mul-184.1%
distribute-rgt-neg-in84.1%
distribute-neg-frac284.1%
Simplified84.1%
if 7.5000000000000004e-120 < F < 5.8000000000000004e-6Initial program 99.7%
Taylor expanded in B around 0 98.6%
associate-*r/98.6%
neg-mul-198.6%
Simplified98.6%
Taylor expanded in B around 0 67.9%
if 5.8000000000000004e-6 < F Initial program 70.1%
Simplified83.7%
Taylor expanded in F around inf 98.1%
Final simplification89.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45e-62)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.05e-103)
(* (cos B) (/ x (- (sin B))))
(if (<= F 6.2e-6)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.3e+253)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45e-62) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.05e-103) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 6.2e-6) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.3e+253) {
tmp = (F * ((1.0 / F) / sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d-62)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.05d-103) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 6.2d-6) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.3d+253) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45e-62) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.05e-103) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 6.2e-6) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.3e+253) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45e-62: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.05e-103: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 6.2e-6: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.3e+253: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45e-62) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.05e-103) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 6.2e-6) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.3e+253) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / 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.45e-62) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.05e-103) tmp = cos(B) * (x / -sin(B)); elseif (F <= 6.2e-6) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.3e+253) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / 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.45e-62], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.05e-103], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-6], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e+253], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-62}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-103}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{+253}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.44999999999999993e-62Initial program 66.9%
Simplified79.1%
Taylor expanded in F around -inf 90.3%
if -1.44999999999999993e-62 < F < 1.05000000000000002e-103Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 35.2%
Taylor expanded in x around inf 84.0%
*-commutative84.0%
associate-*r/84.1%
neg-mul-184.1%
distribute-rgt-neg-in84.1%
distribute-neg-frac284.1%
Simplified84.1%
if 1.05000000000000002e-103 < F < 6.1999999999999999e-6Initial program 99.7%
Taylor expanded in B around 0 98.6%
associate-*r/98.6%
neg-mul-198.6%
Simplified98.6%
Taylor expanded in B around 0 67.9%
if 6.1999999999999999e-6 < F < 4.2999999999999999e253Initial program 71.7%
Simplified82.5%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 76.3%
if 4.2999999999999999e253 < F Initial program 64.4%
Simplified88.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 99.8%
Final simplification84.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.35e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.8e-104)
(* (cos B) (/ x (- (sin B))))
(if (<= F 5.2e-8)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 8.5e+252)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.35e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.8e-104) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 5.2e-8) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 8.5e+252) {
tmp = (F * ((1.0 / F) / sin(B))) - (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 <= (-3.35d+37)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.8d-104) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 5.2d-8) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 8.5d+252) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (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 <= -3.35e+37) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.8e-104) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 5.2e-8) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 8.5e+252) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.35e+37: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.8e-104: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 5.2e-8: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 8.5e+252: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.35e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.8e-104) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 5.2e-8) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 8.5e+252) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - 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 <= -3.35e+37) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.8e-104) tmp = cos(B) * (x / -sin(B)); elseif (F <= 5.2e-8) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 8.5e+252) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.35e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-104], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e-8], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e+252], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $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 -3.35 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-104}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-8}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+252}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.34999999999999984e37Initial program 58.6%
Simplified73.9%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 78.7%
if -3.34999999999999984e37 < F < 4.8000000000000001e-104Initial program 99.5%
Simplified99.8%
Taylor expanded in F around -inf 38.2%
Taylor expanded in x around inf 77.6%
*-commutative77.6%
associate-*r/77.7%
neg-mul-177.7%
distribute-rgt-neg-in77.7%
distribute-neg-frac277.7%
Simplified77.7%
if 4.8000000000000001e-104 < F < 5.2000000000000002e-8Initial program 99.7%
Taylor expanded in B around 0 98.6%
associate-*r/98.6%
neg-mul-198.6%
Simplified98.6%
Taylor expanded in B around 0 67.9%
if 5.2000000000000002e-8 < F < 8.50000000000000044e252Initial program 71.7%
Simplified82.5%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 76.3%
if 8.50000000000000044e252 < F Initial program 64.4%
Simplified88.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 99.8%
Final simplification78.4%
(FPCore (F B x)
:precision binary64
(if (<= F -8e+37)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3e-103)
(* x (/ (cos B) (- (sin B))))
(if (<= F 6.2e-6)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 3e+252)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8e+37) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3e-103) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 6.2e-6) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 3e+252) {
tmp = (F * ((1.0 / F) / sin(B))) - (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 <= (-8d+37)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3d-103) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 6.2d-6) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 3d+252) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (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 <= -8e+37) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3e-103) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 6.2e-6) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 3e+252) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8e+37: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3e-103: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 6.2e-6: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 3e+252: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3e-103) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 6.2e-6) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 3e+252) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - 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 <= -8e+37) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3e-103) tmp = x * (cos(B) / -sin(B)); elseif (F <= 6.2e-6) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 3e+252) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-103], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-6], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e+252], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $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 -8 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-103}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{+252}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7.99999999999999963e37Initial program 58.6%
Simplified73.9%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 78.7%
if -7.99999999999999963e37 < F < 3e-103Initial program 99.5%
Simplified99.8%
Taylor expanded in F around -inf 38.2%
Taylor expanded in x around inf 77.6%
mul-1-neg77.6%
associate-/l*77.7%
distribute-rgt-neg-in77.7%
distribute-neg-frac277.7%
Simplified77.7%
if 3e-103 < F < 6.1999999999999999e-6Initial program 99.7%
Taylor expanded in B around 0 98.6%
associate-*r/98.6%
neg-mul-198.6%
Simplified98.6%
Taylor expanded in B around 0 67.9%
if 6.1999999999999999e-6 < F < 2.99999999999999989e252Initial program 71.7%
Simplified82.5%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 76.3%
if 2.99999999999999989e252 < F Initial program 64.4%
Simplified88.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 99.8%
Final simplification78.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F 1.35e-272)
(- (/ -1.0 B) t_0)
(if (<= F 6.2e-6)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 1.08e+251)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 1.35e-272) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 6.2e-6) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.08e+251) {
tmp = (F * ((1.0 / F) / sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= 1.35d-272) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 6.2d-6) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 1.08d+251) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= 1.35e-272) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 6.2e-6) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.08e+251) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 1.35e-272: tmp = (-1.0 / B) - t_0 elif F <= 6.2e-6: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 1.08e+251: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= 1.35e-272) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 6.2e-6) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.08e+251) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / 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.35e-272) tmp = (-1.0 / B) - t_0; elseif (F <= 6.2e-6) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 1.08e+251) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / 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.35e-272], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.2e-6], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.08e+251], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 1.35 \cdot 10^{-272}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{+251}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < 1.34999999999999996e-272Initial program 79.4%
Simplified87.0%
Taylor expanded in F around -inf 71.7%
Taylor expanded in B around 0 65.2%
if 1.34999999999999996e-272 < F < 6.1999999999999999e-6Initial program 99.7%
Taylor expanded in B around 0 82.5%
associate-*r/82.5%
neg-mul-182.5%
Simplified82.5%
Taylor expanded in B around 0 70.0%
if 6.1999999999999999e-6 < F < 1.08e251Initial program 71.7%
Simplified82.5%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 76.3%
if 1.08e251 < F Initial program 64.4%
Simplified88.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 99.8%
Final simplification71.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F 6.8e-273)
(- (/ -1.0 B) t_0)
(if (<= F 6.2e-6)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 4.6e+253)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 6.8e-273) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 6.2e-6) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 4.6e+253) {
tmp = (F * ((1.0 / F) / sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= 6.8d-273) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 6.2d-6) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 4.6d+253) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= 6.8e-273) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 6.2e-6) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 4.6e+253) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 6.8e-273: tmp = (-1.0 / B) - t_0 elif F <= 6.2e-6: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 4.6e+253: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= 6.8e-273) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 6.2e-6) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 4.6e+253) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / 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-273) tmp = (-1.0 / B) - t_0; elseif (F <= 6.2e-6) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 4.6e+253) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / 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-273], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.2e-6], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.6e+253], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $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^{-273}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{+253}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < 6.79999999999999982e-273Initial program 79.4%
Simplified87.0%
Taylor expanded in F around -inf 71.7%
Taylor expanded in B around 0 65.2%
if 6.79999999999999982e-273 < F < 6.1999999999999999e-6Initial program 99.7%
Simplified99.7%
clear-num99.6%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 70.0%
if 6.1999999999999999e-6 < F < 4.6e253Initial program 71.7%
Simplified82.5%
Taylor expanded in F around inf 97.5%
Taylor expanded in B around 0 76.3%
if 4.6e253 < F Initial program 64.4%
Simplified88.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 99.8%
Final simplification71.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F 6.8e-272)
(- (/ -1.0 B) t_0)
(if (<= F 2.5e-70)
(/ x (- (sin B)))
(if (<= F 1.7e+247)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 6.8e-272) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.5e-70) {
tmp = x / -sin(B);
} else if (F <= 1.7e+247) {
tmp = (F * ((1.0 / F) / sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= 6.8d-272) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 2.5d-70) then
tmp = x / -sin(b)
else if (f <= 1.7d+247) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= 6.8e-272) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.5e-70) {
tmp = x / -Math.sin(B);
} else if (F <= 1.7e+247) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 6.8e-272: tmp = (-1.0 / B) - t_0 elif F <= 2.5e-70: tmp = x / -math.sin(B) elif F <= 1.7e+247: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= 6.8e-272) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 2.5e-70) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 1.7e+247) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / 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-272) tmp = (-1.0 / B) - t_0; elseif (F <= 2.5e-70) tmp = x / -sin(B); elseif (F <= 1.7e+247) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / 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-272], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.5e-70], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.7e+247], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $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^{-272}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{+247}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < 6.8000000000000006e-272Initial program 79.4%
Simplified87.0%
Taylor expanded in F around -inf 71.7%
Taylor expanded in B around 0 65.2%
if 6.8000000000000006e-272 < F < 2.4999999999999999e-70Initial program 99.7%
Simplified99.8%
Taylor expanded in F around -inf 23.8%
Taylor expanded in x around inf 77.4%
*-commutative77.4%
associate-*r/77.6%
neg-mul-177.6%
distribute-rgt-neg-in77.6%
distribute-neg-frac277.6%
Simplified77.6%
Taylor expanded in B around 0 57.2%
if 2.4999999999999999e-70 < F < 1.6999999999999999e247Initial program 76.8%
Simplified85.5%
Taylor expanded in F around inf 82.4%
Taylor expanded in B around 0 65.0%
if 1.6999999999999999e247 < F Initial program 64.4%
Simplified88.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 99.8%
Final simplification66.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F 3.4e-272)
(- (/ -1.0 B) t_0)
(if (<= F 2.5e-70)
(/ x (- (sin B)))
(if (<= F 5.8e+253)
(- (/ F (* F (sin B))) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 3.4e-272) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.5e-70) {
tmp = x / -sin(B);
} else if (F <= 5.8e+253) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= 3.4d-272) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 2.5d-70) then
tmp = x / -sin(b)
else if (f <= 5.8d+253) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= 3.4e-272) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.5e-70) {
tmp = x / -Math.sin(B);
} else if (F <= 5.8e+253) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 3.4e-272: tmp = (-1.0 / B) - t_0 elif F <= 2.5e-70: tmp = x / -math.sin(B) elif F <= 5.8e+253: tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= 3.4e-272) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 2.5e-70) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 5.8e+253) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= 3.4e-272) tmp = (-1.0 / B) - t_0; elseif (F <= 2.5e-70) tmp = x / -sin(B); elseif (F <= 5.8e+253) tmp = (F / (F * sin(B))) - (x / B); else tmp = (1.0 / 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, 3.4e-272], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.5e-70], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 5.8e+253], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 3.4 \cdot 10^{-272}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{+253}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < 3.4000000000000003e-272Initial program 79.4%
Simplified87.0%
Taylor expanded in F around -inf 71.7%
Taylor expanded in B around 0 65.2%
if 3.4000000000000003e-272 < F < 2.4999999999999999e-70Initial program 99.7%
Simplified99.8%
Taylor expanded in F around -inf 23.8%
Taylor expanded in x around inf 77.4%
*-commutative77.4%
associate-*r/77.6%
neg-mul-177.6%
distribute-rgt-neg-in77.6%
distribute-neg-frac277.6%
Simplified77.6%
Taylor expanded in B around 0 57.2%
if 2.4999999999999999e-70 < F < 5.79999999999999976e253Initial program 76.8%
Simplified85.5%
Taylor expanded in F around -inf 36.6%
Taylor expanded in B around 0 19.3%
add-sqr-sqrt7.1%
sqrt-unprod37.9%
frac-times37.9%
metadata-eval37.9%
metadata-eval37.9%
frac-times37.9%
sqrt-unprod35.8%
add-sqr-sqrt65.1%
metadata-eval65.1%
metadata-eval65.1%
pow-prod-up65.0%
pow165.0%
inv-pow65.0%
associate-*r/65.0%
associate-/l/65.0%
Applied egg-rr65.0%
associate-*r/65.0%
*-rgt-identity65.0%
*-commutative65.0%
Simplified65.0%
if 5.79999999999999976e253 < F Initial program 64.4%
Simplified88.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 99.8%
Final simplification66.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F 4.8e-273)
(- (/ -1.0 B) t_0)
(if (<= F 1.8e-70)
(/ x (- (sin B)))
(if (<= F 1.1e+249) (/ (- 1.0 x) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 4.8e-273) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.8e-70) {
tmp = x / -sin(B);
} else if (F <= 1.1e+249) {
tmp = (1.0 - x) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= 4.8d-273) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.8d-70) then
tmp = x / -sin(b)
else if (f <= 1.1d+249) then
tmp = (1.0d0 - x) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= 4.8e-273) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.8e-70) {
tmp = x / -Math.sin(B);
} else if (F <= 1.1e+249) {
tmp = (1.0 - x) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 4.8e-273: tmp = (-1.0 / B) - t_0 elif F <= 1.8e-70: tmp = x / -math.sin(B) elif F <= 1.1e+249: tmp = (1.0 - x) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= 4.8e-273) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.8e-70) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 1.1e+249) tmp = Float64(Float64(1.0 - x) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= 4.8e-273) tmp = (-1.0 / B) - t_0; elseif (F <= 1.8e-70) tmp = x / -sin(B); elseif (F <= 1.1e+249) tmp = (1.0 - x) / sin(B); else tmp = (1.0 / 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, 4.8e-273], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.8e-70], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.1e+249], N[(N[(1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 4.8 \cdot 10^{-273}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{+249}:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < 4.79999999999999963e-273Initial program 79.4%
Simplified87.0%
Taylor expanded in F around -inf 71.7%
Taylor expanded in B around 0 65.2%
if 4.79999999999999963e-273 < F < 1.8000000000000001e-70Initial program 99.7%
Simplified99.8%
Taylor expanded in F around -inf 23.8%
Taylor expanded in x around inf 77.4%
*-commutative77.4%
associate-*r/77.6%
neg-mul-177.6%
distribute-rgt-neg-in77.6%
distribute-neg-frac277.6%
Simplified77.6%
Taylor expanded in B around 0 57.2%
if 1.8000000000000001e-70 < F < 1.0999999999999999e249Initial program 76.8%
Simplified85.5%
Taylor expanded in F around inf 82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
associate-*r/82.4%
sub-div82.4%
Applied egg-rr82.4%
Taylor expanded in B around 0 64.7%
if 1.0999999999999999e249 < F Initial program 64.4%
Simplified88.2%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 99.8%
Final simplification66.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F 9.5e-273)
t_0
(if (<= F 2.5e-70)
(/ x (- (sin B)))
(if (<= F 8e+253) (/ (- 1.0 x) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= 9.5e-273) {
tmp = t_0;
} else if (F <= 2.5e-70) {
tmp = x / -sin(B);
} else if (F <= 8e+253) {
tmp = (1.0 - x) / sin(B);
} else {
tmp = 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 = ((-1.0d0) / b) - (x / tan(b))
if (f <= 9.5d-273) then
tmp = t_0
else if (f <= 2.5d-70) then
tmp = x / -sin(b)
else if (f <= 8d+253) then
tmp = (1.0d0 - x) / sin(b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= 9.5e-273) {
tmp = t_0;
} else if (F <= 2.5e-70) {
tmp = x / -Math.sin(B);
} else if (F <= 8e+253) {
tmp = (1.0 - x) / Math.sin(B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= 9.5e-273: tmp = t_0 elif F <= 2.5e-70: tmp = x / -math.sin(B) elif F <= 8e+253: tmp = (1.0 - x) / math.sin(B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= 9.5e-273) tmp = t_0; elseif (F <= 2.5e-70) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 8e+253) tmp = Float64(Float64(1.0 - x) / sin(B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= 9.5e-273) tmp = t_0; elseif (F <= 2.5e-70) tmp = x / -sin(B); elseif (F <= 8e+253) tmp = (1.0 - x) / sin(B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 9.5e-273], t$95$0, If[LessEqual[F, 2.5e-70], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 8e+253], N[(N[(1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 9.5 \cdot 10^{-273}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{+253}:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < 9.49999999999999925e-273 or 7.9999999999999995e253 < F Initial program 77.6%
Simplified87.1%
Taylor expanded in F around -inf 73.6%
Taylor expanded in B around 0 67.9%
if 9.49999999999999925e-273 < F < 2.4999999999999999e-70Initial program 99.7%
Simplified99.8%
Taylor expanded in F around -inf 23.8%
Taylor expanded in x around inf 77.4%
*-commutative77.4%
associate-*r/77.6%
neg-mul-177.6%
distribute-rgt-neg-in77.6%
distribute-neg-frac277.6%
Simplified77.6%
Taylor expanded in B around 0 57.2%
if 2.4999999999999999e-70 < F < 7.9999999999999995e253Initial program 76.8%
Simplified85.5%
Taylor expanded in F around inf 82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
associate-*r/82.4%
sub-div82.4%
Applied egg-rr82.4%
Taylor expanded in B around 0 64.7%
Final simplification65.5%
(FPCore (F B x)
:precision binary64
(if (<= F -3.8e-48)
(/ (- -1.0 x) B)
(if (<= F 1.15e+17)
(/ x (- B))
(if (<= F 4.2e+196) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e+17) {
tmp = x / -B;
} else if (F <= 4.2e+196) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.8d-48)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.15d+17) then
tmp = x / -b
else if (f <= 4.2d+196) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e+17) {
tmp = x / -B;
} else if (F <= 4.2e+196) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-48: tmp = (-1.0 - x) / B elif F <= 1.15e+17: tmp = x / -B elif F <= 4.2e+196: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-48) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.15e+17) tmp = Float64(x / Float64(-B)); elseif (F <= 4.2e+196) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.8e-48) tmp = (-1.0 - x) / B; elseif (F <= 1.15e+17) tmp = x / -B; elseif (F <= 4.2e+196) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-48], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.15e+17], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 4.2e+196], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{+196}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.80000000000000002e-48Initial program 65.1%
Simplified78.0%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 51.3%
mul-1-neg51.3%
distribute-neg-frac251.3%
Simplified51.3%
if -3.80000000000000002e-48 < F < 1.15e17Initial program 99.6%
Simplified99.7%
Taylor expanded in F around inf 27.6%
Taylor expanded in B around 0 19.7%
Taylor expanded in x around inf 39.7%
associate-*r/39.7%
neg-mul-139.7%
Simplified39.7%
if 1.15e17 < F < 4.20000000000000029e196Initial program 78.8%
Simplified91.7%
Taylor expanded in F around inf 99.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
associate-*r/99.7%
sub-div99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 66.2%
if 4.20000000000000029e196 < F Initial program 52.8%
Simplified70.8%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 50.7%
Final simplification48.4%
(FPCore (F B x) :precision binary64 (if (<= F -1.5e-42) (/ (- -1.0 x) B) (if (<= F 1.05e-83) (/ x (- (sin B))) (/ (- 1.0 x) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-42) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.05e-83) {
tmp = x / -sin(B);
} else {
tmp = (1.0 - x) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d-42)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.05d-83) then
tmp = x / -sin(b)
else
tmp = (1.0d0 - x) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-42) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.05e-83) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 - x) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-42: tmp = (-1.0 - x) / B elif F <= 1.05e-83: tmp = x / -math.sin(B) else: tmp = (1.0 - x) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-42) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.05e-83) tmp = Float64(x / Float64(-sin(B))); else tmp = Float64(Float64(1.0 - x) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-42) tmp = (-1.0 - x) / B; elseif (F <= 1.05e-83) tmp = x / -sin(B); else tmp = (1.0 - x) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-42], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.05e-83], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-83}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\end{array}
\end{array}
if F < -1.50000000000000014e-42Initial program 64.7%
Simplified77.7%
Taylor expanded in F around -inf 93.4%
Taylor expanded in B around 0 52.0%
mul-1-neg52.0%
distribute-neg-frac252.0%
Simplified52.0%
if -1.50000000000000014e-42 < F < 1.0499999999999999e-83Initial program 99.6%
Simplified99.8%
Taylor expanded in F around -inf 34.9%
Taylor expanded in x around inf 80.2%
*-commutative80.2%
associate-*r/80.3%
neg-mul-180.3%
distribute-rgt-neg-in80.3%
distribute-neg-frac280.3%
Simplified80.3%
Taylor expanded in B around 0 46.7%
if 1.0499999999999999e-83 < F Initial program 74.5%
Simplified86.0%
Taylor expanded in F around inf 85.6%
associate-*l/85.6%
*-commutative85.6%
Simplified85.6%
associate-*r/85.6%
sub-div85.6%
Applied egg-rr85.6%
Taylor expanded in B around 0 61.9%
Final simplification53.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.9e-50) (/ (- -1.0 x) B) (if (<= F 8.5e-101) (/ x (- B)) (/ (- 1.0 x) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-50) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.5e-101) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.9d-50)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.5d-101) then
tmp = x / -b
else
tmp = (1.0d0 - x) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-50) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.5e-101) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.9e-50: tmp = (-1.0 - x) / B elif F <= 8.5e-101: tmp = x / -B else: tmp = (1.0 - x) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.9e-50) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.5e-101) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.9e-50) tmp = (-1.0 - x) / B; elseif (F <= 8.5e-101) tmp = x / -B; else tmp = (1.0 - x) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.9e-50], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.5e-101], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.9 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{\sin B}\\
\end{array}
\end{array}
if F < -2.90000000000000008e-50Initial program 65.1%
Simplified78.0%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 51.3%
mul-1-neg51.3%
distribute-neg-frac251.3%
Simplified51.3%
if -2.90000000000000008e-50 < F < 8.49999999999999941e-101Initial program 99.6%
Simplified99.8%
Taylor expanded in F around inf 24.2%
Taylor expanded in B around 0 18.3%
Taylor expanded in x around inf 45.9%
associate-*r/45.9%
neg-mul-145.9%
Simplified45.9%
if 8.49999999999999941e-101 < F Initial program 75.0%
Simplified86.3%
Taylor expanded in F around inf 83.9%
associate-*l/83.9%
*-commutative83.9%
Simplified83.9%
associate-*r/83.9%
sub-div83.9%
Applied egg-rr83.9%
Taylor expanded in B around 0 60.7%
Final simplification53.0%
(FPCore (F B x) :precision binary64 (if (<= F -5e-44) (/ (- -1.0 x) B) (if (<= F 2.3e-101) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.3e-101) {
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 <= (-5d-44)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.3d-101) 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 <= -5e-44) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.3e-101) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e-44: tmp = (-1.0 - x) / B elif F <= 2.3e-101: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e-44) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.3e-101) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e-44) tmp = (-1.0 - x) / B; elseif (F <= 2.3e-101) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e-44], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.3e-101], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-101}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.00000000000000039e-44Initial program 65.1%
Simplified78.0%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 51.3%
mul-1-neg51.3%
distribute-neg-frac251.3%
Simplified51.3%
if -5.00000000000000039e-44 < F < 2.2999999999999999e-101Initial program 99.6%
Simplified99.8%
Taylor expanded in F around inf 24.2%
Taylor expanded in B around 0 18.3%
Taylor expanded in x around inf 45.9%
associate-*r/45.9%
neg-mul-145.9%
Simplified45.9%
if 2.2999999999999999e-101 < F Initial program 75.0%
Simplified86.3%
Taylor expanded in F around inf 83.9%
Taylor expanded in B around 0 34.5%
Final simplification43.2%
(FPCore (F B x) :precision binary64 (if (<= F 3e-100) (/ x (- B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 3e-100) {
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 <= 3d-100) 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 <= 3e-100) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 3e-100: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 3e-100) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 3e-100) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 3e-100], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3 \cdot 10^{-100}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 3.0000000000000001e-100Initial program 83.4%
Simplified89.6%
Taylor expanded in F around inf 35.7%
Taylor expanded in B around 0 23.6%
Taylor expanded in x around inf 38.4%
associate-*r/38.4%
neg-mul-138.4%
Simplified38.4%
if 3.0000000000000001e-100 < F Initial program 75.0%
Simplified86.3%
Taylor expanded in F around inf 83.9%
Taylor expanded in B around 0 34.5%
Final simplification37.0%
(FPCore (F B x) :precision binary64 (/ x (- B)))
double code(double F, double B, double x) {
return x / -B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / -b
end function
public static double code(double F, double B, double x) {
return x / -B;
}
def code(F, B, x): return x / -B
function code(F, B, x) return Float64(x / Float64(-B)) end
function tmp = code(F, B, x) tmp = x / -B; end
code[F_, B_, x_] := N[(x / (-B)), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-B}
\end{array}
Initial program 80.3%
Simplified88.3%
Taylor expanded in F around inf 53.8%
Taylor expanded in B around 0 27.7%
Taylor expanded in x around inf 32.7%
associate-*r/32.7%
neg-mul-132.7%
Simplified32.7%
Final simplification32.7%
(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 80.3%
Simplified88.3%
Taylor expanded in F around inf 53.8%
Taylor expanded in B around 0 27.7%
Taylor expanded in x around 0 7.1%
herbie shell --seed 2024132
(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))))))