
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 48.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(* (cos B) (/ x (sin B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 48.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (cos(B) * (x / sin(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2d+45)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 48.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (cos(b) * (x / sin(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2e+45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 48.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (Math.cos(B) * (x / Math.sin(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2e+45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 48.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (math.cos(B) * (x / math.sin(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 48.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(cos(B) * Float64(x / sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2e+45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 48.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (cos(B) * (x / sin(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 48.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+45}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 48:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.9999999999999999e45Initial program 55.8%
+-commutative55.8%
unsub-neg55.8%
associate-*l/67.3%
associate-*r/67.3%
*-commutative67.3%
Simplified67.4%
Taylor expanded in x around 0 67.4%
associate-*l/67.4%
*-lft-identity67.4%
unpow267.4%
fma-udef67.4%
Simplified67.4%
Taylor expanded in F around -inf 99.7%
if -1.9999999999999999e45 < F < 48Initial program 99.4%
Taylor expanded in x around 0 99.5%
associate-*r/99.6%
Simplified99.6%
if 48 < F Initial program 65.1%
+-commutative65.1%
unsub-neg65.1%
associate-*l/80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.5%
*-lft-identity80.5%
unpow280.5%
fma-udef80.5%
Simplified80.5%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.2e+154)
(- (/ -1.0 (sin B)) (* (cos B) (/ x (sin B))))
(if (<= F 200000000.0)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.2e+154) {
tmp = (-1.0 / sin(B)) - (cos(B) * (x / sin(B)));
} else if (F <= 200000000.0) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.2e+154) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(cos(B) * Float64(x / sin(B)))); elseif (F <= 200000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.2e+154], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{+154}:\\
\;\;\;\;\frac{-1}{\sin B} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.2000000000000001e154Initial program 30.3%
Taylor expanded in F around -inf 99.6%
Taylor expanded in x around 0 99.6%
associate-*r/30.3%
Simplified99.7%
if -2.2000000000000001e154 < F < 2e8Initial program 98.0%
+-commutative98.0%
unsub-neg98.0%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
expm1-log1p-u81.8%
expm1-udef65.8%
associate-*r/65.8%
sqrt-div65.8%
metadata-eval65.8%
un-div-inv65.8%
Applied egg-rr65.8%
expm1-def81.8%
expm1-log1p99.6%
associate-/l/99.6%
Simplified99.6%
if 2e8 < F Initial program 64.1%
+-commutative64.1%
unsub-neg64.1%
associate-*l/80.0%
associate-*r/79.9%
*-commutative79.9%
Simplified80.0%
Taylor expanded in x around 0 80.1%
associate-*l/80.0%
*-lft-identity80.0%
unpow280.0%
fma-udef80.0%
Simplified80.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+44)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 48.0)
(+
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan 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 <= -1e+44) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 48.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(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 <= (-1d+44)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 48.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(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 <= -1e+44) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 48.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(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 <= -1e+44: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 48.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(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 <= -1e+44) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 48.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(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 <= -1e+44) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 48.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(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, -1e+44], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 48.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+44}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 48:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.0000000000000001e44Initial program 55.8%
+-commutative55.8%
unsub-neg55.8%
associate-*l/67.3%
associate-*r/67.3%
*-commutative67.3%
Simplified67.4%
Taylor expanded in x around 0 67.4%
associate-*l/67.4%
*-lft-identity67.4%
unpow267.4%
fma-udef67.4%
Simplified67.4%
Taylor expanded in F around -inf 99.7%
if -1.0000000000000001e44 < F < 48Initial program 99.4%
if 48 < F Initial program 65.1%
+-commutative65.1%
unsub-neg65.1%
associate-*l/80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.5%
*-lft-identity80.5%
unpow280.5%
fma-udef80.5%
Simplified80.5%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e+66)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 48.0)
(+
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ -1.0 (/ (tan B) x)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3e+66) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 48.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (-1.0 / (tan(B) / x));
} 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 <= (-3d+66)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 48.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) + ((-1.0d0) / (tan(b) / x))
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 <= -3e+66) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 48.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (-1.0 / (Math.tan(B) / x));
} 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 <= -3e+66: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 48.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (-1.0 / (math.tan(B) / x)) 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 <= -3e+66) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 48.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) + Float64(-1.0 / Float64(tan(B) / x))); 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 <= -3e+66) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 48.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) + (-1.0 / (tan(B) / x)); 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, -3e+66], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 48.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+66}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 48:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.00000000000000002e66Initial program 54.1%
+-commutative54.1%
unsub-neg54.1%
associate-*l/66.0%
associate-*r/66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in x around 0 66.1%
associate-*l/66.1%
*-lft-identity66.1%
unpow266.1%
fma-udef66.1%
Simplified66.1%
Taylor expanded in F around -inf 99.7%
if -3.00000000000000002e66 < F < 48Initial program 99.4%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
if 48 < F Initial program 65.1%
+-commutative65.1%
unsub-neg65.1%
associate-*l/80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.5%
*-lft-identity80.5%
unpow280.5%
fma-udef80.5%
Simplified80.5%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) t_0)
(if (<= F 1.4)
(- (/ F (* (sin B) (sqrt 2.0))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.9) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - t_0;
} else if (F <= 1.4) {
tmp = (F / (sin(B) * sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.9d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - t_0
else if (f <= 1.4d0) then
tmp = (f / (sin(b) * sqrt(2.0d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.9) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - t_0;
} else if (F <= 1.4) {
tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - t_0 elif F <= 1.4: tmp = (F / (math.sin(B) * math.sqrt(2.0))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.9) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - t_0; elseif (F <= 1.4) tmp = (F / (sin(B) * sqrt(2.0))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.9], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.9:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 59.8%
+-commutative59.8%
unsub-neg59.8%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.2%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u55.0%
expm1-udef54.9%
associate-*r/54.9%
sqrt-div54.9%
metadata-eval54.9%
un-div-inv54.9%
Applied egg-rr54.9%
expm1-def55.0%
expm1-log1p70.3%
associate-/l/70.4%
Simplified70.4%
Taylor expanded in F around -inf 99.2%
mul-1-neg99.2%
Simplified99.2%
if -0.900000000000000022 < F < 1.3999999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
expm1-log1p-u87.9%
expm1-udef65.1%
associate-*r/65.1%
sqrt-div65.1%
metadata-eval65.1%
un-div-inv65.1%
Applied egg-rr65.1%
expm1-def88.0%
expm1-log1p99.6%
associate-/l/99.6%
Simplified99.6%
Taylor expanded in F around 0 99.0%
if 1.3999999999999999 < F Initial program 65.1%
+-commutative65.1%
unsub-neg65.1%
associate-*l/80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.5%
*-lft-identity80.5%
unpow280.5%
fma-udef80.5%
Simplified80.5%
Taylor expanded in F around inf 99.8%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.92)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) 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 <= -0.92) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - 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 <= (-0.92d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - 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 <= -0.92) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - 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 <= -0.92: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - 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 <= -0.92) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F * 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 <= -0.92) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - 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, -0.92], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 59.8%
+-commutative59.8%
unsub-neg59.8%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.2%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u55.0%
expm1-udef54.9%
associate-*r/54.9%
sqrt-div54.9%
metadata-eval54.9%
un-div-inv54.9%
Applied egg-rr54.9%
expm1-def55.0%
expm1-log1p70.3%
associate-/l/70.4%
Simplified70.4%
Taylor expanded in F around -inf 99.2%
mul-1-neg99.2%
Simplified99.2%
if -0.92000000000000004 < F < 1.3999999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 99.0%
if 1.3999999999999999 < F Initial program 65.1%
+-commutative65.1%
unsub-neg65.1%
associate-*l/80.5%
associate-*r/80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.5%
*-lft-identity80.5%
unpow280.5%
fma-udef80.5%
Simplified80.5%
Taylor expanded in F around inf 99.8%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (+ F (/ 1.0 F)))
(t_2 (/ x (tan B))))
(if (<= F -680000.0)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -7e-274)
t_0
(if (<= F 6.6e-23)
(- (/ F (* (sin B) t_1)) t_2)
(if (<= F 1.38e-8) t_0 (- (/ (/ F t_1) (sin B)) t_2)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = F + (1.0 / F);
double t_2 = x / tan(B);
double tmp;
if (F <= -680000.0) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -7e-274) {
tmp = t_0;
} else if (F <= 6.6e-23) {
tmp = (F / (sin(B) * t_1)) - t_2;
} else if (F <= 1.38e-8) {
tmp = t_0;
} else {
tmp = ((F / t_1) / sin(B)) - t_2;
}
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 / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = f + (1.0d0 / f)
t_2 = x / tan(b)
if (f <= (-680000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-7d-274)) then
tmp = t_0
else if (f <= 6.6d-23) then
tmp = (f / (sin(b) * t_1)) - t_2
else if (f <= 1.38d-8) then
tmp = t_0
else
tmp = ((f / t_1) / sin(b)) - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = F + (1.0 / F);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -680000.0) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -7e-274) {
tmp = t_0;
} else if (F <= 6.6e-23) {
tmp = (F / (Math.sin(B) * t_1)) - t_2;
} else if (F <= 1.38e-8) {
tmp = t_0;
} else {
tmp = ((F / t_1) / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) t_1 = F + (1.0 / F) t_2 = x / math.tan(B) tmp = 0 if F <= -680000.0: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -7e-274: tmp = t_0 elif F <= 6.6e-23: tmp = (F / (math.sin(B) * t_1)) - t_2 elif F <= 1.38e-8: tmp = t_0 else: tmp = ((F / t_1) / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(F + Float64(1.0 / F)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -680000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -7e-274) tmp = t_0; elseif (F <= 6.6e-23) tmp = Float64(Float64(F / Float64(sin(B) * t_1)) - t_2); elseif (F <= 1.38e-8) tmp = t_0; else tmp = Float64(Float64(Float64(F / t_1) / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = F + (1.0 / F); t_2 = x / tan(B); tmp = 0.0; if (F <= -680000.0) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -7e-274) tmp = t_0; elseif (F <= 6.6e-23) tmp = (F / (sin(B) * t_1)) - t_2; elseif (F <= 1.38e-8) tmp = t_0; else tmp = ((F / t_1) / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -680000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -7e-274], t$95$0, If[LessEqual[F, 6.6e-23], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 1.38e-8], t$95$0, N[(N[(N[(F / t$95$1), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := F + \frac{1}{F}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -680000:\\
\;\;\;\;\frac{-1}{\sin B} - t_2\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-274}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-23}:\\
\;\;\;\;\frac{F}{\sin B \cdot t_1} - t_2\\
\mathbf{elif}\;F \leq 1.38 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{t_1}}{\sin B} - t_2\\
\end{array}
\end{array}
if F < -6.8e5Initial program 58.8%
+-commutative58.8%
unsub-neg58.8%
associate-*l/69.6%
associate-*r/69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
unpow269.6%
fma-udef69.6%
Simplified69.6%
Taylor expanded in F around -inf 99.7%
if -6.8e5 < F < -6.99999999999999963e-274 or 6.60000000000000041e-23 < F < 1.37999999999999995e-8Initial program 99.5%
Taylor expanded in B around 0 81.8%
if -6.99999999999999963e-274 < F < 6.60000000000000041e-23Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.5%
Taylor expanded in x around 0 99.6%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
expm1-log1p-u97.7%
expm1-udef79.3%
associate-*r/79.3%
sqrt-div79.3%
metadata-eval79.3%
un-div-inv79.3%
Applied egg-rr79.3%
expm1-def97.8%
expm1-log1p99.6%
associate-/l/99.6%
Simplified99.6%
Taylor expanded in F around inf 80.6%
if 1.37999999999999995e-8 < F Initial program 66.0%
+-commutative66.0%
unsub-neg66.0%
associate-*l/81.0%
associate-*r/81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x around 0 81.1%
associate-*l/81.0%
*-lft-identity81.0%
unpow281.0%
fma-udef81.0%
Simplified81.0%
associate-*r/81.1%
sqrt-div81.1%
metadata-eval81.1%
un-div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in F around inf 98.6%
Final simplification92.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1 (- (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ (sin B) F)) (/ x B)))
(t_2 (+ F (/ 1.0 F))))
(if (<= F -0.0165)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) t_0)
(if (<= F -7e-274)
t_1
(if (<= F 7e-23)
(- (/ F (* (sin B) t_2)) t_0)
(if (<= F 1.38e-8) t_1 (- (/ (/ F t_2) (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (sqrt((1.0 / (2.0 + (x * 2.0)))) / (sin(B) / F)) - (x / B);
double t_2 = F + (1.0 / F);
double tmp;
if (F <= -0.0165) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - t_0;
} else if (F <= -7e-274) {
tmp = t_1;
} else if (F <= 7e-23) {
tmp = (F / (sin(B) * t_2)) - t_0;
} else if (F <= 1.38e-8) {
tmp = t_1;
} else {
tmp = ((F / t_2) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x / tan(b)
t_1 = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / (sin(b) / f)) - (x / b)
t_2 = f + (1.0d0 / f)
if (f <= (-0.0165d0)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - t_0
else if (f <= (-7d-274)) then
tmp = t_1
else if (f <= 7d-23) then
tmp = (f / (sin(b) * t_2)) - t_0
else if (f <= 1.38d-8) then
tmp = t_1
else
tmp = ((f / t_2) / 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 t_1 = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / (Math.sin(B) / F)) - (x / B);
double t_2 = F + (1.0 / F);
double tmp;
if (F <= -0.0165) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - t_0;
} else if (F <= -7e-274) {
tmp = t_1;
} else if (F <= 7e-23) {
tmp = (F / (Math.sin(B) * t_2)) - t_0;
} else if (F <= 1.38e-8) {
tmp = t_1;
} else {
tmp = ((F / t_2) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / (math.sin(B) / F)) - (x / B) t_2 = F + (1.0 / F) tmp = 0 if F <= -0.0165: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - t_0 elif F <= -7e-274: tmp = t_1 elif F <= 7e-23: tmp = (F / (math.sin(B) * t_2)) - t_0 elif F <= 1.38e-8: tmp = t_1 else: tmp = ((F / t_2) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / Float64(sin(B) / F)) - Float64(x / B)) t_2 = Float64(F + Float64(1.0 / F)) tmp = 0.0 if (F <= -0.0165) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - t_0); elseif (F <= -7e-274) tmp = t_1; elseif (F <= 7e-23) tmp = Float64(Float64(F / Float64(sin(B) * t_2)) - t_0); elseif (F <= 1.38e-8) tmp = t_1; else tmp = Float64(Float64(Float64(F / t_2) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (sqrt((1.0 / (2.0 + (x * 2.0)))) / (sin(B) / F)) - (x / B); t_2 = F + (1.0 / F); tmp = 0.0; if (F <= -0.0165) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - t_0; elseif (F <= -7e-274) tmp = t_1; elseif (F <= 7e-23) tmp = (F / (sin(B) * t_2)) - t_0; elseif (F <= 1.38e-8) tmp = t_1; else tmp = ((F / t_2) / sin(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[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0165], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7e-274], t$95$1, If[LessEqual[F, 7e-23], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.38e-8], t$95$1, N[(N[(N[(F / t$95$2), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\frac{\sin B}{F}} - \frac{x}{B}\\
t_2 := F + \frac{1}{F}\\
\mathbf{if}\;F \leq -0.0165:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - t_0\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-274}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-23}:\\
\;\;\;\;\frac{F}{\sin B \cdot t_2} - t_0\\
\mathbf{elif}\;F \leq 1.38 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{t_2}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.016500000000000001Initial program 59.8%
+-commutative59.8%
unsub-neg59.8%
associate-*l/70.2%
associate-*r/70.2%
*-commutative70.2%
Simplified70.3%
Taylor expanded in x around 0 70.2%
associate-*l/70.3%
*-lft-identity70.3%
unpow270.3%
fma-udef70.3%
Simplified70.3%
expm1-log1p-u55.0%
expm1-udef54.9%
associate-*r/54.9%
sqrt-div54.9%
metadata-eval54.9%
un-div-inv54.9%
Applied egg-rr54.9%
expm1-def55.0%
expm1-log1p70.3%
associate-/l/70.4%
Simplified70.4%
Taylor expanded in F around -inf 99.2%
mul-1-neg99.2%
Simplified99.2%
if -0.016500000000000001 < F < -6.99999999999999963e-274 or 6.99999999999999987e-23 < F < 1.37999999999999995e-8Initial program 99.5%
*-commutative99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.4%
un-div-inv99.2%
fma-def99.2%
fma-udef99.2%
*-commutative99.2%
fma-def99.2%
fma-def99.2%
Applied egg-rr99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 80.7%
if -6.99999999999999963e-274 < F < 6.99999999999999987e-23Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.5%
Taylor expanded in x around 0 99.6%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
expm1-log1p-u97.7%
expm1-udef79.3%
associate-*r/79.3%
sqrt-div79.3%
metadata-eval79.3%
un-div-inv79.3%
Applied egg-rr79.3%
expm1-def97.8%
expm1-log1p99.6%
associate-/l/99.6%
Simplified99.6%
Taylor expanded in F around inf 80.6%
if 1.37999999999999995e-8 < F Initial program 66.0%
+-commutative66.0%
unsub-neg66.0%
associate-*l/81.0%
associate-*r/81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x around 0 81.1%
associate-*l/81.0%
*-lft-identity81.0%
unpow281.0%
fma-udef81.0%
Simplified81.0%
associate-*r/81.1%
sqrt-div81.1%
metadata-eval81.1%
un-div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in F around inf 98.6%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e-80)
(- (/ -1.0 (sin B)) t_0)
(- (/ F (* (sin B) (+ F (/ 1.0 F)))) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e-80) {
tmp = (-1.0 / sin(B)) - t_0;
} else {
tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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.7d-80)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else
tmp = (f / (sin(b) * (f + (1.0d0 / f)))) - 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.7e-80) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else {
tmp = (F / (Math.sin(B) * (F + (1.0 / F)))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.7e-80: tmp = (-1.0 / math.sin(B)) - t_0 else: tmp = (F / (math.sin(B) * (F + (1.0 / F)))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.7e-80) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); else tmp = Float64(Float64(F / Float64(sin(B) * Float64(F + Float64(1.0 / F)))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.7e-80) tmp = (-1.0 / sin(B)) - t_0; else tmp = (F / (sin(B) * (F + (1.0 / F)))) - 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.7e-80], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{-80}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(F + \frac{1}{F}\right)} - t_0\\
\end{array}
\end{array}
if F < -2.7000000000000002e-80Initial program 64.2%
+-commutative64.2%
unsub-neg64.2%
associate-*l/73.5%
associate-*r/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 91.3%
if -2.7000000000000002e-80 < F Initial program 83.8%
+-commutative83.8%
unsub-neg83.8%
associate-*l/90.8%
associate-*r/90.7%
*-commutative90.7%
Simplified90.9%
Taylor expanded in x around 0 90.9%
associate-*l/90.9%
*-lft-identity90.9%
unpow290.9%
fma-udef90.9%
Simplified90.9%
expm1-log1p-u74.7%
expm1-udef63.7%
associate-*r/63.7%
sqrt-div63.7%
metadata-eval63.7%
un-div-inv63.7%
Applied egg-rr63.7%
expm1-def74.8%
expm1-log1p90.9%
associate-/l/90.9%
Simplified90.9%
Taylor expanded in F around inf 85.4%
Final simplification87.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e-80)
(- (/ -1.0 (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e-80) {
tmp = (-1.0 / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.7d-80)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.7e-80) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.7e-80: tmp = (-1.0 / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.7e-80) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.7e-80) tmp = (-1.0 / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.7e-80], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{-80}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.7000000000000002e-80Initial program 64.2%
+-commutative64.2%
unsub-neg64.2%
associate-*l/73.5%
associate-*r/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 91.3%
if -2.7000000000000002e-80 < F Initial program 83.8%
+-commutative83.8%
unsub-neg83.8%
associate-*l/90.8%
associate-*r/90.7%
*-commutative90.7%
Simplified90.9%
Taylor expanded in x around 0 90.9%
associate-*l/90.9%
*-lft-identity90.9%
unpow290.9%
fma-udef90.9%
Simplified90.9%
associate-*r/90.9%
sqrt-div90.9%
metadata-eval90.9%
un-div-inv90.9%
Applied egg-rr90.9%
Taylor expanded in F around inf 85.4%
Final simplification87.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e-116)
(- (/ F (* (sin B) (- (/ -1.0 F) F))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3e-116) {
tmp = (F / (sin(B) * ((-1.0 / F) - F))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3d-116)) then
tmp = (f / (sin(b) * (((-1.0d0) / f) - f))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3e-116) {
tmp = (F / (Math.sin(B) * ((-1.0 / F) - F))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3e-116: tmp = (F / (math.sin(B) * ((-1.0 / F) - F))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3e-116) tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-1.0 / F) - F))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3e-116) tmp = (F / (sin(B) * ((-1.0 / F) - F))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e-116], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{-116}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(\frac{-1}{F} - F\right)} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.00000000000000026e-116Initial program 64.9%
+-commutative64.9%
unsub-neg64.9%
associate-*l/74.0%
associate-*r/74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in x around 0 74.0%
associate-*l/74.0%
*-lft-identity74.0%
unpow274.0%
fma-udef74.0%
Simplified74.0%
expm1-log1p-u55.6%
expm1-udef49.9%
associate-*r/49.9%
sqrt-div49.9%
metadata-eval49.9%
un-div-inv49.9%
Applied egg-rr49.9%
expm1-def55.7%
expm1-log1p74.1%
associate-/l/74.1%
Simplified74.1%
Taylor expanded in F around -inf 90.9%
mul-1-neg90.9%
Simplified90.9%
if -3.00000000000000026e-116 < F Initial program 83.5%
+-commutative83.5%
unsub-neg83.5%
associate-*l/90.7%
associate-*r/90.6%
*-commutative90.6%
Simplified90.8%
Taylor expanded in x around 0 90.8%
associate-*l/90.8%
*-lft-identity90.8%
unpow290.8%
fma-udef90.8%
Simplified90.8%
associate-*r/90.8%
sqrt-div90.8%
metadata-eval90.8%
un-div-inv90.8%
Applied egg-rr90.8%
Taylor expanded in F around inf 85.8%
Final simplification87.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2.9e+156)
t_0
(if (<= F -6.2e+110)
(/ (- x) (tan B))
(if (<= F -1.22e-57)
t_0
(if (<= F 2.5e-94)
(* (cos B) (/ x (- (sin B))))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2.9e+156) {
tmp = t_0;
} else if (F <= -6.2e+110) {
tmp = -x / tan(B);
} else if (F <= -1.22e-57) {
tmp = t_0;
} else if (F <= 2.5e-94) {
tmp = cos(B) * (x / -sin(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (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) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2.9d+156)) then
tmp = t_0
else if (f <= (-6.2d+110)) then
tmp = -x / tan(b)
else if (f <= (-1.22d-57)) then
tmp = t_0
else if (f <= 2.5d-94) then
tmp = cos(b) * (x / -sin(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / 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)) - (x / B);
double tmp;
if (F <= -2.9e+156) {
tmp = t_0;
} else if (F <= -6.2e+110) {
tmp = -x / Math.tan(B);
} else if (F <= -1.22e-57) {
tmp = t_0;
} else if (F <= 2.5e-94) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2.9e+156: tmp = t_0 elif F <= -6.2e+110: tmp = -x / math.tan(B) elif F <= -1.22e-57: tmp = t_0 elif F <= 2.5e-94: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.9e+156) tmp = t_0; elseif (F <= -6.2e+110) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= -1.22e-57) tmp = t_0; elseif (F <= 2.5e-94) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2.9e+156) tmp = t_0; elseif (F <= -6.2e+110) tmp = -x / tan(B); elseif (F <= -1.22e-57) tmp = t_0; elseif (F <= 2.5e-94) tmp = cos(B) * (x / -sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e+156], t$95$0, If[LessEqual[F, -6.2e+110], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.22e-57], t$95$0, If[LessEqual[F, 2.5e-94], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{+156}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{+110}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq -1.22 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-94}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.9000000000000001e156 or -6.20000000000000035e110 < F < -1.2200000000000001e-57Initial program 59.8%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 72.1%
if -2.9000000000000001e156 < F < -6.20000000000000035e110Initial program 85.9%
Taylor expanded in F around -inf 99.5%
Taylor expanded in x around inf 86.1%
associate-*r/86.1%
mul-1-neg86.1%
Simplified86.1%
div-inv86.1%
distribute-rgt-neg-in86.1%
Applied egg-rr86.1%
un-div-inv86.1%
*-commutative86.1%
associate-/l*86.0%
tan-quot86.4%
un-div-inv86.1%
distribute-lft-neg-in86.1%
neg-sub086.1%
un-div-inv86.4%
Applied egg-rr86.4%
neg-sub086.4%
distribute-neg-frac86.4%
Simplified86.4%
if -1.2200000000000001e-57 < F < 2.4999999999999998e-94Initial program 99.4%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 76.2%
associate-*r/76.2%
mul-1-neg76.2%
Simplified76.2%
div-inv75.9%
distribute-rgt-neg-in75.9%
Applied egg-rr75.9%
un-div-inv76.2%
frac-2neg76.2%
*-rgt-identity76.2%
*-rgt-identity76.2%
add-sqr-sqrt20.4%
sqrt-unprod17.6%
sqr-neg17.6%
sqrt-unprod1.0%
add-sqr-sqrt2.2%
distribute-rgt-neg-out2.2%
add-sqr-sqrt1.2%
sqrt-unprod40.7%
sqr-neg40.7%
sqrt-unprod55.5%
add-sqr-sqrt76.2%
*-commutative76.2%
Applied egg-rr76.2%
associate-/l*76.1%
associate-/r/76.3%
Simplified76.3%
if 2.4999999999999998e-94 < F Initial program 71.0%
Taylor expanded in F around inf 75.7%
Taylor expanded in B around 0 72.5%
Final simplification74.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e-80)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8e-32) (* (cos B) (/ x (- (sin B)))) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e-80) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8e-32) {
tmp = cos(B) * (x / -sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.7d-80)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8d-32) then
tmp = cos(b) * (x / -sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.7e-80) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8e-32) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.7e-80: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8e-32: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.7e-80) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8e-32) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.7e-80) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8e-32) tmp = cos(B) * (x / -sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.7e-80], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-32], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{-80}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-32}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.7000000000000002e-80Initial program 64.2%
+-commutative64.2%
unsub-neg64.2%
associate-*l/73.5%
associate-*r/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 91.3%
if -2.7000000000000002e-80 < F < 8.00000000000000045e-32Initial program 99.4%
Taylor expanded in F around -inf 36.6%
Taylor expanded in x around inf 78.0%
associate-*r/78.0%
mul-1-neg78.0%
Simplified78.0%
div-inv77.7%
distribute-rgt-neg-in77.7%
Applied egg-rr77.7%
un-div-inv78.0%
frac-2neg78.0%
*-rgt-identity78.0%
*-rgt-identity78.0%
add-sqr-sqrt22.5%
sqrt-unprod19.8%
sqr-neg19.8%
sqrt-unprod1.0%
add-sqr-sqrt1.9%
distribute-rgt-neg-out1.9%
add-sqr-sqrt0.9%
sqrt-unprod39.7%
sqr-neg39.7%
sqrt-unprod55.3%
add-sqr-sqrt78.0%
*-commutative78.0%
Applied egg-rr78.0%
associate-/l*78.0%
associate-/r/78.1%
Simplified78.1%
if 8.00000000000000045e-32 < F Initial program 69.3%
+-commutative69.3%
unsub-neg69.3%
associate-*l/82.9%
associate-*r/82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in x around 0 82.9%
associate-*l/82.8%
*-lft-identity82.8%
unpow282.8%
fma-udef82.8%
Simplified82.8%
Taylor expanded in F around inf 92.1%
Final simplification87.7%
(FPCore (F B x)
:precision binary64
(if (<= F -2.7e-80)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 6.7e-99)
(* (cos B) (/ x (- (sin B))))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e-80) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 6.7e-99) {
tmp = cos(B) * (x / -sin(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (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 <= (-2.7d-80)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 6.7d-99) then
tmp = cos(b) * (x / -sin(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e-80) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 6.7e-99) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.7e-80: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 6.7e-99: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.7e-80) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 6.7e-99) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.7e-80) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 6.7e-99) tmp = cos(B) * (x / -sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.7e-80], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.7e-99], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.7 \cdot 10^{-80}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 6.7 \cdot 10^{-99}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.7000000000000002e-80Initial program 64.2%
+-commutative64.2%
unsub-neg64.2%
associate-*l/73.5%
associate-*r/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in x around 0 73.5%
associate-*l/73.5%
*-lft-identity73.5%
unpow273.5%
fma-udef73.5%
Simplified73.5%
Taylor expanded in F around -inf 91.3%
if -2.7000000000000002e-80 < F < 6.6999999999999999e-99Initial program 99.4%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 77.9%
associate-*r/77.9%
mul-1-neg77.9%
Simplified77.9%
div-inv77.6%
distribute-rgt-neg-in77.6%
Applied egg-rr77.6%
un-div-inv77.9%
frac-2neg77.9%
*-rgt-identity77.9%
*-rgt-identity77.9%
add-sqr-sqrt21.3%
sqrt-unprod18.3%
sqr-neg18.3%
sqrt-unprod1.0%
add-sqr-sqrt1.9%
distribute-rgt-neg-out1.9%
add-sqr-sqrt0.9%
sqrt-unprod40.7%
sqr-neg40.7%
sqrt-unprod56.3%
add-sqr-sqrt77.9%
*-commutative77.9%
Applied egg-rr77.9%
associate-/l*77.8%
associate-/r/78.0%
Simplified78.0%
if 6.6999999999999999e-99 < F Initial program 71.0%
Taylor expanded in F around inf 75.7%
Taylor expanded in B around 0 72.5%
Final simplification81.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -5.5e+156)
t_1
(if (<= F -5.9e+110)
t_0
(if (<= F -1.22e-57)
t_1
(if (<= F 1.05e-60) t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -5.5e+156) {
tmp = t_1;
} else if (F <= -5.9e+110) {
tmp = t_0;
} else if (F <= -1.22e-57) {
tmp = t_1;
} else if (F <= 1.05e-60) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-5.5d+156)) then
tmp = t_1
else if (f <= (-5.9d+110)) then
tmp = t_0
else if (f <= (-1.22d-57)) then
tmp = t_1
else if (f <= 1.05d-60) then
tmp = t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -5.5e+156) {
tmp = t_1;
} else if (F <= -5.9e+110) {
tmp = t_0;
} else if (F <= -1.22e-57) {
tmp = t_1;
} else if (F <= 1.05e-60) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -5.5e+156: tmp = t_1 elif F <= -5.9e+110: tmp = t_0 elif F <= -1.22e-57: tmp = t_1 elif F <= 1.05e-60: tmp = t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -5.5e+156) tmp = t_1; elseif (F <= -5.9e+110) tmp = t_0; elseif (F <= -1.22e-57) tmp = t_1; elseif (F <= 1.05e-60) tmp = t_0; else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -5.5e+156) tmp = t_1; elseif (F <= -5.9e+110) tmp = t_0; elseif (F <= -1.22e-57) tmp = t_1; elseif (F <= 1.05e-60) tmp = t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); 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 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.5e+156], t$95$1, If[LessEqual[F, -5.9e+110], t$95$0, If[LessEqual[F, -1.22e-57], t$95$1, If[LessEqual[F, 1.05e-60], t$95$0, N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -5.5 \cdot 10^{+156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -5.9 \cdot 10^{+110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.22 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -5.5000000000000003e156 or -5.8999999999999997e110 < F < -1.2200000000000001e-57Initial program 59.8%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 72.1%
if -5.5000000000000003e156 < F < -5.8999999999999997e110 or -1.2200000000000001e-57 < F < 1.04999999999999996e-60Initial program 97.5%
Taylor expanded in F around -inf 45.8%
Taylor expanded in x around inf 78.3%
associate-*r/78.3%
mul-1-neg78.3%
Simplified78.3%
div-inv78.1%
distribute-rgt-neg-in78.1%
Applied egg-rr78.1%
un-div-inv78.3%
*-commutative78.3%
associate-/l*78.2%
tan-quot78.4%
un-div-inv78.1%
distribute-lft-neg-in78.1%
neg-sub078.1%
un-div-inv78.4%
Applied egg-rr78.4%
neg-sub078.4%
distribute-neg-frac78.4%
Simplified78.4%
if 1.04999999999999996e-60 < F Initial program 70.0%
Taylor expanded in F around inf 77.1%
Taylor expanded in B around 0 71.6%
Final simplification74.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -5.5e+156)
t_1
(if (<= F -6.2e+110)
t_0
(if (<= F -1.22e-57)
t_1
(if (or (<= F 3600.0) (not (<= F 1.75e+90))) t_0 (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -5.5e+156) {
tmp = t_1;
} else if (F <= -6.2e+110) {
tmp = t_0;
} else if (F <= -1.22e-57) {
tmp = t_1;
} else if ((F <= 3600.0) || !(F <= 1.75e+90)) {
tmp = t_0;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-5.5d+156)) then
tmp = t_1
else if (f <= (-6.2d+110)) then
tmp = t_0
else if (f <= (-1.22d-57)) then
tmp = t_1
else if ((f <= 3600.0d0) .or. (.not. (f <= 1.75d+90))) then
tmp = t_0
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -5.5e+156) {
tmp = t_1;
} else if (F <= -6.2e+110) {
tmp = t_0;
} else if (F <= -1.22e-57) {
tmp = t_1;
} else if ((F <= 3600.0) || !(F <= 1.75e+90)) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -5.5e+156: tmp = t_1 elif F <= -6.2e+110: tmp = t_0 elif F <= -1.22e-57: tmp = t_1 elif (F <= 3600.0) or not (F <= 1.75e+90): tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -5.5e+156) tmp = t_1; elseif (F <= -6.2e+110) tmp = t_0; elseif (F <= -1.22e-57) tmp = t_1; elseif ((F <= 3600.0) || !(F <= 1.75e+90)) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -5.5e+156) tmp = t_1; elseif (F <= -6.2e+110) tmp = t_0; elseif (F <= -1.22e-57) tmp = t_1; elseif ((F <= 3600.0) || ~((F <= 1.75e+90))) tmp = t_0; else tmp = (1.0 - x) / B; 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 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.5e+156], t$95$1, If[LessEqual[F, -6.2e+110], t$95$0, If[LessEqual[F, -1.22e-57], t$95$1, If[Or[LessEqual[F, 3600.0], N[Not[LessEqual[F, 1.75e+90]], $MachinePrecision]], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -5.5 \cdot 10^{+156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{+110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.22 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 3600 \lor \neg \left(F \leq 1.75 \cdot 10^{+90}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.5000000000000003e156 or -6.20000000000000035e110 < F < -1.2200000000000001e-57Initial program 59.8%
Taylor expanded in F around -inf 92.0%
Taylor expanded in B around 0 72.1%
if -5.5000000000000003e156 < F < -6.20000000000000035e110 or -1.2200000000000001e-57 < F < 3600 or 1.7499999999999999e90 < F Initial program 83.3%
Taylor expanded in F around -inf 52.0%
Taylor expanded in x around inf 70.8%
associate-*r/70.8%
mul-1-neg70.8%
Simplified70.8%
div-inv70.6%
distribute-rgt-neg-in70.6%
Applied egg-rr70.6%
un-div-inv70.8%
*-commutative70.8%
associate-/l*70.7%
tan-quot70.8%
un-div-inv70.7%
distribute-lft-neg-in70.7%
neg-sub070.7%
un-div-inv70.8%
Applied egg-rr70.8%
neg-sub070.8%
distribute-neg-frac70.8%
Simplified70.8%
if 3600 < F < 1.7499999999999999e90Initial program 98.9%
Taylor expanded in F around inf 98.9%
Taylor expanded in B around 0 70.9%
Taylor expanded in B around 0 71.6%
Final simplification71.3%
(FPCore (F B x)
:precision binary64
(if (<= F -4.5e+156)
(+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B))
(if (or (<= F 6600000.0) (not (<= F 4.5e+85)))
(/ (- x) (tan B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.5e+156) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if ((F <= 6600000.0) || !(F <= 4.5e+85)) {
tmp = -x / tan(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 <= (-4.5d+156)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if ((f <= 6600000.0d0) .or. (.not. (f <= 4.5d+85))) then
tmp = -x / tan(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 <= -4.5e+156) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if ((F <= 6600000.0) || !(F <= 4.5e+85)) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.5e+156: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif (F <= 6600000.0) or not (F <= 4.5e+85): tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.5e+156) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif ((F <= 6600000.0) || !(F <= 4.5e+85)) tmp = Float64(Float64(-x) / tan(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 <= -4.5e+156) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif ((F <= 6600000.0) || ~((F <= 4.5e+85))) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.5e+156], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 6600000.0], N[Not[LessEqual[F, 4.5e+85]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.5 \cdot 10^{+156}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6600000 \lor \neg \left(F \leq 4.5 \cdot 10^{+85}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.50000000000000031e156Initial program 30.1%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 57.8%
if -4.50000000000000031e156 < F < 6.6e6 or 4.50000000000000007e85 < F Initial program 85.7%
Taylor expanded in F around -inf 57.7%
Taylor expanded in x around inf 65.5%
associate-*r/65.5%
mul-1-neg65.5%
Simplified65.5%
div-inv65.4%
distribute-rgt-neg-in65.4%
Applied egg-rr65.4%
un-div-inv65.5%
*-commutative65.5%
associate-/l*65.5%
tan-quot65.6%
un-div-inv65.5%
distribute-lft-neg-in65.5%
neg-sub065.5%
un-div-inv65.6%
Applied egg-rr65.6%
neg-sub065.6%
distribute-neg-frac65.6%
Simplified65.6%
if 6.6e6 < F < 4.50000000000000007e85Initial program 98.9%
Taylor expanded in F around inf 98.9%
Taylor expanded in B around 0 70.9%
Taylor expanded in B around 0 71.6%
Final simplification64.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.9e-47)
(+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B))
(if (<= F 2.3e-18)
(/ (- x) (sin B))
(-
(+ (/ 1.0 B) (* B (+ (* x 0.3333333333333333) 0.16666666666666666)))
(/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-47) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 2.3e-18) {
tmp = -x / sin(B);
} else {
tmp = ((1.0 / B) + (B * ((x * 0.3333333333333333) + 0.16666666666666666))) - (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.9d-47)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 2.3d-18) then
tmp = -x / sin(b)
else
tmp = ((1.0d0 / b) + (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-47) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 2.3e-18) {
tmp = -x / Math.sin(B);
} else {
tmp = ((1.0 / B) + (B * ((x * 0.3333333333333333) + 0.16666666666666666))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e-47: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 2.3e-18: tmp = -x / math.sin(B) else: tmp = ((1.0 / B) + (B * ((x * 0.3333333333333333) + 0.16666666666666666))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e-47) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 2.3e-18) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e-47) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 2.3e-18) tmp = -x / sin(B); else tmp = ((1.0 / B) + (B * ((x * 0.3333333333333333) + 0.16666666666666666))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e-47], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-18], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{-47}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.90000000000000007e-47Initial program 62.7%
Taylor expanded in F around -inf 93.9%
Taylor expanded in B around 0 45.8%
if -1.90000000000000007e-47 < F < 2.3000000000000001e-18Initial program 99.3%
Taylor expanded in F around -inf 37.0%
Taylor expanded in x around inf 74.4%
associate-*r/74.4%
mul-1-neg74.4%
Simplified74.4%
Taylor expanded in B around 0 41.4%
if 2.3000000000000001e-18 < F Initial program 67.7%
Taylor expanded in F around -inf 55.0%
distribute-lft-neg-in55.0%
fma-def55.0%
add-sqr-sqrt30.8%
sqrt-unprod59.7%
frac-times59.7%
metadata-eval59.7%
metadata-eval59.7%
frac-times59.7%
rgt-mult-inverse59.7%
associate-*l/59.7%
rgt-mult-inverse59.7%
associate-*l/59.6%
sqrt-unprod38.7%
add-sqr-sqrt80.2%
associate-*l/94.0%
rgt-mult-inverse94.1%
Applied egg-rr94.1%
Taylor expanded in B around 0 51.6%
Final simplification46.1%
(FPCore (F B x)
:precision binary64
(if (<= F -9e-51)
(+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B))
(if (<= F 3.2e-19)
(/ (- x) B)
(-
(+ (/ 1.0 B) (* B (+ (* x 0.3333333333333333) 0.16666666666666666)))
(/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-51) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 3.2e-19) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * ((x * 0.3333333333333333) + 0.16666666666666666))) - (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 <= (-9d-51)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 3.2d-19) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (b * ((x * 0.3333333333333333d0) + 0.16666666666666666d0))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9e-51) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 3.2e-19) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * ((x * 0.3333333333333333) + 0.16666666666666666))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-51: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 3.2e-19: tmp = -x / B else: tmp = ((1.0 / B) + (B * ((x * 0.3333333333333333) + 0.16666666666666666))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-51) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 3.2e-19) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) + 0.16666666666666666))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e-51) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 3.2e-19) tmp = -x / B; else tmp = ((1.0 / B) + (B * ((x * 0.3333333333333333) + 0.16666666666666666))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-51], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-19], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-51}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot \left(x \cdot 0.3333333333333333 + 0.16666666666666666\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.99999999999999948e-51Initial program 62.7%
Taylor expanded in F around -inf 93.9%
Taylor expanded in B around 0 45.8%
if -8.99999999999999948e-51 < F < 3.19999999999999982e-19Initial program 99.3%
Taylor expanded in F around -inf 37.0%
Taylor expanded in B around 0 20.0%
associate-*r/20.0%
distribute-lft-in20.0%
metadata-eval20.0%
neg-mul-120.0%
Simplified20.0%
Taylor expanded in x around inf 37.9%
associate-*r/37.9%
neg-mul-137.9%
Simplified37.9%
if 3.19999999999999982e-19 < F Initial program 67.7%
Taylor expanded in F around -inf 55.0%
distribute-lft-neg-in55.0%
fma-def55.0%
add-sqr-sqrt30.8%
sqrt-unprod59.7%
frac-times59.7%
metadata-eval59.7%
metadata-eval59.7%
frac-times59.7%
rgt-mult-inverse59.7%
associate-*l/59.7%
rgt-mult-inverse59.7%
associate-*l/59.6%
sqrt-unprod38.7%
add-sqr-sqrt80.2%
associate-*l/94.0%
rgt-mult-inverse94.1%
Applied egg-rr94.1%
Taylor expanded in B around 0 51.6%
Final simplification45.0%
(FPCore (F B x) :precision binary64 (if (<= F -4e-52) (+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B)) (if (<= F 1.22e-101) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-52) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 1.22e-101) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4d-52)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 1.22d-101) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4e-52) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 1.22e-101) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-52: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 1.22e-101: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-52) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 1.22e-101) 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 <= -4e-52) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 1.22e-101) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-52], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.22e-101], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-52}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-101}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4e-52Initial program 62.7%
Taylor expanded in F around -inf 93.9%
Taylor expanded in B around 0 45.8%
if -4e-52 < F < 1.2199999999999999e-101Initial program 99.3%
Taylor expanded in F around -inf 37.0%
Taylor expanded in B around 0 20.6%
associate-*r/20.6%
distribute-lft-in20.6%
metadata-eval20.6%
neg-mul-120.6%
Simplified20.6%
Taylor expanded in x around inf 40.7%
associate-*r/40.7%
neg-mul-140.7%
Simplified40.7%
if 1.2199999999999999e-101 < F Initial program 71.0%
Taylor expanded in F around inf 75.7%
Taylor expanded in B around 0 72.5%
Taylor expanded in B around 0 47.6%
Final simplification44.9%
(FPCore (F B x) :precision binary64 (if (<= F -3.2e-48) (/ (- -1.0 x) B) (if (or (<= F 5.6e-18) (not (<= F 8.4e+92))) (/ (- x) B) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.2e-48) {
tmp = (-1.0 - x) / B;
} else if ((F <= 5.6e-18) || !(F <= 8.4e+92)) {
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 <= (-3.2d-48)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 5.6d-18) .or. (.not. (f <= 8.4d+92))) 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 <= -3.2e-48) {
tmp = (-1.0 - x) / B;
} else if ((F <= 5.6e-18) || !(F <= 8.4e+92)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.2e-48: tmp = (-1.0 - x) / B elif (F <= 5.6e-18) or not (F <= 8.4e+92): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.2e-48) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 5.6e-18) || !(F <= 8.4e+92)) 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 <= -3.2e-48) tmp = (-1.0 - x) / B; elseif ((F <= 5.6e-18) || ~((F <= 8.4e+92))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.2e-48], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 5.6e-18], N[Not[LessEqual[F, 8.4e+92]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-18} \lor \neg \left(F \leq 8.4 \cdot 10^{+92}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -3.1999999999999998e-48Initial program 62.7%
Taylor expanded in F around -inf 93.9%
Taylor expanded in B around 0 45.4%
associate-*r/45.4%
distribute-lft-in45.4%
metadata-eval45.4%
neg-mul-145.4%
Simplified45.4%
Taylor expanded in x around 0 45.4%
sub-neg45.4%
+-commutative45.4%
distribute-neg-frac45.4%
metadata-eval45.4%
mul-1-neg45.4%
sub-neg45.4%
div-sub45.4%
Simplified45.4%
if -3.1999999999999998e-48 < F < 5.60000000000000025e-18 or 8.39999999999999944e92 < F Initial program 82.3%
Taylor expanded in F around -inf 48.9%
Taylor expanded in B around 0 28.9%
associate-*r/28.9%
distribute-lft-in28.9%
metadata-eval28.9%
neg-mul-128.9%
Simplified28.9%
Taylor expanded in x around inf 39.5%
associate-*r/39.5%
neg-mul-139.5%
Simplified39.5%
if 5.60000000000000025e-18 < F < 8.39999999999999944e92Initial program 99.4%
Taylor expanded in F around inf 73.2%
Taylor expanded in B around 0 56.2%
Taylor expanded in x around 0 39.8%
Final simplification41.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.7e-49) (/ (- -1.0 x) B) (if (<= F 8.2e-100) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-49) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-100) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.7d-49)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.2d-100) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-49) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-100) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-49: tmp = (-1.0 - x) / B elif F <= 8.2e-100: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-49) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.2e-100) 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.7e-49) tmp = (-1.0 - x) / B; elseif (F <= 8.2e-100) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-49], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.2e-100], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-100}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.70000000000000002e-49Initial program 62.7%
Taylor expanded in F around -inf 93.9%
Taylor expanded in B around 0 45.4%
associate-*r/45.4%
distribute-lft-in45.4%
metadata-eval45.4%
neg-mul-145.4%
Simplified45.4%
Taylor expanded in x around 0 45.4%
sub-neg45.4%
+-commutative45.4%
distribute-neg-frac45.4%
metadata-eval45.4%
mul-1-neg45.4%
sub-neg45.4%
div-sub45.4%
Simplified45.4%
if -1.70000000000000002e-49 < F < 8.1999999999999998e-100Initial program 99.3%
Taylor expanded in F around -inf 37.0%
Taylor expanded in B around 0 20.6%
associate-*r/20.6%
distribute-lft-in20.6%
metadata-eval20.6%
neg-mul-120.6%
Simplified20.6%
Taylor expanded in x around inf 40.7%
associate-*r/40.7%
neg-mul-140.7%
Simplified40.7%
if 8.1999999999999998e-100 < F Initial program 71.0%
Taylor expanded in F around inf 75.7%
Taylor expanded in B around 0 72.5%
Taylor expanded in B around 0 47.6%
Final simplification44.8%
(FPCore (F B x) :precision binary64 (if (<= F 5.9e-179) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 5.9e-179) {
tmp = -1.0 / 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.9d-179) then
tmp = (-1.0d0) / 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.9e-179) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 5.9e-179: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 5.9e-179) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 5.9e-179) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 5.9e-179], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 5.9 \cdot 10^{-179}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 5.90000000000000029e-179Initial program 76.8%
Taylor expanded in F around -inf 72.4%
Taylor expanded in B around 0 36.5%
associate-*r/36.5%
distribute-lft-in36.5%
metadata-eval36.5%
neg-mul-136.5%
Simplified36.5%
Taylor expanded in x around 0 14.6%
if 5.90000000000000029e-179 < F Initial program 75.4%
Taylor expanded in F around inf 69.3%
Taylor expanded in B around 0 68.5%
Taylor expanded in x around 0 16.3%
Final simplification15.3%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 76.3%
Taylor expanded in F around -inf 63.4%
Taylor expanded in B around 0 33.5%
associate-*r/33.5%
distribute-lft-in33.5%
metadata-eval33.5%
neg-mul-133.5%
Simplified33.5%
Taylor expanded in x around inf 32.3%
associate-*r/32.3%
neg-mul-132.3%
Simplified32.3%
Final simplification32.3%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 76.3%
Taylor expanded in F around -inf 63.4%
Taylor expanded in B around 0 33.5%
associate-*r/33.5%
distribute-lft-in33.5%
metadata-eval33.5%
neg-mul-133.5%
Simplified33.5%
Taylor expanded in x around 0 9.9%
Final simplification9.9%
herbie shell --seed 2023207
(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))))))