
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+15)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 0.023)
(- (* 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 <= -1e+15) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 0.023) {
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 <= -1e+15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.023) 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, -1e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.023], 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 -1 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.023:\\
\;\;\;\;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 < -1e15Initial program 59.4%
Taylor expanded in F around -inf 99.8%
if -1e15 < F < 0.023Initial program 99.4%
Simplified99.8%
if 0.023 < F Initial program 56.7%
Taylor expanded in F around inf 72.6%
+-commutative72.6%
*-un-lft-identity72.6%
fma-define72.6%
associate-*l/99.7%
pow199.7%
inv-pow99.7%
pow-prod-up99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.8%
Applied egg-rr99.8%
fma-undefine99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(if (<= F -350000000.0)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 0.023)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -350000000.0) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 0.023) {
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)) - (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 <= (-350000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 0.023d0) 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)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -350000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.023) {
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)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -350000000.0: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 0.023: 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)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -350000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.023) 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)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -350000000.0) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 0.023) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -350000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.023], 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] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -350000000:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.023:\\
\;\;\;\;\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} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.5e8Initial program 59.4%
Taylor expanded in F around -inf 99.8%
if -3.5e8 < F < 0.023Initial program 99.4%
div-inv99.7%
clear-num99.5%
Applied egg-rr99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 0.023 < F Initial program 56.7%
Taylor expanded in F around inf 72.6%
+-commutative72.6%
*-un-lft-identity72.6%
fma-define72.6%
associate-*l/99.7%
pow199.7%
inv-pow99.7%
pow-prod-up99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.8%
Applied egg-rr99.8%
fma-undefine99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -125000000.0)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 0.023)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -125000000.0) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 0.023) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (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 <= (-125000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 0.023d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -125000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.023) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -125000000.0: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 0.023: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -125000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.023) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -125000000.0) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 0.023) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -125000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.023], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -125000000:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.023:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.25e8Initial program 59.4%
Taylor expanded in F around -inf 99.8%
if -1.25e8 < F < 0.023Initial program 99.4%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.4%
if 0.023 < F Initial program 56.7%
Taylor expanded in F around inf 72.6%
+-commutative72.6%
*-un-lft-identity72.6%
fma-define72.6%
associate-*l/99.7%
pow199.7%
inv-pow99.7%
pow-prod-up99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.8%
Applied egg-rr99.8%
fma-undefine99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 0.023)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 0.023) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 0.023d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.023) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 0.023: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.023) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 0.023) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.023], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.023:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 59.8%
Taylor expanded in F around -inf 98.9%
if -1.44999999999999996 < F < 0.023Initial program 99.4%
Simplified99.8%
Taylor expanded in F around 0 99.0%
if 0.023 < F Initial program 56.7%
Taylor expanded in F around inf 72.6%
+-commutative72.6%
*-un-lft-identity72.6%
fma-define72.6%
associate-*l/99.7%
pow199.7%
inv-pow99.7%
pow-prod-up99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.8%
Applied egg-rr99.8%
fma-undefine99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 0.023)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 0.023) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 0.023d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.023) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 0.023: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.023) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 0.023) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.023], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.023:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 59.8%
Taylor expanded in F around -inf 98.9%
if -1.4199999999999999 < F < 0.023Initial program 99.4%
Simplified99.8%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 98.8%
if 0.023 < F Initial program 56.7%
Taylor expanded in F around inf 72.6%
+-commutative72.6%
*-un-lft-identity72.6%
fma-define72.6%
associate-*l/99.7%
pow199.7%
inv-pow99.7%
pow-prod-up99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.8%
Applied egg-rr99.8%
fma-undefine99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(if (<= F -12.5)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 0.023)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -12.5) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 0.023) {
tmp = (-1.0 / (tan(B) / x)) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(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 <= (-12.5d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 0.023d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -12.5) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.023) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -12.5: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 0.023: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -12.5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.023) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -12.5) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 0.023) tmp = (-1.0 / (tan(B) / x)) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -12.5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.023], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -12.5:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.023:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -12.5Initial program 59.8%
Taylor expanded in F around -inf 98.9%
if -12.5 < F < 0.023Initial program 99.4%
div-inv99.7%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 88.0%
if 0.023 < F Initial program 56.7%
Taylor expanded in F around inf 72.6%
+-commutative72.6%
*-un-lft-identity72.6%
fma-define72.6%
associate-*l/99.7%
pow199.7%
inv-pow99.7%
pow-prod-up99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.8%
Applied egg-rr99.8%
fma-undefine99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))))
(if (<= F -0.032)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 1.1e-206)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 2.5e-36)
(- (* F (* t_0 (sqrt 0.5))) (/ x B))
(- t_0 (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 1.1e-206) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 2.5e-36) {
tmp = (F * (t_0 * sqrt(0.5))) - (x / B);
} else {
tmp = t_0 - (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) :: t_0
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
if (f <= (-0.032d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 1.1d-206) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 2.5d-36) then
tmp = (f * (t_0 * sqrt(0.5d0))) - (x / b)
else
tmp = t_0 - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.1e-206) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 2.5e-36) {
tmp = (F * (t_0 * Math.sqrt(0.5))) - (x / B);
} else {
tmp = t_0 - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) tmp = 0 if F <= -0.032: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 1.1e-206: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 2.5e-36: tmp = (F * (t_0 * math.sqrt(0.5))) - (x / B) else: tmp = t_0 - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -0.032) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.1e-206) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 2.5e-36) tmp = Float64(Float64(F * Float64(t_0 * sqrt(0.5))) - Float64(x / B)); else tmp = Float64(t_0 - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); tmp = 0.0; if (F <= -0.032) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 1.1e-206) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 2.5e-36) tmp = (F * (t_0 * sqrt(0.5))) - (x / B); else tmp = t_0 - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.032], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-206], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 2.5e-36], N[(N[(F * N[(t$95$0 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -0.032:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-206}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-36}:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{0.5}\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.032000000000000001Initial program 59.8%
Taylor expanded in F around -inf 98.9%
if -0.032000000000000001 < F < 1.0999999999999999e-206Initial program 99.4%
Taylor expanded in F around -inf 45.0%
Taylor expanded in x around inf 85.9%
if 1.0999999999999999e-206 < F < 2.50000000000000002e-36Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 74.6%
Taylor expanded in x around 0 74.6%
if 2.50000000000000002e-36 < F Initial program 60.4%
Taylor expanded in F around inf 72.4%
+-commutative72.4%
*-un-lft-identity72.4%
fma-define72.4%
associate-*l/97.2%
pow197.2%
inv-pow97.2%
pow-prod-up97.2%
metadata-eval97.2%
metadata-eval97.2%
div-inv97.3%
Applied egg-rr97.3%
fma-undefine97.3%
*-lft-identity97.3%
unsub-neg97.3%
Simplified97.3%
Final simplification91.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.335)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 0.0135)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F 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 <= -0.335) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 0.0135) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.335d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 0.0135d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.335) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.0135) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.335: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 0.0135: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.335) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.0135) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.335) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 0.0135) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.335], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0135], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.335:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.0135:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.33500000000000002Initial program 59.8%
Taylor expanded in F around -inf 98.9%
if -0.33500000000000002 < F < 0.0134999999999999998Initial program 99.4%
Simplified99.8%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 87.8%
if 0.0134999999999999998 < F Initial program 56.7%
Taylor expanded in F around inf 72.6%
+-commutative72.6%
*-un-lft-identity72.6%
fma-define72.6%
associate-*l/99.7%
pow199.7%
inv-pow99.7%
pow-prod-up99.7%
metadata-eval99.7%
metadata-eval99.7%
div-inv99.8%
Applied egg-rr99.8%
fma-undefine99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification94.3%
(FPCore (F B x)
:precision binary64
(if (<= F -4.2e+283)
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -3.6)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.8e-44)
(- (/ (* x (cos B)) (sin B)))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e+283) {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -3.6) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.8e-44) {
tmp = -((x * cos(B)) / sin(B));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.2d+283)) then
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-3.6d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.8d-44) then
tmp = -((x * cos(b)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e+283) {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -3.6) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.8e-44) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e+283: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -3.6: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.8e-44: tmp = -((x * math.cos(B)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e+283) tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -3.6) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.8e-44) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.2e+283) tmp = (1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -3.6) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.8e-44) tmp = -((x * cos(B)) / sin(B)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e+283], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e-44], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{+283}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -3.6:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-44}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4.20000000000000027e283Initial program 75.1%
Taylor expanded in F around inf 87.5%
Taylor expanded in B around 0 87.8%
if -4.20000000000000027e283 < F < -3.60000000000000009Initial program 58.2%
Taylor expanded in F around -inf 98.8%
Taylor expanded in B around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
Simplified80.3%
if -3.60000000000000009 < F < 3.8000000000000001e-44Initial program 99.4%
Taylor expanded in F around -inf 40.1%
Taylor expanded in x around inf 75.4%
if 3.8000000000000001e-44 < F Initial program 61.0%
Taylor expanded in F around inf 71.5%
+-commutative71.5%
*-un-lft-identity71.5%
fma-define71.5%
associate-*l/95.9%
pow195.9%
inv-pow95.9%
pow-prod-up95.9%
metadata-eval95.9%
metadata-eval95.9%
div-inv96.0%
Applied egg-rr96.0%
fma-undefine96.0%
*-lft-identity96.0%
unsub-neg96.0%
Simplified96.0%
Final simplification82.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -4.2e+283)
t_0
(if (<= F -1.35)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.6e-46) (- (/ (* x (cos B)) (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -1.35) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.6e-46) {
tmp = -((x * cos(B)) / 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 * (1.0d0 / tan(b)))
if (f <= (-4.2d+283)) then
tmp = t_0
else if (f <= (-1.35d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.6d-46) then
tmp = -((x * cos(b)) / 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 * (1.0 / Math.tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -1.35) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.6e-46) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -4.2e+283: tmp = t_0 elif F <= -1.35: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.6e-46: tmp = -((x * math.cos(B)) / math.sin(B)) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -4.2e+283) tmp = t_0; elseif (F <= -1.35) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.6e-46) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -4.2e+283) tmp = t_0; elseif (F <= -1.35) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.6e-46) tmp = -((x * cos(B)) / 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[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e+283], t$95$0, If[LessEqual[F, -1.35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-46], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+283}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.35:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-46}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -4.20000000000000027e283 or 1.6e-46 < F Initial program 62.4%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 76.9%
if -4.20000000000000027e283 < F < -1.3500000000000001Initial program 58.2%
Taylor expanded in F around -inf 98.8%
Taylor expanded in B around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
Simplified80.3%
if -1.3500000000000001 < F < 1.6e-46Initial program 99.4%
Taylor expanded in F around -inf 40.1%
Taylor expanded in x around inf 75.4%
Final simplification77.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -4.2e+283)
t_0
(if (<= F -12.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2e-47) (* (- x) (/ (cos B) (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -12.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2e-47) {
tmp = -x * (cos(B) / 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 * (1.0d0 / tan(b)))
if (f <= (-4.2d+283)) then
tmp = t_0
else if (f <= (-12.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2d-47) then
tmp = -x * (cos(b) / 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 * (1.0 / Math.tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -12.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2e-47) {
tmp = -x * (Math.cos(B) / Math.sin(B));
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -4.2e+283: tmp = t_0 elif F <= -12.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2e-47: tmp = -x * (math.cos(B) / math.sin(B)) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -4.2e+283) tmp = t_0; elseif (F <= -12.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2e-47) tmp = Float64(Float64(-x) * Float64(cos(B) / sin(B))); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -4.2e+283) tmp = t_0; elseif (F <= -12.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2e-47) tmp = -x * (cos(B) / 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[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e+283], t$95$0, If[LessEqual[F, -12.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-47], N[((-x) * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+283}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -12:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-47}:\\
\;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -4.20000000000000027e283 or 1.9999999999999999e-47 < F Initial program 62.4%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 76.9%
if -4.20000000000000027e283 < F < -12Initial program 58.2%
Taylor expanded in F around -inf 98.8%
Taylor expanded in B around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
Simplified80.3%
if -12 < F < 1.9999999999999999e-47Initial program 99.4%
Taylor expanded in F around -inf 40.1%
Taylor expanded in x around inf 75.4%
mul-1-neg75.4%
associate-*r/75.2%
distribute-rgt-neg-in75.2%
distribute-neg-frac275.2%
Simplified75.2%
Final simplification77.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.032)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 1.55e-47)
(- (/ (* x (cos B)) (sin B)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 1.55e-47) {
tmp = -((x * cos(B)) / sin(B));
} else {
tmp = (1.0 / sin(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 <= (-0.032d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 1.55d-47) then
tmp = -((x * cos(b)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.55e-47) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.032: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 1.55e-47: tmp = -((x * math.cos(B)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.032) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.55e-47) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.032) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 1.55e-47) tmp = -((x * cos(B)) / sin(B)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.032], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.55e-47], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.032:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-47}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.032000000000000001Initial program 59.8%
Taylor expanded in F around -inf 98.9%
if -0.032000000000000001 < F < 1.5499999999999999e-47Initial program 99.4%
Taylor expanded in F around -inf 40.1%
Taylor expanded in x around inf 75.4%
if 1.5499999999999999e-47 < F Initial program 61.0%
Taylor expanded in F around inf 71.5%
+-commutative71.5%
*-un-lft-identity71.5%
fma-define71.5%
associate-*l/95.9%
pow195.9%
inv-pow95.9%
pow-prod-up95.9%
metadata-eval95.9%
metadata-eval95.9%
div-inv96.0%
Applied egg-rr96.0%
fma-undefine96.0%
*-lft-identity96.0%
unsub-neg96.0%
Simplified96.0%
Final simplification88.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -4.2e+283)
t_0
(if (<= F -0.000215)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -7.2e-131) (not (<= F 1.15e-43)))
t_0
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -0.000215) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -7.2e-131) || !(F <= 1.15e-43)) {
tmp = t_0;
} else {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
if (f <= (-4.2d+283)) then
tmp = t_0
else if (f <= (-0.000215d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-7.2d-131)) .or. (.not. (f <= 1.15d-43))) then
tmp = t_0
else
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -0.000215) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -7.2e-131) || !(F <= 1.15e-43)) {
tmp = t_0;
} else {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -4.2e+283: tmp = t_0 elif F <= -0.000215: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -7.2e-131) or not (F <= 1.15e-43): tmp = t_0 else: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -4.2e+283) tmp = t_0; elseif (F <= -0.000215) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -7.2e-131) || !(F <= 1.15e-43)) tmp = t_0; else tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -4.2e+283) tmp = t_0; elseif (F <= -0.000215) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -7.2e-131) || ~((F <= 1.15e-43))) tmp = t_0; else tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e+283], t$95$0, If[LessEqual[F, -0.000215], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -7.2e-131], N[Not[LessEqual[F, 1.15e-43]], $MachinePrecision]], t$95$0, N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+283}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -0.000215:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-131} \lor \neg \left(F \leq 1.15 \cdot 10^{-43}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.20000000000000027e283 or -2.14999999999999995e-4 < F < -7.1999999999999999e-131 or 1.1499999999999999e-43 < F Initial program 70.7%
Taylor expanded in F around inf 70.6%
Taylor expanded in B around 0 76.3%
if -4.20000000000000027e283 < F < -2.14999999999999995e-4Initial program 59.3%
Taylor expanded in F around -inf 96.7%
Taylor expanded in B around 0 78.7%
associate-*r/78.7%
neg-mul-178.7%
Simplified78.7%
if -7.1999999999999999e-131 < F < 1.1499999999999999e-43Initial program 99.5%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 73.8%
Taylor expanded in B around 0 65.9%
Final simplification73.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -4.2e+283)
t_0
(if (<= F -7.5e-8)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -1.05e-130) (not (<= F 1.1e-43)))
t_0
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -7.5e-8) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -1.05e-130) || !(F <= 1.1e-43)) {
tmp = t_0;
} else {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
if (f <= (-4.2d+283)) then
tmp = t_0
else if (f <= (-7.5d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-1.05d-130)) .or. (.not. (f <= 1.1d-43))) then
tmp = t_0
else
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -7.5e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -1.05e-130) || !(F <= 1.1e-43)) {
tmp = t_0;
} else {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -4.2e+283: tmp = t_0 elif F <= -7.5e-8: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -1.05e-130) or not (F <= 1.1e-43): tmp = t_0 else: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -4.2e+283) tmp = t_0; elseif (F <= -7.5e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -1.05e-130) || !(F <= 1.1e-43)) tmp = t_0; else tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -4.2e+283) tmp = t_0; elseif (F <= -7.5e-8) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -1.05e-130) || ~((F <= 1.1e-43))) tmp = t_0; else tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e+283], t$95$0, If[LessEqual[F, -7.5e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -1.05e-130], N[Not[LessEqual[F, 1.1e-43]], $MachinePrecision]], t$95$0, N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+283}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-130} \lor \neg \left(F \leq 1.1 \cdot 10^{-43}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\end{array}
\end{array}
if F < -4.20000000000000027e283 or -7.4999999999999997e-8 < F < -1.05000000000000001e-130 or 1.09999999999999999e-43 < F Initial program 70.7%
Taylor expanded in F around inf 70.6%
Taylor expanded in B around 0 76.3%
if -4.20000000000000027e283 < F < -7.4999999999999997e-8Initial program 59.3%
Taylor expanded in F around -inf 96.7%
Taylor expanded in B around 0 78.7%
associate-*r/78.7%
neg-mul-178.7%
Simplified78.7%
if -1.05000000000000001e-130 < F < 1.09999999999999999e-43Initial program 99.5%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 65.9%
Final simplification73.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -4.2e+283)
t_0
(if (<= F -0.00016)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -5.5e-188) (not (<= F 1.2e-220)))
t_0
(/ (- x) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -0.00016) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -5.5e-188) || !(F <= 1.2e-220)) {
tmp = t_0;
} else {
tmp = -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) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
if (f <= (-4.2d+283)) then
tmp = t_0
else if (f <= (-0.00016d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-5.5d-188)) .or. (.not. (f <= 1.2d-220))) then
tmp = t_0
else
tmp = -x / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -4.2e+283) {
tmp = t_0;
} else if (F <= -0.00016) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -5.5e-188) || !(F <= 1.2e-220)) {
tmp = t_0;
} else {
tmp = -x / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -4.2e+283: tmp = t_0 elif F <= -0.00016: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -5.5e-188) or not (F <= 1.2e-220): tmp = t_0 else: tmp = -x / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -4.2e+283) tmp = t_0; elseif (F <= -0.00016) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -5.5e-188) || !(F <= 1.2e-220)) tmp = t_0; else tmp = Float64(Float64(-x) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -4.2e+283) tmp = t_0; elseif (F <= -0.00016) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -5.5e-188) || ~((F <= 1.2e-220))) tmp = t_0; else tmp = -x / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e+283], t$95$0, If[LessEqual[F, -0.00016], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -5.5e-188], N[Not[LessEqual[F, 1.2e-220]], $MachinePrecision]], t$95$0, N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+283}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -0.00016:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-188} \lor \neg \left(F \leq 1.2 \cdot 10^{-220}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\end{array}
\end{array}
if F < -4.20000000000000027e283 or -1.60000000000000013e-4 < F < -5.5000000000000002e-188 or 1.2000000000000001e-220 < F Initial program 79.2%
Taylor expanded in F around inf 60.4%
Taylor expanded in B around 0 68.6%
if -4.20000000000000027e283 < F < -1.60000000000000013e-4Initial program 59.3%
Taylor expanded in F around -inf 96.7%
Taylor expanded in B around 0 78.7%
associate-*r/78.7%
neg-mul-178.7%
Simplified78.7%
if -5.5000000000000002e-188 < F < 1.2000000000000001e-220Initial program 99.5%
Taylor expanded in F around -inf 32.9%
Taylor expanded in x around inf 92.6%
Taylor expanded in B around 0 70.4%
Final simplification71.8%
(FPCore (F B x) :precision binary64 (if (<= F -0.032) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 5.6e-30) (/ (- x) (sin B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.6e-30) {
tmp = -x / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.032d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.6d-30) then
tmp = -x / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.6e-30) {
tmp = -x / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.032: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.6e-30: tmp = -x / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.032) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.6e-30) tmp = Float64(Float64(-x) / 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 <= -0.032) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.6e-30) tmp = -x / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.032], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-30], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.032:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-30}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.032000000000000001Initial program 59.8%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 75.0%
associate-*r/75.0%
neg-mul-175.0%
Simplified75.0%
if -0.032000000000000001 < F < 5.59999999999999977e-30Initial program 99.4%
Taylor expanded in F around -inf 40.3%
Taylor expanded in x around inf 74.9%
Taylor expanded in B around 0 49.7%
if 5.59999999999999977e-30 < F Initial program 59.8%
Taylor expanded in F around inf 72.0%
Taylor expanded in B around 0 55.2%
Final simplification59.2%
(FPCore (F B x) :precision binary64 (if (<= F -0.145) (/ (- -1.0 x) B) (if (<= F 9.5e-31) (/ (- x) (sin B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.145) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.5e-31) {
tmp = -x / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.145d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 9.5d-31) then
tmp = -x / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.145) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.5e-31) {
tmp = -x / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.145: tmp = (-1.0 - x) / B elif F <= 9.5e-31: tmp = -x / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.145) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9.5e-31) tmp = Float64(Float64(-x) / 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 <= -0.145) tmp = (-1.0 - x) / B; elseif (F <= 9.5e-31) tmp = -x / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.145], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.5e-31], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.145:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-31}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.14499999999999999Initial program 59.8%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 50.0%
mul-1-neg50.0%
distribute-neg-frac250.0%
Simplified50.0%
if -0.14499999999999999 < F < 9.5000000000000008e-31Initial program 99.4%
Taylor expanded in F around -inf 40.3%
Taylor expanded in x around inf 74.9%
Taylor expanded in B around 0 49.7%
if 9.5000000000000008e-31 < F Initial program 59.8%
Taylor expanded in F around inf 72.0%
Taylor expanded in B around 0 55.2%
Final simplification51.3%
(FPCore (F B x) :precision binary64 (if (<= F -3.1e-97) (/ (- -1.0 x) B) (if (<= F 3.3e-49) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-97) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.3e-49) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d-97)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.3d-49) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-97) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.3e-49) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e-97: tmp = (-1.0 - x) / B elif F <= 3.3e-49: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e-97) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.3e-49) 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 <= -3.1e-97) tmp = (-1.0 - x) / B; elseif (F <= 3.3e-49) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e-97], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.3e-49], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-97}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-49}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.10000000000000002e-97Initial program 67.3%
Taylor expanded in F around -inf 89.9%
Taylor expanded in B around 0 48.2%
mul-1-neg48.2%
distribute-neg-frac248.2%
Simplified48.2%
if -3.10000000000000002e-97 < F < 3.3e-49Initial program 99.5%
Taylor expanded in F around inf 38.0%
Taylor expanded in B around 0 25.4%
Taylor expanded in x around inf 50.0%
associate-*r/50.0%
neg-mul-150.0%
Simplified50.0%
if 3.3e-49 < F Initial program 61.0%
Taylor expanded in F around inf 71.5%
Taylor expanded in B around 0 53.9%
Final simplification50.4%
(FPCore (F B x) :precision binary64 (if (<= F 1.8e-48) (/ x (- B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.8e-48) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.8d-48) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.8e-48) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.8e-48: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.8e-48) 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 <= 1.8e-48) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.8e-48], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.8000000000000001e-48Initial program 82.1%
Taylor expanded in F around inf 38.0%
Taylor expanded in B around 0 24.2%
Taylor expanded in x around inf 35.8%
associate-*r/35.8%
neg-mul-135.8%
Simplified35.8%
if 1.8000000000000001e-48 < F Initial program 61.0%
Taylor expanded in F around inf 71.5%
Taylor expanded in B around 0 53.9%
Final simplification40.8%
(FPCore (F B x) :precision binary64 (if (<= F 1.25e+32) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.25e+32) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.25d+32) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.25e+32) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.25e+32: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.25e+32) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.25e+32) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.25e+32], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.25 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1.2499999999999999e32Initial program 82.7%
Taylor expanded in F around inf 40.1%
Taylor expanded in B around 0 25.4%
Taylor expanded in x around inf 35.6%
associate-*r/35.6%
neg-mul-135.6%
Simplified35.6%
if 1.2499999999999999e32 < F Initial program 54.0%
Taylor expanded in F around inf 71.5%
Taylor expanded in B around 0 56.5%
Taylor expanded in x around 0 38.4%
Final simplification36.2%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 76.2%
Taylor expanded in F around inf 47.2%
Taylor expanded in B around 0 32.4%
Taylor expanded in x around 0 11.1%
herbie shell --seed 2024128
(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))))))