
(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 -5e+16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 125000000.0)
(- (* F (/ (pow (fma x 2.0 (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 <= -5e+16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 125000000.0) {
tmp = (F * (pow(fma(x, 2.0, 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 <= -5e+16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 125000000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(-1.0 / Float64(-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, -5e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 125000000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(-1.0 / (-N[Sin[B], $MachinePrecision])), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 125000000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{-\sin B} - t_0\\
\end{array}
\end{array}
if F < -5e16Initial program 43.7%
Taylor expanded in F around -inf 99.8%
expm1-log1p-u50.3%
expm1-udef50.3%
div-inv50.3%
neg-mul-150.3%
fma-def50.3%
Applied egg-rr50.3%
expm1-def50.3%
expm1-log1p99.9%
rem-log-exp47.2%
fma-udef47.2%
neg-mul-147.2%
prod-exp38.4%
*-commutative38.4%
prod-exp47.2%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -5e16 < F < 1.25e8Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
if 1.25e8 < F Initial program 55.3%
+-commutative55.3%
unsub-neg55.3%
associate-*l/76.2%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.7%
un-div-inv99.8%
frac-2neg99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
Applied egg-rr99.8%
associate-/r*99.9%
distribute-frac-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.5e+36)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* (cos B) (/ x (sin B))))
(- (/ -1.0 (- (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.5e+36) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (cos(B) * (x / sin(B)));
} else {
tmp = (-1.0 / -sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.5d+36)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (cos(b) * (x / sin(b)))
else
tmp = ((-1.0d0) / -sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.5e+36) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (Math.cos(B) * (x / Math.sin(B)));
} else {
tmp = (-1.0 / -Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.5e+36: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (math.cos(B) * (x / math.sin(B))) else: tmp = (-1.0 / -math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e+36) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(cos(B) * Float64(x / sin(B)))); else tmp = Float64(Float64(-1.0 / Float64(-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 <= -3.5e+36) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (cos(B) * (x / sin(B))); else tmp = (-1.0 / -sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e+36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.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[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / (-N[Sin[B], $MachinePrecision])), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+36}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{-\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.4999999999999998e36Initial program 40.1%
Taylor expanded in F around -inf 99.8%
expm1-log1p-u48.9%
expm1-udef48.9%
div-inv48.9%
neg-mul-148.9%
fma-def48.9%
Applied egg-rr48.9%
expm1-def48.9%
expm1-log1p99.9%
rem-log-exp48.5%
fma-udef48.5%
neg-mul-148.5%
prod-exp39.1%
*-commutative39.1%
prod-exp48.5%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -3.4999999999999998e36 < F < 1e8Initial program 99.5%
Taylor expanded in x around 0 99.5%
associate-*r/99.6%
Simplified99.6%
if 1e8 < F Initial program 55.3%
+-commutative55.3%
unsub-neg55.3%
associate-*l/76.2%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.7%
un-div-inv99.8%
frac-2neg99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
Applied egg-rr99.8%
associate-/r*99.9%
distribute-frac-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+36)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 80000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ -1.0 (- (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e+36) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 80000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (-1.0 / -sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4d+36)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 80000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = ((-1.0d0) / -sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4e+36) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 80000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (-1.0 / -Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4e+36: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 80000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (-1.0 / -math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e+36) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 80000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(-1.0 / Float64(-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 <= -4e+36) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 80000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (-1.0 / -sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 80000000.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 * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / (-N[Sin[B], $MachinePrecision])), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+36}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 80000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{-\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.00000000000000017e36Initial program 40.1%
Taylor expanded in F around -inf 99.8%
expm1-log1p-u48.9%
expm1-udef48.9%
div-inv48.9%
neg-mul-148.9%
fma-def48.9%
Applied egg-rr48.9%
expm1-def48.9%
expm1-log1p99.9%
rem-log-exp48.5%
fma-udef48.5%
neg-mul-148.5%
prod-exp39.1%
*-commutative39.1%
prod-exp48.5%
rem-log-exp99.9%
unsub-neg99.9%
Simplified99.9%
if -4.00000000000000017e36 < F < 8e7Initial program 99.5%
if 8e7 < F Initial program 55.3%
+-commutative55.3%
unsub-neg55.3%
associate-*l/76.2%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.7%
un-div-inv99.8%
frac-2neg99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
Applied egg-rr99.8%
associate-/r*99.9%
distribute-frac-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.92)
(+ t_0 (/ (* F (/ 1.0 (- (/ (- -1.0 x) F) F))) (sin B)))
(if (<= F 22.5)
(-
(* F (* (/ 1.0 (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(/ x (tan B)))
(+ t_0 (/ (+ 1.0 (/ (- -1.0 x) (* F F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.92) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B));
} else if (F <= 22.5) {
tmp = (F * ((1.0 / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - (x / tan(B));
} else {
tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.92d0)) then
tmp = t_0 + ((f * (1.0d0 / ((((-1.0d0) - x) / f) - f))) / sin(b))
else if (f <= 22.5d0) then
tmp = (f * ((1.0d0 / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - (x / tan(b))
else
tmp = t_0 + ((1.0d0 + (((-1.0d0) - x) / (f * f))) / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.92) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / Math.sin(B));
} else if (F <= 22.5) {
tmp = (F * ((1.0 / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - (x / Math.tan(B));
} else {
tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.92: tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / math.sin(B)) elif F <= 22.5: tmp = (F * ((1.0 / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - (x / math.tan(B)) else: tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.92) tmp = Float64(t_0 + Float64(Float64(F * Float64(1.0 / Float64(Float64(Float64(-1.0 - x) / F) - F))) / sin(B))); elseif (F <= 22.5) tmp = Float64(Float64(F * Float64(Float64(1.0 / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.92) tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B)); elseif (F <= 22.5) tmp = (F * ((1.0 / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - (x / tan(B)); else tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.92], N[(t$95$0 + N[(N[(F * N[(1.0 / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 22.5], N[(N[(F * N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;t_0 + \frac{F \cdot \frac{1}{\frac{-1 - x}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 22.5:\\
\;\;\;\;F \cdot \left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 46.1%
associate-*l/68.3%
+-commutative68.3%
*-commutative68.3%
fma-udef68.3%
fma-def68.3%
metadata-eval68.3%
metadata-eval68.3%
fma-def68.3%
fma-udef68.3%
*-commutative68.3%
fma-def68.3%
fma-def68.3%
Applied egg-rr68.3%
add-sqr-sqrt68.3%
unpow-prod-down68.2%
Applied egg-rr68.2%
pow-sqr68.3%
metadata-eval68.3%
unpow-168.3%
fma-udef68.3%
fma-udef68.3%
unpow268.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
+-commutative68.3%
unpow268.3%
fma-def68.3%
+-commutative68.3%
fma-def68.3%
Simplified68.3%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
unsub-neg99.7%
associate-*r/99.7%
distribute-lft-in99.7%
metadata-eval99.7%
associate-*r*99.7%
metadata-eval99.7%
mul-1-neg99.7%
Simplified99.7%
if -0.92000000000000004 < F < 22.5Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
if 22.5 < F Initial program 56.7%
associate-*l/76.9%
+-commutative76.9%
*-commutative76.9%
fma-udef76.9%
fma-def76.9%
metadata-eval76.9%
metadata-eval76.9%
fma-def76.9%
fma-udef76.9%
*-commutative76.9%
fma-def76.9%
fma-def76.9%
Applied egg-rr76.9%
add-sqr-sqrt76.9%
unpow-prod-down76.8%
Applied egg-rr76.8%
pow-sqr76.9%
metadata-eval76.9%
unpow-176.9%
fma-udef76.9%
fma-udef76.9%
unpow276.9%
+-commutative76.9%
associate-+r+76.9%
+-commutative76.9%
+-commutative76.9%
unpow276.9%
fma-def76.9%
+-commutative76.9%
fma-def76.9%
Simplified76.9%
Taylor expanded in F around inf 99.8%
associate-*r/99.8%
+-commutative99.8%
distribute-lft-in99.8%
metadata-eval99.8%
associate-*r*99.8%
metadata-eval99.8%
mul-1-neg99.8%
unpow299.8%
Simplified99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.95)
(+ t_0 (/ (* F (/ 1.0 (- (/ (- -1.0 x) F) F))) (sin B)))
(if (<= F 56.0)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) (/ x (tan B)))
(+ t_0 (/ (+ 1.0 (/ (- -1.0 x) (* F F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.95) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B));
} else if (F <= 56.0) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / tan(B));
} else {
tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.95d0)) then
tmp = t_0 + ((f * (1.0d0 / ((((-1.0d0) - x) / f) - f))) / sin(b))
else if (f <= 56.0d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - (x / tan(b))
else
tmp = t_0 + ((1.0d0 + (((-1.0d0) - x) / (f * f))) / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.95) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / Math.sin(B));
} else if (F <= 56.0) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - (x / Math.tan(B));
} else {
tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.95: tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / math.sin(B)) elif F <= 56.0: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - (x / math.tan(B)) else: tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.95) tmp = Float64(t_0 + Float64(Float64(F * Float64(1.0 / Float64(Float64(Float64(-1.0 - x) / F) - F))) / sin(B))); elseif (F <= 56.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.95) tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B)); elseif (F <= 56.0) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - (x / tan(B)); else tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.95], N[(t$95$0 + N[(N[(F * N[(1.0 / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 56.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.95:\\
\;\;\;\;t_0 + \frac{F \cdot \frac{1}{\frac{-1 - x}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 56:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\
\end{array}
\end{array}
if F < -0.94999999999999996Initial program 46.1%
associate-*l/68.3%
+-commutative68.3%
*-commutative68.3%
fma-udef68.3%
fma-def68.3%
metadata-eval68.3%
metadata-eval68.3%
fma-def68.3%
fma-udef68.3%
*-commutative68.3%
fma-def68.3%
fma-def68.3%
Applied egg-rr68.3%
add-sqr-sqrt68.3%
unpow-prod-down68.2%
Applied egg-rr68.2%
pow-sqr68.3%
metadata-eval68.3%
unpow-168.3%
fma-udef68.3%
fma-udef68.3%
unpow268.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
+-commutative68.3%
unpow268.3%
fma-def68.3%
+-commutative68.3%
fma-def68.3%
Simplified68.3%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
unsub-neg99.7%
associate-*r/99.7%
distribute-lft-in99.7%
metadata-eval99.7%
associate-*r*99.7%
metadata-eval99.7%
mul-1-neg99.7%
Simplified99.7%
if -0.94999999999999996 < F < 56Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
if 56 < F Initial program 56.7%
associate-*l/76.9%
+-commutative76.9%
*-commutative76.9%
fma-udef76.9%
fma-def76.9%
metadata-eval76.9%
metadata-eval76.9%
fma-def76.9%
fma-udef76.9%
*-commutative76.9%
fma-def76.9%
fma-def76.9%
Applied egg-rr76.9%
add-sqr-sqrt76.9%
unpow-prod-down76.8%
Applied egg-rr76.8%
pow-sqr76.9%
metadata-eval76.9%
unpow-176.9%
fma-udef76.9%
fma-udef76.9%
unpow276.9%
+-commutative76.9%
associate-+r+76.9%
+-commutative76.9%
+-commutative76.9%
unpow276.9%
fma-def76.9%
+-commutative76.9%
fma-def76.9%
Simplified76.9%
Taylor expanded in F around inf 99.8%
associate-*r/99.8%
+-commutative99.8%
distribute-lft-in99.8%
metadata-eval99.8%
associate-*r*99.8%
metadata-eval99.8%
mul-1-neg99.8%
unpow299.8%
Simplified99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.86)
(+ t_0 (/ (* F (/ 1.0 (- (/ (- -1.0 x) F) F))) (sin B)))
(if (<= F 18.5)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x (tan B)))
(+ t_0 (/ (+ 1.0 (/ (- -1.0 x) (* F F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.86) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B));
} else if (F <= 18.5) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / tan(B));
} else {
tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.86d0)) then
tmp = t_0 + ((f * (1.0d0 / ((((-1.0d0) - x) / f) - f))) / sin(b))
else if (f <= 18.5d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / tan(b))
else
tmp = t_0 + ((1.0d0 + (((-1.0d0) - x) / (f * f))) / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.86) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / Math.sin(B));
} else if (F <= 18.5) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / Math.tan(B));
} else {
tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.86: tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / math.sin(B)) elif F <= 18.5: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / math.tan(B)) else: tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.86) tmp = Float64(t_0 + Float64(Float64(F * Float64(1.0 / Float64(Float64(Float64(-1.0 - x) / F) - F))) / sin(B))); elseif (F <= 18.5) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.86) tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B)); elseif (F <= 18.5) tmp = (F * (sqrt(0.5) / sin(B))) - (x / tan(B)); else tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.86], N[(t$95$0 + N[(N[(F * N[(1.0 / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 18.5], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.86:\\
\;\;\;\;t_0 + \frac{F \cdot \frac{1}{\frac{-1 - x}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 18.5:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\
\end{array}
\end{array}
if F < -0.859999999999999987Initial program 46.1%
associate-*l/68.3%
+-commutative68.3%
*-commutative68.3%
fma-udef68.3%
fma-def68.3%
metadata-eval68.3%
metadata-eval68.3%
fma-def68.3%
fma-udef68.3%
*-commutative68.3%
fma-def68.3%
fma-def68.3%
Applied egg-rr68.3%
add-sqr-sqrt68.3%
unpow-prod-down68.2%
Applied egg-rr68.2%
pow-sqr68.3%
metadata-eval68.3%
unpow-168.3%
fma-udef68.3%
fma-udef68.3%
unpow268.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
+-commutative68.3%
unpow268.3%
fma-def68.3%
+-commutative68.3%
fma-def68.3%
Simplified68.3%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
unsub-neg99.7%
associate-*r/99.7%
distribute-lft-in99.7%
metadata-eval99.7%
associate-*r*99.7%
metadata-eval99.7%
mul-1-neg99.7%
Simplified99.7%
if -0.859999999999999987 < F < 18.5Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 98.7%
if 18.5 < F Initial program 56.7%
associate-*l/76.9%
+-commutative76.9%
*-commutative76.9%
fma-udef76.9%
fma-def76.9%
metadata-eval76.9%
metadata-eval76.9%
fma-def76.9%
fma-udef76.9%
*-commutative76.9%
fma-def76.9%
fma-def76.9%
Applied egg-rr76.9%
add-sqr-sqrt76.9%
unpow-prod-down76.8%
Applied egg-rr76.8%
pow-sqr76.9%
metadata-eval76.9%
unpow-176.9%
fma-udef76.9%
fma-udef76.9%
unpow276.9%
+-commutative76.9%
associate-+r+76.9%
+-commutative76.9%
+-commutative76.9%
unpow276.9%
fma-def76.9%
+-commutative76.9%
fma-def76.9%
Simplified76.9%
Taylor expanded in F around inf 99.8%
associate-*r/99.8%
+-commutative99.8%
distribute-lft-in99.8%
metadata-eval99.8%
associate-*r*99.8%
metadata-eval99.8%
mul-1-neg99.8%
unpow299.8%
Simplified99.8%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.075)
(- (* F (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ 1.0 B))) t_0)
(- (/ -1.0 (- (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.075) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0;
} else {
tmp = (-1.0 / -sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.5d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.075d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (1.0d0 / b))) - t_0
else
tmp = ((-1.0d0) / -sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.075) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0;
} else {
tmp = (-1.0 / -Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.075: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0 else: tmp = (-1.0 / -math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.075) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(-1.0 / Float64(-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.5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.075) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0; else tmp = (-1.0 / -sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.075], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(-1.0 / (-N[Sin[B], $MachinePrecision])), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.5:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.075:\\
\;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{-\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.5Initial program 46.1%
Taylor expanded in F around -inf 99.5%
expm1-log1p-u50.7%
expm1-udef50.7%
div-inv50.7%
neg-mul-150.7%
fma-def50.7%
Applied egg-rr50.7%
expm1-def50.7%
expm1-log1p99.5%
rem-log-exp46.7%
fma-udef46.7%
neg-mul-146.7%
prod-exp38.4%
*-commutative38.4%
prod-exp46.7%
rem-log-exp99.5%
unsub-neg99.5%
Simplified99.5%
if -0.5 < F < 0.0749999999999999972Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 86.0%
if 0.0749999999999999972 < F Initial program 57.4%
+-commutative57.4%
unsub-neg57.4%
associate-*l/77.3%
associate-*r/77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in F around inf 99.0%
un-div-inv99.1%
frac-2neg99.1%
*-commutative99.1%
distribute-rgt-neg-in99.1%
Applied egg-rr99.1%
associate-/r*99.2%
distribute-frac-neg99.2%
*-inverses99.2%
metadata-eval99.2%
Simplified99.2%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.34)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.2)
(- (* F (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ 1.0 B))) t_0)
(+
(* x (/ -1.0 (tan B)))
(/ (+ 1.0 (/ (- -1.0 x) (* F F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.34) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.2) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.34d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6.2d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (1.0d0 / b))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + ((1.0d0 + (((-1.0d0) - x) / (f * f))) / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.34) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6.2) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + ((1.0 + ((-1.0 - x) / (F * F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.34: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6.2: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + ((1.0 + ((-1.0 - x) / (F * F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.34) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.2) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.34) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6.2) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - t_0; else tmp = (x * (-1.0 / tan(B))) + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.34], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.2], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.34:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.2:\\
\;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\
\end{array}
\end{array}
if F < -0.340000000000000024Initial program 46.1%
Taylor expanded in F around -inf 99.5%
expm1-log1p-u50.7%
expm1-udef50.7%
div-inv50.7%
neg-mul-150.7%
fma-def50.7%
Applied egg-rr50.7%
expm1-def50.7%
expm1-log1p99.5%
rem-log-exp46.7%
fma-udef46.7%
neg-mul-146.7%
prod-exp38.4%
*-commutative38.4%
prod-exp46.7%
rem-log-exp99.5%
unsub-neg99.5%
Simplified99.5%
if -0.340000000000000024 < F < 6.20000000000000018Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 86.1%
if 6.20000000000000018 < F Initial program 56.7%
associate-*l/76.9%
+-commutative76.9%
*-commutative76.9%
fma-udef76.9%
fma-def76.9%
metadata-eval76.9%
metadata-eval76.9%
fma-def76.9%
fma-udef76.9%
*-commutative76.9%
fma-def76.9%
fma-def76.9%
Applied egg-rr76.9%
add-sqr-sqrt76.9%
unpow-prod-down76.8%
Applied egg-rr76.8%
pow-sqr76.9%
metadata-eval76.9%
unpow-176.9%
fma-udef76.9%
fma-udef76.9%
unpow276.9%
+-commutative76.9%
associate-+r+76.9%
+-commutative76.9%
+-commutative76.9%
unpow276.9%
fma-def76.9%
+-commutative76.9%
fma-def76.9%
Simplified76.9%
Taylor expanded in F around inf 99.8%
associate-*r/99.8%
+-commutative99.8%
distribute-lft-in99.8%
metadata-eval99.8%
associate-*r*99.8%
metadata-eval99.8%
mul-1-neg99.8%
unpow299.8%
Simplified99.8%
Final simplification93.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.27)
(+ t_0 (/ (* F (/ 1.0 (- (/ (- -1.0 x) F) F))) (sin B)))
(if (<= F 24.0)
(- (* F (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ 1.0 B))) (/ x (tan B)))
(+ t_0 (/ (+ 1.0 (/ (- -1.0 x) (* F F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.27) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B));
} else if (F <= 24.0) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - (x / tan(B));
} else {
tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.27d0)) then
tmp = t_0 + ((f * (1.0d0 / ((((-1.0d0) - x) / f) - f))) / sin(b))
else if (f <= 24.0d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (1.0d0 / b))) - (x / tan(b))
else
tmp = t_0 + ((1.0d0 + (((-1.0d0) - x) / (f * f))) / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.27) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / Math.sin(B));
} else if (F <= 24.0) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - (x / Math.tan(B));
} else {
tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.27: tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / math.sin(B)) elif F <= 24.0: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - (x / math.tan(B)) else: tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.27) tmp = Float64(t_0 + Float64(Float64(F * Float64(1.0 / Float64(Float64(Float64(-1.0 - x) / F) - F))) / sin(B))); elseif (F <= 24.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(1.0 / B))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.27) tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B)); elseif (F <= 24.0) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) * (1.0 / B))) - (x / tan(B)); else tmp = t_0 + ((1.0 + ((-1.0 - x) / (F * F))) / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.27], N[(t$95$0 + N[(N[(F * N[(1.0 / N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 24.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.27:\\
\;\;\;\;t_0 + \frac{F \cdot \frac{1}{\frac{-1 - x}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 24:\\
\;\;\;\;F \cdot \left(\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{1}{B}\right) - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1 + \frac{-1 - x}{F \cdot F}}{\sin B}\\
\end{array}
\end{array}
if F < -0.27000000000000002Initial program 46.1%
associate-*l/68.3%
+-commutative68.3%
*-commutative68.3%
fma-udef68.3%
fma-def68.3%
metadata-eval68.3%
metadata-eval68.3%
fma-def68.3%
fma-udef68.3%
*-commutative68.3%
fma-def68.3%
fma-def68.3%
Applied egg-rr68.3%
add-sqr-sqrt68.3%
unpow-prod-down68.2%
Applied egg-rr68.2%
pow-sqr68.3%
metadata-eval68.3%
unpow-168.3%
fma-udef68.3%
fma-udef68.3%
unpow268.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
+-commutative68.3%
unpow268.3%
fma-def68.3%
+-commutative68.3%
fma-def68.3%
Simplified68.3%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
unsub-neg99.7%
associate-*r/99.7%
distribute-lft-in99.7%
metadata-eval99.7%
associate-*r*99.7%
metadata-eval99.7%
mul-1-neg99.7%
Simplified99.7%
if -0.27000000000000002 < F < 24Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 86.1%
if 24 < F Initial program 56.7%
associate-*l/76.9%
+-commutative76.9%
*-commutative76.9%
fma-udef76.9%
fma-def76.9%
metadata-eval76.9%
metadata-eval76.9%
fma-def76.9%
fma-udef76.9%
*-commutative76.9%
fma-def76.9%
fma-def76.9%
Applied egg-rr76.9%
add-sqr-sqrt76.9%
unpow-prod-down76.8%
Applied egg-rr76.8%
pow-sqr76.9%
metadata-eval76.9%
unpow-176.9%
fma-udef76.9%
fma-udef76.9%
unpow276.9%
+-commutative76.9%
associate-+r+76.9%
+-commutative76.9%
+-commutative76.9%
unpow276.9%
fma-def76.9%
+-commutative76.9%
fma-def76.9%
Simplified76.9%
Taylor expanded in F around inf 99.8%
associate-*r/99.8%
+-commutative99.8%
distribute-lft-in99.8%
metadata-eval99.8%
associate-*r*99.8%
metadata-eval99.8%
mul-1-neg99.8%
unpow299.8%
Simplified99.8%
Final simplification93.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.48)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.22)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ -1.0 (- (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.48) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.22) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (-1.0 / -sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.48d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.22d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = ((-1.0d0) / -sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.48) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.22) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (-1.0 / -Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.48: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.22: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (-1.0 / -math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.48) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.22) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(-1.0 / Float64(-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.48) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.22) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (-1.0 / -sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.48], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.22], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(-1.0 / (-N[Sin[B], $MachinePrecision])), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.48:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.22:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{-\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.47999999999999998Initial program 46.1%
Taylor expanded in F around -inf 99.5%
expm1-log1p-u50.7%
expm1-udef50.7%
div-inv50.7%
neg-mul-150.7%
fma-def50.7%
Applied egg-rr50.7%
expm1-def50.7%
expm1-log1p99.5%
rem-log-exp46.7%
fma-udef46.7%
neg-mul-146.7%
prod-exp38.4%
*-commutative38.4%
prod-exp46.7%
rem-log-exp99.5%
unsub-neg99.5%
Simplified99.5%
if -0.47999999999999998 < F < 0.220000000000000001Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 86.0%
if 0.220000000000000001 < F Initial program 57.4%
+-commutative57.4%
unsub-neg57.4%
associate-*l/77.3%
associate-*r/77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in F around inf 99.0%
un-div-inv99.1%
frac-2neg99.1%
*-commutative99.1%
distribute-rgt-neg-in99.1%
Applied egg-rr99.1%
associate-/r*99.2%
distribute-frac-neg99.2%
*-inverses99.2%
metadata-eval99.2%
Simplified99.2%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e-6)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -9.8e-60)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 5.5e-9)
(* (cos B) (/ (- x) (sin B)))
(- (/ -1.0 (- (sin B))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.9e-6) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -9.8e-60) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 5.5e-9) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (-1.0 / -sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.9d-6)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-9.8d-60)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 5.5d-9) then
tmp = cos(b) * (-x / sin(b))
else
tmp = ((-1.0d0) / -sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.9e-6) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -9.8e-60) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 5.5e-9) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (-1.0 / -Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.9e-6: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -9.8e-60: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 5.5e-9: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (-1.0 / -math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e-6) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -9.8e-60) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 5.5e-9) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(-1.0 / Float64(-sin(B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.9e-6) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -9.8e-60) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 5.5e-9) tmp = cos(B) * (-x / sin(B)); else tmp = (-1.0 / -sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -9.8e-60], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-9], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / (-N[Sin[B], $MachinePrecision])), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -9.8 \cdot 10^{-60}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-9}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{-\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.9e-6Initial program 47.6%
Taylor expanded in F around -inf 98.3%
expm1-log1p-u49.4%
expm1-udef49.4%
div-inv49.4%
neg-mul-149.4%
fma-def49.4%
Applied egg-rr49.4%
expm1-def49.4%
expm1-log1p98.3%
rem-log-exp47.0%
fma-udef47.0%
neg-mul-147.0%
prod-exp38.9%
*-commutative38.9%
prod-exp47.0%
rem-log-exp98.3%
unsub-neg98.3%
Simplified98.3%
if -1.9e-6 < F < -9.79999999999999977e-60Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.5%
associate-*r/99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 99.5%
if -9.79999999999999977e-60 < F < 5.4999999999999996e-9Initial program 99.5%
Taylor expanded in F around -inf 41.5%
Taylor expanded in x around inf 78.1%
mul-1-neg78.1%
associate-*r/78.1%
distribute-rgt-neg-in78.1%
Simplified78.1%
if 5.4999999999999996e-9 < F Initial program 60.4%
+-commutative60.4%
unsub-neg60.4%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in F around inf 95.3%
un-div-inv95.3%
frac-2neg95.3%
*-commutative95.3%
distribute-rgt-neg-in95.3%
Applied egg-rr95.3%
associate-/r*95.4%
distribute-frac-neg95.4%
*-inverses95.4%
metadata-eval95.4%
Simplified95.4%
Final simplification88.9%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00023)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9e-58)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 5.5e-9)
(* (cos B) (/ (- x) (sin B)))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00023) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9e-58) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 5.5e-9) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.00023d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9d-58)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 5.5d-9) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00023) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9e-58) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 5.5e-9) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00023: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9e-58: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 5.5e-9: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00023) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9e-58) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 5.5e-9) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00023) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9e-58) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 5.5e-9) tmp = cos(B) * (-x / sin(B)); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00023], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9e-58], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-9], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00023:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-58}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-9}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.3000000000000001e-4Initial program 47.6%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 82.8%
if -2.3000000000000001e-4 < F < -9.0000000000000006e-58Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.5%
associate-*r/99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 99.5%
if -9.0000000000000006e-58 < F < 5.4999999999999996e-9Initial program 99.5%
Taylor expanded in F around -inf 41.5%
Taylor expanded in x around inf 78.1%
mul-1-neg78.1%
associate-*r/78.1%
distribute-rgt-neg-in78.1%
Simplified78.1%
if 5.4999999999999996e-9 < F Initial program 60.4%
+-commutative60.4%
unsub-neg60.4%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in F around inf 95.3%
Taylor expanded in B around 0 70.9%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.2e-6)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.5e-62)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 5.5e-9) (* (cos B) (/ (- x) (sin B))) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.2e-6) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.5e-62) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 5.5e-9) {
tmp = cos(B) * (-x / sin(B));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7.2d-6)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.5d-62)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 5.5d-9) then
tmp = cos(b) * (-x / sin(b))
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7.2e-6) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.5e-62) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 5.5e-9) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.2e-6: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.5e-62: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 5.5e-9: tmp = math.cos(B) * (-x / math.sin(B)) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.2e-6) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.5e-62) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 5.5e-9) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.2e-6) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.5e-62) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 5.5e-9) tmp = cos(B) * (-x / sin(B)); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.2e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.5e-62], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-9], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $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 -7.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-62}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-9}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -7.19999999999999967e-6Initial program 47.6%
Taylor expanded in F around -inf 98.3%
expm1-log1p-u49.4%
expm1-udef49.4%
div-inv49.4%
neg-mul-149.4%
fma-def49.4%
Applied egg-rr49.4%
expm1-def49.4%
expm1-log1p98.3%
rem-log-exp47.0%
fma-udef47.0%
neg-mul-147.0%
prod-exp38.9%
*-commutative38.9%
prod-exp47.0%
rem-log-exp98.3%
unsub-neg98.3%
Simplified98.3%
if -7.19999999999999967e-6 < F < -3.5000000000000001e-62Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.5%
associate-*r/99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 99.5%
if -3.5000000000000001e-62 < F < 5.4999999999999996e-9Initial program 99.5%
Taylor expanded in F around -inf 41.5%
Taylor expanded in x around inf 78.1%
mul-1-neg78.1%
associate-*r/78.1%
distribute-rgt-neg-in78.1%
Simplified78.1%
if 5.4999999999999996e-9 < F Initial program 60.4%
+-commutative60.4%
unsub-neg60.4%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in F around inf 95.3%
Taylor expanded in B around 0 70.9%
Final simplification82.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00028)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.5e-57)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 5.5e-9)
(+ (* x (/ -1.0 (tan B))) (/ F (* B (- (/ (- -1.0 x) F) F))))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00028) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.5e-57) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 5.5e-9) {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (((-1.0 - x) / F) - F)));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.00028d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.5d-57)) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 5.5d-9) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * ((((-1.0d0) - x) / f) - f)))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00028) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.5e-57) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 5.5e-9) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (((-1.0 - x) / F) - F)));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00028: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.5e-57: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 5.5e-9: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (((-1.0 - x) / F) - F))) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00028) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.5e-57) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 5.5e-9) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F)))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00028) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.5e-57) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 5.5e-9) tmp = (x * (-1.0 / tan(B))) + (F / (B * (((-1.0 - x) / F) - F))); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00028], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.5e-57], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-9], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00028:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.7999999999999998e-4Initial program 47.6%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 82.8%
if -2.7999999999999998e-4 < F < -4.49999999999999973e-57Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.5%
associate-*r/99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 99.5%
associate-/l*99.0%
Simplified99.0%
div-inv99.2%
clear-num99.0%
Applied egg-rr99.0%
if -4.49999999999999973e-57 < F < 5.4999999999999996e-9Initial program 99.5%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
add-sqr-sqrt99.5%
unpow-prod-down99.5%
Applied egg-rr99.5%
pow-sqr99.5%
metadata-eval99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around -inf 78.0%
neg-mul-178.0%
unsub-neg78.0%
associate-*r/78.0%
distribute-lft-in78.0%
metadata-eval78.0%
associate-*r*78.0%
metadata-eval78.0%
mul-1-neg78.0%
Simplified78.0%
Taylor expanded in B around 0 78.0%
*-commutative78.0%
mul-1-neg78.0%
+-commutative78.0%
Simplified78.0%
if 5.4999999999999996e-9 < F Initial program 60.4%
+-commutative60.4%
unsub-neg60.4%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in F around inf 95.3%
Taylor expanded in B around 0 70.9%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00014)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1e-60)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 5.5e-9)
(+ (* x (/ -1.0 (tan B))) (/ F (* B (- (/ (- -1.0 x) F) F))))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00014) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1e-60) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 5.5e-9) {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (((-1.0 - x) / F) - F)));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.00014d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1d-60)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 5.5d-9) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * ((((-1.0d0) - x) / f) - f)))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00014) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1e-60) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 5.5e-9) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (((-1.0 - x) / F) - F)));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00014: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1e-60: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 5.5e-9: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (((-1.0 - x) / F) - F))) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00014) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1e-60) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 5.5e-9) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F)))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00014) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1e-60) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 5.5e-9) tmp = (x * (-1.0 / tan(B))) + (F / (B * (((-1.0 - x) / F) - F))); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00014], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1e-60], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-9], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00014:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1 \cdot 10^{-60}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.3999999999999999e-4Initial program 47.6%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 82.8%
if -1.3999999999999999e-4 < F < -9.9999999999999997e-61Initial program 99.0%
+-commutative99.0%
unsub-neg99.0%
associate-*l/99.5%
associate-*r/99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 99.5%
if -9.9999999999999997e-61 < F < 5.4999999999999996e-9Initial program 99.5%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
add-sqr-sqrt99.5%
unpow-prod-down99.5%
Applied egg-rr99.5%
pow-sqr99.5%
metadata-eval99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around -inf 78.0%
neg-mul-178.0%
unsub-neg78.0%
associate-*r/78.0%
distribute-lft-in78.0%
metadata-eval78.0%
associate-*r*78.0%
metadata-eval78.0%
mul-1-neg78.0%
Simplified78.0%
Taylor expanded in B around 0 78.0%
*-commutative78.0%
mul-1-neg78.0%
+-commutative78.0%
Simplified78.0%
if 5.4999999999999996e-9 < F Initial program 60.4%
+-commutative60.4%
unsub-neg60.4%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in F around inf 95.3%
Taylor expanded in B around 0 70.9%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(if (<= F -4.6e+131)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.5e-9)
(+ (* x (/ -1.0 (tan B))) (/ F (* B (- (/ (- -1.0 x) F) F))))
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e+131) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.5e-9) {
tmp = (x * (-1.0 / tan(B))) + (F / (B * (((-1.0 - x) / F) - F)));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.6d+131)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.5d-9) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (b * ((((-1.0d0) - x) / f) - f)))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e+131) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.5e-9) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (B * (((-1.0 - x) / F) - F)));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.6e+131: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.5e-9: tmp = (x * (-1.0 / math.tan(B))) + (F / (B * (((-1.0 - x) / F) - F))) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.6e+131) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.5e-9) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F)))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.6e+131) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.5e-9) tmp = (x * (-1.0 / tan(B))) + (F / (B * (((-1.0 - x) / F) - F))); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.6e+131], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-9], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.6 \cdot 10^{+131}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-9}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4.59999999999999983e131Initial program 24.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 91.1%
if -4.59999999999999983e131 < F < 5.4999999999999996e-9Initial program 98.8%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
add-sqr-sqrt99.5%
unpow-prod-down99.5%
Applied egg-rr99.5%
pow-sqr99.5%
metadata-eval99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around -inf 77.9%
neg-mul-177.9%
unsub-neg77.9%
associate-*r/77.9%
distribute-lft-in77.9%
metadata-eval77.9%
associate-*r*77.9%
metadata-eval77.9%
mul-1-neg77.9%
Simplified77.9%
Taylor expanded in B around 0 73.7%
*-commutative73.7%
mul-1-neg73.7%
+-commutative73.7%
Simplified73.7%
if 5.4999999999999996e-9 < F Initial program 60.4%
+-commutative60.4%
unsub-neg60.4%
associate-*l/78.9%
associate-*r/78.9%
*-commutative78.9%
Simplified79.0%
Taylor expanded in F around inf 95.3%
Taylor expanded in B around 0 70.9%
Final simplification76.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45e+136)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -7e-222)
(- (/ -1.0 B) t_0)
(if (<= F 9.2e-71)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) 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 <= -1.45e+136) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -7e-222) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 9.2e-71) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - 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 <= (-1.45d+136)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-7d-222)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 9.2d-71) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - 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 <= -1.45e+136) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -7e-222) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 9.2e-71) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - 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 <= -1.45e+136: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -7e-222: tmp = (-1.0 / B) - t_0 elif F <= 9.2e-71: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - 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 <= -1.45e+136) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -7e-222) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 9.2e-71) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - 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 <= -1.45e+136) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -7e-222) tmp = (-1.0 / B) - t_0; elseif (F <= 9.2e-71) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - 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, -1.45e+136], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-222], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9.2e-71], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], 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.45 \cdot 10^{+136}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-222}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-71}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.44999999999999987e136Initial program 25.9%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 90.5%
if -1.44999999999999987e136 < F < -7.00000000000000049e-222Initial program 93.9%
Taylor expanded in F around -inf 65.7%
Taylor expanded in B around 0 64.3%
+-commutative64.3%
div-inv64.3%
unsub-neg64.3%
Applied egg-rr64.3%
if -7.00000000000000049e-222 < F < 9.1999999999999994e-71Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 57.1%
if 9.1999999999999994e-71 < F Initial program 65.3%
+-commutative65.3%
unsub-neg65.3%
associate-*l/81.4%
associate-*r/81.5%
*-commutative81.5%
Simplified81.6%
Taylor expanded in F around inf 90.0%
Taylor expanded in B around 0 69.8%
Final simplification68.8%
(FPCore (F B x)
:precision binary64
(if (<= F -6.2e+29)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 7e-204)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ -1.0 F)))
(if (<= F 3.8e-63)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e+29) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 7e-204) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 3.8e-63) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.2d+29)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 7d-204) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * ((-1.0d0) / f))
else if (f <= 3.8d-63) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e+29) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 7e-204) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 3.8e-63) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e+29: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 7e-204: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (-1.0 / F)) elif F <= 3.8e-63: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e+29) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 7e-204) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 3.8e-63) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.2e+29) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 7e-204) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F)); elseif (F <= 3.8e-63) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-204], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e-63], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-204}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-63}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.1999999999999998e29Initial program 41.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 85.5%
if -6.1999999999999998e29 < F < 7.00000000000000054e-204Initial program 99.5%
Taylor expanded in F around -inf 44.6%
Taylor expanded in B around 0 59.2%
if 7.00000000000000054e-204 < F < 3.80000000000000017e-63Initial program 99.2%
+-commutative99.2%
unsub-neg99.2%
associate-*l/99.2%
associate-*r/99.3%
*-commutative99.3%
Simplified99.6%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 58.3%
if 3.80000000000000017e-63 < F Initial program 65.3%
+-commutative65.3%
unsub-neg65.3%
associate-*l/81.4%
associate-*r/81.5%
*-commutative81.5%
Simplified81.6%
Taylor expanded in F around inf 90.0%
Taylor expanded in B around 0 69.8%
Final simplification68.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -8.2e-25)
t_0
(if (<= x 1.15e-131)
(/ -1.0 (sin B))
(if (<= x 6.6e-90) (/ (- x) B) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -8.2e-25) {
tmp = t_0;
} else if (x <= 1.15e-131) {
tmp = -1.0 / sin(B);
} else if (x <= 6.6e-90) {
tmp = -x / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-8.2d-25)) then
tmp = t_0
else if (x <= 1.15d-131) then
tmp = (-1.0d0) / sin(b)
else if (x <= 6.6d-90) then
tmp = -x / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -8.2e-25) {
tmp = t_0;
} else if (x <= 1.15e-131) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 6.6e-90) {
tmp = -x / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -8.2e-25: tmp = t_0 elif x <= 1.15e-131: tmp = -1.0 / math.sin(B) elif x <= 6.6e-90: tmp = -x / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -8.2e-25) tmp = t_0; elseif (x <= 1.15e-131) tmp = Float64(-1.0 / sin(B)); elseif (x <= 6.6e-90) tmp = Float64(Float64(-x) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -8.2e-25) tmp = t_0; elseif (x <= 1.15e-131) tmp = -1.0 / sin(B); elseif (x <= 6.6e-90) tmp = -x / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e-25], t$95$0, If[LessEqual[x, 1.15e-131], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.6e-90], N[((-x) / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{-25}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-131}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{-90}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -8.19999999999999974e-25 or 6.6e-90 < x Initial program 77.8%
Taylor expanded in F around -inf 85.0%
Taylor expanded in B around 0 89.6%
+-commutative89.6%
div-inv89.7%
unsub-neg89.7%
Applied egg-rr89.7%
if -8.19999999999999974e-25 < x < 1.15000000000000011e-131Initial program 68.5%
Taylor expanded in F around -inf 28.6%
expm1-log1p-u14.5%
expm1-udef14.5%
div-inv14.5%
neg-mul-114.5%
fma-def14.5%
Applied egg-rr14.5%
expm1-def14.5%
expm1-log1p28.6%
rem-log-exp17.4%
fma-udef17.4%
neg-mul-117.4%
prod-exp17.0%
*-commutative17.0%
prod-exp17.4%
rem-log-exp28.6%
unsub-neg28.6%
Simplified28.6%
Taylor expanded in x around 0 28.6%
if 1.15000000000000011e-131 < x < 6.6e-90Initial program 99.4%
Taylor expanded in F around -inf 14.1%
Taylor expanded in B around 0 14.3%
associate-*r/14.3%
distribute-lft-in14.3%
metadata-eval14.3%
neg-mul-114.3%
Simplified14.3%
Taylor expanded in x around inf 64.8%
associate-*r/64.8%
mul-1-neg64.8%
Simplified64.8%
Final simplification62.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.45e+137)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.05e-303)
(- (/ -1.0 B) t_0)
(if (<= F 1.25e-247) (/ (- 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.45e+137) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.05e-303) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.25e-247) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.45d+137)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.05d-303)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.25d-247) then
tmp = -x / b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.45e+137) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.05e-303) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.25e-247) {
tmp = -x / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.45e+137: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.05e-303: tmp = (-1.0 / B) - t_0 elif F <= 1.25e-247: tmp = -x / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.45e+137) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.05e-303) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.25e-247) tmp = Float64(Float64(-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.45e+137) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.05e-303) tmp = (-1.0 / B) - t_0; elseif (F <= 1.25e-247) tmp = -x / B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.45e+137], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.05e-303], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.25e-247], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.45 \cdot 10^{+137}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-303}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-247}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.4500000000000002e137Initial program 25.9%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 90.5%
if -3.4500000000000002e137 < F < -1.05e-303Initial program 94.8%
Taylor expanded in F around -inf 58.6%
Taylor expanded in B around 0 61.0%
+-commutative61.0%
div-inv61.1%
unsub-neg61.1%
Applied egg-rr61.1%
if -1.05e-303 < F < 1.24999999999999994e-247Initial program 99.7%
Taylor expanded in F around -inf 27.0%
Taylor expanded in B around 0 27.9%
associate-*r/27.9%
distribute-lft-in27.9%
metadata-eval27.9%
neg-mul-127.9%
Simplified27.9%
Taylor expanded in x around inf 68.8%
associate-*r/68.8%
mul-1-neg68.8%
Simplified68.8%
if 1.24999999999999994e-247 < F Initial program 76.6%
+-commutative76.6%
unsub-neg76.6%
associate-*l/87.4%
associate-*r/87.5%
*-commutative87.5%
Simplified87.6%
Taylor expanded in F around inf 68.4%
Taylor expanded in B around 0 63.9%
Final simplification67.9%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ x (tan B)))) (if (<= F -1.85e-202) (- (/ -1.0 B) t_0) (- (/ 1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.85e-202) {
tmp = (-1.0 / B) - t_0;
} 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 <= (-1.85d-202)) then
tmp = ((-1.0d0) / b) - t_0
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 <= -1.85e-202) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.85e-202: tmp = (-1.0 / B) - t_0 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 <= -1.85e-202) tmp = Float64(Float64(-1.0 / B) - t_0); 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 <= -1.85e-202) tmp = (-1.0 / B) - t_0; 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, -1.85e-202], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $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.85 \cdot 10^{-202}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -1.84999999999999995e-202Initial program 65.0%
Taylor expanded in F around -inf 80.2%
Taylor expanded in B around 0 65.9%
+-commutative65.9%
div-inv65.9%
unsub-neg65.9%
Applied egg-rr65.9%
if -1.84999999999999995e-202 < F Initial program 81.1%
+-commutative81.1%
unsub-neg81.1%
associate-*l/89.8%
associate-*r/89.8%
*-commutative89.8%
Simplified90.0%
Taylor expanded in F around inf 57.6%
Taylor expanded in B around 0 61.3%
Final simplification63.2%
(FPCore (F B x) :precision binary64 (if (<= F -2.2e+106) (+ (* x (* B 0.3333333333333333)) (/ (- -1.0 x) B)) (if (<= F -0.0007) (/ -1.0 (sin B)) (/ (- x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e+106) {
tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= -0.0007) {
tmp = -1.0 / sin(B);
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.2d+106)) then
tmp = (x * (b * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else if (f <= (-0.0007d0)) then
tmp = (-1.0d0) / sin(b)
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e+106) {
tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B);
} else if (F <= -0.0007) {
tmp = -1.0 / Math.sin(B);
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.2e+106: tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B) elif F <= -0.0007: tmp = -1.0 / math.sin(B) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.2e+106) tmp = Float64(Float64(x * Float64(B * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= -0.0007) tmp = Float64(-1.0 / sin(B)); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.2e+106) tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B); elseif (F <= -0.0007) tmp = -1.0 / sin(B); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.2e+106], N[(N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.0007], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{+106}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -0.0007:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -2.19999999999999992e106Initial program 31.7%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 76.2%
Taylor expanded in B around 0 65.6%
+-commutative65.6%
mul-1-neg65.6%
unsub-neg65.6%
associate-*r*65.6%
+-commutative65.6%
Simplified65.6%
if -2.19999999999999992e106 < F < -6.99999999999999993e-4Initial program 94.4%
Taylor expanded in F around -inf 93.3%
expm1-log1p-u44.5%
expm1-udef44.5%
div-inv44.5%
neg-mul-144.5%
fma-def44.5%
Applied egg-rr44.5%
expm1-def44.5%
expm1-log1p93.2%
rem-log-exp39.6%
fma-udef39.6%
neg-mul-139.6%
prod-exp39.4%
*-commutative39.4%
prod-exp39.6%
rem-log-exp93.2%
unsub-neg93.2%
Simplified93.2%
Taylor expanded in x around 0 65.0%
if -6.99999999999999993e-4 < F Initial program 84.8%
Taylor expanded in F around -inf 43.0%
Taylor expanded in B around 0 23.8%
associate-*r/23.8%
distribute-lft-in23.8%
metadata-eval23.8%
neg-mul-123.8%
Simplified23.8%
Taylor expanded in x around inf 35.0%
associate-*r/35.0%
mul-1-neg35.0%
Simplified35.0%
Final simplification43.3%
(FPCore (F B x) :precision binary64 (if (<= F -3.25e-63) (+ (* x (* B 0.3333333333333333)) (/ (- -1.0 x) B)) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.25e-63) {
tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B);
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.25d-63)) then
tmp = (x * (b * 0.3333333333333333d0)) + (((-1.0d0) - x) / b)
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.25e-63) {
tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B);
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.25e-63: tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.25e-63) tmp = Float64(Float64(x * Float64(B * 0.3333333333333333)) + Float64(Float64(-1.0 - x) / B)); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.25e-63) tmp = (x * (B * 0.3333333333333333)) + ((-1.0 - x) / B); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.25e-63], N[(N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.25 \cdot 10^{-63}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) + \frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -3.2499999999999999e-63Initial program 52.3%
Taylor expanded in F around -inf 90.2%
Taylor expanded in B around 0 67.9%
Taylor expanded in B around 0 53.3%
+-commutative53.3%
mul-1-neg53.3%
unsub-neg53.3%
associate-*r*53.3%
+-commutative53.3%
Simplified53.3%
if -3.2499999999999999e-63 < F Initial program 84.1%
Taylor expanded in F around -inf 44.0%
Taylor expanded in B around 0 24.1%
associate-*r/24.1%
distribute-lft-in24.1%
metadata-eval24.1%
neg-mul-124.1%
Simplified24.1%
Taylor expanded in x around inf 35.9%
associate-*r/35.9%
mul-1-neg35.9%
Simplified35.9%
Final simplification41.2%
(FPCore (F B x) :precision binary64 (if (<= F -6.4e-55) (- (/ -1.0 B) (/ x B)) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.4e-55) {
tmp = (-1.0 / B) - (x / B);
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.4d-55)) then
tmp = ((-1.0d0) / b) - (x / b)
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.4e-55) {
tmp = (-1.0 / B) - (x / B);
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.4e-55: tmp = (-1.0 / B) - (x / B) else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.4e-55) tmp = Float64(Float64(-1.0 / B) - Float64(x / B)); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.4e-55) tmp = (-1.0 / B) - (x / B); else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.4e-55], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -6.4000000000000003e-55Initial program 51.0%
Taylor expanded in F around -inf 92.4%
Taylor expanded in B around 0 54.2%
associate-*r/54.2%
distribute-lft-in54.2%
metadata-eval54.2%
neg-mul-154.2%
Simplified54.2%
unsub-neg54.2%
div-sub54.2%
Applied egg-rr54.2%
if -6.4000000000000003e-55 < F Initial program 84.3%
Taylor expanded in F around -inf 43.6%
Taylor expanded in B around 0 23.8%
associate-*r/23.8%
distribute-lft-in23.8%
metadata-eval23.8%
neg-mul-123.8%
Simplified23.8%
Taylor expanded in x around inf 35.5%
associate-*r/35.5%
mul-1-neg35.5%
Simplified35.5%
Final simplification41.1%
(FPCore (F B x) :precision binary64 (if (<= F -3e-55) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-55) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3d-55)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3e-55) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e-55: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e-55) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3e-55) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e-55], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-55}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -3.00000000000000016e-55Initial program 51.0%
Taylor expanded in F around -inf 92.4%
Taylor expanded in B around 0 54.2%
associate-*r/54.2%
distribute-lft-in54.2%
metadata-eval54.2%
neg-mul-154.2%
Simplified54.2%
if -3.00000000000000016e-55 < F Initial program 84.3%
Taylor expanded in F around -inf 43.6%
Taylor expanded in B around 0 23.8%
associate-*r/23.8%
distribute-lft-in23.8%
metadata-eval23.8%
neg-mul-123.8%
Simplified23.8%
Taylor expanded in x around inf 35.5%
associate-*r/35.5%
mul-1-neg35.5%
Simplified35.5%
Final simplification41.1%
(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 74.4%
Taylor expanded in F around -inf 58.1%
Taylor expanded in B around 0 32.8%
associate-*r/32.8%
distribute-lft-in32.8%
metadata-eval32.8%
neg-mul-132.8%
Simplified32.8%
Taylor expanded in x around inf 33.7%
associate-*r/33.7%
mul-1-neg33.7%
Simplified33.7%
Final simplification33.7%
(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 74.4%
Taylor expanded in F around -inf 58.1%
Taylor expanded in B around 0 32.8%
associate-*r/32.8%
distribute-lft-in32.8%
metadata-eval32.8%
neg-mul-132.8%
Simplified32.8%
Taylor expanded in x around 0 10.1%
Final simplification10.1%
herbie shell --seed 2023249
(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))))))