
(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 22 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 -420000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 13.0)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(+
(* x (/ -1.0 (tan B)))
(+ t_0 (/ (- -1.0 x) (* F (* F (sin 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 <= -420000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 13.0) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = (x * (-1.0 / tan(B))) + (t_0 + ((-1.0 - x) / (F * (F * 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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-420000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 13.0d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 + (((-1.0d0) - x) / (f * (f * sin(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 <= -420000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 13.0) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 + ((-1.0 - x) / (F * (F * Math.sin(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 <= -420000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 13.0: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = (x * (-1.0 / math.tan(B))) + (t_0 + ((-1.0 - x) / (F * (F * math.sin(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 <= -420000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 13.0) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 + Float64(Float64(-1.0 - x) / Float64(F * Float64(F * sin(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 <= -420000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 13.0) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = (x * (-1.0 / tan(B))) + (t_0 + ((-1.0 - x) / (F * (F * sin(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, -420000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 13.0], 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[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $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 -420000:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 13:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \left(t_0 + \frac{-1 - x}{F \cdot \left(F \cdot \sin B\right)}\right)\\
\end{array}
\end{array}
if F < -4.2e5Initial program 50.7%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
if -4.2e5 < F < 13Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
if 13 < F Initial program 57.7%
Taylor expanded in F around inf 99.9%
+-commutative99.9%
associate-*r/99.9%
+-commutative99.9%
distribute-lft-in99.9%
metadata-eval99.9%
associate-*r*99.9%
metadata-eval99.9%
neg-mul-199.9%
*-commutative99.9%
unpow299.9%
associate-*l*99.9%
Simplified99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -420000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.45)
(- (* 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 <= -420000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.45) {
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 <= (-420000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.45d0) 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 <= -420000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.45) {
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 <= -420000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.45: 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 <= -420000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.45) 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 <= -420000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.45) 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, -420000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.45], 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 -420000:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;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 < -4.2e5Initial program 50.7%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
if -4.2e5 < F < 1.44999999999999996Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
if 1.44999999999999996 < F Initial program 58.3%
+-commutative58.3%
unsub-neg58.3%
associate-*l/72.8%
associate-*r/72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in F around inf 99.3%
*-commutative99.3%
associate-/r*99.2%
Simplified99.2%
sub-neg99.2%
associate-/l/99.3%
Applied egg-rr99.3%
sub-neg99.3%
associate-*r/99.3%
*-commutative99.3%
times-frac99.5%
*-rgt-identity99.5%
associate-*r/99.4%
rgt-mult-inverse99.5%
*-lft-identity99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -420000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -420000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= (-420000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / 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 <= -420000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= -420000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= -420000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / 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 <= -420000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / 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, -420000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 -420000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.2e5Initial program 50.7%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
if -4.2e5 < F < 1.3999999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
if 1.3999999999999999 < F Initial program 58.3%
+-commutative58.3%
unsub-neg58.3%
associate-*l/72.8%
associate-*r/72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in F around inf 99.3%
*-commutative99.3%
associate-/r*99.2%
Simplified99.2%
sub-neg99.2%
associate-/l/99.3%
Applied egg-rr99.3%
sub-neg99.3%
associate-*r/99.3%
*-commutative99.3%
times-frac99.5%
*-rgt-identity99.5%
associate-*r/99.4%
rgt-mult-inverse99.5%
*-lft-identity99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -420000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* 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 <= -420000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= (-420000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) 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 <= -420000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
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 <= -420000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: 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 <= -420000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) 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 <= -420000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) 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, -420000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], 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 -420000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.2e5Initial program 50.7%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
if -4.2e5 < F < 1.3999999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.4%
if 1.3999999999999999 < F Initial program 58.3%
+-commutative58.3%
unsub-neg58.3%
associate-*l/72.8%
associate-*r/72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in F around inf 99.3%
*-commutative99.3%
associate-/r*99.2%
Simplified99.2%
sub-neg99.2%
associate-/l/99.3%
Applied egg-rr99.3%
sub-neg99.3%
associate-*r/99.3%
*-commutative99.3%
times-frac99.5%
*-rgt-identity99.5%
associate-*r/99.4%
rgt-mult-inverse99.5%
*-lft-identity99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.1e-9)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.135)
(- (* F (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ 1.0 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.1e-9) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.135) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / 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.1d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.135d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (1.0d0 / 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.1e-9) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.135) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / 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.1e-9: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.135: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / 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.1e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.135) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(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.1e-9) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.135) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / 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.1e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.135], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(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.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.135:\\
\;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.0999999999999999e-9Initial program 52.6%
Taylor expanded in F around -inf 97.4%
*-un-lft-identity97.4%
+-commutative97.4%
div-inv97.4%
Applied egg-rr97.4%
*-lft-identity97.4%
unsub-neg97.4%
Simplified97.4%
if -1.0999999999999999e-9 < F < 0.13500000000000001Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 85.9%
if 0.13500000000000001 < F Initial program 58.3%
+-commutative58.3%
unsub-neg58.3%
associate-*l/72.8%
associate-*r/72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in F around inf 99.3%
*-commutative99.3%
associate-/r*99.2%
Simplified99.2%
sub-neg99.2%
associate-/l/99.3%
Applied egg-rr99.3%
sub-neg99.3%
associate-*r/99.3%
*-commutative99.3%
times-frac99.5%
*-rgt-identity99.5%
associate-*r/99.4%
rgt-mult-inverse99.5%
*-lft-identity99.5%
Simplified99.5%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.1e-9)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.41)
(- (* (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 <= -1.1e-9) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.41) {
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 <= (-1.1d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.41d0) 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 <= -1.1e-9) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.41) {
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 <= -1.1e-9: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.41: 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 <= -1.1e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.41) 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 <= -1.1e-9) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.41) 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, -1.1e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.41], 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 -1.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.41:\\
\;\;\;\;\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 < -1.0999999999999999e-9Initial program 52.6%
Taylor expanded in F around -inf 97.4%
*-un-lft-identity97.4%
+-commutative97.4%
div-inv97.4%
Applied egg-rr97.4%
*-lft-identity97.4%
unsub-neg97.4%
Simplified97.4%
if -1.0999999999999999e-9 < F < 0.409999999999999976Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 85.9%
if 0.409999999999999976 < F Initial program 58.3%
+-commutative58.3%
unsub-neg58.3%
associate-*l/72.8%
associate-*r/72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in F around inf 99.3%
*-commutative99.3%
associate-/r*99.2%
Simplified99.2%
sub-neg99.2%
associate-/l/99.3%
Applied egg-rr99.3%
sub-neg99.3%
associate-*r/99.3%
*-commutative99.3%
times-frac99.5%
*-rgt-identity99.5%
associate-*r/99.4%
rgt-mult-inverse99.5%
*-lft-identity99.5%
Simplified99.5%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.3e+209)
(- (/ -1.0 B) t_0)
(if (<= F -0.016)
(/ (- -1.0 x) (sin B))
(if (<= F -7.6e-90)
(* (sqrt 0.5) (/ F (sin B)))
(if (<= F 2.7e-95)
(- (/ (cos B) (/ (sin B) x)))
(- (* F (/ 1.0 (* F B))) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.3e+209) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.016) {
tmp = (-1.0 - x) / sin(B);
} else if (F <= -7.6e-90) {
tmp = sqrt(0.5) * (F / sin(B));
} else if (F <= 2.7e-95) {
tmp = -(cos(B) / (sin(B) / x));
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.3d+209)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-0.016d0)) then
tmp = ((-1.0d0) - x) / sin(b)
else if (f <= (-7.6d-90)) then
tmp = sqrt(0.5d0) * (f / sin(b))
else if (f <= 2.7d-95) then
tmp = -(cos(b) / (sin(b) / x))
else
tmp = (f * (1.0d0 / (f * b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.3e+209) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.016) {
tmp = (-1.0 - x) / Math.sin(B);
} else if (F <= -7.6e-90) {
tmp = Math.sqrt(0.5) * (F / Math.sin(B));
} else if (F <= 2.7e-95) {
tmp = -(Math.cos(B) / (Math.sin(B) / x));
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.3e+209: tmp = (-1.0 / B) - t_0 elif F <= -0.016: tmp = (-1.0 - x) / math.sin(B) elif F <= -7.6e-90: tmp = math.sqrt(0.5) * (F / math.sin(B)) elif F <= 2.7e-95: tmp = -(math.cos(B) / (math.sin(B) / x)) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.3e+209) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -0.016) tmp = Float64(Float64(-1.0 - x) / sin(B)); elseif (F <= -7.6e-90) tmp = Float64(sqrt(0.5) * Float64(F / sin(B))); elseif (F <= 2.7e-95) tmp = Float64(-Float64(cos(B) / Float64(sin(B) / x))); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.3e+209) tmp = (-1.0 / B) - t_0; elseif (F <= -0.016) tmp = (-1.0 - x) / sin(B); elseif (F <= -7.6e-90) tmp = sqrt(0.5) * (F / sin(B)); elseif (F <= 2.7e-95) tmp = -(cos(B) / (sin(B) / x)); else tmp = (F * (1.0 / (F * B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.3e+209], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.016], N[(N[(-1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.6e-90], N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-95], (-N[(N[Cos[B], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.3 \cdot 10^{+209}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -0.016:\\
\;\;\;\;\frac{-1 - x}{\sin B}\\
\mathbf{elif}\;F \leq -7.6 \cdot 10^{-90}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{\sin B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-95}:\\
\;\;\;\;-\frac{\cos B}{\frac{\sin B}{x}}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t_0\\
\end{array}
\end{array}
if F < -3.2999999999999998e209Initial program 37.1%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.9%
Applied egg-rr99.9%
*-lft-identity99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in B around 0 82.2%
if -3.2999999999999998e209 < F < -0.016Initial program 62.5%
Taylor expanded in F around -inf 99.7%
*-un-lft-identity99.7%
+-commutative99.7%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in B around inf 99.8%
mul-1-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
sub-neg99.8%
*-commutative99.8%
div-sub99.8%
Simplified99.8%
Taylor expanded in B around 0 88.2%
if -0.016 < F < -7.6e-90Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 61.1%
Taylor expanded in x around 0 61.2%
if -7.6e-90 < F < 2.7e-95Initial program 99.5%
Taylor expanded in F around -inf 37.9%
*-un-lft-identity37.9%
+-commutative37.9%
div-inv37.9%
Applied egg-rr37.9%
*-lft-identity37.9%
unsub-neg37.9%
Simplified37.9%
Taylor expanded in B around inf 37.8%
mul-1-neg37.8%
+-commutative37.8%
distribute-neg-in37.8%
distribute-neg-frac37.8%
metadata-eval37.8%
sub-neg37.8%
*-commutative37.8%
div-sub37.8%
Simplified37.8%
Taylor expanded in x around inf 83.7%
mul-1-neg83.7%
associate-/l*83.6%
Simplified83.6%
if 2.7e-95 < F Initial program 67.7%
+-commutative67.7%
unsub-neg67.7%
associate-*l/78.9%
associate-*r/78.7%
*-commutative78.7%
Simplified78.8%
Taylor expanded in F around inf 89.4%
*-commutative89.4%
associate-/r*89.3%
Simplified89.3%
Taylor expanded in B around 0 71.8%
Final simplification78.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.6e+208)
(- (/ -1.0 B) t_0)
(if (<= F -0.011)
(/ (- -1.0 x) (sin B))
(if (<= F -2.15e-89)
(* (sqrt 0.5) (/ F (sin B)))
(if (<= F 2.7e-95)
(* (/ (- x) (sin B)) (cos B))
(- (* F (/ 1.0 (* F B))) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.6e+208) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.011) {
tmp = (-1.0 - x) / sin(B);
} else if (F <= -2.15e-89) {
tmp = sqrt(0.5) * (F / sin(B));
} else if (F <= 2.7e-95) {
tmp = (-x / sin(B)) * cos(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.6d+208)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-0.011d0)) then
tmp = ((-1.0d0) - x) / sin(b)
else if (f <= (-2.15d-89)) then
tmp = sqrt(0.5d0) * (f / sin(b))
else if (f <= 2.7d-95) then
tmp = (-x / sin(b)) * cos(b)
else
tmp = (f * (1.0d0 / (f * b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.6e+208) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.011) {
tmp = (-1.0 - x) / Math.sin(B);
} else if (F <= -2.15e-89) {
tmp = Math.sqrt(0.5) * (F / Math.sin(B));
} else if (F <= 2.7e-95) {
tmp = (-x / Math.sin(B)) * Math.cos(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.6e+208: tmp = (-1.0 / B) - t_0 elif F <= -0.011: tmp = (-1.0 - x) / math.sin(B) elif F <= -2.15e-89: tmp = math.sqrt(0.5) * (F / math.sin(B)) elif F <= 2.7e-95: tmp = (-x / math.sin(B)) * math.cos(B) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.6e+208) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -0.011) tmp = Float64(Float64(-1.0 - x) / sin(B)); elseif (F <= -2.15e-89) tmp = Float64(sqrt(0.5) * Float64(F / sin(B))); elseif (F <= 2.7e-95) tmp = Float64(Float64(Float64(-x) / sin(B)) * cos(B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.6e+208) tmp = (-1.0 / B) - t_0; elseif (F <= -0.011) tmp = (-1.0 - x) / sin(B); elseif (F <= -2.15e-89) tmp = sqrt(0.5) * (F / sin(B)); elseif (F <= 2.7e-95) tmp = (-x / sin(B)) * cos(B); else tmp = (F * (1.0 / (F * B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.6e+208], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.011], N[(N[(-1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.15e-89], N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-95], N[(N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.6 \cdot 10^{+208}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -0.011:\\
\;\;\;\;\frac{-1 - x}{\sin B}\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-89}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{\sin B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t_0\\
\end{array}
\end{array}
if F < -6.6e208Initial program 37.1%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.9%
Applied egg-rr99.9%
*-lft-identity99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in B around 0 82.2%
if -6.6e208 < F < -0.010999999999999999Initial program 62.5%
Taylor expanded in F around -inf 99.7%
*-un-lft-identity99.7%
+-commutative99.7%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in B around inf 99.8%
mul-1-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
sub-neg99.8%
*-commutative99.8%
div-sub99.8%
Simplified99.8%
Taylor expanded in B around 0 88.2%
if -0.010999999999999999 < F < -2.14999999999999993e-89Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 61.1%
Taylor expanded in x around 0 61.2%
if -2.14999999999999993e-89 < F < 2.7e-95Initial program 99.5%
Taylor expanded in F around -inf 37.9%
*-un-lft-identity37.9%
+-commutative37.9%
div-inv37.9%
Applied egg-rr37.9%
*-lft-identity37.9%
unsub-neg37.9%
Simplified37.9%
Taylor expanded in x around inf 83.7%
associate-*r/83.7%
*-commutative83.7%
neg-mul-183.7%
distribute-lft-neg-in83.7%
*-rgt-identity83.7%
times-frac83.7%
rem-square-sqrt64.9%
associate-*r/64.9%
/-rgt-identity64.9%
rem-square-sqrt83.7%
Simplified83.7%
if 2.7e-95 < F Initial program 67.7%
+-commutative67.7%
unsub-neg67.7%
associate-*l/78.9%
associate-*r/78.7%
*-commutative78.7%
Simplified78.8%
Taylor expanded in F around inf 89.4%
*-commutative89.4%
associate-/r*89.3%
Simplified89.3%
Taylor expanded in B around 0 71.8%
Final simplification78.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.5e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.9e-89)
(* (sqrt 0.5) (/ F (sin B)))
(if (<= F 2.35e-10)
(* (/ (- x) (sin B)) (cos B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.5e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.9e-89) {
tmp = sqrt(0.5) * (F / sin(B));
} else if (F <= 2.35e-10) {
tmp = (-x / sin(B)) * cos(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.5d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.9d-89)) then
tmp = sqrt(0.5d0) * (f / sin(b))
else if (f <= 2.35d-10) then
tmp = (-x / sin(b)) * cos(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.5e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.9e-89) {
tmp = Math.sqrt(0.5) * (F / Math.sin(B));
} else if (F <= 2.35e-10) {
tmp = (-x / Math.sin(B)) * Math.cos(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.5e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.9e-89: tmp = math.sqrt(0.5) * (F / math.sin(B)) elif F <= 2.35e-10: tmp = (-x / math.sin(B)) * math.cos(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.5e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.9e-89) tmp = Float64(sqrt(0.5) * Float64(F / sin(B))); elseif (F <= 2.35e-10) tmp = Float64(Float64(Float64(-x) / sin(B)) * cos(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.5e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.9e-89) tmp = sqrt(0.5) * (F / sin(B)); elseif (F <= 2.35e-10) tmp = (-x / sin(B)) * cos(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.5e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.9e-89], N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e-10], N[(N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -1.9 \cdot 10^{-89}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{\sin B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-10}:\\
\;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5.5000000000000002e-5Initial program 51.3%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
if -5.5000000000000002e-5 < F < -1.9000000000000001e-89Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 61.1%
Taylor expanded in x around 0 61.2%
if -1.9000000000000001e-89 < F < 2.3500000000000002e-10Initial program 99.5%
Taylor expanded in F around -inf 41.0%
*-un-lft-identity41.0%
+-commutative41.0%
div-inv41.0%
Applied egg-rr41.0%
*-lft-identity41.0%
unsub-neg41.0%
Simplified41.0%
Taylor expanded in x around inf 80.4%
associate-*r/80.4%
*-commutative80.4%
neg-mul-180.4%
distribute-lft-neg-in80.4%
*-rgt-identity80.4%
times-frac80.5%
rem-square-sqrt61.6%
associate-*r/61.6%
/-rgt-identity61.6%
rem-square-sqrt80.5%
Simplified80.5%
if 2.3500000000000002e-10 < F Initial program 58.3%
+-commutative58.3%
unsub-neg58.3%
associate-*l/72.8%
associate-*r/72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in F around inf 99.3%
*-commutative99.3%
associate-/r*99.2%
Simplified99.2%
sub-neg99.2%
associate-/l/99.3%
Applied egg-rr99.3%
sub-neg99.3%
associate-*r/99.3%
*-commutative99.3%
times-frac99.5%
*-rgt-identity99.5%
associate-*r/99.4%
rgt-mult-inverse99.5%
*-lft-identity99.5%
Simplified99.5%
Final simplification88.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.5e-6)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -9.2e-90)
(* (sqrt 0.5) (/ F (sin B)))
(if (<= F 2.7e-95)
(* (/ (- x) (sin B)) (cos B))
(- (* F (/ 1.0 (* F B))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.5e-6) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -9.2e-90) {
tmp = sqrt(0.5) * (F / sin(B));
} else if (F <= 2.7e-95) {
tmp = (-x / sin(B)) * cos(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.5d-6)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-9.2d-90)) then
tmp = sqrt(0.5d0) * (f / sin(b))
else if (f <= 2.7d-95) then
tmp = (-x / sin(b)) * cos(b)
else
tmp = (f * (1.0d0 / (f * b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.5e-6) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -9.2e-90) {
tmp = Math.sqrt(0.5) * (F / Math.sin(B));
} else if (F <= 2.7e-95) {
tmp = (-x / Math.sin(B)) * Math.cos(B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.5e-6: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -9.2e-90: tmp = math.sqrt(0.5) * (F / math.sin(B)) elif F <= 2.7e-95: tmp = (-x / math.sin(B)) * math.cos(B) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.5e-6) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -9.2e-90) tmp = Float64(sqrt(0.5) * Float64(F / sin(B))); elseif (F <= 2.7e-95) tmp = Float64(Float64(Float64(-x) / sin(B)) * cos(B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.5e-6) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -9.2e-90) tmp = sqrt(0.5) * (F / sin(B)); elseif (F <= 2.7e-95) tmp = (-x / sin(B)) * cos(B); else tmp = (F * (1.0 / (F * B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -9.2e-90], N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-95], N[(N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{-90}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{\sin B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t_0\\
\end{array}
\end{array}
if F < -2.5000000000000002e-6Initial program 51.3%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
if -2.5000000000000002e-6 < F < -9.1999999999999992e-90Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 61.1%
Taylor expanded in x around 0 61.2%
if -9.1999999999999992e-90 < F < 2.7e-95Initial program 99.5%
Taylor expanded in F around -inf 37.9%
*-un-lft-identity37.9%
+-commutative37.9%
div-inv37.9%
Applied egg-rr37.9%
*-lft-identity37.9%
unsub-neg37.9%
Simplified37.9%
Taylor expanded in x around inf 83.7%
associate-*r/83.7%
*-commutative83.7%
neg-mul-183.7%
distribute-lft-neg-in83.7%
*-rgt-identity83.7%
times-frac83.7%
rem-square-sqrt64.9%
associate-*r/64.9%
/-rgt-identity64.9%
rem-square-sqrt83.7%
Simplified83.7%
if 2.7e-95 < F Initial program 67.7%
+-commutative67.7%
unsub-neg67.7%
associate-*l/78.9%
associate-*r/78.7%
*-commutative78.7%
Simplified78.8%
Taylor expanded in F around inf 89.4%
*-commutative89.4%
associate-/r*89.3%
Simplified89.3%
Taylor expanded in B around 0 71.8%
Final simplification82.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1 (- (/ -1.0 B) t_0))
(t_2 (- (* F (sqrt 0.5)) x)))
(if (<= F -2.42e+210)
t_1
(if (<= F -0.0032)
(/ (- -1.0 x) (sin B))
(if (<= F -2.15e-89)
(* (sqrt 0.5) (/ F (sin B)))
(if (<= F 1.32e-236)
(/ t_2 B)
(if (<= F 6.2e-101)
t_1
(if (<= F 5e-87)
(/ 1.0 (/ B t_2))
(- (* F (/ 1.0 (* F B))) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double t_2 = (F * sqrt(0.5)) - x;
double tmp;
if (F <= -2.42e+210) {
tmp = t_1;
} else if (F <= -0.0032) {
tmp = (-1.0 - x) / sin(B);
} else if (F <= -2.15e-89) {
tmp = sqrt(0.5) * (F / sin(B));
} else if (F <= 1.32e-236) {
tmp = t_2 / B;
} else if (F <= 6.2e-101) {
tmp = t_1;
} else if (F <= 5e-87) {
tmp = 1.0 / (B / t_2);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
t_2 = (f * sqrt(0.5d0)) - x
if (f <= (-2.42d+210)) then
tmp = t_1
else if (f <= (-0.0032d0)) then
tmp = ((-1.0d0) - x) / sin(b)
else if (f <= (-2.15d-89)) then
tmp = sqrt(0.5d0) * (f / sin(b))
else if (f <= 1.32d-236) then
tmp = t_2 / b
else if (f <= 6.2d-101) then
tmp = t_1
else if (f <= 5d-87) then
tmp = 1.0d0 / (b / t_2)
else
tmp = (f * (1.0d0 / (f * b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = (-1.0 / B) - t_0;
double t_2 = (F * Math.sqrt(0.5)) - x;
double tmp;
if (F <= -2.42e+210) {
tmp = t_1;
} else if (F <= -0.0032) {
tmp = (-1.0 - x) / Math.sin(B);
} else if (F <= -2.15e-89) {
tmp = Math.sqrt(0.5) * (F / Math.sin(B));
} else if (F <= 1.32e-236) {
tmp = t_2 / B;
} else if (F <= 6.2e-101) {
tmp = t_1;
} else if (F <= 5e-87) {
tmp = 1.0 / (B / t_2);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 t_2 = (F * math.sqrt(0.5)) - x tmp = 0 if F <= -2.42e+210: tmp = t_1 elif F <= -0.0032: tmp = (-1.0 - x) / math.sin(B) elif F <= -2.15e-89: tmp = math.sqrt(0.5) * (F / math.sin(B)) elif F <= 1.32e-236: tmp = t_2 / B elif F <= 6.2e-101: tmp = t_1 elif F <= 5e-87: tmp = 1.0 / (B / t_2) else: tmp = (F * (1.0 / (F * B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) t_2 = Float64(Float64(F * sqrt(0.5)) - x) tmp = 0.0 if (F <= -2.42e+210) tmp = t_1; elseif (F <= -0.0032) tmp = Float64(Float64(-1.0 - x) / sin(B)); elseif (F <= -2.15e-89) tmp = Float64(sqrt(0.5) * Float64(F / sin(B))); elseif (F <= 1.32e-236) tmp = Float64(t_2 / B); elseif (F <= 6.2e-101) tmp = t_1; elseif (F <= 5e-87) tmp = Float64(1.0 / Float64(B / t_2)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / B) - t_0; t_2 = (F * sqrt(0.5)) - x; tmp = 0.0; if (F <= -2.42e+210) tmp = t_1; elseif (F <= -0.0032) tmp = (-1.0 - x) / sin(B); elseif (F <= -2.15e-89) tmp = sqrt(0.5) * (F / sin(B)); elseif (F <= 1.32e-236) tmp = t_2 / B; elseif (F <= 6.2e-101) tmp = t_1; elseif (F <= 5e-87) tmp = 1.0 / (B / t_2); else tmp = (F * (1.0 / (F * B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[F, -2.42e+210], t$95$1, If[LessEqual[F, -0.0032], N[(N[(-1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.15e-89], N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.32e-236], N[(t$95$2 / B), $MachinePrecision], If[LessEqual[F, 6.2e-101], t$95$1, If[LessEqual[F, 5e-87], N[(1.0 / N[(B / t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
t_2 := F \cdot \sqrt{0.5} - x\\
\mathbf{if}\;F \leq -2.42 \cdot 10^{+210}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -0.0032:\\
\;\;\;\;\frac{-1 - x}{\sin B}\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-89}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{\sin B}\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{-236}:\\
\;\;\;\;\frac{t_2}{B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-87}:\\
\;\;\;\;\frac{1}{\frac{B}{t_2}}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t_0\\
\end{array}
\end{array}
if F < -2.42e210 or 1.32e-236 < F < 6.19999999999999946e-101Initial program 65.0%
Taylor expanded in F around -inf 73.3%
*-un-lft-identity73.3%
+-commutative73.3%
div-inv73.4%
Applied egg-rr73.4%
*-lft-identity73.4%
unsub-neg73.4%
Simplified73.4%
Taylor expanded in B around 0 73.6%
if -2.42e210 < F < -0.00320000000000000015Initial program 62.5%
Taylor expanded in F around -inf 99.7%
*-un-lft-identity99.7%
+-commutative99.7%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in B around inf 99.8%
mul-1-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
sub-neg99.8%
*-commutative99.8%
div-sub99.8%
Simplified99.8%
Taylor expanded in B around 0 88.2%
if -0.00320000000000000015 < F < -2.14999999999999993e-89Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 61.1%
Taylor expanded in x around 0 61.2%
if -2.14999999999999993e-89 < F < 1.32e-236Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 64.5%
Taylor expanded in x around 0 64.5%
if 6.19999999999999946e-101 < F < 5.00000000000000042e-87Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.1%
associate-*r/98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in F around 0 98.9%
Taylor expanded in B around 0 79.9%
clear-num80.2%
inv-pow80.2%
inv-pow80.2%
sqrt-pow180.2%
*-commutative80.2%
fma-def80.2%
metadata-eval80.2%
Applied egg-rr80.2%
unpow-180.2%
Simplified80.2%
Taylor expanded in x around 0 80.2%
if 5.00000000000000042e-87 < F Initial program 66.5%
+-commutative66.5%
unsub-neg66.5%
associate-*l/78.1%
associate-*r/78.0%
*-commutative78.0%
Simplified78.1%
Taylor expanded in F around inf 92.5%
*-commutative92.5%
associate-/r*92.5%
Simplified92.5%
Taylor expanded in B around 0 74.3%
Final simplification73.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* F (sqrt 0.5)) x))
(t_1 (/ x (tan B)))
(t_2 (- (/ -1.0 B) t_1)))
(if (<= F -7.8e+208)
t_2
(if (<= F -1.1e-9)
(/ (- -1.0 x) (sin B))
(if (<= F 1.25e-230)
(/ t_0 B)
(if (<= F 7e-103)
t_2
(if (<= F 1.35e-89)
(/ 1.0 (/ B t_0))
(- (* F (/ 1.0 (* F B))) t_1))))))))
double code(double F, double B, double x) {
double t_0 = (F * sqrt(0.5)) - x;
double t_1 = x / tan(B);
double t_2 = (-1.0 / B) - t_1;
double tmp;
if (F <= -7.8e+208) {
tmp = t_2;
} else if (F <= -1.1e-9) {
tmp = (-1.0 - x) / sin(B);
} else if (F <= 1.25e-230) {
tmp = t_0 / B;
} else if (F <= 7e-103) {
tmp = t_2;
} else if (F <= 1.35e-89) {
tmp = 1.0 / (B / t_0);
} else {
tmp = (F * (1.0 / (F * B))) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (f * sqrt(0.5d0)) - x
t_1 = x / tan(b)
t_2 = ((-1.0d0) / b) - t_1
if (f <= (-7.8d+208)) then
tmp = t_2
else if (f <= (-1.1d-9)) then
tmp = ((-1.0d0) - x) / sin(b)
else if (f <= 1.25d-230) then
tmp = t_0 / b
else if (f <= 7d-103) then
tmp = t_2
else if (f <= 1.35d-89) then
tmp = 1.0d0 / (b / t_0)
else
tmp = (f * (1.0d0 / (f * b))) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F * Math.sqrt(0.5)) - x;
double t_1 = x / Math.tan(B);
double t_2 = (-1.0 / B) - t_1;
double tmp;
if (F <= -7.8e+208) {
tmp = t_2;
} else if (F <= -1.1e-9) {
tmp = (-1.0 - x) / Math.sin(B);
} else if (F <= 1.25e-230) {
tmp = t_0 / B;
} else if (F <= 7e-103) {
tmp = t_2;
} else if (F <= 1.35e-89) {
tmp = 1.0 / (B / t_0);
} else {
tmp = (F * (1.0 / (F * B))) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F * math.sqrt(0.5)) - x t_1 = x / math.tan(B) t_2 = (-1.0 / B) - t_1 tmp = 0 if F <= -7.8e+208: tmp = t_2 elif F <= -1.1e-9: tmp = (-1.0 - x) / math.sin(B) elif F <= 1.25e-230: tmp = t_0 / B elif F <= 7e-103: tmp = t_2 elif F <= 1.35e-89: tmp = 1.0 / (B / t_0) else: tmp = (F * (1.0 / (F * B))) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F * sqrt(0.5)) - x) t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(-1.0 / B) - t_1) tmp = 0.0 if (F <= -7.8e+208) tmp = t_2; elseif (F <= -1.1e-9) tmp = Float64(Float64(-1.0 - x) / sin(B)); elseif (F <= 1.25e-230) tmp = Float64(t_0 / B); elseif (F <= 7e-103) tmp = t_2; elseif (F <= 1.35e-89) tmp = Float64(1.0 / Float64(B / t_0)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F * sqrt(0.5)) - x; t_1 = x / tan(B); t_2 = (-1.0 / B) - t_1; tmp = 0.0; if (F <= -7.8e+208) tmp = t_2; elseif (F <= -1.1e-9) tmp = (-1.0 - x) / sin(B); elseif (F <= 1.25e-230) tmp = t_0 / B; elseif (F <= 7e-103) tmp = t_2; elseif (F <= 1.35e-89) tmp = 1.0 / (B / t_0); else tmp = (F * (1.0 / (F * B))) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -7.8e+208], t$95$2, If[LessEqual[F, -1.1e-9], N[(N[(-1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-230], N[(t$95$0 / B), $MachinePrecision], If[LessEqual[F, 7e-103], t$95$2, If[LessEqual[F, 1.35e-89], N[(1.0 / N[(B / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \sqrt{0.5} - x\\
t_1 := \frac{x}{\tan B}\\
t_2 := \frac{-1}{B} - t_1\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{+208}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1 - x}{\sin B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-230}:\\
\;\;\;\;\frac{t_0}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-103}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-89}:\\
\;\;\;\;\frac{1}{\frac{B}{t_0}}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t_1\\
\end{array}
\end{array}
if F < -7.8000000000000001e208 or 1.25000000000000009e-230 < F < 7.00000000000000032e-103Initial program 65.0%
Taylor expanded in F around -inf 73.3%
*-un-lft-identity73.3%
+-commutative73.3%
div-inv73.4%
Applied egg-rr73.4%
*-lft-identity73.4%
unsub-neg73.4%
Simplified73.4%
Taylor expanded in B around 0 73.6%
if -7.8000000000000001e208 < F < -1.0999999999999999e-9Initial program 64.2%
Taylor expanded in F around -inf 95.6%
*-un-lft-identity95.6%
+-commutative95.6%
div-inv95.6%
Applied egg-rr95.6%
*-lft-identity95.6%
unsub-neg95.6%
Simplified95.6%
Taylor expanded in B around inf 95.6%
mul-1-neg95.6%
+-commutative95.6%
distribute-neg-in95.6%
distribute-neg-frac95.6%
metadata-eval95.6%
sub-neg95.6%
*-commutative95.6%
div-sub95.7%
Simplified95.7%
Taylor expanded in B around 0 84.6%
if -1.0999999999999999e-9 < F < 1.25000000000000009e-230Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around 0 57.0%
if 7.00000000000000032e-103 < F < 1.34999999999999994e-89Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.1%
associate-*r/98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in F around 0 98.9%
Taylor expanded in B around 0 79.9%
clear-num80.2%
inv-pow80.2%
inv-pow80.2%
sqrt-pow180.2%
*-commutative80.2%
fma-def80.2%
metadata-eval80.2%
Applied egg-rr80.2%
unpow-180.2%
Simplified80.2%
Taylor expanded in x around 0 80.2%
if 1.34999999999999994e-89 < F Initial program 66.5%
+-commutative66.5%
unsub-neg66.5%
associate-*l/78.1%
associate-*r/78.0%
*-commutative78.0%
Simplified78.1%
Taylor expanded in F around inf 92.5%
*-commutative92.5%
associate-/r*92.5%
Simplified92.5%
Taylor expanded in B around 0 74.3%
Final simplification71.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -2.75e+210)
t_0
(if (<= F -6.5e-11)
(/ (- -1.0 x) (sin B))
(if (<= F -6.2e-270)
t_0
(if (<= F 1.25e-237)
(/ (- x) B)
(if (<= F 8.2e+172)
t_0
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -2.75e+210) {
tmp = t_0;
} else if (F <= -6.5e-11) {
tmp = (-1.0 - x) / sin(B);
} else if (F <= -6.2e-270) {
tmp = t_0;
} else if (F <= 1.25e-237) {
tmp = -x / B;
} else if (F <= 8.2e+172) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-2.75d+210)) then
tmp = t_0
else if (f <= (-6.5d-11)) then
tmp = ((-1.0d0) - x) / sin(b)
else if (f <= (-6.2d-270)) then
tmp = t_0
else if (f <= 1.25d-237) then
tmp = -x / b
else if (f <= 8.2d+172) then
tmp = t_0
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -2.75e+210) {
tmp = t_0;
} else if (F <= -6.5e-11) {
tmp = (-1.0 - x) / Math.sin(B);
} else if (F <= -6.2e-270) {
tmp = t_0;
} else if (F <= 1.25e-237) {
tmp = -x / B;
} else if (F <= 8.2e+172) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -2.75e+210: tmp = t_0 elif F <= -6.5e-11: tmp = (-1.0 - x) / math.sin(B) elif F <= -6.2e-270: tmp = t_0 elif F <= 1.25e-237: tmp = -x / B elif F <= 8.2e+172: tmp = t_0 else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - 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 <= -2.75e+210) tmp = t_0; elseif (F <= -6.5e-11) tmp = Float64(Float64(-1.0 - x) / sin(B)); elseif (F <= -6.2e-270) tmp = t_0; elseif (F <= 1.25e-237) tmp = Float64(Float64(-x) / B); elseif (F <= 8.2e+172) tmp = t_0; else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -2.75e+210) tmp = t_0; elseif (F <= -6.5e-11) tmp = (-1.0 - x) / sin(B); elseif (F <= -6.2e-270) tmp = t_0; elseif (F <= 1.25e-237) tmp = -x / B; elseif (F <= 8.2e+172) tmp = t_0; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.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[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.75e+210], t$95$0, If[LessEqual[F, -6.5e-11], N[(N[(-1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.2e-270], t$95$0, If[LessEqual[F, 1.25e-237], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 8.2e+172], t$95$0, N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.75 \cdot 10^{+210}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1 - x}{\sin B}\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-270}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-237}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{+172}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.75000000000000006e210 or -6.49999999999999953e-11 < F < -6.2e-270 or 1.2500000000000001e-237 < F < 8.200000000000001e172Initial program 84.2%
Taylor expanded in F around -inf 54.4%
*-un-lft-identity54.4%
+-commutative54.4%
div-inv54.4%
Applied egg-rr54.4%
*-lft-identity54.4%
unsub-neg54.4%
Simplified54.4%
Taylor expanded in B around 0 59.2%
if -2.75000000000000006e210 < F < -6.49999999999999953e-11Initial program 64.2%
Taylor expanded in F around -inf 95.6%
*-un-lft-identity95.6%
+-commutative95.6%
div-inv95.6%
Applied egg-rr95.6%
*-lft-identity95.6%
unsub-neg95.6%
Simplified95.6%
Taylor expanded in B around inf 95.6%
mul-1-neg95.6%
+-commutative95.6%
distribute-neg-in95.6%
distribute-neg-frac95.6%
metadata-eval95.6%
sub-neg95.6%
*-commutative95.6%
div-sub95.7%
Simplified95.7%
Taylor expanded in B around 0 84.6%
if -6.2e-270 < F < 1.2500000000000001e-237Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.9%
Taylor expanded in F around inf 7.3%
*-commutative7.3%
associate-/r*7.3%
Simplified7.3%
Taylor expanded in B around 0 23.4%
Taylor expanded in x around inf 81.5%
associate-*r/81.5%
neg-mul-181.5%
Simplified81.5%
if 8.200000000000001e172 < F Initial program 29.9%
+-commutative29.9%
unsub-neg29.9%
associate-*l/47.3%
associate-*r/47.3%
*-commutative47.3%
Simplified47.3%
Taylor expanded in F around inf 99.7%
*-commutative99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 59.4%
associate--l+59.4%
*-commutative59.4%
*-commutative59.4%
div-sub59.4%
Simplified59.4%
Final simplification65.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -2.25e+208)
t_0
(if (<= F -1.1e-9)
(/ (- -1.0 x) (sin B))
(if (<= F 1.1e-233)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 8.2e+172)
t_0
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -2.25e+208) {
tmp = t_0;
} else if (F <= -1.1e-9) {
tmp = (-1.0 - x) / sin(B);
} else if (F <= 1.1e-233) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 8.2e+172) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-2.25d+208)) then
tmp = t_0
else if (f <= (-1.1d-9)) then
tmp = ((-1.0d0) - x) / sin(b)
else if (f <= 1.1d-233) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 8.2d+172) then
tmp = t_0
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -2.25e+208) {
tmp = t_0;
} else if (F <= -1.1e-9) {
tmp = (-1.0 - x) / Math.sin(B);
} else if (F <= 1.1e-233) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 8.2e+172) {
tmp = t_0;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -2.25e+208: tmp = t_0 elif F <= -1.1e-9: tmp = (-1.0 - x) / math.sin(B) elif F <= 1.1e-233: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 8.2e+172: tmp = t_0 else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - 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 <= -2.25e+208) tmp = t_0; elseif (F <= -1.1e-9) tmp = Float64(Float64(-1.0 - x) / sin(B)); elseif (F <= 1.1e-233) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 8.2e+172) tmp = t_0; else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -2.25e+208) tmp = t_0; elseif (F <= -1.1e-9) tmp = (-1.0 - x) / sin(B); elseif (F <= 1.1e-233) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 8.2e+172) tmp = t_0; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.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[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.25e+208], t$95$0, If[LessEqual[F, -1.1e-9], N[(N[(-1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-233], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.2e+172], t$95$0, N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.25 \cdot 10^{+208}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1 - x}{\sin B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-233}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{+172}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.25000000000000007e208 or 1.1e-233 < F < 8.200000000000001e172Initial program 77.4%
Taylor expanded in F around -inf 60.6%
*-un-lft-identity60.6%
+-commutative60.6%
div-inv60.7%
Applied egg-rr60.7%
*-lft-identity60.7%
unsub-neg60.7%
Simplified60.7%
Taylor expanded in B around 0 63.4%
if -2.25000000000000007e208 < F < -1.0999999999999999e-9Initial program 64.2%
Taylor expanded in F around -inf 95.6%
*-un-lft-identity95.6%
+-commutative95.6%
div-inv95.6%
Applied egg-rr95.6%
*-lft-identity95.6%
unsub-neg95.6%
Simplified95.6%
Taylor expanded in B around inf 95.6%
mul-1-neg95.6%
+-commutative95.6%
distribute-neg-in95.6%
distribute-neg-frac95.6%
metadata-eval95.6%
sub-neg95.6%
*-commutative95.6%
div-sub95.7%
Simplified95.7%
Taylor expanded in B around 0 84.6%
if -1.0999999999999999e-9 < F < 1.1e-233Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around 0 57.0%
if 8.200000000000001e172 < F Initial program 29.9%
+-commutative29.9%
unsub-neg29.9%
associate-*l/47.3%
associate-*r/47.3%
*-commutative47.3%
Simplified47.3%
Taylor expanded in F around inf 99.7%
*-commutative99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 59.4%
associate--l+59.4%
*-commutative59.4%
*-commutative59.4%
div-sub59.4%
Simplified59.4%
Final simplification64.7%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e-29)
(/ (- -1.0 x) (sin B))
(if (<= F 1.22e-60)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-29) {
tmp = (-1.0 - x) / sin(B);
} else if (F <= 1.22e-60) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.8d-29)) then
tmp = ((-1.0d0) - x) / sin(b)
else if (f <= 1.22d-60) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-29) {
tmp = (-1.0 - x) / Math.sin(B);
} else if (F <= 1.22e-60) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.8e-29: tmp = (-1.0 - x) / math.sin(B) elif F <= 1.22e-60: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.8e-29) tmp = Float64(Float64(-1.0 - x) / sin(B)); elseif (F <= 1.22e-60) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.8e-29) tmp = (-1.0 - x) / sin(B); elseif (F <= 1.22e-60) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.8e-29], N[(N[(-1.0 - x), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.22e-60], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{-1 - x}{\sin B}\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.79999999999999961e-29Initial program 54.4%
Taylor expanded in F around -inf 93.9%
*-un-lft-identity93.9%
+-commutative93.9%
div-inv93.9%
Applied egg-rr93.9%
*-lft-identity93.9%
unsub-neg93.9%
Simplified93.9%
Taylor expanded in B around inf 93.9%
mul-1-neg93.9%
+-commutative93.9%
distribute-neg-in93.9%
distribute-neg-frac93.9%
metadata-eval93.9%
sub-neg93.9%
*-commutative93.9%
div-sub93.9%
Simplified93.9%
Taylor expanded in B around 0 75.2%
if -8.79999999999999961e-29 < F < 1.22e-60Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 27.6%
*-commutative27.6%
associate-/r*27.6%
Simplified27.6%
Taylor expanded in B around 0 21.9%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 1.22e-60 < F Initial program 64.8%
+-commutative64.8%
unsub-neg64.8%
associate-*l/77.0%
associate-*r/76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in F around inf 92.1%
*-commutative92.1%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in B around 0 46.1%
associate--l+46.1%
*-commutative46.1%
*-commutative46.1%
div-sub46.1%
Simplified46.1%
Final simplification53.5%
(FPCore (F B x)
:precision binary64
(if (<= F -420000.0)
(/ -1.0 (sin B))
(if (<= F 1.22e-60)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -420000.0) {
tmp = -1.0 / sin(B);
} else if (F <= 1.22e-60) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-420000.0d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.22d-60) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -420000.0) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.22e-60) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -420000.0: tmp = -1.0 / math.sin(B) elif F <= 1.22e-60: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -420000.0) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.22e-60) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -420000.0) tmp = -1.0 / sin(B); elseif (F <= 1.22e-60) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -420000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.22e-60], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -420000:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.2e5Initial program 50.7%
Taylor expanded in F around -inf 99.8%
*-un-lft-identity99.8%
+-commutative99.8%
div-inv99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 61.7%
if -4.2e5 < F < 1.22e-60Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 27.2%
*-commutative27.2%
associate-/r*27.2%
Simplified27.2%
Taylor expanded in B around 0 21.7%
Taylor expanded in x around inf 41.0%
associate-*r/41.0%
neg-mul-141.0%
Simplified41.0%
if 1.22e-60 < F Initial program 64.8%
+-commutative64.8%
unsub-neg64.8%
associate-*l/77.0%
associate-*r/76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in F around inf 92.1%
*-commutative92.1%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in B around 0 46.1%
associate--l+46.1%
*-commutative46.1%
*-commutative46.1%
div-sub46.1%
Simplified46.1%
Final simplification48.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.6e-28)
(/ (- -1.0 x) B)
(if (<= F 1.18e-60)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e-28) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.18e-60) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.6d-28)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.18d-60) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e-28) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.18e-60) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.6e-28: tmp = (-1.0 - x) / B elif F <= 1.18e-60: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.6e-28) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.18e-60) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.6e-28) tmp = (-1.0 - x) / B; elseif (F <= 1.18e-60) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.6e-28], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.18e-60], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.6 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.18 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.59999999999999991e-28Initial program 54.4%
Taylor expanded in F around -inf 93.9%
*-un-lft-identity93.9%
+-commutative93.9%
div-inv93.9%
Applied egg-rr93.9%
*-lft-identity93.9%
unsub-neg93.9%
Simplified93.9%
Taylor expanded in B around inf 93.9%
mul-1-neg93.9%
+-commutative93.9%
distribute-neg-in93.9%
distribute-neg-frac93.9%
metadata-eval93.9%
sub-neg93.9%
*-commutative93.9%
div-sub93.9%
Simplified93.9%
Taylor expanded in B around 0 46.3%
associate-*r/46.3%
distribute-lft-in46.3%
metadata-eval46.3%
neg-mul-146.3%
sub-neg46.3%
Simplified46.3%
if -1.59999999999999991e-28 < F < 1.17999999999999994e-60Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 27.6%
*-commutative27.6%
associate-/r*27.6%
Simplified27.6%
Taylor expanded in B around 0 21.9%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 1.17999999999999994e-60 < F Initial program 64.8%
+-commutative64.8%
unsub-neg64.8%
associate-*l/77.0%
associate-*r/76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in F around inf 92.1%
*-commutative92.1%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in B around 0 46.1%
associate--l+46.1%
*-commutative46.1%
*-commutative46.1%
div-sub46.1%
Simplified46.1%
Final simplification44.7%
(FPCore (F B x)
:precision binary64
(if (<= F -5e-28)
(- (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (+ x 1.0) B))
(if (<= F 1.22e-60)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e-28) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B);
} else if (F <= 1.22e-60) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5d-28)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 1.22d-60) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5e-28) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B);
} else if (F <= 1.22e-60) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e-28: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B) elif F <= 1.22e-60: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e-28) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) - Float64(Float64(x + 1.0) / B)); elseif (F <= 1.22e-60) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e-28) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) - ((x + 1.0) / B); elseif (F <= 1.22e-60) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e-28], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.22e-60], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-28}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.0000000000000002e-28Initial program 54.4%
Taylor expanded in F around -inf 93.9%
Taylor expanded in B around 0 46.4%
if -5.0000000000000002e-28 < F < 1.22e-60Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 27.6%
*-commutative27.6%
associate-/r*27.6%
Simplified27.6%
Taylor expanded in B around 0 21.9%
Taylor expanded in x around inf 42.4%
associate-*r/42.4%
neg-mul-142.4%
Simplified42.4%
if 1.22e-60 < F Initial program 64.8%
+-commutative64.8%
unsub-neg64.8%
associate-*l/77.0%
associate-*r/76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in F around inf 92.1%
*-commutative92.1%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in B around 0 46.1%
associate--l+46.1%
*-commutative46.1%
*-commutative46.1%
div-sub46.1%
Simplified46.1%
Final simplification44.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.2e-27) (/ (- -1.0 x) B) (if (<= F 2.65e-95) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-27) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.65e-95) {
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.2d-27)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.65d-95) 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.2e-27) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.65e-95) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2e-27: tmp = (-1.0 - x) / B elif F <= 2.65e-95: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.2e-27) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.65e-95) 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.2e-27) tmp = (-1.0 - x) / B; elseif (F <= 2.65e-95) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2e-27], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.65e-95], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.65 \cdot 10^{-95}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.20000000000000001e-27Initial program 54.4%
Taylor expanded in F around -inf 93.9%
*-un-lft-identity93.9%
+-commutative93.9%
div-inv93.9%
Applied egg-rr93.9%
*-lft-identity93.9%
unsub-neg93.9%
Simplified93.9%
Taylor expanded in B around inf 93.9%
mul-1-neg93.9%
+-commutative93.9%
distribute-neg-in93.9%
distribute-neg-frac93.9%
metadata-eval93.9%
sub-neg93.9%
*-commutative93.9%
div-sub93.9%
Simplified93.9%
Taylor expanded in B around 0 46.3%
associate-*r/46.3%
distribute-lft-in46.3%
metadata-eval46.3%
neg-mul-146.3%
sub-neg46.3%
Simplified46.3%
if -1.20000000000000001e-27 < F < 2.6499999999999999e-95Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 25.3%
*-commutative25.3%
associate-/r*25.3%
Simplified25.3%
Taylor expanded in B around 0 21.1%
Taylor expanded in x around inf 43.2%
associate-*r/43.2%
neg-mul-143.2%
Simplified43.2%
if 2.6499999999999999e-95 < F Initial program 67.7%
+-commutative67.7%
unsub-neg67.7%
associate-*l/78.9%
associate-*r/78.7%
*-commutative78.7%
Simplified78.8%
Taylor expanded in F around inf 89.4%
*-commutative89.4%
associate-/r*89.3%
Simplified89.3%
Taylor expanded in B around 0 43.9%
Final simplification44.4%
(FPCore (F B x) :precision binary64 (if (<= F -1e-28) (/ (- -1.0 x) B) (if (<= F 1.32e+146) (/ (- x) B) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e-28) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.32e+146) {
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 <= (-1d-28)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.32d+146) 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 <= -1e-28) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.32e+146) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e-28: tmp = (-1.0 - x) / B elif F <= 1.32e+146: tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e-28) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.32e+146) 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 (F <= -1e-28) tmp = (-1.0 - x) / B; elseif (F <= 1.32e+146) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e-28], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.32e+146], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{+146}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -9.99999999999999971e-29Initial program 54.4%
Taylor expanded in F around -inf 93.9%
*-un-lft-identity93.9%
+-commutative93.9%
div-inv93.9%
Applied egg-rr93.9%
*-lft-identity93.9%
unsub-neg93.9%
Simplified93.9%
Taylor expanded in B around inf 93.9%
mul-1-neg93.9%
+-commutative93.9%
distribute-neg-in93.9%
distribute-neg-frac93.9%
metadata-eval93.9%
sub-neg93.9%
*-commutative93.9%
div-sub93.9%
Simplified93.9%
Taylor expanded in B around 0 46.3%
associate-*r/46.3%
distribute-lft-in46.3%
metadata-eval46.3%
neg-mul-146.3%
sub-neg46.3%
Simplified46.3%
if -9.99999999999999971e-29 < F < 1.32000000000000011e146Initial program 96.8%
+-commutative96.8%
unsub-neg96.8%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around inf 44.3%
*-commutative44.3%
associate-/r*44.2%
Simplified44.2%
Taylor expanded in B around 0 26.1%
Taylor expanded in x around inf 37.1%
associate-*r/37.1%
neg-mul-137.1%
Simplified37.1%
if 1.32000000000000011e146 < F Initial program 35.0%
+-commutative35.0%
unsub-neg35.0%
associate-*l/50.5%
associate-*r/50.5%
*-commutative50.5%
Simplified50.5%
Taylor expanded in F around inf 99.7%
*-commutative99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 54.8%
Taylor expanded in x around 0 35.7%
Final simplification39.7%
(FPCore (F B x) :precision binary64 (if (<= F 5.8e+146) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 5.8e+146) {
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 <= 5.8d+146) 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 <= 5.8e+146) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 5.8e+146: tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 5.8e+146) 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 (F <= 5.8e+146) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 5.8e+146], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 5.8 \cdot 10^{+146}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 5.7999999999999997e146Initial program 81.9%
+-commutative81.9%
unsub-neg81.9%
associate-*l/87.2%
associate-*r/87.2%
*-commutative87.2%
Simplified87.3%
Taylor expanded in F around inf 41.4%
*-commutative41.4%
associate-/r*41.4%
Simplified41.4%
Taylor expanded in B around 0 23.6%
Taylor expanded in x around inf 30.8%
associate-*r/30.8%
neg-mul-130.8%
Simplified30.8%
if 5.7999999999999997e146 < F Initial program 35.0%
+-commutative35.0%
unsub-neg35.0%
associate-*l/50.5%
associate-*r/50.5%
*-commutative50.5%
Simplified50.5%
Taylor expanded in F around inf 99.7%
*-commutative99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 54.8%
Taylor expanded in x around 0 35.7%
Final simplification31.5%
(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 75.5%
+-commutative75.5%
unsub-neg75.5%
associate-*l/82.2%
associate-*r/82.2%
*-commutative82.2%
Simplified82.3%
Taylor expanded in F around inf 49.4%
*-commutative49.4%
associate-/r*49.4%
Simplified49.4%
Taylor expanded in B around 0 27.8%
Taylor expanded in x around 0 9.3%
Final simplification9.3%
herbie shell --seed 2023257
(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))))))