
(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 27 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 -120000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 120000000.0)
(fma
(/ F (sin B))
(pow (fma x 2.0 (fma F F 2.0)) -0.5)
(/ (- x) (tan B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -120000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 120000000.0) {
tmp = fma((F / sin(B)), pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), (-x / tan(B)));
} 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 <= -120000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 120000000.0) tmp = fma(Float64(F / sin(B)), (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5), Float64(Float64(-x) / tan(B))); 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, -120000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 120000000.0], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -120000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.2e8Initial program 53.1%
distribute-lft-neg-in53.1%
+-commutative53.1%
cancel-sign-sub-inv53.1%
Simplified69.0%
Taylor expanded in x around 0 68.9%
associate-*l/69.0%
*-lft-identity69.0%
+-commutative69.0%
unpow269.0%
fma-udef69.0%
Simplified69.0%
Taylor expanded in F around -inf 99.8%
if -1.2e8 < F < 1.2e8Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
if 1.2e8 < F Initial program 60.2%
distribute-lft-neg-in60.2%
+-commutative60.2%
cancel-sign-sub-inv60.2%
Simplified78.9%
Taylor expanded in x around 0 78.9%
associate-*l/78.9%
*-lft-identity78.9%
+-commutative78.9%
unpow278.9%
fma-udef78.9%
Simplified78.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.5e+92)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 125000000.0)
(- (* F (/ (/ 1.0 (sqrt (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.5e+92) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 125000000.0) {
tmp = (F * ((1.0 / sqrt(fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.5e+92) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 125000000.0) tmp = Float64(Float64(F * Float64(Float64(1.0 / sqrt(fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e+92], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 125000000.0], N[(N[(F * N[(N[(1.0 / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{+92}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 125000000:\\
\;\;\;\;F \cdot \frac{\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.49999999999999946e92Initial program 41.9%
Taylor expanded in F around -inf 99.8%
if -7.49999999999999946e92 < F < 1.25e8Initial program 98.8%
distribute-lft-neg-in98.8%
+-commutative98.8%
cancel-sign-sub-inv98.8%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
sqrt-div99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 1.25e8 < F Initial program 60.2%
distribute-lft-neg-in60.2%
+-commutative60.2%
cancel-sign-sub-inv60.2%
Simplified78.9%
Taylor expanded in x around 0 78.9%
associate-*l/78.9%
*-lft-identity78.9%
+-commutative78.9%
unpow278.9%
fma-udef78.9%
Simplified78.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+101)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 200000000.0)
(- (/ (* F (pow (fma F F 2.0) -0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+101) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 200000000.0) {
tmp = ((F * pow(fma(F, F, 2.0), -0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+101) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F * (fma(F, F, 2.0) ^ -0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+101], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F * N[Power[N[(F * F + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+101}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -9.9999999999999998e100Initial program 40.1%
Taylor expanded in F around -inf 99.8%
if -9.9999999999999998e100 < F < 2e8Initial program 98.1%
distribute-lft-neg-in98.1%
+-commutative98.1%
cancel-sign-sub-inv98.1%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.6%
pow1/299.6%
inv-pow99.6%
pow-pow99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 2e8 < F Initial program 60.2%
distribute-lft-neg-in60.2%
+-commutative60.2%
cancel-sign-sub-inv60.2%
Simplified78.9%
Taylor expanded in x around 0 78.9%
associate-*l/78.9%
*-lft-identity78.9%
+-commutative78.9%
unpow278.9%
fma-udef78.9%
Simplified78.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+22)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.02e+40)
(- (/ (/ 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 <= -4e+22) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.02e+40) {
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 <= -4e+22) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.02e+40) 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, -4e+22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.02e+40], 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 -4 \cdot 10^{+22}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{+40}:\\
\;\;\;\;\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 < -4e22Initial program 52.3%
distribute-lft-neg-in52.3%
+-commutative52.3%
cancel-sign-sub-inv52.3%
Simplified68.6%
Taylor expanded in x around 0 68.5%
associate-*l/68.5%
*-lft-identity68.5%
+-commutative68.5%
unpow268.5%
fma-udef68.5%
Simplified68.5%
Taylor expanded in F around -inf 99.8%
if -4e22 < F < 1.02e40Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-*r/99.6%
Applied egg-rr99.6%
associate-/l*99.6%
associate-/r/99.6%
times-frac99.6%
*-rgt-identity99.6%
associate-/r*99.6%
Simplified99.6%
if 1.02e40 < F Initial program 56.1%
distribute-lft-neg-in56.1%
+-commutative56.1%
cancel-sign-sub-inv56.1%
Simplified76.8%
Taylor expanded in x around 0 76.8%
associate-*l/76.8%
*-lft-identity76.8%
+-commutative76.8%
unpow276.8%
fma-udef76.8%
Simplified76.8%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -58000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000.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 <= -58000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000.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 <= (-58000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 200000000.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 <= -58000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 200000000.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 <= -58000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 200000000.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 <= -58000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000.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 <= -58000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 200000000.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, -58000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.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 -58000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;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 < -5.8e7Initial program 53.1%
distribute-lft-neg-in53.1%
+-commutative53.1%
cancel-sign-sub-inv53.1%
Simplified69.0%
Taylor expanded in x around 0 68.9%
associate-*l/69.0%
*-lft-identity69.0%
+-commutative69.0%
unpow269.0%
fma-udef69.0%
Simplified69.0%
Taylor expanded in F around -inf 99.8%
if -5.8e7 < F < 2e8Initial program 99.5%
if 2e8 < F Initial program 60.2%
distribute-lft-neg-in60.2%
+-commutative60.2%
cancel-sign-sub-inv60.2%
Simplified78.9%
Taylor expanded in x around 0 78.9%
associate-*l/78.9%
*-lft-identity78.9%
+-commutative78.9%
unpow278.9%
fma-udef78.9%
Simplified78.9%
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 -90.0)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 1.42)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 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 <= -90.0) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 1.42) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 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 <= (-90.0d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 1.42d0) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 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 <= -90.0) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 1.42) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 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 <= -90.0: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 1.42: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 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 <= -90.0) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 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 <= -90.0) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 1.42) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 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, -90.0], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -90:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -90Initial program 53.8%
distribute-lft-neg-in53.8%
+-commutative53.8%
cancel-sign-sub-inv53.8%
Simplified69.5%
Taylor expanded in x around 0 69.4%
associate-*l/69.5%
*-lft-identity69.5%
+-commutative69.5%
unpow269.5%
fma-udef69.5%
Simplified69.5%
sqrt-div69.6%
metadata-eval69.6%
Applied egg-rr69.6%
Taylor expanded in F around -inf 99.1%
mul-1-neg99.1%
Simplified99.1%
if -90 < F < 1.4199999999999999Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in F around 0 97.6%
Taylor expanded in F around 0 97.6%
if 1.4199999999999999 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in x around 0 79.3%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-udef79.2%
Simplified79.2%
Taylor expanded in F around inf 98.6%
Final simplification98.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -90.0)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 1.42)
(- (/ 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 <= -90.0) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 1.42) {
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 <= (-90.0d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 1.42d0) 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 <= -90.0) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 1.42) {
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 <= -90.0: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 1.42: 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 <= -90.0) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(F / Float64(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 <= -90.0) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 1.42) 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, -90.0], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $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 -90:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -90Initial program 53.8%
distribute-lft-neg-in53.8%
+-commutative53.8%
cancel-sign-sub-inv53.8%
Simplified69.5%
Taylor expanded in x around 0 69.4%
associate-*l/69.5%
*-lft-identity69.5%
+-commutative69.5%
unpow269.5%
fma-udef69.5%
Simplified69.5%
sqrt-div69.6%
metadata-eval69.6%
Applied egg-rr69.6%
Taylor expanded in F around -inf 99.1%
mul-1-neg99.1%
Simplified99.1%
if -90 < F < 1.4199999999999999Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 97.6%
associate-/l*97.6%
Simplified97.6%
if 1.4199999999999999 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in x around 0 79.3%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-udef79.2%
Simplified79.2%
Taylor expanded in F around inf 98.6%
Final simplification98.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00084)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 1.35e-120)
(- (/ F (/ B (sqrt 0.5))) t_0)
(if (<= F 2050000.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x 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 <= -0.00084) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 1.35e-120) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else if (F <= 2050000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.00084d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 1.35d-120) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else if (f <= 2050000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.00084) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 1.35e-120) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else if (F <= 2050000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / 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 <= -0.00084: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 1.35e-120: tmp = (F / (B / math.sqrt(0.5))) - t_0 elif F <= 2050000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / 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 <= -0.00084) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 1.35e-120) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); elseif (F <= 2050000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.00084) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 1.35e-120) tmp = (F / (B / sqrt(0.5))) - t_0; elseif (F <= 2050000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00084], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35e-120], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2050000.0], N[(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] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00084:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-120}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{elif}\;F \leq 2050000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -8.4000000000000003e-4Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified71.3%
Taylor expanded in x around 0 71.2%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
sqrt-div71.3%
metadata-eval71.3%
Applied egg-rr71.3%
Taylor expanded in F around -inf 95.4%
mul-1-neg95.4%
Simplified95.4%
if -8.4000000000000003e-4 < F < 1.3499999999999999e-120Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 87.6%
associate-/l*87.7%
Simplified87.7%
if 1.3499999999999999e-120 < F < 2.05e6Initial program 99.4%
Taylor expanded in B around 0 81.7%
if 2.05e6 < F Initial program 60.2%
distribute-lft-neg-in60.2%
+-commutative60.2%
cancel-sign-sub-inv60.2%
Simplified78.9%
Taylor expanded in x around 0 78.9%
associate-*l/78.9%
*-lft-identity78.9%
+-commutative78.9%
unpow278.9%
fma-udef78.9%
Simplified78.9%
Taylor expanded in F around inf 99.8%
Final simplification91.9%
(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 -700.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 2.7e-118)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(if (<= F 10500000.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 <= -700.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 2.7e-118) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else if (F <= 10500000.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 <= (-700.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 2.7d-118) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else if (f <= 10500000.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 <= -700.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 2.7e-118) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else if (F <= 10500000.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 <= -700.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 2.7e-118: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) elif F <= 10500000.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 <= -700.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 2.7e-118) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); elseif (F <= 10500000.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 <= -700.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 2.7e-118) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); elseif (F <= 10500000.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, -700.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2.7e-118], 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, 10500000.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 -700:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-118}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 10500000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -700Initial program 53.1%
distribute-lft-neg-in53.1%
+-commutative53.1%
cancel-sign-sub-inv53.1%
Simplified69.0%
Taylor expanded in x around 0 68.9%
associate-*l/69.0%
*-lft-identity69.0%
+-commutative69.0%
unpow269.0%
fma-udef69.0%
Simplified69.0%
Taylor expanded in F around -inf 99.8%
if -700 < F < 2.69999999999999994e-118Initial program 99.5%
Taylor expanded in B around 0 86.0%
if 2.69999999999999994e-118 < F < 1.05e7Initial program 99.4%
Taylor expanded in B around 0 81.7%
if 1.05e7 < F Initial program 60.2%
distribute-lft-neg-in60.2%
+-commutative60.2%
cancel-sign-sub-inv60.2%
Simplified78.9%
Taylor expanded in x around 0 78.9%
associate-*l/78.9%
*-lft-identity78.9%
+-commutative78.9%
unpow278.9%
fma-udef78.9%
Simplified78.9%
Taylor expanded in F around inf 99.8%
Final simplification92.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.002)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 0.25) (- (* (sqrt 0.5) (/ F B)) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.002) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 0.25) {
tmp = (sqrt(0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.002d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 0.25d0) then
tmp = (sqrt(0.5d0) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.002) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 0.25) {
tmp = (Math.sqrt(0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.002: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 0.25: tmp = (math.sqrt(0.5) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.002) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 0.25) tmp = Float64(Float64(sqrt(0.5) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.002) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 0.25) tmp = (sqrt(0.5) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.002], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.25], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.002:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.25:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2e-3Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified71.3%
Taylor expanded in x around 0 71.2%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
sqrt-div71.3%
metadata-eval71.3%
Applied egg-rr71.3%
Taylor expanded in F around -inf 95.4%
mul-1-neg95.4%
Simplified95.4%
if -2e-3 < F < 0.25Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.0%
Taylor expanded in B around 0 78.8%
associate-/l*78.8%
associate-/r/78.9%
Simplified78.9%
if 0.25 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in x around 0 79.3%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-udef79.2%
Simplified79.2%
Taylor expanded in F around inf 98.6%
Final simplification88.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.1e-18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2e-125)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 0.16)
(/ (- (* F (sqrt 0.5)) x) 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 <= -6.1e-18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2e-125) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 0.16) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.1d-18)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2d-125) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 0.16d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.1e-18) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2e-125) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 0.16) {
tmp = ((F * Math.sqrt(0.5)) - x) / 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 <= -6.1e-18: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2e-125: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 0.16: tmp = ((F * math.sqrt(0.5)) - x) / 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 <= -6.1e-18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2e-125) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 0.16) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.1e-18) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2e-125) tmp = -x / (sin(B) / cos(B)); elseif (F <= 0.16) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.1e-18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2e-125], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.16], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -6.1 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-125}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 0.16:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.0999999999999999e-18Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified71.3%
Taylor expanded in x around 0 71.2%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
Taylor expanded in F around -inf 95.2%
if -6.0999999999999999e-18 < F < 2.00000000000000002e-125Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in F around 0 78.9%
mul-1-neg78.9%
associate-/l*78.9%
distribute-neg-frac78.9%
Simplified78.9%
if 2.00000000000000002e-125 < F < 0.160000000000000003Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.3%
Taylor expanded in F around 0 97.3%
Taylor expanded in x around 0 97.3%
Taylor expanded in B around 0 47.7%
if 0.160000000000000003 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in x around 0 79.3%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-udef79.2%
Simplified79.2%
Taylor expanded in F around inf 98.6%
Final simplification84.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.002)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.5) (- (* F (/ (sqrt 0.5) B)) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.002) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.5) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.002d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.5d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.002) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.5) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.002: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.5: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.002) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.5) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.002) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.5) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.002], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.5], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.002:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.5:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2e-3Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified71.3%
Taylor expanded in x around 0 71.2%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
Taylor expanded in F around -inf 95.2%
if -2e-3 < F < 0.5Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.0%
Taylor expanded in B around 0 78.8%
if 0.5 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in x around 0 79.3%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-udef79.2%
Simplified79.2%
Taylor expanded in F around inf 98.6%
Final simplification88.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.002)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.2) (- (* (sqrt 0.5) (/ F B)) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.002) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.2) {
tmp = (sqrt(0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.002d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.2d0) then
tmp = (sqrt(0.5d0) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.002) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.2) {
tmp = (Math.sqrt(0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.002: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.2: tmp = (math.sqrt(0.5) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.002) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.2) tmp = Float64(Float64(sqrt(0.5) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.002) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.2) tmp = (sqrt(0.5) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.002], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.2], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.002:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.2:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2e-3Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified71.3%
Taylor expanded in x around 0 71.2%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
Taylor expanded in F around -inf 95.2%
if -2e-3 < F < 0.20000000000000001Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.0%
Taylor expanded in B around 0 78.8%
associate-/l*78.8%
associate-/r/78.9%
Simplified78.9%
if 0.20000000000000001 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in x around 0 79.3%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
fma-udef79.2%
Simplified79.2%
Taylor expanded in F around inf 98.6%
Final simplification88.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+142)
(- (/ -1.0 B) t_0)
(if (<= F -100.0)
(- (* (/ F (sin B)) (/ -1.0 F)) (/ x B))
(if (<= F 8e-119)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 0.165) (/ (- (* F (sqrt 0.5)) 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 <= -1e+142) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -100.0) {
tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= 8e-119) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 0.165) {
tmp = ((F * sqrt(0.5)) - 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 <= (-1d+142)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-100.0d0)) then
tmp = ((f / sin(b)) * ((-1.0d0) / f)) - (x / b)
else if (f <= 8d-119) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 0.165d0) then
tmp = ((f * sqrt(0.5d0)) - 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 <= -1e+142) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -100.0) {
tmp = ((F / Math.sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= 8e-119) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 0.165) {
tmp = ((F * Math.sqrt(0.5)) - 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 <= -1e+142: tmp = (-1.0 / B) - t_0 elif F <= -100.0: tmp = ((F / math.sin(B)) * (-1.0 / F)) - (x / B) elif F <= 8e-119: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 0.165: tmp = ((F * math.sqrt(0.5)) - 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 <= -1e+142) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -100.0) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= 8e-119) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 0.165) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / 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 <= -1e+142) tmp = (-1.0 / B) - t_0; elseif (F <= -100.0) tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B); elseif (F <= 8e-119) tmp = cos(B) * (-x / sin(B)); elseif (F <= 0.165) tmp = ((F * sqrt(0.5)) - 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, -1e+142], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -100.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8e-119], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.165], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / 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 -1 \cdot 10^{+142}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -100:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-119}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 0.165:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.00000000000000005e142Initial program 27.6%
Taylor expanded in F around -inf 69.5%
Taylor expanded in B around 0 41.8%
expm1-log1p-u21.4%
expm1-udef21.2%
+-commutative21.2%
fma-def21.2%
un-div-inv21.2%
Applied egg-rr21.2%
expm1-def21.4%
expm1-log1p41.8%
fma-neg41.8%
*-commutative41.8%
*-commutative41.8%
associate-*l/72.0%
associate-*r/72.1%
*-commutative72.1%
associate-/l*72.1%
*-inverses72.1%
metadata-eval72.1%
Simplified72.1%
if -1.00000000000000005e142 < F < -100Initial program 92.1%
Taylor expanded in F around -inf 89.7%
Taylor expanded in B around 0 75.0%
if -100 < F < 8.0000000000000001e-119Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 76.6%
mul-1-neg76.6%
associate-*l/76.6%
*-commutative76.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
if 8.0000000000000001e-119 < F < 0.165000000000000008Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.3%
Taylor expanded in F around 0 97.3%
Taylor expanded in x around 0 97.3%
Taylor expanded in B around 0 47.7%
if 0.165000000000000008 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in F around inf 98.5%
associate-/r*98.5%
Simplified98.5%
Taylor expanded in B around 0 72.2%
Final simplification70.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.7e+142)
(- (/ -1.0 B) t_0)
(if (<= F -90.0)
(- (* (/ F (sin B)) (/ -1.0 F)) (/ x B))
(if (<= F 8.5e-118)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 0.16) (/ (- (* F (sqrt 0.5)) 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 <= -3.7e+142) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -90.0) {
tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= 8.5e-118) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 0.16) {
tmp = ((F * sqrt(0.5)) - 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 <= (-3.7d+142)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-90.0d0)) then
tmp = ((f / sin(b)) * ((-1.0d0) / f)) - (x / b)
else if (f <= 8.5d-118) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 0.16d0) then
tmp = ((f * sqrt(0.5d0)) - 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 <= -3.7e+142) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -90.0) {
tmp = ((F / Math.sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= 8.5e-118) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 0.16) {
tmp = ((F * Math.sqrt(0.5)) - 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 <= -3.7e+142: tmp = (-1.0 / B) - t_0 elif F <= -90.0: tmp = ((F / math.sin(B)) * (-1.0 / F)) - (x / B) elif F <= 8.5e-118: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 0.16: tmp = ((F * math.sqrt(0.5)) - 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 <= -3.7e+142) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -90.0) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= 8.5e-118) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 0.16) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / 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.7e+142) tmp = (-1.0 / B) - t_0; elseif (F <= -90.0) tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B); elseif (F <= 8.5e-118) tmp = -x / (sin(B) / cos(B)); elseif (F <= 0.16) tmp = ((F * sqrt(0.5)) - 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, -3.7e+142], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -90.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-118], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.16], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / 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 -3.7 \cdot 10^{+142}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -90:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-118}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 0.16:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.6999999999999997e142Initial program 27.6%
Taylor expanded in F around -inf 69.5%
Taylor expanded in B around 0 41.8%
expm1-log1p-u21.4%
expm1-udef21.2%
+-commutative21.2%
fma-def21.2%
un-div-inv21.2%
Applied egg-rr21.2%
expm1-def21.4%
expm1-log1p41.8%
fma-neg41.8%
*-commutative41.8%
*-commutative41.8%
associate-*l/72.0%
associate-*r/72.1%
*-commutative72.1%
associate-/l*72.1%
*-inverses72.1%
metadata-eval72.1%
Simplified72.1%
if -3.6999999999999997e142 < F < -90Initial program 92.1%
Taylor expanded in F around -inf 89.7%
Taylor expanded in B around 0 75.0%
if -90 < F < 8.50000000000000087e-118Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in F around 0 97.7%
Taylor expanded in x around 0 97.7%
Taylor expanded in F around 0 76.6%
mul-1-neg76.6%
associate-/l*76.7%
distribute-neg-frac76.7%
Simplified76.7%
if 8.50000000000000087e-118 < F < 0.160000000000000003Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.3%
Taylor expanded in F around 0 97.3%
Taylor expanded in x around 0 97.3%
Taylor expanded in B around 0 47.7%
if 0.160000000000000003 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in F around inf 98.5%
associate-/r*98.5%
Simplified98.5%
Taylor expanded in B around 0 72.2%
Final simplification70.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.5e-21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.36e-117)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 0.8) (/ (- (* F (sqrt 0.5)) 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 <= -5.5e-21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.36e-117) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 0.8) {
tmp = ((F * sqrt(0.5)) - 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 <= (-5.5d-21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.36d-117) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 0.8d0) then
tmp = ((f * sqrt(0.5d0)) - 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 <= -5.5e-21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.36e-117) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 0.8) {
tmp = ((F * Math.sqrt(0.5)) - 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 <= -5.5e-21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.36e-117: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 0.8: tmp = ((F * math.sqrt(0.5)) - 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 <= -5.5e-21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.36e-117) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 0.8) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / 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 <= -5.5e-21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.36e-117) tmp = -x / (sin(B) / cos(B)); elseif (F <= 0.8) tmp = ((F * sqrt(0.5)) - 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, -5.5e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.36e-117], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.8], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / 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 -5.5 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.36 \cdot 10^{-117}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 0.8:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -5.49999999999999977e-21Initial program 56.4%
distribute-lft-neg-in56.4%
+-commutative56.4%
cancel-sign-sub-inv56.4%
Simplified71.3%
Taylor expanded in x around 0 71.2%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
Taylor expanded in F around -inf 95.2%
if -5.49999999999999977e-21 < F < 1.35999999999999996e-117Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in F around 0 78.9%
mul-1-neg78.9%
associate-/l*78.9%
distribute-neg-frac78.9%
Simplified78.9%
if 1.35999999999999996e-117 < F < 0.80000000000000004Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.3%
Taylor expanded in F around 0 97.3%
Taylor expanded in x around 0 97.3%
Taylor expanded in B around 0 47.7%
if 0.80000000000000004 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in F around inf 98.5%
associate-/r*98.5%
Simplified98.5%
Taylor expanded in B around 0 72.2%
Final simplification77.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= F -7e+141)
t_1
(if (<= F -4.2e+78)
(- (* (/ F (sin B)) (/ -1.0 F)) (/ x B))
(if (<= F -7.2e-191)
t_1
(if (<= F 3.5e-294)
(* (/ x B) (- (cos B)))
(if (<= F 7.2e-124)
(- (* (/ F B) (/ -1.0 F)) t_0)
(if (<= F 0.16)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -7e+141) {
tmp = t_1;
} else if (F <= -4.2e+78) {
tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= -7.2e-191) {
tmp = t_1;
} else if (F <= 3.5e-294) {
tmp = (x / B) * -cos(B);
} else if (F <= 7.2e-124) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 0.16) {
tmp = ((F * sqrt(0.5)) - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
if (f <= (-7d+141)) then
tmp = t_1
else if (f <= (-4.2d+78)) then
tmp = ((f / sin(b)) * ((-1.0d0) / f)) - (x / b)
else if (f <= (-7.2d-191)) then
tmp = t_1
else if (f <= 3.5d-294) then
tmp = (x / b) * -cos(b)
else if (f <= 7.2d-124) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_0
else if (f <= 0.16d0) then
tmp = ((f * sqrt(0.5d0)) - 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 t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -7e+141) {
tmp = t_1;
} else if (F <= -4.2e+78) {
tmp = ((F / Math.sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= -7.2e-191) {
tmp = t_1;
} else if (F <= 3.5e-294) {
tmp = (x / B) * -Math.cos(B);
} else if (F <= 7.2e-124) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 0.16) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 tmp = 0 if F <= -7e+141: tmp = t_1 elif F <= -4.2e+78: tmp = ((F / math.sin(B)) * (-1.0 / F)) - (x / B) elif F <= -7.2e-191: tmp = t_1 elif F <= 3.5e-294: tmp = (x / B) * -math.cos(B) elif F <= 7.2e-124: tmp = ((F / B) * (-1.0 / F)) - t_0 elif F <= 0.16: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (F <= -7e+141) tmp = t_1; elseif (F <= -4.2e+78) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= -7.2e-191) tmp = t_1; elseif (F <= 3.5e-294) tmp = Float64(Float64(x / B) * Float64(-cos(B))); elseif (F <= 7.2e-124) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_0); elseif (F <= 0.16) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / 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); t_1 = (-1.0 / B) - t_0; tmp = 0.0; if (F <= -7e+141) tmp = t_1; elseif (F <= -4.2e+78) tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B); elseif (F <= -7.2e-191) tmp = t_1; elseif (F <= 3.5e-294) tmp = (x / B) * -cos(B); elseif (F <= 7.2e-124) tmp = ((F / B) * (-1.0 / F)) - t_0; elseif (F <= 0.16) tmp = ((F * sqrt(0.5)) - 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]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -7e+141], t$95$1, If[LessEqual[F, -4.2e+78], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.2e-191], t$95$1, If[LessEqual[F, 3.5e-294], N[(N[(x / B), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 7.2e-124], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.16], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
\mathbf{if}\;F \leq -7 \cdot 10^{+141}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-294}:\\
\;\;\;\;\frac{x}{B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-124}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t_0\\
\mathbf{elif}\;F \leq 0.16:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -6.9999999999999999e141 or -4.2000000000000002e78 < F < -7.20000000000000038e-191Initial program 66.9%
Taylor expanded in F around -inf 59.1%
Taylor expanded in B around 0 47.6%
expm1-log1p-u23.6%
expm1-udef20.1%
+-commutative20.1%
fma-def20.1%
un-div-inv20.1%
Applied egg-rr20.1%
expm1-def23.6%
expm1-log1p47.7%
fma-neg47.7%
*-commutative47.7%
*-commutative47.7%
associate-*l/62.1%
associate-*r/62.1%
*-commutative62.1%
associate-/l*62.1%
*-inverses62.1%
metadata-eval62.1%
Simplified62.1%
if -6.9999999999999999e141 < F < -4.2000000000000002e78Initial program 92.9%
Taylor expanded in F around -inf 92.9%
Taylor expanded in B around 0 79.4%
if -7.20000000000000038e-191 < F < 3.50000000000000032e-294Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 88.6%
mul-1-neg88.6%
associate-*l/88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
Simplified88.5%
Taylor expanded in B around 0 48.9%
if 3.50000000000000032e-294 < F < 7.20000000000000019e-124Initial program 99.5%
Taylor expanded in F around -inf 41.1%
Taylor expanded in B around 0 64.6%
div-inv64.7%
expm1-log1p-u40.6%
expm1-udef19.3%
Applied egg-rr19.3%
expm1-def40.6%
expm1-log1p64.7%
Simplified64.7%
if 7.20000000000000019e-124 < F < 0.160000000000000003Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.3%
Taylor expanded in F around 0 97.3%
Taylor expanded in x around 0 97.3%
Taylor expanded in B around 0 47.7%
if 0.160000000000000003 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in F around inf 98.5%
associate-/r*98.5%
Simplified98.5%
Taylor expanded in B around 0 72.2%
Final simplification62.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= F -1.55e+143)
t_1
(if (<= F -1.05e+79)
(- (* (/ F (sin B)) (/ -1.0 F)) (/ x B))
(if (<= F -8.5e-189)
t_1
(if (<= F 6.5e-294)
(* (/ x B) (- (cos B)))
(if (<= F 2.7e-123)
t_1
(if (<= F 0.37)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -1.55e+143) {
tmp = t_1;
} else if (F <= -1.05e+79) {
tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= -8.5e-189) {
tmp = t_1;
} else if (F <= 6.5e-294) {
tmp = (x / B) * -cos(B);
} else if (F <= 2.7e-123) {
tmp = t_1;
} else if (F <= 0.37) {
tmp = ((F * sqrt(0.5)) - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
if (f <= (-1.55d+143)) then
tmp = t_1
else if (f <= (-1.05d+79)) then
tmp = ((f / sin(b)) * ((-1.0d0) / f)) - (x / b)
else if (f <= (-8.5d-189)) then
tmp = t_1
else if (f <= 6.5d-294) then
tmp = (x / b) * -cos(b)
else if (f <= 2.7d-123) then
tmp = t_1
else if (f <= 0.37d0) then
tmp = ((f * sqrt(0.5d0)) - 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 t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -1.55e+143) {
tmp = t_1;
} else if (F <= -1.05e+79) {
tmp = ((F / Math.sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= -8.5e-189) {
tmp = t_1;
} else if (F <= 6.5e-294) {
tmp = (x / B) * -Math.cos(B);
} else if (F <= 2.7e-123) {
tmp = t_1;
} else if (F <= 0.37) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 tmp = 0 if F <= -1.55e+143: tmp = t_1 elif F <= -1.05e+79: tmp = ((F / math.sin(B)) * (-1.0 / F)) - (x / B) elif F <= -8.5e-189: tmp = t_1 elif F <= 6.5e-294: tmp = (x / B) * -math.cos(B) elif F <= 2.7e-123: tmp = t_1 elif F <= 0.37: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (F <= -1.55e+143) tmp = t_1; elseif (F <= -1.05e+79) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= -8.5e-189) tmp = t_1; elseif (F <= 6.5e-294) tmp = Float64(Float64(x / B) * Float64(-cos(B))); elseif (F <= 2.7e-123) tmp = t_1; elseif (F <= 0.37) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / 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); t_1 = (-1.0 / B) - t_0; tmp = 0.0; if (F <= -1.55e+143) tmp = t_1; elseif (F <= -1.05e+79) tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B); elseif (F <= -8.5e-189) tmp = t_1; elseif (F <= 6.5e-294) tmp = (x / B) * -cos(B); elseif (F <= 2.7e-123) tmp = t_1; elseif (F <= 0.37) tmp = ((F * sqrt(0.5)) - 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]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -1.55e+143], t$95$1, If[LessEqual[F, -1.05e+79], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.5e-189], t$95$1, If[LessEqual[F, 6.5e-294], N[(N[(x / B), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.7e-123], t$95$1, If[LessEqual[F, 0.37], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
\mathbf{if}\;F \leq -1.55 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{+79}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-189}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-294}:\\
\;\;\;\;\frac{x}{B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 0.37:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.54999999999999995e143 or -1.05000000000000004e79 < F < -8.50000000000000068e-189 or 6.4999999999999995e-294 < F < 2.7000000000000001e-123Initial program 75.5%
Taylor expanded in F around -inf 54.4%
Taylor expanded in B around 0 52.1%
expm1-log1p-u29.6%
expm1-udef21.4%
+-commutative21.4%
fma-def21.4%
un-div-inv21.4%
Applied egg-rr21.4%
expm1-def29.6%
expm1-log1p52.2%
fma-neg52.2%
*-commutative52.2%
*-commutative52.2%
associate-*l/62.7%
associate-*r/62.7%
*-commutative62.7%
associate-/l*62.7%
*-inverses62.7%
metadata-eval62.7%
Simplified62.7%
if -1.54999999999999995e143 < F < -1.05000000000000004e79Initial program 92.9%
Taylor expanded in F around -inf 92.9%
Taylor expanded in B around 0 79.4%
if -8.50000000000000068e-189 < F < 6.4999999999999995e-294Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 88.6%
mul-1-neg88.6%
associate-*l/88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
Simplified88.5%
Taylor expanded in B around 0 48.9%
if 2.7000000000000001e-123 < F < 0.37Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.3%
Taylor expanded in F around 0 97.3%
Taylor expanded in x around 0 97.3%
Taylor expanded in B around 0 47.7%
if 0.37 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in F around inf 98.5%
associate-/r*98.5%
Simplified98.5%
Taylor expanded in B around 0 72.2%
Final simplification62.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= F -1.66e-191)
t_1
(if (<= F 1.22e-293)
(* (/ x B) (- (cos B)))
(if (<= F 1.08e-122)
t_1
(if (<= F 0.16) (/ (- (* F (sqrt 0.5)) x) B) (- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -1.66e-191) {
tmp = t_1;
} else if (F <= 1.22e-293) {
tmp = (x / B) * -cos(B);
} else if (F <= 1.08e-122) {
tmp = t_1;
} else if (F <= 0.16) {
tmp = ((F * sqrt(0.5)) - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
if (f <= (-1.66d-191)) then
tmp = t_1
else if (f <= 1.22d-293) then
tmp = (x / b) * -cos(b)
else if (f <= 1.08d-122) then
tmp = t_1
else if (f <= 0.16d0) then
tmp = ((f * sqrt(0.5d0)) - 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 t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -1.66e-191) {
tmp = t_1;
} else if (F <= 1.22e-293) {
tmp = (x / B) * -Math.cos(B);
} else if (F <= 1.08e-122) {
tmp = t_1;
} else if (F <= 0.16) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 tmp = 0 if F <= -1.66e-191: tmp = t_1 elif F <= 1.22e-293: tmp = (x / B) * -math.cos(B) elif F <= 1.08e-122: tmp = t_1 elif F <= 0.16: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (F <= -1.66e-191) tmp = t_1; elseif (F <= 1.22e-293) tmp = Float64(Float64(x / B) * Float64(-cos(B))); elseif (F <= 1.08e-122) tmp = t_1; elseif (F <= 0.16) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / 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); t_1 = (-1.0 / B) - t_0; tmp = 0.0; if (F <= -1.66e-191) tmp = t_1; elseif (F <= 1.22e-293) tmp = (x / B) * -cos(B); elseif (F <= 1.08e-122) tmp = t_1; elseif (F <= 0.16) tmp = ((F * sqrt(0.5)) - 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]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -1.66e-191], t$95$1, If[LessEqual[F, 1.22e-293], N[(N[(x / B), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.08e-122], t$95$1, If[LessEqual[F, 0.16], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
\mathbf{if}\;F \leq -1.66 \cdot 10^{-191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-293}:\\
\;\;\;\;\frac{x}{B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{-122}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 0.16:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.65999999999999992e-191 or 1.2200000000000001e-293 < F < 1.08e-122Initial program 77.3%
Taylor expanded in F around -inf 58.5%
Taylor expanded in B around 0 50.6%
expm1-log1p-u28.1%
expm1-udef20.8%
+-commutative20.8%
fma-def20.8%
un-div-inv20.8%
Applied egg-rr20.8%
expm1-def28.1%
expm1-log1p50.7%
fma-neg50.7%
*-commutative50.7%
*-commutative50.7%
associate-*l/60.8%
associate-*r/60.8%
*-commutative60.8%
associate-/l*60.8%
*-inverses60.8%
metadata-eval60.8%
Simplified60.8%
if -1.65999999999999992e-191 < F < 1.2200000000000001e-293Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 88.6%
mul-1-neg88.6%
associate-*l/88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
Simplified88.5%
Taylor expanded in B around 0 48.9%
if 1.08e-122 < F < 0.160000000000000003Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
cancel-sign-sub-inv99.4%
Simplified99.3%
Taylor expanded in F around 0 97.3%
Taylor expanded in x around 0 97.3%
Taylor expanded in B around 0 47.7%
if 0.160000000000000003 < F Initial program 60.8%
distribute-lft-neg-in60.8%
+-commutative60.8%
cancel-sign-sub-inv60.8%
Simplified79.2%
Taylor expanded in F around inf 98.5%
associate-/r*98.5%
Simplified98.5%
Taylor expanded in B around 0 72.2%
Final simplification60.8%
(FPCore (F B x) :precision binary64 (if (or (<= x 6.5e-123) (not (<= x 2.05e-8))) (- (/ -1.0 B) (/ x (tan B))) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= 6.5e-123) || !(x <= 2.05e-8)) {
tmp = (-1.0 / B) - (x / tan(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 ((x <= 6.5d-123) .or. (.not. (x <= 2.05d-8))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= 6.5e-123) || !(x <= 2.05e-8)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= 6.5e-123) or not (x <= 2.05e-8): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= 6.5e-123) || !(x <= 2.05e-8)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= 6.5e-123) || ~((x <= 2.05e-8))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, 6.5e-123], N[Not[LessEqual[x, 2.05e-8]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6.5 \cdot 10^{-123} \lor \neg \left(x \leq 2.05 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if x < 6.49999999999999938e-123 or 2.05000000000000016e-8 < x Initial program 77.4%
Taylor expanded in F around -inf 48.5%
Taylor expanded in B around 0 47.0%
expm1-log1p-u24.4%
expm1-udef19.3%
+-commutative19.3%
fma-def19.3%
un-div-inv19.3%
Applied egg-rr19.3%
expm1-def24.4%
expm1-log1p47.0%
fma-neg47.0%
*-commutative47.0%
*-commutative47.0%
associate-*l/55.2%
associate-*r/55.2%
*-commutative55.2%
associate-/l*55.2%
*-inverses55.2%
metadata-eval55.2%
Simplified55.2%
if 6.49999999999999938e-123 < x < 2.05000000000000016e-8Initial program 84.1%
distribute-lft-neg-in84.1%
+-commutative84.1%
fma-def84.1%
+-commutative84.1%
*-commutative84.1%
fma-def84.1%
fma-def84.1%
metadata-eval84.1%
metadata-eval84.1%
associate-*r/84.3%
*-rgt-identity84.3%
Simplified84.3%
Taylor expanded in F around 0 55.0%
mul-1-neg55.0%
associate-*l/55.1%
*-commutative55.1%
distribute-rgt-neg-in55.1%
Simplified55.1%
Taylor expanded in B around 0 37.8%
associate-*r/37.8%
neg-mul-137.8%
Simplified37.8%
Final simplification53.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e-191)
(- (/ -1.0 B) t_0)
(if (<= F 1e-293) (* (/ x B) (- (cos B))) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e-191) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1e-293) {
tmp = (x / B) * -cos(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 <= (-2.7d-191)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1d-293) then
tmp = (x / b) * -cos(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 <= -2.7e-191) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1e-293) {
tmp = (x / B) * -Math.cos(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 <= -2.7e-191: tmp = (-1.0 / B) - t_0 elif F <= 1e-293: tmp = (x / B) * -math.cos(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 <= -2.7e-191) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1e-293) tmp = Float64(Float64(x / B) * Float64(-cos(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 <= -2.7e-191) tmp = (-1.0 / B) - t_0; elseif (F <= 1e-293) tmp = (x / B) * -cos(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, -2.7e-191], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-293], N[(N[(x / B), $MachinePrecision] * (-N[Cos[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 -2.7 \cdot 10^{-191}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 10^{-293}:\\
\;\;\;\;\frac{x}{B} \cdot \left(-\cos B\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.69999999999999999e-191Initial program 70.5%
Taylor expanded in F around -inf 63.8%
Taylor expanded in B around 0 46.3%
expm1-log1p-u22.5%
expm1-udef19.4%
+-commutative19.4%
fma-def19.4%
un-div-inv19.4%
Applied egg-rr19.4%
expm1-def22.5%
expm1-log1p46.4%
fma-neg46.4%
*-commutative46.4%
*-commutative46.4%
associate-*l/59.7%
associate-*r/59.7%
*-commutative59.7%
associate-/l*59.7%
*-inverses59.7%
metadata-eval59.7%
Simplified59.7%
if -2.69999999999999999e-191 < F < 1.0000000000000001e-293Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in F around 0 88.6%
mul-1-neg88.6%
associate-*l/88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
Simplified88.5%
Taylor expanded in B around 0 48.9%
if 1.0000000000000001e-293 < F Initial program 80.3%
distribute-lft-neg-in80.3%
+-commutative80.3%
cancel-sign-sub-inv80.3%
Simplified89.4%
Taylor expanded in F around inf 60.2%
associate-/r*60.2%
Simplified60.2%
Taylor expanded in B around 0 58.4%
Final simplification58.0%
(FPCore (F B x)
:precision binary64
(if (<= F -7.5e-73)
(+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B))
(if (<= F 6e-88)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e-73) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 6e-88) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (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 <= (-7.5d-73)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 6d-88) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (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 <= -7.5e-73) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 6e-88) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.5e-73: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 6e-88: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.5e-73) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 6e-88) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.5e-73) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 6e-88) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.5e-73], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-88], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.5 \cdot 10^{-73}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-88}:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.5e-73Initial program 60.4%
Taylor expanded in F around -inf 71.4%
Taylor expanded in B around 0 44.1%
Taylor expanded in B around 0 41.4%
+-commutative41.4%
mul-1-neg41.4%
unsub-neg41.4%
*-commutative41.4%
associate-*r*41.4%
Simplified41.4%
if -7.5e-73 < F < 5.9999999999999999e-88Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 78.6%
mul-1-neg78.6%
associate-*l/78.7%
*-commutative78.7%
distribute-rgt-neg-in78.7%
Simplified78.7%
Taylor expanded in B around 0 40.0%
if 5.9999999999999999e-88 < F Initial program 72.7%
distribute-lft-neg-in72.7%
+-commutative72.7%
cancel-sign-sub-inv72.7%
Simplified85.4%
Taylor expanded in F around inf 72.4%
associate-/r*72.3%
Simplified72.3%
Taylor expanded in B around 0 39.2%
Final simplification40.1%
(FPCore (F B x) :precision binary64 (if (<= F -4.2e-73) (+ (* B (* x 0.3333333333333333)) (/ (- -1.0 x) B)) (if (<= F 1.28e-98) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e-73) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.28e-98) {
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 <= (-4.2d-73)) then
tmp = (b * (x * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= 1.28d-98) 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 <= -4.2e-73) {
tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= 1.28e-98) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e-73: tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= 1.28e-98: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e-73) tmp = Float64(Float64(B * Float64(x * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 1.28e-98) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.2e-73) tmp = (B * (x * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= 1.28e-98) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e-73], N[(N[(B * N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.28e-98], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{-73}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.28 \cdot 10^{-98}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.1999999999999997e-73Initial program 60.4%
Taylor expanded in F around -inf 71.4%
Taylor expanded in B around 0 44.1%
Taylor expanded in B around 0 41.4%
+-commutative41.4%
mul-1-neg41.4%
unsub-neg41.4%
*-commutative41.4%
associate-*r*41.4%
Simplified41.4%
if -4.1999999999999997e-73 < F < 1.28e-98Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 79.5%
mul-1-neg79.5%
associate-*l/79.6%
*-commutative79.6%
distribute-rgt-neg-in79.6%
Simplified79.6%
Taylor expanded in B around 0 40.0%
associate-*r/40.0%
neg-mul-140.0%
Simplified40.0%
if 1.28e-98 < F Initial program 73.0%
distribute-lft-neg-in73.0%
+-commutative73.0%
cancel-sign-sub-inv73.0%
Simplified85.6%
Taylor expanded in F around inf 71.7%
associate-/r*71.6%
Simplified71.6%
Taylor expanded in B around 0 38.9%
Final simplification40.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-73) (/ (- -1.0 x) B) (if (or (<= F 2e+78) (not (<= F 9e+112))) (/ (- x) B) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-73) {
tmp = (-1.0 - x) / B;
} else if ((F <= 2e+78) || !(F <= 9e+112)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.3d-73)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 2d+78) .or. (.not. (f <= 9d+112))) then
tmp = -x / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-73) {
tmp = (-1.0 - x) / B;
} else if ((F <= 2e+78) || !(F <= 9e+112)) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-73: tmp = (-1.0 - x) / B elif (F <= 2e+78) or not (F <= 9e+112): tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-73) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 2e+78) || !(F <= 9e+112)) tmp = Float64(Float64(-x) / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-73) tmp = (-1.0 - x) / B; elseif ((F <= 2e+78) || ~((F <= 9e+112))) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-73], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 2e+78], N[Not[LessEqual[F, 9e+112]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-73}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+78} \lor \neg \left(F \leq 9 \cdot 10^{+112}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -1.3e-73Initial program 60.4%
Taylor expanded in F around -inf 71.4%
Taylor expanded in B around 0 44.1%
Taylor expanded in B around 0 41.3%
associate-*r/41.3%
distribute-lft-in41.3%
metadata-eval41.3%
neg-mul-141.3%
unsub-neg41.3%
Simplified41.3%
if -1.3e-73 < F < 2.00000000000000002e78 or 8.9999999999999998e112 < F Initial program 86.0%
distribute-lft-neg-in86.0%
+-commutative86.0%
fma-def86.0%
+-commutative86.0%
*-commutative86.0%
fma-def86.0%
fma-def86.0%
metadata-eval86.0%
metadata-eval86.0%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
Taylor expanded in F around 0 63.3%
mul-1-neg63.3%
associate-*l/63.4%
*-commutative63.4%
distribute-rgt-neg-in63.4%
Simplified63.4%
Taylor expanded in B around 0 32.9%
associate-*r/32.9%
neg-mul-132.9%
Simplified32.9%
if 2.00000000000000002e78 < F < 8.9999999999999998e112Initial program 76.6%
distribute-lft-neg-in76.6%
+-commutative76.6%
cancel-sign-sub-inv76.6%
Simplified99.6%
Taylor expanded in F around inf 99.6%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in B around 0 88.3%
Taylor expanded in x around 0 75.9%
Final simplification36.7%
(FPCore (F B x) :precision binary64 (if (<= F -2.16e-72) (/ (- -1.0 x) B) (if (<= F 2.35e-95) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.16e-72) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.35e-95) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.16d-72)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.35d-95) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.16e-72) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.35e-95) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.16e-72: tmp = (-1.0 - x) / B elif F <= 2.35e-95: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.16e-72) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.35e-95) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.16e-72) tmp = (-1.0 - x) / B; elseif (F <= 2.35e-95) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.16e-72], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.35e-95], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.16 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-95}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.15999999999999996e-72Initial program 60.4%
Taylor expanded in F around -inf 71.4%
Taylor expanded in B around 0 44.1%
Taylor expanded in B around 0 41.3%
associate-*r/41.3%
distribute-lft-in41.3%
metadata-eval41.3%
neg-mul-141.3%
unsub-neg41.3%
Simplified41.3%
if -2.15999999999999996e-72 < F < 2.3499999999999999e-95Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 79.5%
mul-1-neg79.5%
associate-*l/79.6%
*-commutative79.6%
distribute-rgt-neg-in79.6%
Simplified79.6%
Taylor expanded in B around 0 40.0%
associate-*r/40.0%
neg-mul-140.0%
Simplified40.0%
if 2.3499999999999999e-95 < F Initial program 73.0%
distribute-lft-neg-in73.0%
+-commutative73.0%
cancel-sign-sub-inv73.0%
Simplified85.6%
Taylor expanded in F around inf 71.7%
associate-/r*71.6%
Simplified71.6%
Taylor expanded in B around 0 38.9%
Final simplification40.0%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 78.2%
distribute-lft-neg-in78.2%
+-commutative78.2%
fma-def78.2%
+-commutative78.2%
*-commutative78.2%
fma-def78.2%
fma-def78.2%
metadata-eval78.2%
metadata-eval78.2%
associate-*r/78.3%
*-rgt-identity78.3%
Simplified78.3%
Taylor expanded in F around 0 54.5%
mul-1-neg54.5%
associate-*l/54.5%
*-commutative54.5%
distribute-rgt-neg-in54.5%
Simplified54.5%
Taylor expanded in B around 0 27.9%
associate-*r/27.9%
neg-mul-127.9%
Simplified27.9%
Final simplification27.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 78.2%
distribute-lft-neg-in78.2%
+-commutative78.2%
cancel-sign-sub-inv78.2%
Simplified86.9%
Taylor expanded in F around inf 46.4%
associate-/r*46.3%
Simplified46.3%
Taylor expanded in B around 0 24.5%
Taylor expanded in x around 0 8.1%
Final simplification8.1%
herbie shell --seed 2023293
(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))))))