
(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 25 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 (/ -1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -100000000.0)
(- t_0 t_1)
(if (<= F 14600000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_1)
(+ (/ 1.0 (sin B)) (* x (* t_0 (cos B))))))))
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 <= -100000000.0) {
tmp = t_0 - t_1;
} else if (F <= 14600000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_1;
} else {
tmp = (1.0 / sin(B)) + (x * (t_0 * cos(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-1.0d0) / sin(b)
t_1 = x / tan(b)
if (f <= (-100000000.0d0)) then
tmp = t_0 - t_1
else if (f <= 14600000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_1
else
tmp = (1.0d0 / sin(b)) + (x * (t_0 * cos(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 t_1 = x / Math.tan(B);
double tmp;
if (F <= -100000000.0) {
tmp = t_0 - t_1;
} else if (F <= 14600000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_1;
} else {
tmp = (1.0 / Math.sin(B)) + (x * (t_0 * Math.cos(B)));
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -100000000.0: tmp = t_0 - t_1 elif F <= 14600000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_1 else: tmp = (1.0 / math.sin(B)) + (x * (t_0 * math.cos(B))) 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 <= -100000000.0) tmp = Float64(t_0 - t_1); elseif (F <= 14600000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_1); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(t_0 * cos(B)))); 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 <= -100000000.0) tmp = t_0 - t_1; elseif (F <= 14600000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_1; else tmp = (1.0 / sin(B)) + (x * (t_0 * cos(B))); 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, -100000000.0], N[(t$95$0 - t$95$1), $MachinePrecision], If[LessEqual[F, 14600000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(t$95$0 * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -100000000:\\
\;\;\;\;t_0 - t_1\\
\mathbf{elif}\;F \leq 14600000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\
\end{array}
\end{array}
if F < -1e8Initial program 68.3%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
div-inv99.9%
unsub-neg99.9%
Applied egg-rr99.9%
if -1e8 < F < 1.46e10Initial program 99.4%
div-inv99.6%
expm1-log1p-u74.5%
expm1-udef55.3%
Applied egg-rr55.3%
expm1-def74.5%
expm1-log1p99.6%
Simplified99.6%
if 1.46e10 < F Initial program 51.6%
Taylor expanded in F around inf 99.8%
tan-quot99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.42)
(+ (* x (/ -1.0 (tan B))) (/ (+ -1.0 (/ 1.0 (pow F 2.0))) (sin B)))
(if (<= F 1.45)
(- (/ F (* (sin B) (sqrt 2.0))) (/ x (tan B)))
(+ (/ 1.0 (sin B)) (* x (* (/ -1.0 (sin B)) (cos B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.42) {
tmp = (x * (-1.0 / tan(B))) + ((-1.0 + (1.0 / pow(F, 2.0))) / sin(B));
} else if (F <= 1.45) {
tmp = (F / (sin(B) * sqrt(2.0))) - (x / tan(B));
} else {
tmp = (1.0 / sin(B)) + (x * ((-1.0 / sin(B)) * cos(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.42d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + (((-1.0d0) + (1.0d0 / (f ** 2.0d0))) / sin(b))
else if (f <= 1.45d0) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - (x / tan(b))
else
tmp = (1.0d0 / sin(b)) + (x * (((-1.0d0) / sin(b)) * cos(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.42) {
tmp = (x * (-1.0 / Math.tan(B))) + ((-1.0 + (1.0 / Math.pow(F, 2.0))) / Math.sin(B));
} else if (F <= 1.45) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x / Math.tan(B));
} else {
tmp = (1.0 / Math.sin(B)) + (x * ((-1.0 / Math.sin(B)) * Math.cos(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.42: tmp = (x * (-1.0 / math.tan(B))) + ((-1.0 + (1.0 / math.pow(F, 2.0))) / math.sin(B)) elif F <= 1.45: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - (x / math.tan(B)) else: tmp = (1.0 / math.sin(B)) + (x * ((-1.0 / math.sin(B)) * math.cos(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(-1.0 + Float64(1.0 / (F ^ 2.0))) / sin(B))); elseif (F <= 1.45) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(Float64(-1.0 / sin(B)) * cos(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.42) tmp = (x * (-1.0 / tan(B))) + ((-1.0 + (1.0 / (F ^ 2.0))) / sin(B)); elseif (F <= 1.45) tmp = (F / (sin(B) * sqrt(2.0))) - (x / tan(B)); else tmp = (1.0 / sin(B)) + (x * ((-1.0 / sin(B)) * cos(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.42], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 + N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1 + \frac{1}{{F}^{2}}}{\sin B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \left(\frac{-1}{\sin B} \cdot \cos B\right)\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 69.0%
associate-*l/78.3%
+-commutative78.3%
*-commutative78.3%
fma-udef78.3%
fma-def78.3%
metadata-eval78.3%
metadata-eval78.3%
fma-def78.3%
fma-udef78.3%
*-commutative78.3%
fma-def78.3%
fma-def78.3%
Applied egg-rr78.3%
Taylor expanded in x around 0 78.3%
+-commutative78.3%
unpow278.3%
fma-udef78.3%
Simplified78.3%
Taylor expanded in F around -inf 99.7%
if -1.4199999999999999 < F < 1.44999999999999996Initial program 99.4%
Taylor expanded in F around 0 98.7%
+-commutative98.7%
div-inv98.9%
unsub-neg98.9%
*-commutative98.9%
sqrt-div98.8%
metadata-eval98.8%
frac-times98.9%
*-un-lft-identity98.9%
+-commutative98.9%
fma-def98.9%
Applied egg-rr98.9%
Taylor expanded in x around 0 98.9%
if 1.44999999999999996 < F Initial program 52.4%
Taylor expanded in F around inf 98.8%
tan-quot98.7%
associate-/r/98.8%
Applied egg-rr98.8%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.42)
(- t_0 t_1)
(if (<= F 1.5)
(- (/ F (* (sin B) (sqrt 2.0))) t_1)
(+ (/ 1.0 (sin B)) (* x (* t_0 (cos B))))))))
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.42) {
tmp = t_0 - t_1;
} else if (F <= 1.5) {
tmp = (F / (sin(B) * sqrt(2.0))) - t_1;
} else {
tmp = (1.0 / sin(B)) + (x * (t_0 * cos(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-1.0d0) / sin(b)
t_1 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = t_0 - t_1
else if (f <= 1.5d0) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - t_1
else
tmp = (1.0d0 / sin(b)) + (x * (t_0 * cos(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 t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = t_0 - t_1;
} else if (F <= 1.5) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - t_1;
} else {
tmp = (1.0 / Math.sin(B)) + (x * (t_0 * Math.cos(B)));
}
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.42: tmp = t_0 - t_1 elif F <= 1.5: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - t_1 else: tmp = (1.0 / math.sin(B)) + (x * (t_0 * math.cos(B))) 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.42) tmp = Float64(t_0 - t_1); elseif (F <= 1.5) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - t_1); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(t_0 * cos(B)))); 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.42) tmp = t_0 - t_1; elseif (F <= 1.5) tmp = (F / (sin(B) * sqrt(2.0))) - t_1; else tmp = (1.0 / sin(B)) + (x * (t_0 * cos(B))); 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.42], N[(t$95$0 - t$95$1), $MachinePrecision], If[LessEqual[F, 1.5], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(t$95$0 * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;t_0 - t_1\\
\mathbf{elif}\;F \leq 1.5:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \left(t_0 \cdot \cos B\right)\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 69.0%
Taylor expanded in F around -inf 98.9%
+-commutative98.9%
div-inv99.1%
unsub-neg99.1%
Applied egg-rr99.1%
if -1.4199999999999999 < F < 1.5Initial program 99.4%
Taylor expanded in F around 0 98.7%
+-commutative98.7%
div-inv98.9%
unsub-neg98.9%
*-commutative98.9%
sqrt-div98.8%
metadata-eval98.8%
frac-times98.9%
*-un-lft-identity98.9%
+-commutative98.9%
fma-def98.9%
Applied egg-rr98.9%
Taylor expanded in x around 0 98.9%
if 1.5 < F Initial program 52.4%
Taylor expanded in F around inf 98.8%
tan-quot98.7%
associate-/r/98.8%
Applied egg-rr98.8%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.5)
(- (/ F (* (sin B) (sqrt 2.0))) t_0)
(+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.5) {
tmp = (F / (sin(B) * sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.5d0) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - t_0
else
tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.5) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.5: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - t_0 else: tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.5) tmp = (F / (sin(B) * sqrt(2.0))) - t_0; else tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5], 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] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.5:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 69.0%
Taylor expanded in F around -inf 98.9%
+-commutative98.9%
div-inv99.1%
unsub-neg99.1%
Applied egg-rr99.1%
if -1.4199999999999999 < F < 1.5Initial program 99.4%
Taylor expanded in F around 0 98.7%
+-commutative98.7%
div-inv98.9%
unsub-neg98.9%
*-commutative98.9%
sqrt-div98.8%
metadata-eval98.8%
frac-times98.9%
*-un-lft-identity98.9%
+-commutative98.9%
fma-def98.9%
Applied egg-rr98.9%
Taylor expanded in x around 0 98.9%
if 1.5 < F Initial program 52.4%
Taylor expanded in F around inf 98.8%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e-21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.7e-106)
(- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) t_0)
(if (<= F 8000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e-21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.7e-106) {
tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0;
} else if (F <= 8000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1d-21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.7d-106) then
tmp = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else if (f <= 8000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1e-21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.7e-106) {
tmp = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else if (F <= 8000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1e-21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.7e-106: tmp = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - t_0 elif F <= 8000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) else: tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e-21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.7e-106) tmp = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); elseif (F <= 8000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1e-21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.7e-106) tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0; elseif (F <= 8000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.7e-106], N[(N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-106}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{elif}\;F \leq 8000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -9.99999999999999908e-22Initial program 70.0%
Taylor expanded in F around -inf 97.0%
+-commutative97.0%
div-inv97.1%
unsub-neg97.1%
Applied egg-rr97.1%
if -9.99999999999999908e-22 < F < 4.6999999999999999e-106Initial program 99.5%
Taylor expanded in F around 0 99.5%
+-commutative99.5%
div-inv99.7%
unsub-neg99.7%
*-commutative99.7%
sqrt-div99.6%
metadata-eval99.6%
frac-times99.7%
*-un-lft-identity99.7%
+-commutative99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in B around 0 85.4%
if 4.6999999999999999e-106 < F < 8e6Initial program 99.2%
Taylor expanded in B around 0 91.3%
if 8e6 < F Initial program 51.6%
Taylor expanded in F around inf 99.8%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -128000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 3.65e-109)
(+ t_0 (* t_1 (/ F B)))
(if (<= F 45000.0)
(- (* (/ F (sin B)) t_1) (/ x B))
(+ (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -128000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3.65e-109) {
tmp = t_0 + (t_1 * (F / B));
} else if (F <= 45000.0) {
tmp = ((F / sin(B)) * t_1) - (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) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-128000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 3.65d-109) then
tmp = t_0 + (t_1 * (f / b))
else if (f <= 45000.0d0) then
tmp = ((f / sin(b)) * t_1) - (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 * (-1.0 / Math.tan(B));
double t_1 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -128000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 3.65e-109) {
tmp = t_0 + (t_1 * (F / B));
} else if (F <= 45000.0) {
tmp = ((F / Math.sin(B)) * t_1) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) + t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -128000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 3.65e-109: tmp = t_0 + (t_1 * (F / B)) elif F <= 45000.0: tmp = ((F / math.sin(B)) * t_1) - (x / B) else: tmp = (1.0 / math.sin(B)) + t_0 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -128000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3.65e-109) tmp = Float64(t_0 + Float64(t_1 * Float64(F / B))); elseif (F <= 45000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_1) - 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 * (-1.0 / tan(B)); t_1 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -128000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 3.65e-109) tmp = t_0 + (t_1 * (F / B)); elseif (F <= 45000.0) tmp = ((F / sin(B)) * t_1) - (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[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -128000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.65e-109], N[(t$95$0 + N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 45000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$1), $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 := x \cdot \frac{-1}{\tan B}\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -128000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.65 \cdot 10^{-109}:\\
\;\;\;\;t_0 + t_1 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 45000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_1 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + t_0\\
\end{array}
\end{array}
if F < -128000Initial program 68.3%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
div-inv99.9%
unsub-neg99.9%
Applied egg-rr99.9%
if -128000 < F < 3.6500000000000002e-109Initial program 99.4%
Taylor expanded in B around 0 83.9%
if 3.6500000000000002e-109 < F < 45000Initial program 99.2%
Taylor expanded in B around 0 91.3%
if 45000 < F Initial program 51.6%
Taylor expanded in F around inf 99.8%
Final simplification93.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ F (/ (sin B) (sqrt 0.5))) (/ x B))))
(if (<= F -0.45)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -5e-77)
t_0
(if (<= F 8e-187)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 3.8e-16)
t_0
(+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = (F / (sin(B) / sqrt(0.5))) - (x / B);
double tmp;
if (F <= -0.45) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -5e-77) {
tmp = t_0;
} else if (F <= 8e-187) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 3.8e-16) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (f / (sin(b) / sqrt(0.5d0))) - (x / b)
if (f <= (-0.45d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-5d-77)) then
tmp = t_0
else if (f <= 8d-187) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 3.8d-16) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / (Math.sin(B) / Math.sqrt(0.5))) - (x / B);
double tmp;
if (F <= -0.45) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -5e-77) {
tmp = t_0;
} else if (F <= 8e-187) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 3.8e-16) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = (F / (math.sin(B) / math.sqrt(0.5))) - (x / B) tmp = 0 if F <= -0.45: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -5e-77: tmp = t_0 elif F <= 8e-187: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 3.8e-16: tmp = t_0 else: tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - Float64(x / B)) tmp = 0.0 if (F <= -0.45) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -5e-77) tmp = t_0; elseif (F <= 8e-187) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 3.8e-16) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / (sin(B) / sqrt(0.5))) - (x / B); tmp = 0.0; if (F <= -0.45) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -5e-77) tmp = t_0; elseif (F <= 8e-187) tmp = (cos(B) * -x) / sin(B); elseif (F <= 3.8e-16) tmp = t_0; else tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5e-77], t$95$0, If[LessEqual[F, 8e-187], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e-16], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.45:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-77}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-187}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-16}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -0.450000000000000011Initial program 69.0%
Taylor expanded in F around -inf 98.9%
+-commutative98.9%
div-inv99.1%
unsub-neg99.1%
Applied egg-rr99.1%
if -0.450000000000000011 < F < -4.99999999999999963e-77 or 8.0000000000000001e-187 < F < 3.80000000000000012e-16Initial program 99.4%
Taylor expanded in F around 0 98.1%
Taylor expanded in x around 0 98.2%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in B around 0 76.2%
if -4.99999999999999963e-77 < F < 8.0000000000000001e-187Initial program 99.4%
Taylor expanded in F around -inf 39.2%
Taylor expanded in x around inf 83.0%
associate-*r/83.0%
*-commutative83.0%
neg-mul-183.0%
distribute-lft-neg-in83.0%
Simplified83.0%
if 3.80000000000000012e-16 < F Initial program 54.6%
Taylor expanded in F around inf 97.5%
Final simplification90.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e-21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.05e-29)
(- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) t_0)
(+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e-21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.05e-29) {
tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1d-21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.05d-29) then
tmp = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1e-21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.05e-29) {
tmp = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1e-21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.05e-29: tmp = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e-21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.05e-29) tmp = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1e-21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.05e-29) tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.05e-29], 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] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-29}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -9.99999999999999908e-22Initial program 70.0%
Taylor expanded in F around -inf 97.0%
+-commutative97.0%
div-inv97.1%
unsub-neg97.1%
Applied egg-rr97.1%
if -9.99999999999999908e-22 < F < 2.0499999999999999e-29Initial program 99.4%
Taylor expanded in F around 0 99.4%
+-commutative99.4%
div-inv99.7%
unsub-neg99.7%
*-commutative99.7%
sqrt-div99.6%
metadata-eval99.6%
frac-times99.7%
*-un-lft-identity99.7%
+-commutative99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in B around 0 83.6%
if 2.0499999999999999e-29 < F Initial program 55.3%
Taylor expanded in F around inf 96.1%
Final simplification91.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -3.9e+77)
t_0
(if (<= F -2.25e+27)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.7e-10)
t_0
(if (<= F -7.2e-76)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 4.1e+18)
(* (cos B) (/ x (- (sin B))))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -3.9e+77) {
tmp = t_0;
} else if (F <= -2.25e+27) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.7e-10) {
tmp = t_0;
} else if (F <= -7.2e-76) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 4.1e+18) {
tmp = cos(B) * (x / -sin(B));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-3.9d+77)) then
tmp = t_0
else if (f <= (-2.25d+27)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.7d-10)) then
tmp = t_0
else if (f <= (-7.2d-76)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 4.1d+18) then
tmp = cos(b) * (x / -sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -3.9e+77) {
tmp = t_0;
} else if (F <= -2.25e+27) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.7e-10) {
tmp = t_0;
} else if (F <= -7.2e-76) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 4.1e+18) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -3.9e+77: tmp = t_0 elif F <= -2.25e+27: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.7e-10: tmp = t_0 elif F <= -7.2e-76: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 4.1e+18: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -3.9e+77) tmp = t_0; elseif (F <= -2.25e+27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.7e-10) tmp = t_0; elseif (F <= -7.2e-76) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 4.1e+18) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -3.9e+77) tmp = t_0; elseif (F <= -2.25e+27) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.7e-10) tmp = t_0; elseif (F <= -7.2e-76) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 4.1e+18) tmp = cos(B) * (x / -sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.9e+77], t$95$0, If[LessEqual[F, -2.25e+27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.7e-10], t$95$0, If[LessEqual[F, -7.2e-76], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e+18], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.9 \cdot 10^{+77}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.25 \cdot 10^{+27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.8999999999999998e77 or -2.25e27 < F < -1.70000000000000007e-10Initial program 66.3%
Taylor expanded in F around -inf 97.8%
+-commutative97.8%
div-inv97.9%
unsub-neg97.9%
Applied egg-rr97.9%
Taylor expanded in B around 0 79.2%
if -3.8999999999999998e77 < F < -2.25e27Initial program 99.7%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 99.8%
if -1.70000000000000007e-10 < F < -7.2000000000000001e-76Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.5%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in x around 0 64.5%
associate-*l/64.5%
*-commutative64.5%
Simplified64.5%
if -7.2000000000000001e-76 < F < 4.1e18Initial program 98.4%
Taylor expanded in F around -inf 39.9%
Taylor expanded in x around inf 74.6%
mul-1-neg74.6%
*-commutative74.6%
associate-*r/74.6%
distribute-rgt-neg-in74.6%
*-lft-identity74.6%
metadata-eval74.6%
times-frac74.6%
neg-mul-174.6%
neg-mul-174.6%
distribute-frac-neg74.6%
remove-double-neg74.6%
Simplified74.6%
if 4.1e18 < F Initial program 51.7%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 81.5%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -6.6e+77)
t_0
(if (<= F -5.8e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -8.8e-7)
t_0
(if (<= F -7.5e-77)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 4.1e+18)
(/ (* (cos B) (- x)) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -6.6e+77) {
tmp = t_0;
} else if (F <= -5.8e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -8.8e-7) {
tmp = t_0;
} else if (F <= -7.5e-77) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 4.1e+18) {
tmp = (cos(B) * -x) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-6.6d+77)) then
tmp = t_0
else if (f <= (-5.8d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-8.8d-7)) then
tmp = t_0
else if (f <= (-7.5d-77)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 4.1d+18) then
tmp = (cos(b) * -x) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -6.6e+77) {
tmp = t_0;
} else if (F <= -5.8e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -8.8e-7) {
tmp = t_0;
} else if (F <= -7.5e-77) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 4.1e+18) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -6.6e+77: tmp = t_0 elif F <= -5.8e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -8.8e-7: tmp = t_0 elif F <= -7.5e-77: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 4.1e+18: tmp = (math.cos(B) * -x) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -6.6e+77) tmp = t_0; elseif (F <= -5.8e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -8.8e-7) tmp = t_0; elseif (F <= -7.5e-77) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 4.1e+18) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -6.6e+77) tmp = t_0; elseif (F <= -5.8e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -8.8e-7) tmp = t_0; elseif (F <= -7.5e-77) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 4.1e+18) tmp = (cos(B) * -x) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.6e+77], t$95$0, If[LessEqual[F, -5.8e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.8e-7], t$95$0, If[LessEqual[F, -7.5e-77], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e+18], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.6 \cdot 10^{+77}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -5.8 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-7}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-77}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.5999999999999996e77 or -5.8000000000000002e28 < F < -8.8000000000000004e-7Initial program 66.3%
Taylor expanded in F around -inf 97.8%
+-commutative97.8%
div-inv97.9%
unsub-neg97.9%
Applied egg-rr97.9%
Taylor expanded in B around 0 79.2%
if -6.5999999999999996e77 < F < -5.8000000000000002e28Initial program 99.7%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 99.8%
if -8.8000000000000004e-7 < F < -7.5000000000000006e-77Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.5%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in x around 0 64.5%
associate-*l/64.5%
*-commutative64.5%
Simplified64.5%
if -7.5000000000000006e-77 < F < 4.1e18Initial program 98.4%
Taylor expanded in F around -inf 39.9%
Taylor expanded in x around inf 74.6%
associate-*r/74.6%
*-commutative74.6%
neg-mul-174.6%
distribute-lft-neg-in74.6%
Simplified74.6%
if 4.1e18 < F Initial program 51.7%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 81.5%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(if (<= F -9e-7)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.02e-75)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 3.7e-31)
(/ (* (cos B) (- x)) (sin B))
(+ (/ 1.0 (sin B)) (* x (/ -1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-7) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.02e-75) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 3.7e-31) {
tmp = (cos(B) * -x) / sin(B);
} else {
tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9d-7)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.02d-75)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 3.7d-31) then
tmp = (cos(b) * -x) / sin(b)
else
tmp = (1.0d0 / sin(b)) + (x * ((-1.0d0) / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.02e-75) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 3.7e-31) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-7: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.02e-75: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 3.7e-31: tmp = (math.cos(B) * -x) / math.sin(B) else: tmp = (1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.02e-75) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 3.7e-31) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e-7) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.02e-75) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 3.7e-31) tmp = (cos(B) * -x) / sin(B); else tmp = (1.0 / sin(B)) + (x * (-1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.02e-75], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-31], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-75}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-31}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -8.99999999999999959e-7Initial program 69.7%
Taylor expanded in F around -inf 98.0%
+-commutative98.0%
div-inv98.1%
unsub-neg98.1%
Applied egg-rr98.1%
if -8.99999999999999959e-7 < F < -1.01999999999999997e-75Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.5%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in x around 0 64.5%
associate-*l/64.5%
*-commutative64.5%
Simplified64.5%
if -1.01999999999999997e-75 < F < 3.6999999999999998e-31Initial program 99.4%
Taylor expanded in F around -inf 38.5%
Taylor expanded in x around inf 75.9%
associate-*r/75.9%
*-commutative75.9%
neg-mul-175.9%
distribute-lft-neg-in75.9%
Simplified75.9%
if 3.6999999999999998e-31 < F Initial program 55.3%
Taylor expanded in F around inf 96.1%
Final simplification88.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.7e-8)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.2e-76)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 4.1e+18)
(/ (* (cos B) (- x)) (sin B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.7e-8) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.2e-76) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 4.1e+18) {
tmp = (cos(B) * -x) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.7d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.2d-76)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 4.1d+18) then
tmp = (cos(b) * -x) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.7e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.2e-76) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 4.1e+18) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.7e-8: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.2e-76: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 4.1e+18: tmp = (math.cos(B) * -x) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.7e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.2e-76) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 4.1e+18) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.7e-8) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.2e-76) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 4.1e+18) tmp = (cos(B) * -x) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.7e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.2e-76], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e+18], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.7 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.7e-8Initial program 69.7%
Taylor expanded in F around -inf 98.0%
+-commutative98.0%
div-inv98.1%
unsub-neg98.1%
Applied egg-rr98.1%
if -3.7e-8 < F < -1.20000000000000007e-76Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.5%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in x around 0 64.5%
associate-*l/64.5%
*-commutative64.5%
Simplified64.5%
if -1.20000000000000007e-76 < F < 4.1e18Initial program 98.4%
Taylor expanded in F around -inf 39.9%
Taylor expanded in x around inf 74.6%
associate-*r/74.6%
*-commutative74.6%
neg-mul-174.6%
distribute-lft-neg-in74.6%
Simplified74.6%
if 4.1e18 < F Initial program 51.7%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 81.5%
Final simplification83.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))) (t_1 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= x -2.7e-84)
t_1
(if (<= x -2.2e-301)
(- t_0 (/ x B))
(if (<= x 6e-251)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= x 6.5e-48) t_0 t_1))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double t_1 = (1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (x <= -2.7e-84) {
tmp = t_1;
} else if (x <= -2.2e-301) {
tmp = t_0 - (x / B);
} else if (x <= 6e-251) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (x <= 6.5e-48) {
tmp = t_0;
} else {
tmp = 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 = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
if (x <= (-2.7d-84)) then
tmp = t_1
else if (x <= (-2.2d-301)) then
tmp = t_0 - (x / b)
else if (x <= 6d-251) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (x <= 6.5d-48) then
tmp = t_0
else
tmp = 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 = (1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (x <= -2.7e-84) {
tmp = t_1;
} else if (x <= -2.2e-301) {
tmp = t_0 - (x / B);
} else if (x <= 6e-251) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (x <= 6.5e-48) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) t_1 = (1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if x <= -2.7e-84: tmp = t_1 elif x <= -2.2e-301: tmp = t_0 - (x / B) elif x <= 6e-251: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif x <= 6.5e-48: tmp = t_0 else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) t_1 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (x <= -2.7e-84) tmp = t_1; elseif (x <= -2.2e-301) tmp = Float64(t_0 - Float64(x / B)); elseif (x <= 6e-251) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (x <= 6.5e-48) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); t_1 = (1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (x <= -2.7e-84) tmp = t_1; elseif (x <= -2.2e-301) tmp = t_0 - (x / B); elseif (x <= 6e-251) tmp = (F / sin(B)) * sqrt(0.5); elseif (x <= 6.5e-48) tmp = t_0; else tmp = 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[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.7e-84], t$95$1, If[LessEqual[x, -2.2e-301], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e-251], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-48], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;x \leq -2.7 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-301}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-251}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-48}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -2.6999999999999999e-84 or 6.5e-48 < x Initial program 85.7%
Taylor expanded in F around inf 85.8%
Taylor expanded in B around 0 87.8%
if -2.6999999999999999e-84 < x < -2.2e-301Initial program 69.8%
Taylor expanded in F around -inf 41.6%
Taylor expanded in B around 0 41.6%
if -2.2e-301 < x < 5.9999999999999997e-251Initial program 77.3%
Taylor expanded in F around 0 63.6%
Taylor expanded in x around 0 63.8%
associate-/l*63.9%
Simplified63.9%
Taylor expanded in x around 0 55.7%
associate-*l/55.5%
*-commutative55.5%
Simplified55.5%
if 5.9999999999999997e-251 < x < 6.5e-48Initial program 66.2%
Taylor expanded in F around -inf 38.6%
+-commutative38.6%
div-inv38.6%
unsub-neg38.6%
Applied egg-rr38.6%
Taylor expanded in x around 0 38.6%
Final simplification66.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (sin B))) (t_1 (- (/ 1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= x -6.8e-83)
t_1
(if (<= x -1.7e-303)
(- t_0 (/ x B))
(if (<= x 7.6e-254)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= x 6.8e-43) t_0 t_1))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / sin(B);
double t_1 = (1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (x <= -6.8e-83) {
tmp = t_1;
} else if (x <= -1.7e-303) {
tmp = t_0 - (x / B);
} else if (x <= 7.6e-254) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (x <= 6.8e-43) {
tmp = t_0;
} else {
tmp = 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 = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
if (x <= (-6.8d-83)) then
tmp = t_1
else if (x <= (-1.7d-303)) then
tmp = t_0 - (x / b)
else if (x <= 7.6d-254) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (x <= 6.8d-43) then
tmp = t_0
else
tmp = 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 = (1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (x <= -6.8e-83) {
tmp = t_1;
} else if (x <= -1.7e-303) {
tmp = t_0 - (x / B);
} else if (x <= 7.6e-254) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (x <= 6.8e-43) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / math.sin(B) t_1 = (1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if x <= -6.8e-83: tmp = t_1 elif x <= -1.7e-303: tmp = t_0 - (x / B) elif x <= 7.6e-254: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif x <= 6.8e-43: tmp = t_0 else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(-1.0 / sin(B)) t_1 = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (x <= -6.8e-83) tmp = t_1; elseif (x <= -1.7e-303) tmp = Float64(t_0 - Float64(x / B)); elseif (x <= 7.6e-254) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (x <= 6.8e-43) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / sin(B); t_1 = (1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (x <= -6.8e-83) tmp = t_1; elseif (x <= -1.7e-303) tmp = t_0 - (x / B); elseif (x <= 7.6e-254) tmp = (F * sqrt(0.5)) / sin(B); elseif (x <= 6.8e-43) tmp = t_0; else tmp = 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[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e-83], t$95$1, If[LessEqual[x, -1.7e-303], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e-254], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-43], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
t_1 := \frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{-83}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-303}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-254}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-43}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -6.7999999999999995e-83 or 6.8000000000000001e-43 < x Initial program 85.7%
Taylor expanded in F around inf 85.8%
Taylor expanded in B around 0 87.8%
if -6.7999999999999995e-83 < x < -1.7e-303Initial program 69.8%
Taylor expanded in F around -inf 41.6%
Taylor expanded in B around 0 41.6%
if -1.7e-303 < x < 7.6000000000000002e-254Initial program 77.3%
Taylor expanded in F around 0 63.6%
Taylor expanded in x around 0 63.8%
associate-/l*63.9%
Simplified63.9%
Taylor expanded in x around 0 55.7%
if 7.6000000000000002e-254 < x < 6.8000000000000001e-43Initial program 66.2%
Taylor expanded in F around -inf 38.6%
+-commutative38.6%
div-inv38.6%
unsub-neg38.6%
Applied egg-rr38.6%
Taylor expanded in x around 0 38.6%
Final simplification66.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -9.2e-52)
t_0
(if (<= x 4e-75)
(/ -1.0 (sin B))
(if (<= x 2.05e-6)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= x 2.9e+50) (/ (- 1.0 x) B) t_0))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -9.2e-52) {
tmp = t_0;
} else if (x <= 4e-75) {
tmp = -1.0 / sin(B);
} else if (x <= 2.05e-6) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (x <= 2.9e+50) {
tmp = (1.0 - x) / 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 (x <= (-9.2d-52)) then
tmp = t_0
else if (x <= 4d-75) then
tmp = (-1.0d0) / sin(b)
else if (x <= 2.05d-6) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (x <= 2.9d+50) then
tmp = (1.0d0 - x) / 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 (x <= -9.2e-52) {
tmp = t_0;
} else if (x <= 4e-75) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 2.05e-6) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (x <= 2.9e+50) {
tmp = (1.0 - x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -9.2e-52: tmp = t_0 elif x <= 4e-75: tmp = -1.0 / math.sin(B) elif x <= 2.05e-6: tmp = ((F * math.sqrt(0.5)) - x) / B elif x <= 2.9e+50: tmp = (1.0 - x) / 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 (x <= -9.2e-52) tmp = t_0; elseif (x <= 4e-75) tmp = Float64(-1.0 / sin(B)); elseif (x <= 2.05e-6) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (x <= 2.9e+50) tmp = Float64(Float64(1.0 - x) / 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 (x <= -9.2e-52) tmp = t_0; elseif (x <= 4e-75) tmp = -1.0 / sin(B); elseif (x <= 2.05e-6) tmp = ((F * sqrt(0.5)) - x) / B; elseif (x <= 2.9e+50) tmp = (1.0 - x) / 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[x, -9.2e-52], t$95$0, If[LessEqual[x, 4e-75], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.05e-6], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[x, 2.9e+50], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{-52}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-75}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+50}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -9.19999999999999977e-52 or 2.9e50 < x Initial program 88.3%
Taylor expanded in F around -inf 90.5%
+-commutative90.5%
div-inv90.7%
unsub-neg90.7%
Applied egg-rr90.7%
Taylor expanded in B around 0 93.2%
if -9.19999999999999977e-52 < x < 3.9999999999999998e-75Initial program 68.0%
Taylor expanded in F around -inf 36.5%
+-commutative36.5%
div-inv36.5%
unsub-neg36.5%
Applied egg-rr36.5%
Taylor expanded in x around 0 36.5%
if 3.9999999999999998e-75 < x < 2.0499999999999999e-6Initial program 88.4%
Taylor expanded in F around 0 68.2%
Taylor expanded in x around 0 68.2%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in B around 0 47.1%
if 2.0499999999999999e-6 < x < 2.9e50Initial program 63.2%
Taylor expanded in F around inf 83.0%
Taylor expanded in B around 0 76.1%
Final simplification62.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -8e+76)
t_0
(if (<= F -3.55e+28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.1e+18) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -8e+76) {
tmp = t_0;
} else if (F <= -3.55e+28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.1e+18) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-8d+76)) then
tmp = t_0
else if (f <= (-3.55d+28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.1d+18) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -8e+76) {
tmp = t_0;
} else if (F <= -3.55e+28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.1e+18) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -8e+76: tmp = t_0 elif F <= -3.55e+28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.1e+18: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -8e+76) tmp = t_0; elseif (F <= -3.55e+28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.1e+18) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -8e+76) tmp = t_0; elseif (F <= -3.55e+28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.1e+18) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8e+76], t$95$0, If[LessEqual[F, -3.55e+28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e+18], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8 \cdot 10^{+76}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -3.55 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.0000000000000004e76 or -3.55e28 < F < 4.1e18Initial program 85.1%
Taylor expanded in F around -inf 63.2%
+-commutative63.2%
div-inv63.3%
unsub-neg63.3%
Applied egg-rr63.3%
Taylor expanded in B around 0 59.6%
if -8.0000000000000004e76 < F < -3.55e28Initial program 99.7%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 99.8%
if 4.1e18 < F Initial program 51.7%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 81.5%
Final simplification66.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.35e-81) (not (<= x 1.7e-45))) (- (/ 1.0 B) (* x (/ 1.0 (tan B)))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.35e-81) || !(x <= 1.7e-45)) {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.35d-81)) .or. (.not. (x <= 1.7d-45))) then
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.35e-81) || !(x <= 1.7e-45)) {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.35e-81) or not (x <= 1.7e-45): tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.35e-81) || !(x <= 1.7e-45)) tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.35e-81) || ~((x <= 1.7e-45))) tmp = (1.0 / B) - (x * (1.0 / tan(B))); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.35e-81], N[Not[LessEqual[x, 1.7e-45]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-81} \lor \neg \left(x \leq 1.7 \cdot 10^{-45}\right):\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -1.34999999999999995e-81 or 1.70000000000000002e-45 < x Initial program 85.7%
Taylor expanded in F around inf 85.8%
Taylor expanded in B around 0 87.8%
if -1.34999999999999995e-81 < x < 1.70000000000000002e-45Initial program 69.8%
Taylor expanded in F around -inf 36.4%
+-commutative36.4%
div-inv36.4%
unsub-neg36.4%
Applied egg-rr36.4%
Taylor expanded in x around 0 36.4%
Final simplification62.9%
(FPCore (F B x) :precision binary64 (if (or (<= x -8e-52) (not (<= x 2.7e-89))) (- (/ -1.0 B) (/ x (tan B))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -8e-52) || !(x <= 2.7e-89)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-8d-52)) .or. (.not. (x <= 2.7d-89))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -8e-52) || !(x <= 2.7e-89)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -8e-52) or not (x <= 2.7e-89): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -8e-52) || !(x <= 2.7e-89)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -8e-52) || ~((x <= 2.7e-89))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -8e-52], N[Not[LessEqual[x, 2.7e-89]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{-52} \lor \neg \left(x \leq 2.7 \cdot 10^{-89}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -8.0000000000000001e-52 or 2.69999999999999988e-89 < x Initial program 86.3%
Taylor expanded in F around -inf 79.1%
+-commutative79.1%
div-inv79.3%
unsub-neg79.3%
Applied egg-rr79.3%
Taylor expanded in B around 0 82.3%
if -8.0000000000000001e-52 < x < 2.69999999999999988e-89Initial program 68.3%
Taylor expanded in F around -inf 36.2%
+-commutative36.2%
div-inv36.2%
unsub-neg36.2%
Applied egg-rr36.2%
Taylor expanded in x around 0 36.2%
Final simplification61.1%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00185)
(/ -1.0 (sin B))
(if (<= F 4.1e+18)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00185) {
tmp = -1.0 / sin(B);
} else if (F <= 4.1e+18) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.00185d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 4.1d+18) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00185) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 4.1e+18) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00185: tmp = -1.0 / math.sin(B) elif F <= 4.1e+18: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00185) tmp = Float64(-1.0 / sin(B)); elseif (F <= 4.1e+18) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00185) tmp = -1.0 / sin(B); elseif (F <= 4.1e+18) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00185], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e+18], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00185:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.0018500000000000001Initial program 69.3%
Taylor expanded in F around -inf 98.0%
+-commutative98.0%
div-inv98.1%
unsub-neg98.1%
Applied egg-rr98.1%
Taylor expanded in x around 0 54.3%
if -0.0018500000000000001 < F < 4.1e18Initial program 98.6%
Taylor expanded in F around -inf 38.9%
Taylor expanded in B around 0 18.6%
Taylor expanded in x around inf 32.2%
associate-*r*32.2%
neg-mul-132.2%
+-commutative32.2%
*-commutative32.2%
distribute-rgt-in32.2%
distribute-rgt-neg-in32.2%
distribute-lft-neg-in32.2%
distribute-rgt-neg-in32.2%
distribute-lft-neg-in32.2%
distribute-rgt-out32.2%
distribute-neg-frac32.2%
metadata-eval32.2%
distribute-rgt-neg-in32.2%
metadata-eval32.2%
Simplified32.2%
if 4.1e18 < F Initial program 51.7%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 58.5%
Final simplification45.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.1e-24)
(+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B))
(if (<= F 4.1e+18)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-24) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 4.1e+18) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.1d-24)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 4.1d+18) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-24) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 4.1e+18) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e-24: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 4.1e+18: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e-24) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 4.1e+18) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.1e-24) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 4.1e+18) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e-24], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e+18], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{-24}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.10000000000000001e-24Initial program 70.3%
Taylor expanded in F around -inf 96.0%
Taylor expanded in B around 0 50.7%
if -1.10000000000000001e-24 < F < 4.1e18Initial program 98.5%
Taylor expanded in F around -inf 38.9%
Taylor expanded in B around 0 18.1%
Taylor expanded in x around inf 32.1%
associate-*r*32.1%
neg-mul-132.1%
+-commutative32.1%
*-commutative32.1%
distribute-rgt-in32.1%
distribute-rgt-neg-in32.1%
distribute-lft-neg-in32.1%
distribute-rgt-neg-in32.1%
distribute-lft-neg-in32.1%
distribute-rgt-out32.1%
distribute-neg-frac32.1%
metadata-eval32.1%
distribute-rgt-neg-in32.1%
metadata-eval32.1%
Simplified32.1%
if 4.1e18 < F Initial program 51.7%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 58.5%
Final simplification44.6%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e-45)
(/ (- -1.0 x) B)
(if (<= F 4.1e+18)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-45) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.1e+18) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d-45)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.1d+18) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-45) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.1e+18) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-45: tmp = (-1.0 - x) / B elif F <= 4.1e+18: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-45) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.1e+18) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-45) tmp = (-1.0 - x) / B; elseif (F <= 4.1e+18) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-45], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.1e+18], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.20000000000000001e-45Initial program 71.3%
Taylor expanded in F around -inf 94.6%
Taylor expanded in B around 0 48.9%
associate-*r/48.9%
mul-1-neg48.9%
Simplified48.9%
if -7.20000000000000001e-45 < F < 4.1e18Initial program 98.5%
Taylor expanded in F around -inf 38.5%
Taylor expanded in B around 0 18.5%
Taylor expanded in x around inf 33.0%
associate-*r*33.0%
neg-mul-133.0%
+-commutative33.0%
*-commutative33.0%
distribute-rgt-in33.0%
distribute-rgt-neg-in33.0%
distribute-lft-neg-in33.0%
distribute-rgt-neg-in33.0%
distribute-lft-neg-in33.0%
distribute-rgt-out33.0%
distribute-neg-frac33.0%
metadata-eval33.0%
distribute-rgt-neg-in33.0%
metadata-eval33.0%
Simplified33.0%
if 4.1e18 < F Initial program 51.7%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 58.5%
Final simplification44.6%
(FPCore (F B x) :precision binary64 (if (<= F -0.0054) (/ -1.0 B) (if (<= F 3.6e-35) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0054) {
tmp = -1.0 / B;
} else if (F <= 3.6e-35) {
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 <= (-0.0054d0)) then
tmp = (-1.0d0) / b
else if (f <= 3.6d-35) 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 <= -0.0054) {
tmp = -1.0 / B;
} else if (F <= 3.6e-35) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0054: tmp = -1.0 / B elif F <= 3.6e-35: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0054) tmp = Float64(-1.0 / B); elseif (F <= 3.6e-35) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0054) tmp = -1.0 / B; elseif (F <= 3.6e-35) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0054], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 3.6e-35], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0054:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-35}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.0054000000000000003Initial program 69.3%
Taylor expanded in F around -inf 98.0%
Taylor expanded in B around 0 50.9%
associate-*r/50.9%
mul-1-neg50.9%
Simplified50.9%
Taylor expanded in x around 0 32.2%
if -0.0054000000000000003 < F < 3.60000000000000019e-35Initial program 99.4%
Taylor expanded in F around -inf 37.6%
Taylor expanded in B around 0 17.7%
associate-*r/17.7%
mul-1-neg17.7%
Simplified17.7%
Taylor expanded in x around inf 31.8%
associate-*r/31.8%
neg-mul-131.8%
Simplified31.8%
if 3.60000000000000019e-35 < F Initial program 55.3%
Taylor expanded in F around inf 96.1%
Taylor expanded in B around 0 55.5%
Final simplification37.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.15e-24) (/ (- -1.0 x) B) (if (<= F 3.4e-36) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-24) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.4e-36) {
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.15d-24)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.4d-36) 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.15e-24) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.4e-36) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-24: tmp = (-1.0 - x) / B elif F <= 3.4e-36: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-24) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.4e-36) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-24) tmp = (-1.0 - x) / B; elseif (F <= 3.4e-36) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-24], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.4e-36], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-24}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.1500000000000001e-24Initial program 70.3%
Taylor expanded in F around -inf 96.0%
Taylor expanded in B around 0 50.4%
associate-*r/50.4%
mul-1-neg50.4%
Simplified50.4%
if -1.1500000000000001e-24 < F < 3.4000000000000003e-36Initial program 99.4%
Taylor expanded in F around -inf 37.6%
Taylor expanded in B around 0 17.1%
associate-*r/17.1%
mul-1-neg17.1%
Simplified17.1%
Taylor expanded in x around inf 31.7%
associate-*r/31.7%
neg-mul-131.7%
Simplified31.7%
if 3.4000000000000003e-36 < F Initial program 55.3%
Taylor expanded in F around inf 96.1%
Taylor expanded in B around 0 55.5%
Final simplification44.3%
(FPCore (F B x) :precision binary64 (if (or (<= x -4.4e-68) (not (<= x 1.4e-72))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -4.4e-68) || !(x <= 1.4e-72)) {
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 ((x <= (-4.4d-68)) .or. (.not. (x <= 1.4d-72))) 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 ((x <= -4.4e-68) || !(x <= 1.4e-72)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -4.4e-68) or not (x <= 1.4e-72): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -4.4e-68) || !(x <= 1.4e-72)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -4.4e-68) || ~((x <= 1.4e-72))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -4.4e-68], N[Not[LessEqual[x, 1.4e-72]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-68} \lor \neg \left(x \leq 1.4 \cdot 10^{-72}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -4.40000000000000005e-68 or 1.3999999999999999e-72 < x Initial program 87.0%
Taylor expanded in F around -inf 79.1%
Taylor expanded in B around 0 37.5%
associate-*r/37.5%
mul-1-neg37.5%
Simplified37.5%
Taylor expanded in x around inf 43.0%
associate-*r/43.0%
neg-mul-143.0%
Simplified43.0%
if -4.40000000000000005e-68 < x < 1.3999999999999999e-72Initial program 67.4%
Taylor expanded in F around -inf 36.2%
Taylor expanded in B around 0 22.3%
associate-*r/22.3%
mul-1-neg22.3%
Simplified22.3%
Taylor expanded in x around 0 22.3%
Final simplification33.4%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 78.0%
Taylor expanded in F around -inf 59.3%
Taylor expanded in B around 0 30.5%
associate-*r/30.5%
mul-1-neg30.5%
Simplified30.5%
Taylor expanded in x around 0 13.4%
Final simplification13.4%
herbie shell --seed 2023321
(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))))))