
(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 28 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 -15000000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 64000000.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 <= -15000000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 64000000.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 <= -15000000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 64000000.0) tmp = Float64(Float64(Float64(F / 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, -15000000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 64000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(F * F + 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 -15000000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 64000000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.5e13Initial program 64.7%
Simplified78.7%
Taylor expanded in F around -inf 99.8%
if -1.5e13 < F < 6.4e7Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
*-commutative99.6%
sqrt-div99.6%
metadata-eval99.6%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
*-commutative99.6%
associate-/r*99.7%
Simplified99.7%
if 6.4e7 < F Initial program 61.1%
Simplified75.3%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -122000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 70000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (* F t_0) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -122000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 70000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F * t_0) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-122000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 70000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f * t_0) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -122000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 70000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F * t_0) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -122000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 70000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F * t_0) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -122000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 70000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F * t_0) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -122000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 70000000.0) tmp = (x * (-1.0 / tan(B))) + ((F * t_0) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -122000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 70000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * t$95$0), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -122000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 70000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \left(F \cdot t\_0\right) \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -1.22e8Initial program 65.8%
Simplified79.3%
Taylor expanded in F around -inf 99.8%
if -1.22e8 < F < 7e7Initial program 99.4%
clear-num99.4%
associate-/r/99.4%
Applied egg-rr99.4%
if 7e7 < F Initial program 61.1%
Simplified75.3%
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 -132000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 26000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -132000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 26000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-132000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 26000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -132000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 26000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -132000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 26000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -132000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 26000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -132000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 26000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -132000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 26000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -132000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 26000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.32e8Initial program 65.8%
Simplified79.3%
Taylor expanded in F around -inf 99.8%
if -1.32e8 < F < 2.6e7Initial program 99.4%
neg-mul-199.4%
div-inv99.6%
clear-num99.4%
un-div-inv99.4%
Applied egg-rr99.4%
if 2.6e7 < F Initial program 61.1%
Simplified75.3%
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 -145000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 75000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -145000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 75000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - 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 <= (-145000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 75000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - 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 <= -145000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 75000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -145000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 75000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -145000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 75000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -145000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 75000000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -145000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 75000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -145000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 75000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.45e8Initial program 65.8%
Simplified79.3%
Taylor expanded in F around -inf 99.8%
if -1.45e8 < F < 7.5e7Initial program 99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
if 7.5e7 < F Initial program 61.1%
Simplified75.3%
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 -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (/ (/ F (sin B)) (sqrt 2.0)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F / sin(B)) / sqrt(2.0)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = ((f / sin(b)) / sqrt(2.0d0)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F / Math.sin(B)) / Math.sqrt(2.0)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = ((F / math.sin(B)) / math.sqrt(2.0)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(2.0)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = ((F / sin(B)) / sqrt(2.0)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 68.5%
Simplified81.0%
Taylor expanded in F around -inf 98.2%
if -1.4199999999999999 < F < 1.44999999999999996Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
*-commutative99.6%
sqrt-div99.6%
metadata-eval99.6%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
*-commutative99.6%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in F around 0 99.4%
if 1.44999999999999996 < F Initial program 62.2%
Simplified76.1%
Taylor expanded in F around inf 98.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (* (/ F (sin B)) (sqrt 0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F / sin(B)) * sqrt(0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = ((f / sin(b)) * sqrt(0.5d0)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F / Math.sin(B)) * Math.sqrt(0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = ((F / math.sin(B)) * math.sqrt(0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = ((F / sin(B)) * sqrt(0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 68.5%
Simplified81.0%
Taylor expanded in F around -inf 98.2%
if -1.4199999999999999 < F < 1.44999999999999996Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.3%
if 1.44999999999999996 < F Initial program 62.2%
Simplified76.1%
Taylor expanded in F around inf 98.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B)))
(t_1 (- (* t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -820000.0)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -4.1e-162)
t_1
(if (<= F 1.1e-130)
(- (/ t_0 (+ F (/ 1.0 F))) t_2)
(if (<= F 49000.0) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = (t_0 * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -820000.0) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -4.1e-162) {
tmp = t_1;
} else if (F <= 1.1e-130) {
tmp = (t_0 / (F + (1.0 / F))) - t_2;
} else if (F <= 49000.0) {
tmp = t_1;
} else {
tmp = (1.0 / 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)
t_1 = (t_0 * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_2 = x / tan(b)
if (f <= (-820000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-4.1d-162)) then
tmp = t_1
else if (f <= 1.1d-130) then
tmp = (t_0 / (f + (1.0d0 / f))) - t_2
else if (f <= 49000.0d0) then
tmp = t_1
else
tmp = (1.0d0 / 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);
double t_1 = (t_0 * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -820000.0) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -4.1e-162) {
tmp = t_1;
} else if (F <= 1.1e-130) {
tmp = (t_0 / (F + (1.0 / F))) - t_2;
} else if (F <= 49000.0) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = (t_0 * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -820000.0: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -4.1e-162: tmp = t_1 elif F <= 1.1e-130: tmp = (t_0 / (F + (1.0 / F))) - t_2 elif F <= 49000.0: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(Float64(t_0 * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -820000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -4.1e-162) tmp = t_1; elseif (F <= 1.1e-130) tmp = Float64(Float64(t_0 / Float64(F + Float64(1.0 / F))) - t_2); elseif (F <= 49000.0) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = (t_0 * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -820000.0) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -4.1e-162) tmp = t_1; elseif (F <= 1.1e-130) tmp = (t_0 / (F + (1.0 / F))) - t_2; elseif (F <= 49000.0) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -820000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -4.1e-162], t$95$1, If[LessEqual[F, 1.1e-130], N[(N[(t$95$0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 49000.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := t\_0 \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -820000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq -4.1 \cdot 10^{-162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-130}:\\
\;\;\;\;\frac{t\_0}{F + \frac{1}{F}} - t\_2\\
\mathbf{elif}\;F \leq 49000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_2\\
\end{array}
\end{array}
if F < -8.2e5Initial program 67.7%
Simplified80.4%
Taylor expanded in F around -inf 99.6%
if -8.2e5 < F < -4.10000000000000019e-162 or 1.0999999999999999e-130 < F < 49000Initial program 99.2%
Taylor expanded in B around 0 89.9%
associate-*r/89.9%
mul-1-neg89.9%
Simplified89.9%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr89.9%
if -4.10000000000000019e-162 < F < 1.0999999999999999e-130Initial program 99.4%
Simplified99.8%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
*-commutative99.7%
sqrt-div99.7%
metadata-eval99.7%
frac-times99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in F around -inf 92.7%
associate-*r*92.7%
neg-mul-192.7%
Simplified92.7%
distribute-rgt-in92.7%
*-un-lft-identity92.7%
add-sqr-sqrt42.6%
sqrt-unprod92.7%
sqr-neg92.7%
sqrt-prod50.1%
add-sqr-sqrt92.7%
pow-flip92.7%
metadata-eval92.7%
add-sqr-sqrt42.6%
sqrt-unprod8.1%
sqr-neg8.1%
sqrt-prod50.1%
add-sqr-sqrt92.7%
Applied egg-rr92.7%
pow-plus92.7%
metadata-eval92.7%
unpow-192.7%
Simplified92.7%
if 49000 < F Initial program 61.1%
Simplified75.3%
Taylor expanded in F around inf 99.8%
Final simplification95.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B)))
(t_1 (/ 1.0 (sin B)))
(t_2 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(t_3 (/ x (tan B))))
(if (<= F -0.00135)
(- (/ -1.0 (sin B)) t_3)
(if (<= F -5.5e-157)
(- (* F (* t_1 t_2)) (/ x B))
(if (<= F 8e-133)
(- (/ t_0 (+ F (/ 1.0 F))) t_3)
(if (<= F 0.048) (- (* t_0 t_2) (/ x B)) (- t_1 t_3)))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = 1.0 / sin(B);
double t_2 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_3 = x / tan(B);
double tmp;
if (F <= -0.00135) {
tmp = (-1.0 / sin(B)) - t_3;
} else if (F <= -5.5e-157) {
tmp = (F * (t_1 * t_2)) - (x / B);
} else if (F <= 8e-133) {
tmp = (t_0 / (F + (1.0 / F))) - t_3;
} else if (F <= 0.048) {
tmp = (t_0 * t_2) - (x / B);
} else {
tmp = t_1 - t_3;
}
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) :: t_3
real(8) :: tmp
t_0 = f / sin(b)
t_1 = 1.0d0 / sin(b)
t_2 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_3 = x / tan(b)
if (f <= (-0.00135d0)) then
tmp = ((-1.0d0) / sin(b)) - t_3
else if (f <= (-5.5d-157)) then
tmp = (f * (t_1 * t_2)) - (x / b)
else if (f <= 8d-133) then
tmp = (t_0 / (f + (1.0d0 / f))) - t_3
else if (f <= 0.048d0) then
tmp = (t_0 * t_2) - (x / b)
else
tmp = t_1 - t_3
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = 1.0 / Math.sin(B);
double t_2 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_3 = x / Math.tan(B);
double tmp;
if (F <= -0.00135) {
tmp = (-1.0 / Math.sin(B)) - t_3;
} else if (F <= -5.5e-157) {
tmp = (F * (t_1 * t_2)) - (x / B);
} else if (F <= 8e-133) {
tmp = (t_0 / (F + (1.0 / F))) - t_3;
} else if (F <= 0.048) {
tmp = (t_0 * t_2) - (x / B);
} else {
tmp = t_1 - t_3;
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = 1.0 / math.sin(B) t_2 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_3 = x / math.tan(B) tmp = 0 if F <= -0.00135: tmp = (-1.0 / math.sin(B)) - t_3 elif F <= -5.5e-157: tmp = (F * (t_1 * t_2)) - (x / B) elif F <= 8e-133: tmp = (t_0 / (F + (1.0 / F))) - t_3 elif F <= 0.048: tmp = (t_0 * t_2) - (x / B) else: tmp = t_1 - t_3 return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(1.0 / sin(B)) t_2 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_3 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00135) tmp = Float64(Float64(-1.0 / sin(B)) - t_3); elseif (F <= -5.5e-157) tmp = Float64(Float64(F * Float64(t_1 * t_2)) - Float64(x / B)); elseif (F <= 8e-133) tmp = Float64(Float64(t_0 / Float64(F + Float64(1.0 / F))) - t_3); elseif (F <= 0.048) tmp = Float64(Float64(t_0 * t_2) - Float64(x / B)); else tmp = Float64(t_1 - t_3); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = 1.0 / sin(B); t_2 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_3 = x / tan(B); tmp = 0.0; if (F <= -0.00135) tmp = (-1.0 / sin(B)) - t_3; elseif (F <= -5.5e-157) tmp = (F * (t_1 * t_2)) - (x / B); elseif (F <= 8e-133) tmp = (t_0 / (F + (1.0 / F))) - t_3; elseif (F <= 0.048) tmp = (t_0 * t_2) - (x / B); else tmp = t_1 - t_3; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00135], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[F, -5.5e-157], N[(N[(F * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8e-133], N[(N[(t$95$0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[F, 0.048], N[(N[(t$95$0 * t$95$2), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - t$95$3), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := \frac{1}{\sin B}\\
t_2 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_3 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00135:\\
\;\;\;\;\frac{-1}{\sin B} - t\_3\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-157}:\\
\;\;\;\;F \cdot \left(t\_1 \cdot t\_2\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\
\;\;\;\;\frac{t\_0}{F + \frac{1}{F}} - t\_3\\
\mathbf{elif}\;F \leq 0.048:\\
\;\;\;\;t\_0 \cdot t\_2 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_3\\
\end{array}
\end{array}
if F < -0.0013500000000000001Initial program 68.5%
Simplified81.0%
Taylor expanded in F around -inf 98.2%
if -0.0013500000000000001 < F < -5.4999999999999998e-157Initial program 99.3%
Simplified99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 86.0%
if -5.4999999999999998e-157 < F < 8.0000000000000005e-133Initial program 99.4%
Simplified99.8%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
*-commutative99.7%
sqrt-div99.7%
metadata-eval99.7%
frac-times99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in F around -inf 92.7%
associate-*r*92.7%
neg-mul-192.7%
Simplified92.7%
distribute-rgt-in92.7%
*-un-lft-identity92.7%
add-sqr-sqrt42.6%
sqrt-unprod92.7%
sqr-neg92.7%
sqrt-prod50.1%
add-sqr-sqrt92.7%
pow-flip92.7%
metadata-eval92.7%
add-sqr-sqrt42.6%
sqrt-unprod8.1%
sqr-neg8.1%
sqrt-prod50.1%
add-sqr-sqrt92.7%
Applied egg-rr92.7%
pow-plus92.7%
metadata-eval92.7%
unpow-192.7%
Simplified92.7%
if 8.0000000000000005e-133 < F < 0.048000000000000001Initial program 99.3%
Taylor expanded in B around 0 94.8%
associate-*r/94.8%
mul-1-neg94.8%
Simplified94.8%
Taylor expanded in F around 0 93.4%
*-commutative93.4%
Simplified93.4%
if 0.048000000000000001 < F Initial program 62.2%
Simplified76.1%
Taylor expanded in F around inf 98.4%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B)))
(t_1 (- (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -0.00135)
(- (/ -1.0 (sin B)) t_2)
(if (<= F -2.55e-166)
t_1
(if (<= F 3.8e-132)
(- (/ t_0 (+ F (/ 1.0 F))) t_2)
(if (<= F 0.185) t_1 (- (/ 1.0 (sin B)) t_2)))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = (t_0 * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -0.00135) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= -2.55e-166) {
tmp = t_1;
} else if (F <= 3.8e-132) {
tmp = (t_0 / (F + (1.0 / F))) - t_2;
} else if (F <= 0.185) {
tmp = t_1;
} else {
tmp = (1.0 / 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)
t_1 = (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_2 = x / tan(b)
if (f <= (-0.00135d0)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= (-2.55d-166)) then
tmp = t_1
else if (f <= 3.8d-132) then
tmp = (t_0 / (f + (1.0d0 / f))) - t_2
else if (f <= 0.185d0) then
tmp = t_1
else
tmp = (1.0d0 / 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);
double t_1 = (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -0.00135) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= -2.55e-166) {
tmp = t_1;
} else if (F <= 3.8e-132) {
tmp = (t_0 / (F + (1.0 / F))) - t_2;
} else if (F <= 0.185) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -0.00135: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= -2.55e-166: tmp = t_1 elif F <= 3.8e-132: tmp = (t_0 / (F + (1.0 / F))) - t_2 elif F <= 0.185: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00135) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= -2.55e-166) tmp = t_1; elseif (F <= 3.8e-132) tmp = Float64(Float64(t_0 / Float64(F + Float64(1.0 / F))) - t_2); elseif (F <= 0.185) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = (t_0 * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -0.00135) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= -2.55e-166) tmp = t_1; elseif (F <= 3.8e-132) tmp = (t_0 / (F + (1.0 / F))) - t_2; elseif (F <= 0.185) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00135], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -2.55e-166], t$95$1, If[LessEqual[F, 3.8e-132], N[(N[(t$95$0 / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 0.185], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00135:\\
\;\;\;\;\frac{-1}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq -2.55 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-132}:\\
\;\;\;\;\frac{t\_0}{F + \frac{1}{F}} - t\_2\\
\mathbf{elif}\;F \leq 0.185:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_2\\
\end{array}
\end{array}
if F < -0.0013500000000000001Initial program 68.5%
Simplified81.0%
Taylor expanded in F around -inf 98.2%
if -0.0013500000000000001 < F < -2.5500000000000001e-166 or 3.7999999999999997e-132 < F < 0.185Initial program 99.3%
Taylor expanded in B around 0 89.2%
associate-*r/89.2%
mul-1-neg89.2%
Simplified89.2%
Taylor expanded in F around 0 88.7%
*-commutative88.7%
Simplified88.7%
if -2.5500000000000001e-166 < F < 3.7999999999999997e-132Initial program 99.4%
Simplified99.8%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
*-commutative99.7%
sqrt-div99.7%
metadata-eval99.7%
frac-times99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in F around -inf 92.7%
associate-*r*92.7%
neg-mul-192.7%
Simplified92.7%
distribute-rgt-in92.7%
*-un-lft-identity92.7%
add-sqr-sqrt42.6%
sqrt-unprod92.7%
sqr-neg92.7%
sqrt-prod50.1%
add-sqr-sqrt92.7%
pow-flip92.7%
metadata-eval92.7%
add-sqr-sqrt42.6%
sqrt-unprod8.1%
sqr-neg8.1%
sqrt-prod50.1%
add-sqr-sqrt92.7%
Applied egg-rr92.7%
pow-plus92.7%
metadata-eval92.7%
unpow-192.7%
Simplified92.7%
if 0.185 < F Initial program 62.2%
Simplified76.1%
Taylor expanded in F around inf 98.4%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B)))
(t_1 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_2 (/ x (tan B))))
(if (<= F -900.0)
(- (/ -1.0 (sin B)) t_2)
(if (<= F 4.6e-129)
(+ (* x (/ -1.0 (tan B))) (* t_1 (/ F B)))
(if (<= F 9500000.0) (- (* (* F t_0) t_1) (/ x B)) (- t_0 t_2))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_2 = x / tan(B);
double tmp;
if (F <= -900.0) {
tmp = (-1.0 / sin(B)) - t_2;
} else if (F <= 4.6e-129) {
tmp = (x * (-1.0 / tan(B))) + (t_1 * (F / B));
} else if (F <= 9500000.0) {
tmp = ((F * t_0) * t_1) - (x / B);
} else {
tmp = t_0 - 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 = 1.0d0 / sin(b)
t_1 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_2 = x / tan(b)
if (f <= (-900.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_2
else if (f <= 4.6d-129) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_1 * (f / b))
else if (f <= 9500000.0d0) then
tmp = ((f * t_0) * t_1) - (x / b)
else
tmp = t_0 - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -900.0) {
tmp = (-1.0 / Math.sin(B)) - t_2;
} else if (F <= 4.6e-129) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_1 * (F / B));
} else if (F <= 9500000.0) {
tmp = ((F * t_0) * t_1) - (x / B);
} else {
tmp = t_0 - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_2 = x / math.tan(B) tmp = 0 if F <= -900.0: tmp = (-1.0 / math.sin(B)) - t_2 elif F <= 4.6e-129: tmp = (x * (-1.0 / math.tan(B))) + (t_1 * (F / B)) elif F <= 9500000.0: tmp = ((F * t_0) * t_1) - (x / B) else: tmp = t_0 - t_2 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -900.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_2); elseif (F <= 4.6e-129) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_1 * Float64(F / B))); elseif (F <= 9500000.0) tmp = Float64(Float64(Float64(F * t_0) * t_1) - Float64(x / B)); else tmp = Float64(t_0 - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_2 = x / tan(B); tmp = 0.0; if (F <= -900.0) tmp = (-1.0 / sin(B)) - t_2; elseif (F <= 4.6e-129) tmp = (x * (-1.0 / tan(B))) + (t_1 * (F / B)); elseif (F <= 9500000.0) tmp = ((F * t_0) * t_1) - (x / B); else tmp = t_0 - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -900.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 4.6e-129], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9500000.0], N[(N[(N[(F * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 - t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -900:\\
\;\;\;\;\frac{-1}{\sin B} - t\_2\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-129}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t\_1 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 9500000:\\
\;\;\;\;\left(F \cdot t\_0\right) \cdot t\_1 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_2\\
\end{array}
\end{array}
if F < -900Initial program 68.1%
Simplified80.7%
Taylor expanded in F around -inf 99.0%
if -900 < F < 4.5999999999999999e-129Initial program 99.4%
Taylor expanded in B around 0 94.1%
if 4.5999999999999999e-129 < F < 9.5e6Initial program 99.3%
Taylor expanded in B around 0 95.2%
associate-*r/95.2%
mul-1-neg95.2%
Simplified95.2%
clear-num99.3%
associate-/r/99.5%
Applied egg-rr95.4%
if 9.5e6 < F Initial program 61.1%
Simplified75.3%
Taylor expanded in F around inf 99.8%
Final simplification97.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -820.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 2.1e-130)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(if (<= F 750000.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -820.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 2.1e-130) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else if (F <= 750000.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-820.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 2.1d-130) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else if (f <= 750000.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -820.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 2.1e-130) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else if (F <= 750000.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -820.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 2.1e-130: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) elif F <= 750000.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -820.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 2.1e-130) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); elseif (F <= 750000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -820.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 2.1e-130) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); elseif (F <= 750000.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -820.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.1e-130], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 750000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -820:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-130}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 750000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -820Initial program 68.1%
Simplified80.7%
Taylor expanded in F around -inf 99.0%
if -820 < F < 2.10000000000000002e-130Initial program 99.4%
Taylor expanded in B around 0 94.1%
if 2.10000000000000002e-130 < F < 7.5e5Initial program 99.3%
Taylor expanded in B around 0 95.2%
associate-*r/95.2%
mul-1-neg95.2%
Simplified95.2%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr95.2%
if 7.5e5 < F Initial program 61.1%
Simplified75.3%
Taylor expanded in F around inf 99.8%
Final simplification97.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+94)
(- (/ -1.0 B) t_0)
(if (<= F -460.0)
(- (/ (* F (/ -1.0 F)) (sin B)) (/ x B))
(if (<= F -1.18e-155)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.5e-69)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1050.0)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e+94) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -460.0) {
tmp = ((F * (-1.0 / F)) / sin(B)) - (x / B);
} else if (F <= -1.18e-155) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.5e-69) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1050.0) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4d+94)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-460.0d0)) then
tmp = ((f * ((-1.0d0) / f)) / sin(b)) - (x / b)
else if (f <= (-1.18d-155)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.5d-69) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1050.0d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4e+94) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -460.0) {
tmp = ((F * (-1.0 / F)) / Math.sin(B)) - (x / B);
} else if (F <= -1.18e-155) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.5e-69) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1050.0) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4e+94: tmp = (-1.0 / B) - t_0 elif F <= -460.0: tmp = ((F * (-1.0 / F)) / math.sin(B)) - (x / B) elif F <= -1.18e-155: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.5e-69: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1050.0: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e+94) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -460.0) tmp = Float64(Float64(Float64(F * Float64(-1.0 / F)) / sin(B)) - Float64(x / B)); elseif (F <= -1.18e-155) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.5e-69) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1050.0) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4e+94) tmp = (-1.0 / B) - t_0; elseif (F <= -460.0) tmp = ((F * (-1.0 / F)) / sin(B)) - (x / B); elseif (F <= -1.18e-155) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.5e-69) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1050.0) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+94], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -460.0], N[(N[(N[(F * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.18e-155], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-69], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1050.0], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+94}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -460:\\
\;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.18 \cdot 10^{-155}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-69}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1050:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -4.0000000000000001e94Initial program 52.2%
Simplified70.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 84.5%
if -4.0000000000000001e94 < F < -460Initial program 96.2%
Simplified99.6%
associate-*r/99.9%
fma-undefine99.9%
+-commutative99.9%
metadata-eval99.9%
metadata-eval99.9%
fma-define99.8%
*-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 85.3%
if -460 < F < -1.18e-155Initial program 99.2%
Taylor expanded in B around 0 86.2%
associate-*r/86.2%
mul-1-neg86.2%
Simplified86.2%
Taylor expanded in B around 0 75.6%
if -1.18e-155 < F < 4.50000000000000009e-69Initial program 99.4%
Simplified99.7%
associate-*r/99.8%
fma-undefine99.8%
+-commutative99.8%
metadata-eval99.8%
metadata-eval99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 85.9%
if 4.50000000000000009e-69 < F < 1050Initial program 99.0%
Simplified99.1%
Taylor expanded in F around 0 86.3%
Taylor expanded in x around 0 86.4%
if 1050 < F Initial program 61.7%
Simplified75.7%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in B around 0 78.8%
Final simplification82.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e+94)
(- (/ -1.0 B) t_0)
(if (<= F -1050.0)
(- (/ (* F (/ -1.0 F)) (sin B)) (/ x B))
(if (<= F -1.05e-155)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 9.6e-70)
(* x (/ (cos B) (- (sin B))))
(if (<= F 1050.0)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 B) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+94) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1050.0) {
tmp = ((F * (-1.0 / F)) / sin(B)) - (x / B);
} else if (F <= -1.05e-155) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 9.6e-70) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 1050.0) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.8d+94)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-1050.0d0)) then
tmp = ((f * ((-1.0d0) / f)) / sin(b)) - (x / b)
else if (f <= (-1.05d-155)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 9.6d-70) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 1050.0d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.8e+94) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1050.0) {
tmp = ((F * (-1.0 / F)) / Math.sin(B)) - (x / B);
} else if (F <= -1.05e-155) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 9.6e-70) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 1050.0) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.8e+94: tmp = (-1.0 / B) - t_0 elif F <= -1050.0: tmp = ((F * (-1.0 / F)) / math.sin(B)) - (x / B) elif F <= -1.05e-155: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 9.6e-70: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 1050.0: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+94) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -1050.0) tmp = Float64(Float64(Float64(F * Float64(-1.0 / F)) / sin(B)) - Float64(x / B)); elseif (F <= -1.05e-155) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 9.6e-70) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 1050.0) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.8e+94) tmp = (-1.0 / B) - t_0; elseif (F <= -1050.0) tmp = ((F * (-1.0 / F)) / sin(B)) - (x / B); elseif (F <= -1.05e-155) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 9.6e-70) tmp = x * (cos(B) / -sin(B)); elseif (F <= 1050.0) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+94], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1050.0], N[(N[(N[(F * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.05e-155], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.6e-70], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1050.0], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+94}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -1050:\\
\;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-155}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.6 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1050:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -3.7999999999999996e94Initial program 52.2%
Simplified70.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 84.5%
if -3.7999999999999996e94 < F < -1050Initial program 96.2%
Simplified99.6%
associate-*r/99.9%
fma-undefine99.9%
+-commutative99.9%
metadata-eval99.9%
metadata-eval99.9%
fma-define99.8%
*-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 85.3%
if -1050 < F < -1.0500000000000001e-155Initial program 99.2%
Taylor expanded in B around 0 86.2%
associate-*r/86.2%
mul-1-neg86.2%
Simplified86.2%
Taylor expanded in B around 0 75.6%
if -1.0500000000000001e-155 < F < 9.6000000000000005e-70Initial program 99.4%
Simplified99.7%
associate-*r/99.8%
fma-undefine99.8%
+-commutative99.8%
metadata-eval99.8%
metadata-eval99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 85.9%
mul-1-neg85.9%
associate-/l*85.8%
Simplified85.8%
if 9.6000000000000005e-70 < F < 1050Initial program 99.0%
Simplified99.1%
Taylor expanded in F around 0 86.3%
Taylor expanded in x around 0 86.4%
if 1050 < F Initial program 61.7%
Simplified75.7%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in B around 0 78.8%
Final simplification82.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -320.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.65e-158)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (pow F 2.0))))) x) B)
(if (<= F 1.25e-69)
(- (/ (/ F (sin B)) (+ F (/ 1.0 F))) t_0)
(if (<= F 5.2e-5)
(/ (* F (sqrt 0.5)) (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 <= -320.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.65e-158) {
tmp = ((F * sqrt((1.0 / (2.0 + pow(F, 2.0))))) - x) / B;
} else if (F <= 1.25e-69) {
tmp = ((F / sin(B)) / (F + (1.0 / F))) - t_0;
} else if (F <= 5.2e-5) {
tmp = (F * sqrt(0.5)) / 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 <= (-320.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.65d-158)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (f ** 2.0d0))))) - x) / b
else if (f <= 1.25d-69) then
tmp = ((f / sin(b)) / (f + (1.0d0 / f))) - t_0
else if (f <= 5.2d-5) then
tmp = (f * sqrt(0.5d0)) / 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 <= -320.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.65e-158) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + Math.pow(F, 2.0))))) - x) / B;
} else if (F <= 1.25e-69) {
tmp = ((F / Math.sin(B)) / (F + (1.0 / F))) - t_0;
} else if (F <= 5.2e-5) {
tmp = (F * Math.sqrt(0.5)) / 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 <= -320.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.65e-158: tmp = ((F * math.sqrt((1.0 / (2.0 + math.pow(F, 2.0))))) - x) / B elif F <= 1.25e-69: tmp = ((F / math.sin(B)) / (F + (1.0 / F))) - t_0 elif F <= 5.2e-5: tmp = (F * math.sqrt(0.5)) / 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 <= -320.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.65e-158) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + (F ^ 2.0))))) - x) / B); elseif (F <= 1.25e-69) tmp = Float64(Float64(Float64(F / sin(B)) / Float64(F + Float64(1.0 / F))) - t_0); elseif (F <= 5.2e-5) tmp = Float64(Float64(F * sqrt(0.5)) / 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 <= -320.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.65e-158) tmp = ((F * sqrt((1.0 / (2.0 + (F ^ 2.0))))) - x) / B; elseif (F <= 1.25e-69) tmp = ((F / sin(B)) / (F + (1.0 / F))) - t_0; elseif (F <= 5.2e-5) tmp = (F * sqrt(0.5)) / 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, -320.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.65e-158], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.25e-69], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.2e-5], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -320:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-158}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}} - x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{F + \frac{1}{F}} - t\_0\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -320Initial program 68.1%
Simplified80.7%
Taylor expanded in F around -inf 99.0%
if -320 < F < -1.6500000000000001e-158Initial program 99.2%
Simplified99.4%
Taylor expanded in x around 0 99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
*-commutative99.3%
sqrt-div99.5%
metadata-eval99.5%
frac-times99.5%
*-un-lft-identity99.5%
Applied egg-rr99.5%
*-commutative99.5%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 75.7%
if -1.6500000000000001e-158 < F < 1.25000000000000008e-69Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
*-commutative99.7%
sqrt-div99.7%
metadata-eval99.7%
frac-times99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in F around -inf 86.0%
associate-*r*86.0%
neg-mul-186.0%
Simplified86.0%
distribute-rgt-in86.0%
*-un-lft-identity86.0%
add-sqr-sqrt35.2%
sqrt-unprod86.0%
sqr-neg86.0%
sqrt-prod50.8%
add-sqr-sqrt86.0%
pow-flip86.0%
metadata-eval86.0%
add-sqr-sqrt35.2%
sqrt-unprod16.2%
sqr-neg16.2%
sqrt-prod50.9%
add-sqr-sqrt86.1%
Applied egg-rr86.1%
pow-plus86.1%
metadata-eval86.1%
unpow-186.1%
Simplified86.1%
if 1.25000000000000008e-69 < F < 5.19999999999999968e-5Initial program 99.2%
Simplified99.2%
Taylor expanded in F around 0 95.4%
Taylor expanded in x around 0 95.5%
if 5.19999999999999968e-5 < F Initial program 62.2%
Simplified76.1%
Taylor expanded in F around inf 98.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -250.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.8e-161)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (pow F 2.0))))) x) B)
(if (<= F 2.1e-69)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 0.00024)
(/ (* F (sqrt 0.5)) (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 <= -250.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.8e-161) {
tmp = ((F * sqrt((1.0 / (2.0 + pow(F, 2.0))))) - x) / B;
} else if (F <= 2.1e-69) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 0.00024) {
tmp = (F * sqrt(0.5)) / 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 <= (-250.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.8d-161)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (f ** 2.0d0))))) - x) / b
else if (f <= 2.1d-69) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 0.00024d0) then
tmp = (f * sqrt(0.5d0)) / 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 <= -250.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.8e-161) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + Math.pow(F, 2.0))))) - x) / B;
} else if (F <= 2.1e-69) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 0.00024) {
tmp = (F * Math.sqrt(0.5)) / 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 <= -250.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.8e-161: tmp = ((F * math.sqrt((1.0 / (2.0 + math.pow(F, 2.0))))) - x) / B elif F <= 2.1e-69: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 0.00024: tmp = (F * math.sqrt(0.5)) / 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 <= -250.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.8e-161) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + (F ^ 2.0))))) - x) / B); elseif (F <= 2.1e-69) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 0.00024) tmp = Float64(Float64(F * sqrt(0.5)) / 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 <= -250.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.8e-161) tmp = ((F * sqrt((1.0 / (2.0 + (F ^ 2.0))))) - x) / B; elseif (F <= 2.1e-69) tmp = (x * cos(B)) / -sin(B); elseif (F <= 0.00024) tmp = (F * sqrt(0.5)) / 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, -250.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.8e-161], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-69], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.00024], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -250:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-161}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + {F}^{2}}} - x}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-69}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.00024:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -250Initial program 68.1%
Simplified80.7%
Taylor expanded in F around -inf 99.0%
if -250 < F < -3.8000000000000001e-161Initial program 99.2%
Simplified99.4%
Taylor expanded in x around 0 99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
*-commutative99.3%
sqrt-div99.5%
metadata-eval99.5%
frac-times99.5%
*-un-lft-identity99.5%
Applied egg-rr99.5%
*-commutative99.5%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 75.7%
if -3.8000000000000001e-161 < F < 2.1e-69Initial program 99.4%
Simplified99.7%
associate-*r/99.8%
fma-undefine99.8%
+-commutative99.8%
metadata-eval99.8%
metadata-eval99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 85.9%
if 2.1e-69 < F < 2.40000000000000006e-4Initial program 99.2%
Simplified99.2%
Taylor expanded in F around 0 95.4%
Taylor expanded in x around 0 95.5%
if 2.40000000000000006e-4 < F Initial program 62.2%
Simplified76.1%
Taylor expanded in F around inf 98.4%
Final simplification91.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -370.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8.8e-160)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 1.25e-69)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 5.4e-5)
(/ (* F (sqrt 0.5)) (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 <= -370.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8.8e-160) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.25e-69) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 5.4e-5) {
tmp = (F * sqrt(0.5)) / 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 <= (-370.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8.8d-160)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 1.25d-69) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 5.4d-5) then
tmp = (f * sqrt(0.5d0)) / 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 <= -370.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8.8e-160) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.25e-69) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 5.4e-5) {
tmp = (F * Math.sqrt(0.5)) / 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 <= -370.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8.8e-160: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 1.25e-69: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 5.4e-5: tmp = (F * math.sqrt(0.5)) / 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 <= -370.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8.8e-160) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.25e-69) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 5.4e-5) tmp = Float64(Float64(F * sqrt(0.5)) / 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 <= -370.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8.8e-160) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 1.25e-69) tmp = (x * cos(B)) / -sin(B); elseif (F <= 5.4e-5) tmp = (F * sqrt(0.5)) / 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, -370.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.8e-160], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-69], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 5.4e-5], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -370:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-160}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-69}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -370Initial program 68.1%
Simplified80.7%
Taylor expanded in F around -inf 99.0%
if -370 < F < -8.8e-160Initial program 99.2%
Taylor expanded in B around 0 86.2%
associate-*r/86.2%
mul-1-neg86.2%
Simplified86.2%
Taylor expanded in B around 0 75.6%
if -8.8e-160 < F < 1.25000000000000008e-69Initial program 99.4%
Simplified99.7%
associate-*r/99.8%
fma-undefine99.8%
+-commutative99.8%
metadata-eval99.8%
metadata-eval99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 85.9%
if 1.25000000000000008e-69 < F < 5.3999999999999998e-5Initial program 99.2%
Simplified99.2%
Taylor expanded in F around 0 95.4%
Taylor expanded in x around 0 95.5%
if 5.3999999999999998e-5 < F Initial program 62.2%
Simplified76.1%
Taylor expanded in F around inf 98.4%
Final simplification91.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -260.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8.5e-156)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.4e-69)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1050.0) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -260.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8.5e-156) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.4e-69) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1050.0) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-260.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8.5d-156)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.4d-69) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1050.0d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -260.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8.5e-156) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.4e-69) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1050.0) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -260.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8.5e-156: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.4e-69: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1050.0: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -260.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8.5e-156) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.4e-69) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1050.0) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -260.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8.5e-156) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.4e-69) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1050.0) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -260.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.5e-156], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.4e-69], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1050.0], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -260:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-156}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-69}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1050:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -260Initial program 68.1%
Simplified80.7%
Taylor expanded in F around -inf 99.0%
if -260 < F < -8.5e-156Initial program 99.2%
Taylor expanded in B around 0 86.2%
associate-*r/86.2%
mul-1-neg86.2%
Simplified86.2%
Taylor expanded in B around 0 75.6%
if -8.5e-156 < F < 4.4e-69Initial program 99.4%
Simplified99.7%
associate-*r/99.8%
fma-undefine99.8%
+-commutative99.8%
metadata-eval99.8%
metadata-eval99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 85.9%
if 4.4e-69 < F < 1050Initial program 99.0%
Simplified99.1%
Taylor expanded in F around 0 86.3%
Taylor expanded in x around 0 86.4%
if 1050 < F Initial program 61.7%
Simplified75.7%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in B around 0 78.8%
Final simplification86.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B)))
(t_1 (/ x (tan B)))
(t_2 (- (/ -1.0 B) t_1)))
(if (<= F -3.9e+90)
t_2
(if (<= F -1150.0)
(- (/ (* F (/ -1.0 F)) (sin B)) (/ x B))
(if (<= F -1.55e-156)
t_0
(if (<= F -2.8e-265)
t_2
(if (<= F 105000.0) t_0 (- (/ 1.0 B) t_1))))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x / tan(B);
double t_2 = (-1.0 / B) - t_1;
double tmp;
if (F <= -3.9e+90) {
tmp = t_2;
} else if (F <= -1150.0) {
tmp = ((F * (-1.0 / F)) / sin(B)) - (x / B);
} else if (F <= -1.55e-156) {
tmp = t_0;
} else if (F <= -2.8e-265) {
tmp = t_2;
} else if (F <= 105000.0) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
t_1 = x / tan(b)
t_2 = ((-1.0d0) / b) - t_1
if (f <= (-3.9d+90)) then
tmp = t_2
else if (f <= (-1150.0d0)) then
tmp = ((f * ((-1.0d0) / f)) / sin(b)) - (x / b)
else if (f <= (-1.55d-156)) then
tmp = t_0
else if (f <= (-2.8d-265)) then
tmp = t_2
else if (f <= 105000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x / Math.tan(B);
double t_2 = (-1.0 / B) - t_1;
double tmp;
if (F <= -3.9e+90) {
tmp = t_2;
} else if (F <= -1150.0) {
tmp = ((F * (-1.0 / F)) / Math.sin(B)) - (x / B);
} else if (F <= -1.55e-156) {
tmp = t_0;
} else if (F <= -2.8e-265) {
tmp = t_2;
} else if (F <= 105000.0) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) t_1 = x / math.tan(B) t_2 = (-1.0 / B) - t_1 tmp = 0 if F <= -3.9e+90: tmp = t_2 elif F <= -1150.0: tmp = ((F * (-1.0 / F)) / math.sin(B)) - (x / B) elif F <= -1.55e-156: tmp = t_0 elif F <= -2.8e-265: tmp = t_2 elif F <= 105000.0: tmp = t_0 else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(-1.0 / B) - t_1) tmp = 0.0 if (F <= -3.9e+90) tmp = t_2; elseif (F <= -1150.0) tmp = Float64(Float64(Float64(F * Float64(-1.0 / F)) / sin(B)) - Float64(x / B)); elseif (F <= -1.55e-156) tmp = t_0; elseif (F <= -2.8e-265) tmp = t_2; elseif (F <= 105000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); t_1 = x / tan(B); t_2 = (-1.0 / B) - t_1; tmp = 0.0; if (F <= -3.9e+90) tmp = t_2; elseif (F <= -1150.0) tmp = ((F * (-1.0 / F)) / sin(B)) - (x / B); elseif (F <= -1.55e-156) tmp = t_0; elseif (F <= -2.8e-265) tmp = t_2; elseif (F <= 105000.0) tmp = t_0; else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -3.9e+90], t$95$2, If[LessEqual[F, -1150.0], N[(N[(N[(F * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-156], t$95$0, If[LessEqual[F, -2.8e-265], t$95$2, If[LessEqual[F, 105000.0], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
t_2 := \frac{-1}{B} - t\_1\\
\mathbf{if}\;F \leq -3.9 \cdot 10^{+90}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq -1150:\\
\;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq 105000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\end{array}
\end{array}
if F < -3.9000000000000002e90 or -1.5499999999999999e-156 < F < -2.80000000000000023e-265Initial program 68.5%
Simplified80.2%
Taylor expanded in F around -inf 80.6%
Taylor expanded in B around 0 83.7%
if -3.9000000000000002e90 < F < -1150Initial program 96.2%
Simplified99.6%
associate-*r/99.9%
fma-undefine99.9%
+-commutative99.9%
metadata-eval99.9%
metadata-eval99.9%
fma-define99.8%
*-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 85.3%
if -1150 < F < -1.5499999999999999e-156 or -2.80000000000000023e-265 < F < 105000Initial program 99.3%
Taylor expanded in B around 0 81.8%
associate-*r/81.8%
mul-1-neg81.8%
Simplified81.8%
Taylor expanded in B around 0 68.0%
if 105000 < F Initial program 61.1%
Simplified75.3%
Taylor expanded in F around inf 99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 79.1%
Final simplification76.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ x (tan B)))
(t_2 (- (/ -1.0 B) t_1)))
(if (<= F -1.25e+93)
t_2
(if (<= F -0.37)
(- (/ (* F (/ -1.0 F)) (sin B)) (/ x B))
(if (<= F -1.4e-157)
t_0
(if (<= F -1.85e-264)
t_2
(if (<= F 1050.0) t_0 (- (/ 1.0 B) t_1))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / tan(B);
double t_2 = (-1.0 / B) - t_1;
double tmp;
if (F <= -1.25e+93) {
tmp = t_2;
} else if (F <= -0.37) {
tmp = ((F * (-1.0 / F)) / sin(B)) - (x / B);
} else if (F <= -1.4e-157) {
tmp = t_0;
} else if (F <= -1.85e-264) {
tmp = t_2;
} else if (F <= 1050.0) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x / tan(b)
t_2 = ((-1.0d0) / b) - t_1
if (f <= (-1.25d+93)) then
tmp = t_2
else if (f <= (-0.37d0)) then
tmp = ((f * ((-1.0d0) / f)) / sin(b)) - (x / b)
else if (f <= (-1.4d-157)) then
tmp = t_0
else if (f <= (-1.85d-264)) then
tmp = t_2
else if (f <= 1050.0d0) then
tmp = t_0
else
tmp = (1.0d0 / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / Math.tan(B);
double t_2 = (-1.0 / B) - t_1;
double tmp;
if (F <= -1.25e+93) {
tmp = t_2;
} else if (F <= -0.37) {
tmp = ((F * (-1.0 / F)) / Math.sin(B)) - (x / B);
} else if (F <= -1.4e-157) {
tmp = t_0;
} else if (F <= -1.85e-264) {
tmp = t_2;
} else if (F <= 1050.0) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x / math.tan(B) t_2 = (-1.0 / B) - t_1 tmp = 0 if F <= -1.25e+93: tmp = t_2 elif F <= -0.37: tmp = ((F * (-1.0 / F)) / math.sin(B)) - (x / B) elif F <= -1.4e-157: tmp = t_0 elif F <= -1.85e-264: tmp = t_2 elif F <= 1050.0: tmp = t_0 else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(-1.0 / B) - t_1) tmp = 0.0 if (F <= -1.25e+93) tmp = t_2; elseif (F <= -0.37) tmp = Float64(Float64(Float64(F * Float64(-1.0 / F)) / sin(B)) - Float64(x / B)); elseif (F <= -1.4e-157) tmp = t_0; elseif (F <= -1.85e-264) tmp = t_2; elseif (F <= 1050.0) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x / tan(B); t_2 = (-1.0 / B) - t_1; tmp = 0.0; if (F <= -1.25e+93) tmp = t_2; elseif (F <= -0.37) tmp = ((F * (-1.0 / F)) / sin(B)) - (x / B); elseif (F <= -1.4e-157) tmp = t_0; elseif (F <= -1.85e-264) tmp = t_2; elseif (F <= 1050.0) tmp = t_0; else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -1.25e+93], t$95$2, If[LessEqual[F, -0.37], N[(N[(N[(F * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.4e-157], t$95$0, If[LessEqual[F, -1.85e-264], t$95$2, If[LessEqual[F, 1050.0], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
t_2 := \frac{-1}{B} - t\_1\\
\mathbf{if}\;F \leq -1.25 \cdot 10^{+93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq -0.37:\\
\;\;\;\;\frac{F \cdot \frac{-1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-157}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.85 \cdot 10^{-264}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq 1050:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\end{array}
\end{array}
if F < -1.25e93 or -1.40000000000000005e-157 < F < -1.84999999999999998e-264Initial program 68.5%
Simplified80.2%
Taylor expanded in F around -inf 80.6%
Taylor expanded in B around 0 83.7%
if -1.25e93 < F < -0.37Initial program 96.3%
Simplified99.6%
associate-*r/99.8%
fma-undefine99.8%
+-commutative99.8%
metadata-eval99.8%
metadata-eval99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in F around -inf 95.5%
Taylor expanded in B around 0 83.7%
if -0.37 < F < -1.40000000000000005e-157 or -1.84999999999999998e-264 < F < 1050Initial program 99.3%
Simplified99.6%
Taylor expanded in F around 0 98.4%
Taylor expanded in B around 0 67.4%
if 1050 < F Initial program 61.7%
Simplified75.7%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in B around 0 78.8%
Final simplification76.4%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.4e-143) (not (<= x 1.28e-272))) (- (/ -1.0 B) (/ x (tan B))) (* (* F (sqrt 0.5)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.4e-143) || !(x <= 1.28e-272)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = (F * sqrt(0.5)) * (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-3.4d-143)) .or. (.not. (x <= 1.28d-272))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = (f * sqrt(0.5d0)) * (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3.4e-143) || !(x <= 1.28e-272)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (F * Math.sqrt(0.5)) * (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.4e-143) or not (x <= 1.28e-272): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (F * math.sqrt(0.5)) * (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.4e-143) || !(x <= 1.28e-272)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(F * sqrt(0.5)) * Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3.4e-143) || ~((x <= 1.28e-272))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (F * sqrt(0.5)) * (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.4e-143], N[Not[LessEqual[x, 1.28e-272]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{-143} \lor \neg \left(x \leq 1.28 \cdot 10^{-272}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\left(F \cdot \sqrt{0.5}\right) \cdot \frac{1}{B}\\
\end{array}
\end{array}
if x < -3.39999999999999983e-143 or 1.27999999999999996e-272 < x Initial program 81.7%
Simplified90.0%
Taylor expanded in F around -inf 64.9%
Taylor expanded in B around 0 66.9%
if -3.39999999999999983e-143 < x < 1.27999999999999996e-272Initial program 78.9%
Simplified81.0%
Taylor expanded in F around 0 55.7%
Taylor expanded in x around 0 45.7%
associate-/l*45.5%
Simplified45.5%
Taylor expanded in B around 0 35.1%
div-inv35.1%
Applied egg-rr35.1%
Final simplification61.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.8e-282)
(- (/ -1.0 B) t_0)
(if (<= F 1.02e-265) (/ x (- B)) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.8e-282) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.02e-265) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.8d-282)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.02d-265) then
tmp = x / -b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.8e-282) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.02e-265) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.8e-282: tmp = (-1.0 / B) - t_0 elif F <= 1.02e-265: tmp = x / -B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.8e-282) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.02e-265) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.8e-282) tmp = (-1.0 / B) - t_0; elseif (F <= 1.02e-265) tmp = x / -B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e-282], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.02e-265], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-282}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{-265}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -6.79999999999999997e-282Initial program 82.8%
Simplified89.5%
Taylor expanded in F around -inf 70.4%
Taylor expanded in B around 0 66.1%
if -6.79999999999999997e-282 < F < 1.02000000000000005e-265Initial program 99.2%
Simplified100.0%
Taylor expanded in F around inf 1.5%
associate-/r*1.5%
Simplified1.5%
Taylor expanded in B around 0 12.2%
Taylor expanded in x around inf 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if 1.02000000000000005e-265 < F Initial program 77.4%
Simplified85.7%
Taylor expanded in F around inf 66.0%
associate-/r*66.0%
Simplified66.0%
Taylor expanded in B around 0 64.8%
Final simplification66.9%
(FPCore (F B x) :precision binary64 (if (<= B 7e-23) (/ (- (/ -1.0 (+ 1.0 (/ 1.0 (pow F 2.0)))) x) B) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 7e-23) {
tmp = ((-1.0 / (1.0 + (1.0 / pow(F, 2.0)))) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 7d-23) then
tmp = (((-1.0d0) / (1.0d0 + (1.0d0 / (f ** 2.0d0)))) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 7e-23) {
tmp = ((-1.0 / (1.0 + (1.0 / Math.pow(F, 2.0)))) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 7e-23: tmp = ((-1.0 / (1.0 + (1.0 / math.pow(F, 2.0)))) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 7e-23) tmp = Float64(Float64(Float64(-1.0 / Float64(1.0 + Float64(1.0 / (F ^ 2.0)))) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 7e-23) tmp = ((-1.0 / (1.0 + (1.0 / (F ^ 2.0)))) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 7e-23], N[(N[(N[(-1.0 / N[(1.0 + N[(1.0 / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{-1}{1 + \frac{1}{{F}^{2}}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 6.99999999999999987e-23Initial program 76.8%
Simplified86.4%
Taylor expanded in x around 0 76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
*-commutative76.9%
sqrt-div77.0%
metadata-eval77.0%
frac-times86.4%
*-un-lft-identity86.4%
Applied egg-rr86.4%
*-commutative86.4%
associate-/r*77.0%
Simplified77.0%
Taylor expanded in F around -inf 62.8%
associate-*r*62.8%
neg-mul-162.8%
Simplified62.8%
Taylor expanded in B around 0 52.4%
mul-1-neg52.4%
distribute-neg-frac252.4%
Simplified52.4%
if 6.99999999999999987e-23 < B Initial program 93.7%
Simplified93.8%
Taylor expanded in F around inf 54.3%
associate-/r*54.3%
Simplified54.3%
Taylor expanded in B around 0 63.0%
Final simplification55.1%
(FPCore (F B x)
:precision binary64
(if (<= F -2.45e-5)
(/ (- -1.0 x) B)
(if (<= F -6.2e-65)
(* F (/ (sqrt 0.5) B))
(if (<= F 6.5e-69) (/ x (- B)) (- (/ 1.0 B) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.45e-5) {
tmp = (-1.0 - x) / B;
} else if (F <= -6.2e-65) {
tmp = F * (sqrt(0.5) / B);
} else if (F <= 6.5e-69) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.45d-5)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-6.2d-65)) then
tmp = f * (sqrt(0.5d0) / b)
else if (f <= 6.5d-69) then
tmp = x / -b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.45e-5) {
tmp = (-1.0 - x) / B;
} else if (F <= -6.2e-65) {
tmp = F * (Math.sqrt(0.5) / B);
} else if (F <= 6.5e-69) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.45e-5: tmp = (-1.0 - x) / B elif F <= -6.2e-65: tmp = F * (math.sqrt(0.5) / B) elif F <= 6.5e-69: tmp = x / -B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.45e-5) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -6.2e-65) tmp = Float64(F * Float64(sqrt(0.5) / B)); elseif (F <= 6.5e-69) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.45e-5) tmp = (-1.0 - x) / B; elseif (F <= -6.2e-65) tmp = F * (sqrt(0.5) / B); elseif (F <= 6.5e-69) tmp = x / -B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.45e-5], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -6.2e-65], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-69], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.45 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-65}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.45e-5Initial program 68.5%
Simplified81.0%
associate-*r/81.1%
fma-undefine81.1%
+-commutative81.1%
metadata-eval81.1%
metadata-eval81.1%
fma-define81.1%
*-commutative81.1%
fma-define81.1%
+-commutative81.1%
fma-define81.1%
metadata-eval81.1%
metadata-eval81.1%
Applied egg-rr81.1%
Taylor expanded in F around -inf 98.2%
Taylor expanded in B around 0 49.0%
associate-*r/49.0%
neg-mul-149.0%
distribute-neg-in49.0%
metadata-eval49.0%
unsub-neg49.0%
Simplified49.0%
if -2.45e-5 < F < -6.20000000000000032e-65Initial program 99.2%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 63.8%
associate-/l*63.9%
Simplified63.9%
Taylor expanded in B around 0 63.8%
associate-/l*64.0%
Simplified64.0%
if -6.20000000000000032e-65 < F < 6.49999999999999951e-69Initial program 99.4%
Simplified99.6%
Taylor expanded in F around inf 18.4%
associate-/r*18.4%
Simplified18.4%
Taylor expanded in B around 0 25.5%
Taylor expanded in x around inf 50.0%
associate-*r/50.0%
neg-mul-150.0%
Simplified50.0%
if 6.49999999999999951e-69 < F Initial program 66.3%
Simplified78.6%
Taylor expanded in F around inf 88.4%
associate-/r*88.4%
Simplified88.4%
Taylor expanded in B around 0 41.5%
div-sub41.5%
Applied egg-rr41.5%
Final simplification47.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.65e-64) (/ (- -1.0 x) B) (if (<= F 8.2e-69) (/ x (- B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-64) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-69) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.65d-64)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.2d-69) then
tmp = x / -b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-64) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-69) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.65e-64: tmp = (-1.0 - x) / B elif F <= 8.2e-69: tmp = x / -B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.65e-64) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.2e-69) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.65e-64) tmp = (-1.0 - x) / B; elseif (F <= 8.2e-69) tmp = x / -B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.65e-64], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.2e-69], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.65 \cdot 10^{-64}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.65e-64Initial program 72.2%
Simplified83.2%
associate-*r/83.3%
fma-undefine83.3%
+-commutative83.3%
metadata-eval83.3%
metadata-eval83.3%
fma-define83.3%
*-commutative83.3%
fma-define83.3%
+-commutative83.3%
fma-define83.3%
metadata-eval83.3%
metadata-eval83.3%
Applied egg-rr83.3%
Taylor expanded in F around -inf 90.7%
Taylor expanded in B around 0 45.1%
associate-*r/45.1%
neg-mul-145.1%
distribute-neg-in45.1%
metadata-eval45.1%
unsub-neg45.1%
Simplified45.1%
if -1.65e-64 < F < 8.1999999999999998e-69Initial program 99.4%
Simplified99.6%
Taylor expanded in F around inf 18.4%
associate-/r*18.4%
Simplified18.4%
Taylor expanded in B around 0 25.5%
Taylor expanded in x around inf 50.0%
associate-*r/50.0%
neg-mul-150.0%
Simplified50.0%
if 8.1999999999999998e-69 < F Initial program 66.3%
Simplified78.6%
Taylor expanded in F around inf 88.4%
associate-/r*88.4%
Simplified88.4%
Taylor expanded in B around 0 41.5%
div-sub41.5%
Applied egg-rr41.5%
Final simplification46.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.15e-64) (/ (- -1.0 x) B) (if (<= F 5e-69) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-64) {
tmp = (-1.0 - x) / B;
} else if (F <= 5e-69) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.15d-64)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5d-69) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-64) {
tmp = (-1.0 - x) / B;
} else if (F <= 5e-69) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-64: tmp = (-1.0 - x) / B elif F <= 5e-69: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-64) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5e-69) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-64) tmp = (-1.0 - x) / B; elseif (F <= 5e-69) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-64], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5e-69], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-64}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.1500000000000001e-64Initial program 72.2%
Simplified83.2%
associate-*r/83.3%
fma-undefine83.3%
+-commutative83.3%
metadata-eval83.3%
metadata-eval83.3%
fma-define83.3%
*-commutative83.3%
fma-define83.3%
+-commutative83.3%
fma-define83.3%
metadata-eval83.3%
metadata-eval83.3%
Applied egg-rr83.3%
Taylor expanded in F around -inf 90.7%
Taylor expanded in B around 0 45.1%
associate-*r/45.1%
neg-mul-145.1%
distribute-neg-in45.1%
metadata-eval45.1%
unsub-neg45.1%
Simplified45.1%
if -1.1500000000000001e-64 < F < 5.00000000000000033e-69Initial program 99.4%
Simplified99.6%
Taylor expanded in F around inf 18.4%
associate-/r*18.4%
Simplified18.4%
Taylor expanded in B around 0 25.5%
Taylor expanded in x around inf 50.0%
associate-*r/50.0%
neg-mul-150.0%
Simplified50.0%
if 5.00000000000000033e-69 < F Initial program 66.3%
Simplified78.6%
Taylor expanded in F around inf 88.4%
associate-/r*88.4%
Simplified88.4%
Taylor expanded in B around 0 41.5%
Final simplification46.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.95e-64) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.95e-64) {
tmp = (-1.0 - x) / B;
} else {
tmp = 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.95d-64)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.95e-64) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.95e-64: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.95e-64) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.95e-64) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.95e-64], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.95 \cdot 10^{-64}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -1.9499999999999998e-64Initial program 72.2%
Simplified83.2%
associate-*r/83.3%
fma-undefine83.3%
+-commutative83.3%
metadata-eval83.3%
metadata-eval83.3%
fma-define83.3%
*-commutative83.3%
fma-define83.3%
+-commutative83.3%
fma-define83.3%
metadata-eval83.3%
metadata-eval83.3%
Applied egg-rr83.3%
Taylor expanded in F around -inf 90.7%
Taylor expanded in B around 0 45.1%
associate-*r/45.1%
neg-mul-145.1%
distribute-neg-in45.1%
metadata-eval45.1%
unsub-neg45.1%
Simplified45.1%
if -1.9499999999999998e-64 < F Initial program 85.4%
Simplified90.8%
Taylor expanded in F around inf 48.0%
associate-/r*48.0%
Simplified48.0%
Taylor expanded in B around 0 32.3%
Taylor expanded in x around inf 37.8%
associate-*r/37.8%
neg-mul-137.8%
Simplified37.8%
Final simplification40.2%
(FPCore (F B x) :precision binary64 (/ x (- B)))
double code(double F, double B, double x) {
return x / -B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / -b
end function
public static double code(double F, double B, double x) {
return x / -B;
}
def code(F, B, x): return x / -B
function code(F, B, x) return Float64(x / Float64(-B)) end
function tmp = code(F, B, x) tmp = x / -B; end
code[F_, B_, x_] := N[(x / (-B)), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-B}
\end{array}
Initial program 81.1%
Simplified88.3%
Taylor expanded in F around inf 46.5%
associate-/r*46.5%
Simplified46.5%
Taylor expanded in B around 0 27.8%
Taylor expanded in x around inf 31.9%
associate-*r/31.9%
neg-mul-131.9%
Simplified31.9%
Final simplification31.9%
(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 81.1%
Simplified88.3%
Taylor expanded in F around inf 46.5%
associate-/r*46.5%
Simplified46.5%
Taylor expanded in B around 0 27.8%
Taylor expanded in x around 0 7.7%
herbie shell --seed 2024136
(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))))))