
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2e+89)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e+83)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+89) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e+83) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+89) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e+83) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+89], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e+83], 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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+89}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 10^{+83}:\\
\;\;\;\;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}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.99999999999999999e89Initial program 42.7%
Taylor expanded in F around -inf 99.6%
expm1-log1p-u54.6%
expm1-udef54.6%
div-inv54.6%
neg-mul-154.6%
fma-def54.6%
Applied egg-rr54.6%
expm1-def54.6%
expm1-log1p99.7%
rem-log-exp48.3%
fma-udef48.3%
neg-mul-148.3%
prod-exp39.7%
*-commutative39.7%
prod-exp48.3%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -1.99999999999999999e89 < F < 1.00000000000000003e83Initial program 97.4%
distribute-lft-neg-in97.4%
+-commutative97.4%
cancel-sign-sub-inv97.4%
Simplified99.6%
if 1.00000000000000003e83 < F Initial program 39.6%
Taylor expanded in F around inf 99.6%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= x -1.0)
(- (* F (/ 1.0 (* F (sin B)))) (/ x (tan B)))
(+
(* x (/ -1.0 (tan B)))
(/ F (* (sin B) (hypot F (sqrt (fma 2.0 x 2.0))))))))
double code(double F, double B, double x) {
double tmp;
if (x <= -1.0) {
tmp = (F * (1.0 / (F * sin(B)))) - (x / tan(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * hypot(F, sqrt(fma(2.0, x, 2.0)))));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(F * Float64(1.0 / Float64(F * sin(B)))) - Float64(x / tan(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * hypot(F, sqrt(fma(2.0, x, 2.0)))))); end return tmp end
code[F_, B_, x_] := If[LessEqual[x, -1.0], N[(N[(F * N[(1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}\\
\end{array}
\end{array}
if x < -1Initial program 65.1%
distribute-lft-neg-in65.1%
+-commutative65.1%
cancel-sign-sub-inv65.1%
Simplified97.9%
Taylor expanded in F around inf 99.8%
if -1 < x Initial program 72.2%
associate-*l/80.1%
+-commutative80.1%
*-commutative80.1%
fma-udef80.1%
fma-def80.1%
metadata-eval80.1%
metadata-eval80.1%
fma-def80.1%
fma-udef80.1%
*-commutative80.1%
fma-def80.1%
fma-def80.1%
Applied egg-rr80.1%
add-sqr-sqrt80.1%
unpow-prod-down80.0%
Applied egg-rr80.0%
pow-sqr80.1%
metadata-eval80.1%
unpow-180.1%
fma-udef80.1%
fma-udef80.1%
unpow280.1%
+-commutative80.1%
associate-+r+80.1%
+-commutative80.1%
+-commutative80.1%
unpow280.1%
fma-def80.1%
+-commutative80.1%
fma-def80.1%
Simplified80.1%
expm1-log1p-u65.2%
expm1-udef56.7%
un-div-inv56.7%
fma-udef56.7%
add-sqr-sqrt56.7%
hypot-def62.8%
Applied egg-rr62.8%
expm1-def71.4%
expm1-log1p99.6%
associate-/l/99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(if (<= F -95000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1300000000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* (cos B) (/ x (sin B))))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -95000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1300000000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (cos(B) * (x / sin(B)));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / 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) :: tmp
if (f <= (-95000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1300000000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (cos(b) * (x / sin(b)))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -95000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1300000000000.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 = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -95000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1300000000000.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 = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -95000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1300000000000.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(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -95000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1300000000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (cos(B) * (x / sin(B))); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -95000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1300000000000.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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -95000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1300000000000:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -9.5e7Initial program 52.8%
Taylor expanded in F around -inf 99.6%
expm1-log1p-u56.6%
expm1-udef56.5%
div-inv56.5%
neg-mul-156.5%
fma-def56.5%
Applied egg-rr56.5%
expm1-def56.6%
expm1-log1p99.7%
rem-log-exp48.4%
fma-udef48.4%
neg-mul-148.4%
prod-exp41.3%
*-commutative41.3%
prod-exp48.4%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -9.5e7 < F < 1.3e12Initial program 99.3%
Taylor expanded in x around 0 99.4%
associate-*r/99.4%
Simplified99.4%
if 1.3e12 < F Initial program 50.3%
Taylor expanded in F around inf 99.7%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(if (<= F -9.6e+99)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 110000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e+99) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 110000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / 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) :: tmp
if (f <= (-9.6d+99)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 110000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e+99) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 110000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.6e+99: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 110000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.6e+99) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 110000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.6e+99) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 110000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.6e+99], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 110000000.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[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.6 \cdot 10^{+99}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 110000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -9.6000000000000005e99Initial program 37.5%
Taylor expanded in F around -inf 99.6%
expm1-log1p-u54.4%
expm1-udef54.4%
div-inv54.4%
neg-mul-154.4%
fma-def54.4%
Applied egg-rr54.4%
expm1-def54.4%
expm1-log1p99.7%
rem-log-exp48.7%
fma-udef48.7%
neg-mul-148.7%
prod-exp39.3%
*-commutative39.3%
prod-exp48.7%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -9.6000000000000005e99 < F < 1.1e8Initial program 99.4%
Taylor expanded in x around 0 99.4%
if 1.1e8 < F Initial program 50.3%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -9.6e+99)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 200000.0)
(+ t_0 (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* F F))))))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -9.6e+99) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 200000.0) {
tmp = t_0 + ((F / sin(B)) * sqrt((1.0 / (2.0 + (F * F)))));
} else {
tmp = t_0 + (1.0 / 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 <= (-9.6d+99)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 200000.0d0) then
tmp = t_0 + ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (f * f)))))
else
tmp = t_0 + (1.0d0 / 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 <= -9.6e+99) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 200000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (F * F)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -9.6e+99: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 200000.0: tmp = t_0 + ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (F * F))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -9.6e+99) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 200000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(F * F)))))); else tmp = Float64(t_0 + Float64(1.0 / 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 <= -9.6e+99) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 200000.0) tmp = t_0 + ((F / sin(B)) * sqrt((1.0 / (2.0 + (F * F))))); else tmp = t_0 + (1.0 / 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, -9.6e+99], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -9.6 \cdot 10^{+99}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 200000:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + F \cdot F}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -9.6000000000000005e99Initial program 37.5%
Taylor expanded in F around -inf 99.6%
expm1-log1p-u54.4%
expm1-udef54.4%
div-inv54.4%
neg-mul-154.4%
fma-def54.4%
Applied egg-rr54.4%
expm1-def54.4%
expm1-log1p99.7%
rem-log-exp48.7%
fma-udef48.7%
neg-mul-148.7%
prod-exp39.3%
*-commutative39.3%
prod-exp48.7%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -9.6000000000000005e99 < F < 2e5Initial program 99.4%
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.4%
Applied egg-rr99.4%
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 x around 0 99.4%
*-commutative99.4%
+-commutative99.4%
unpow299.4%
Simplified99.4%
if 2e5 < F Initial program 50.3%
Taylor expanded in F around inf 99.7%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -390.0)
(+ t_0 (/ (* F (/ 1.0 (- (/ (- -1.0 x) F) F))) (sin B)))
(if (<= F 1.45)
(- (* F (/ 1.0 (/ (sin B) (sqrt 0.5)))) (/ x (tan B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -390.0) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B));
} else if (F <= 1.45) {
tmp = (F * (1.0 / (sin(B) / sqrt(0.5)))) - (x / tan(B));
} else {
tmp = t_0 + (1.0 / 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 <= (-390.0d0)) then
tmp = t_0 + ((f * (1.0d0 / ((((-1.0d0) - x) / f) - f))) / sin(b))
else if (f <= 1.45d0) then
tmp = (f * (1.0d0 / (sin(b) / sqrt(0.5d0)))) - (x / tan(b))
else
tmp = t_0 + (1.0d0 / 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 <= -390.0) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / Math.sin(B));
} else if (F <= 1.45) {
tmp = (F * (1.0 / (Math.sin(B) / Math.sqrt(0.5)))) - (x / Math.tan(B));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -390.0: tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / math.sin(B)) elif F <= 1.45: tmp = (F * (1.0 / (math.sin(B) / math.sqrt(0.5)))) - (x / math.tan(B)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -390.0) tmp = Float64(t_0 + Float64(Float64(F * Float64(1.0 / Float64(Float64(Float64(-1.0 - x) / F) - F))) / sin(B))); elseif (F <= 1.45) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) / sqrt(0.5)))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(1.0 / 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 <= -390.0) tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B)); elseif (F <= 1.45) tmp = (F * (1.0 / (sin(B) / sqrt(0.5)))) - (x / tan(B)); else tmp = t_0 + (1.0 / 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, -390.0], 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, 1.45], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -390:\\
\;\;\;\;t_0 + \frac{F \cdot \frac{1}{\frac{-1 - x}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;F \cdot \frac{1}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -390Initial program 54.1%
associate-*l/70.2%
+-commutative70.2%
*-commutative70.2%
fma-udef70.2%
fma-def70.2%
metadata-eval70.2%
metadata-eval70.2%
fma-def70.2%
fma-udef70.2%
*-commutative70.2%
fma-def70.2%
fma-def70.2%
Applied egg-rr70.2%
add-sqr-sqrt70.2%
unpow-prod-down70.1%
Applied egg-rr70.1%
pow-sqr70.2%
metadata-eval70.2%
unpow-170.2%
fma-udef70.2%
fma-udef70.2%
unpow270.2%
+-commutative70.2%
associate-+r+70.2%
+-commutative70.2%
+-commutative70.2%
unpow270.2%
fma-def70.2%
+-commutative70.2%
fma-def70.2%
Simplified70.2%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
associate-*r/99.6%
distribute-lft-in99.6%
metadata-eval99.6%
associate-*r*99.6%
metadata-eval99.6%
neg-mul-199.6%
sub-neg99.6%
Simplified99.6%
if -390 < F < 1.44999999999999996Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
cancel-sign-sub-inv99.3%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.6%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
if 1.44999999999999996 < F Initial program 51.6%
Taylor expanded in F around inf 99.3%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -390.0)
(+ t_0 (/ (* F (/ 1.0 (- (/ (- -1.0 x) F) F))) (sin B)))
(if (<= F 1.45)
(- (* F (/ (sqrt 0.5) (sin B))) (/ x (tan B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -390.0) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B));
} else if (F <= 1.45) {
tmp = (F * (sqrt(0.5) / sin(B))) - (x / tan(B));
} else {
tmp = t_0 + (1.0 / 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 <= (-390.0d0)) then
tmp = t_0 + ((f * (1.0d0 / ((((-1.0d0) - x) / f) - f))) / sin(b))
else if (f <= 1.45d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - (x / tan(b))
else
tmp = t_0 + (1.0d0 / 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 <= -390.0) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / Math.sin(B));
} else if (F <= 1.45) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / Math.tan(B));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -390.0: tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / math.sin(B)) elif F <= 1.45: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - (x / math.tan(B)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -390.0) tmp = Float64(t_0 + Float64(Float64(F * Float64(1.0 / Float64(Float64(Float64(-1.0 - x) / F) - F))) / sin(B))); elseif (F <= 1.45) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(1.0 / 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 <= -390.0) tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B)); elseif (F <= 1.45) tmp = (F * (sqrt(0.5) / sin(B))) - (x / tan(B)); else tmp = t_0 + (1.0 / 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, -390.0], 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, 1.45], 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -390:\\
\;\;\;\;t_0 + \frac{F \cdot \frac{1}{\frac{-1 - x}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -390Initial program 54.1%
associate-*l/70.2%
+-commutative70.2%
*-commutative70.2%
fma-udef70.2%
fma-def70.2%
metadata-eval70.2%
metadata-eval70.2%
fma-def70.2%
fma-udef70.2%
*-commutative70.2%
fma-def70.2%
fma-def70.2%
Applied egg-rr70.2%
add-sqr-sqrt70.2%
unpow-prod-down70.1%
Applied egg-rr70.1%
pow-sqr70.2%
metadata-eval70.2%
unpow-170.2%
fma-udef70.2%
fma-udef70.2%
unpow270.2%
+-commutative70.2%
associate-+r+70.2%
+-commutative70.2%
+-commutative70.2%
unpow270.2%
fma-def70.2%
+-commutative70.2%
fma-def70.2%
Simplified70.2%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
associate-*r/99.6%
distribute-lft-in99.6%
metadata-eval99.6%
associate-*r*99.6%
metadata-eval99.6%
neg-mul-199.6%
sub-neg99.6%
Simplified99.6%
if -390 < F < 1.44999999999999996Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
cancel-sign-sub-inv99.3%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.6%
if 1.44999999999999996 < F Initial program 51.6%
Taylor expanded in F around inf 99.3%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -7e-30)
(+ t_0 (/ (* F (/ 1.0 (- (/ (- -1.0 x) F) F))) (sin B)))
(if (<= F 7.5e-12)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x (tan B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -7e-30) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B));
} else if (F <= 7.5e-12) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / tan(B));
} else {
tmp = t_0 + (1.0 / 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 <= (-7d-30)) then
tmp = t_0 + ((f * (1.0d0 / ((((-1.0d0) - x) / f) - f))) / sin(b))
else if (f <= 7.5d-12) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / tan(b))
else
tmp = t_0 + (1.0d0 / 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 <= -7e-30) {
tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / Math.sin(B));
} else if (F <= 7.5e-12) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / Math.tan(B));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -7e-30: tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / math.sin(B)) elif F <= 7.5e-12: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / math.tan(B)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -7e-30) tmp = Float64(t_0 + Float64(Float64(F * Float64(1.0 / Float64(Float64(Float64(-1.0 - x) / F) - F))) / sin(B))); elseif (F <= 7.5e-12) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(1.0 / 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 <= -7e-30) tmp = t_0 + ((F * (1.0 / (((-1.0 - x) / F) - F))) / sin(B)); elseif (F <= 7.5e-12) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / tan(B)); else tmp = t_0 + (1.0 / 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, -7e-30], 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, 7.5e-12], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{-30}:\\
\;\;\;\;t_0 + \frac{F \cdot \frac{1}{\frac{-1 - x}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7.0000000000000006e-30Initial program 56.3%
associate-*l/71.6%
+-commutative71.6%
*-commutative71.6%
fma-udef71.6%
fma-def71.6%
metadata-eval71.6%
metadata-eval71.6%
fma-def71.6%
fma-udef71.6%
*-commutative71.6%
fma-def71.6%
fma-def71.6%
Applied egg-rr71.6%
add-sqr-sqrt71.6%
unpow-prod-down71.5%
Applied egg-rr71.5%
pow-sqr71.6%
metadata-eval71.6%
unpow-171.6%
fma-udef71.6%
fma-udef71.6%
unpow271.6%
+-commutative71.6%
associate-+r+71.6%
+-commutative71.6%
+-commutative71.6%
unpow271.6%
fma-def71.6%
+-commutative71.6%
fma-def71.6%
Simplified71.6%
Taylor expanded in F around -inf 98.4%
mul-1-neg98.4%
unsub-neg98.4%
associate-*r/98.4%
distribute-lft-in98.4%
metadata-eval98.4%
associate-*r*98.4%
metadata-eval98.4%
neg-mul-198.4%
sub-neg98.4%
Simplified98.4%
if -7.0000000000000006e-30 < F < 7.5e-12Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
cancel-sign-sub-inv99.3%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 85.8%
if 7.5e-12 < F Initial program 52.2%
Taylor expanded in F around inf 98.2%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7e-30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7.5e-12)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7e-30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7.5e-12) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / 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 <= (-7d-30)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7.5d-12) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / 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 <= -7e-30) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7.5e-12) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7e-30: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7.5e-12: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7e-30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7.5e-12) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7e-30) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7.5e-12) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / 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, -7e-30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.5e-12], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7.0000000000000006e-30Initial program 56.3%
Taylor expanded in F around -inf 97.8%
expm1-log1p-u53.4%
expm1-udef53.4%
div-inv53.4%
neg-mul-153.4%
fma-def53.4%
Applied egg-rr53.4%
expm1-def53.4%
expm1-log1p97.8%
rem-log-exp47.3%
fma-udef47.3%
neg-mul-147.3%
prod-exp40.8%
*-commutative40.8%
prod-exp47.3%
rem-log-exp97.8%
unsub-neg97.8%
Simplified97.8%
if -7.0000000000000006e-30 < F < 7.5e-12Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
cancel-sign-sub-inv99.3%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 85.8%
if 7.5e-12 < F Initial program 52.2%
Taylor expanded in F around inf 98.2%
Final simplification93.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7e-30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.02e+48) (- (* F (/ (sqrt 0.5) B)) t_0) (/ (- x) (tan B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7e-30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.02e+48) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = -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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7d-30)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.02d+48) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = -x / tan(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 <= -7e-30) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.02e+48) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7e-30: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.02e+48: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7e-30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.02e+48) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7e-30) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.02e+48) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7e-30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.02e+48], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{+48}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -7.0000000000000006e-30Initial program 56.3%
Taylor expanded in F around -inf 97.8%
expm1-log1p-u53.4%
expm1-udef53.4%
div-inv53.4%
neg-mul-153.4%
fma-def53.4%
Applied egg-rr53.4%
expm1-def53.4%
expm1-log1p97.8%
rem-log-exp47.3%
fma-udef47.3%
neg-mul-147.3%
prod-exp40.8%
*-commutative40.8%
prod-exp47.3%
rem-log-exp97.8%
unsub-neg97.8%
Simplified97.8%
if -7.0000000000000006e-30 < F < 1.02e48Initial program 97.0%
distribute-lft-neg-in97.0%
+-commutative97.0%
cancel-sign-sub-inv97.0%
Simplified99.6%
Taylor expanded in F around 0 92.2%
Taylor expanded in x around 0 92.2%
Taylor expanded in B around 0 79.0%
if 1.02e48 < F Initial program 47.6%
distribute-lft-neg-in47.6%
+-commutative47.6%
cancel-sign-sub-inv47.6%
Simplified65.3%
Taylor expanded in F around 0 17.7%
Taylor expanded in x around 0 24.7%
Taylor expanded in F around 0 50.0%
mul-1-neg50.0%
associate-/l*50.0%
Simplified50.0%
associate-/r/50.1%
clear-num50.0%
tan-quot50.0%
*-commutative50.0%
add-sqr-sqrt26.0%
sqrt-unprod13.3%
sqr-neg13.3%
sqrt-unprod1.2%
add-sqr-sqrt2.0%
neg-sub02.0%
metadata-eval2.0%
sub-neg2.0%
add-sqr-sqrt1.2%
sqrt-unprod13.3%
sqr-neg13.3%
sqrt-unprod26.0%
add-sqr-sqrt50.0%
metadata-eval50.0%
un-div-inv50.1%
Applied egg-rr50.1%
+-lft-identity50.1%
Simplified50.1%
Final simplification77.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7e-30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 7.5e-12)
(- (* F (/ (sqrt 0.5) B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7e-30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 7.5e-12) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / 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 <= (-7d-30)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 7.5d-12) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / 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 <= -7e-30) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 7.5e-12) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7e-30: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 7.5e-12: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7e-30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 7.5e-12) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7e-30) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 7.5e-12) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / 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, -7e-30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 7.5e-12], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-12}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -7.0000000000000006e-30Initial program 56.3%
Taylor expanded in F around -inf 97.8%
expm1-log1p-u53.4%
expm1-udef53.4%
div-inv53.4%
neg-mul-153.4%
fma-def53.4%
Applied egg-rr53.4%
expm1-def53.4%
expm1-log1p97.8%
rem-log-exp47.3%
fma-udef47.3%
neg-mul-147.3%
prod-exp40.8%
*-commutative40.8%
prod-exp47.3%
rem-log-exp97.8%
unsub-neg97.8%
Simplified97.8%
if -7.0000000000000006e-30 < F < 7.5e-12Initial program 99.3%
distribute-lft-neg-in99.3%
+-commutative99.3%
cancel-sign-sub-inv99.3%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in B around 0 85.8%
if 7.5e-12 < F Initial program 52.2%
Taylor expanded in F around inf 98.2%
Final simplification93.3%
(FPCore (F B x) :precision binary64 (if (<= F -2.55e-27) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F -1.7e-64) (/ (sqrt 0.5) (/ (sin B) F)) (/ (- x) (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.55e-27) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.7e-64) {
tmp = sqrt(0.5) / (sin(B) / F);
} else {
tmp = -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 <= (-2.55d-27)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.7d-64)) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.55e-27) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.7e-64) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.55e-27: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.7e-64: tmp = math.sqrt(0.5) / (math.sin(B) / F) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.55e-27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.7e-64) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.55e-27) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.7e-64) tmp = sqrt(0.5) / (sin(B) / F); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.55e-27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.7e-64], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.55 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-64}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -2.55e-27Initial program 55.8%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 75.3%
if -2.55e-27 < F < -1.70000000000000006e-64Initial program 98.7%
distribute-lft-neg-in98.7%
+-commutative98.7%
cancel-sign-sub-inv98.7%
Simplified99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in x around 0 78.2%
associate-/l*78.0%
Simplified78.0%
if -1.70000000000000006e-64 < F Initial program 77.1%
distribute-lft-neg-in77.1%
+-commutative77.1%
cancel-sign-sub-inv77.1%
Simplified85.9%
Taylor expanded in F around 0 61.9%
Taylor expanded in x around 0 64.7%
Taylor expanded in F around 0 62.3%
mul-1-neg62.3%
associate-/l*62.2%
Simplified62.2%
associate-/r/62.2%
clear-num62.2%
tan-quot62.2%
*-commutative62.2%
add-sqr-sqrt29.9%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod1.1%
add-sqr-sqrt2.1%
neg-sub02.1%
metadata-eval2.1%
sub-neg2.1%
add-sqr-sqrt1.1%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod29.9%
add-sqr-sqrt62.2%
metadata-eval62.2%
un-div-inv62.3%
Applied egg-rr62.3%
+-lft-identity62.3%
Simplified62.3%
Final simplification67.0%
(FPCore (F B x) :precision binary64 (if (<= F -2.5e-27) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F -1.9e-64) (/ (* F (sqrt 0.5)) (sin B)) (/ (- x) (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-27) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.9e-64) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = -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 <= (-2.5d-27)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.9d-64)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-27) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.9e-64) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.5e-27: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.9e-64: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.5e-27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.9e-64) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.5e-27) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.9e-64) tmp = (F * sqrt(0.5)) / sin(B); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.5e-27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.9e-64], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.5 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.9 \cdot 10^{-64}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -2.5000000000000001e-27Initial program 55.8%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 75.3%
if -2.5000000000000001e-27 < F < -1.9000000000000001e-64Initial program 98.7%
distribute-lft-neg-in98.7%
+-commutative98.7%
cancel-sign-sub-inv98.7%
Simplified99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in x around 0 78.2%
if -1.9000000000000001e-64 < F Initial program 77.1%
distribute-lft-neg-in77.1%
+-commutative77.1%
cancel-sign-sub-inv77.1%
Simplified85.9%
Taylor expanded in F around 0 61.9%
Taylor expanded in x around 0 64.7%
Taylor expanded in F around 0 62.3%
mul-1-neg62.3%
associate-/l*62.2%
Simplified62.2%
associate-/r/62.2%
clear-num62.2%
tan-quot62.2%
*-commutative62.2%
add-sqr-sqrt29.9%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod1.1%
add-sqr-sqrt2.1%
neg-sub02.1%
metadata-eval2.1%
sub-neg2.1%
add-sqr-sqrt1.1%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod29.9%
add-sqr-sqrt62.2%
metadata-eval62.2%
un-div-inv62.3%
Applied egg-rr62.3%
+-lft-identity62.3%
Simplified62.3%
Final simplification67.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.1e-27) (- (/ -1.0 (sin B)) (/ x (tan B))) (if (<= F -1.55e-64) (/ (* F (sqrt 0.5)) (sin B)) (/ (- x) (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-27) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.55e-64) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = -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 <= (-1.1d-27)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.55d-64)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-27) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.55e-64) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e-27: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.55e-64: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e-27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.55e-64) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.1e-27) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.55e-64) tmp = (F * sqrt(0.5)) / sin(B); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e-27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.55e-64], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-64}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -1.09999999999999993e-27Initial program 55.8%
Taylor expanded in F around -inf 98.9%
expm1-log1p-u54.1%
expm1-udef54.1%
div-inv54.1%
neg-mul-154.1%
fma-def54.1%
Applied egg-rr54.1%
expm1-def54.1%
expm1-log1p99.0%
rem-log-exp47.8%
fma-udef47.8%
neg-mul-147.8%
prod-exp41.2%
*-commutative41.2%
prod-exp47.8%
rem-log-exp99.0%
unsub-neg99.0%
Simplified99.0%
if -1.09999999999999993e-27 < F < -1.55000000000000012e-64Initial program 98.7%
distribute-lft-neg-in98.7%
+-commutative98.7%
cancel-sign-sub-inv98.7%
Simplified99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in x around 0 78.2%
if -1.55000000000000012e-64 < F Initial program 77.1%
distribute-lft-neg-in77.1%
+-commutative77.1%
cancel-sign-sub-inv77.1%
Simplified85.9%
Taylor expanded in F around 0 61.9%
Taylor expanded in x around 0 64.7%
Taylor expanded in F around 0 62.3%
mul-1-neg62.3%
associate-/l*62.2%
Simplified62.2%
associate-/r/62.2%
clear-num62.2%
tan-quot62.2%
*-commutative62.2%
add-sqr-sqrt29.9%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod1.1%
add-sqr-sqrt2.1%
neg-sub02.1%
metadata-eval2.1%
sub-neg2.1%
add-sqr-sqrt1.1%
sqrt-unprod19.7%
sqr-neg19.7%
sqrt-unprod29.9%
add-sqr-sqrt62.2%
metadata-eval62.2%
un-div-inv62.3%
Applied egg-rr62.3%
+-lft-identity62.3%
Simplified62.3%
Final simplification74.2%
(FPCore (F B x) :precision binary64 (if (<= F -2.1e-61) (- (/ -1.0 B) (/ x (tan B))) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-61) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = -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 <= (-2.1d-61)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-61) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-61: tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-61) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.1e-61) tmp = (-1.0 / B) - (x / tan(B)); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-61], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-61}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -2.0999999999999999e-61Initial program 60.7%
Taylor expanded in F around -inf 90.4%
Taylor expanded in B around 0 64.7%
+-commutative64.7%
unsub-neg64.7%
un-div-inv64.7%
Applied egg-rr64.7%
if -2.0999999999999999e-61 < F Initial program 77.2%
distribute-lft-neg-in77.2%
+-commutative77.2%
cancel-sign-sub-inv77.2%
Simplified85.9%
Taylor expanded in F around 0 62.1%
Taylor expanded in x around 0 64.9%
Taylor expanded in F around 0 61.9%
mul-1-neg61.9%
associate-/l*61.9%
Simplified61.9%
associate-/r/61.9%
clear-num61.8%
tan-quot61.9%
*-commutative61.9%
add-sqr-sqrt29.7%
sqrt-unprod19.6%
sqr-neg19.6%
sqrt-unprod1.1%
add-sqr-sqrt2.1%
neg-sub02.1%
metadata-eval2.1%
sub-neg2.1%
add-sqr-sqrt1.1%
sqrt-unprod19.6%
sqr-neg19.6%
sqrt-unprod29.7%
add-sqr-sqrt61.9%
metadata-eval61.9%
un-div-inv62.0%
Applied egg-rr62.0%
+-lft-identity62.0%
Simplified62.0%
Final simplification62.9%
(FPCore (F B x) :precision binary64 (if (<= F -4500.0) (- (/ -1.0 (sin B)) (/ x B)) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4500.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = -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 <= (-4500.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4500.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4500.0: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4500.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4500.0) tmp = (-1.0 / sin(B)) - (x / B); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4500:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -4500Initial program 54.1%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 75.6%
if -4500 < F Initial program 78.7%
distribute-lft-neg-in78.7%
+-commutative78.7%
cancel-sign-sub-inv78.7%
Simplified86.9%
Taylor expanded in F around 0 64.8%
Taylor expanded in x around 0 67.4%
Taylor expanded in F around 0 60.3%
mul-1-neg60.3%
associate-/l*60.3%
Simplified60.3%
associate-/r/60.3%
clear-num60.3%
tan-quot60.3%
*-commutative60.3%
add-sqr-sqrt28.8%
sqrt-unprod19.0%
sqr-neg19.0%
sqrt-unprod1.2%
add-sqr-sqrt2.2%
neg-sub02.2%
metadata-eval2.2%
sub-neg2.2%
add-sqr-sqrt1.2%
sqrt-unprod19.0%
sqr-neg19.0%
sqrt-unprod28.8%
add-sqr-sqrt60.3%
metadata-eval60.3%
un-div-inv60.4%
Applied egg-rr60.4%
+-lft-identity60.4%
Simplified60.4%
Final simplification64.9%
(FPCore (F B x) :precision binary64 (/ (- x) (tan B)))
double code(double F, double B, double x) {
return -x / tan(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 / tan(b)
end function
public static double code(double F, double B, double x) {
return -x / Math.tan(B);
}
def code(F, B, x): return -x / math.tan(B)
function code(F, B, x) return Float64(Float64(-x) / tan(B)) end
function tmp = code(F, B, x) tmp = -x / tan(B); end
code[F_, B_, x_] := N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{\tan B}
\end{array}
Initial program 71.5%
distribute-lft-neg-in71.5%
+-commutative71.5%
cancel-sign-sub-inv71.5%
Simplified82.0%
Taylor expanded in F around 0 52.4%
Taylor expanded in x around 0 55.8%
Taylor expanded in F around 0 56.2%
mul-1-neg56.2%
associate-/l*56.2%
Simplified56.2%
associate-/r/56.2%
clear-num56.2%
tan-quot56.2%
*-commutative56.2%
add-sqr-sqrt26.1%
sqrt-unprod16.7%
sqr-neg16.7%
sqrt-unprod1.2%
add-sqr-sqrt2.2%
neg-sub02.2%
metadata-eval2.2%
sub-neg2.2%
add-sqr-sqrt1.2%
sqrt-unprod16.7%
sqr-neg16.7%
sqrt-unprod26.1%
add-sqr-sqrt56.2%
metadata-eval56.2%
un-div-inv56.3%
Applied egg-rr56.3%
+-lft-identity56.3%
Simplified56.3%
Final simplification56.3%
(FPCore (F B x) :precision binary64 (if (<= F -5e-63) (+ (* 0.3333333333333333 (* x B)) (/ (- -1.0 x) B)) (- (* B (* x (- -0.3333333333333333))) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e-63) {
tmp = (0.3333333333333333 * (x * B)) + ((-1.0 - x) / B);
} else {
tmp = (B * (x * -(-0.3333333333333333))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5d-63)) then
tmp = (0.3333333333333333d0 * (x * b)) + (((-1.0d0) - x) / b)
else
tmp = (b * (x * -(-0.3333333333333333d0))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5e-63) {
tmp = (0.3333333333333333 * (x * B)) + ((-1.0 - x) / B);
} else {
tmp = (B * (x * -(-0.3333333333333333))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e-63: tmp = (0.3333333333333333 * (x * B)) + ((-1.0 - x) / B) else: tmp = (B * (x * -(-0.3333333333333333))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e-63) tmp = Float64(Float64(0.3333333333333333 * Float64(x * B)) + Float64(Float64(-1.0 - x) / B)); else tmp = Float64(Float64(B * Float64(x * Float64(-(-0.3333333333333333)))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e-63) tmp = (0.3333333333333333 * (x * B)) + ((-1.0 - x) / B); else tmp = (B * (x * -(-0.3333333333333333))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e-63], N[(N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(N[(B * N[(x * (--0.3333333333333333)), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-63}:\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot B\right) + \frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot \left(--0.3333333333333333\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.0000000000000002e-63Initial program 60.7%
Taylor expanded in F around -inf 90.4%
Taylor expanded in B around 0 64.7%
Taylor expanded in B around 0 43.7%
+-commutative43.7%
mul-1-neg43.7%
unsub-neg43.7%
Simplified43.7%
if -5.0000000000000002e-63 < F Initial program 77.2%
distribute-lft-neg-in77.2%
+-commutative77.2%
cancel-sign-sub-inv77.2%
Simplified85.9%
Taylor expanded in F around 0 62.1%
Taylor expanded in x around 0 64.9%
Taylor expanded in F around 0 61.9%
mul-1-neg61.9%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in B around 0 28.7%
*-commutative28.7%
distribute-rgt-out--28.7%
metadata-eval28.7%
Simplified28.7%
Final simplification33.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.7e-61) (/ (- -1.0 x) B) (- (* B (* x (- -0.3333333333333333))) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e-61) {
tmp = (-1.0 - x) / B;
} else {
tmp = (B * (x * -(-0.3333333333333333))) - (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.7d-61)) then
tmp = ((-1.0d0) - x) / b
else
tmp = (b * (x * -(-0.3333333333333333d0))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e-61) {
tmp = (-1.0 - x) / B;
} else {
tmp = (B * (x * -(-0.3333333333333333))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.7e-61: tmp = (-1.0 - x) / B else: tmp = (B * (x * -(-0.3333333333333333))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.7e-61) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(B * Float64(x * Float64(-(-0.3333333333333333)))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.7e-61) tmp = (-1.0 - x) / B; else tmp = (B * (x * -(-0.3333333333333333))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.7e-61], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(B * N[(x * (--0.3333333333333333)), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.7 \cdot 10^{-61}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(x \cdot \left(--0.3333333333333333\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.69999999999999993e-61Initial program 60.7%
Taylor expanded in F around -inf 90.4%
Taylor expanded in B around 0 43.4%
associate-*r/43.4%
distribute-lft-in43.4%
metadata-eval43.4%
neg-mul-143.4%
Simplified43.4%
Taylor expanded in B around 0 43.4%
associate-*r/43.4%
distribute-lft-in43.4%
metadata-eval43.4%
neg-mul-143.4%
sub-neg43.4%
Simplified43.4%
if -2.69999999999999993e-61 < F Initial program 77.2%
distribute-lft-neg-in77.2%
+-commutative77.2%
cancel-sign-sub-inv77.2%
Simplified85.9%
Taylor expanded in F around 0 62.1%
Taylor expanded in x around 0 64.9%
Taylor expanded in F around 0 61.9%
mul-1-neg61.9%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in B around 0 28.7%
*-commutative28.7%
distribute-rgt-out--28.7%
metadata-eval28.7%
Simplified28.7%
Final simplification33.7%
(FPCore (F B x) :precision binary64 (if (or (<= x -6.8e-234) (not (<= x 6.2e-72))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -6.8e-234) || !(x <= 6.2e-72)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-6.8d-234)) .or. (.not. (x <= 6.2d-72))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -6.8e-234) || !(x <= 6.2e-72)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -6.8e-234) or not (x <= 6.2e-72): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -6.8e-234) || !(x <= 6.2e-72)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -6.8e-234) || ~((x <= 6.2e-72))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -6.8e-234], N[Not[LessEqual[x, 6.2e-72]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{-234} \lor \neg \left(x \leq 6.2 \cdot 10^{-72}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -6.79999999999999971e-234 or 6.1999999999999996e-72 < x Initial program 76.4%
Taylor expanded in F around -inf 72.1%
Taylor expanded in B around 0 32.4%
associate-*r/32.4%
distribute-lft-in32.4%
metadata-eval32.4%
neg-mul-132.4%
Simplified32.4%
Taylor expanded in x around inf 35.8%
mul-1-neg35.8%
distribute-neg-frac35.8%
Simplified35.8%
if -6.79999999999999971e-234 < x < 6.1999999999999996e-72Initial program 59.7%
Taylor expanded in F around -inf 25.1%
Taylor expanded in B around 0 19.4%
associate-*r/19.4%
distribute-lft-in19.4%
metadata-eval19.4%
neg-mul-119.4%
Simplified19.4%
Taylor expanded in x around 0 19.4%
Final simplification31.0%
(FPCore (F B x) :precision binary64 (if (<= F -2e-63) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-63) {
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 <= (-2d-63)) 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 <= -2e-63) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-63: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-63) 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 <= -2e-63) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-63], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-63}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -2.00000000000000013e-63Initial program 60.7%
Taylor expanded in F around -inf 90.4%
Taylor expanded in B around 0 43.4%
associate-*r/43.4%
distribute-lft-in43.4%
metadata-eval43.4%
neg-mul-143.4%
Simplified43.4%
Taylor expanded in B around 0 43.4%
associate-*r/43.4%
distribute-lft-in43.4%
metadata-eval43.4%
neg-mul-143.4%
sub-neg43.4%
Simplified43.4%
if -2.00000000000000013e-63 < F Initial program 77.2%
Taylor expanded in F around -inf 41.5%
Taylor expanded in B around 0 20.8%
associate-*r/20.8%
distribute-lft-in20.8%
metadata-eval20.8%
neg-mul-120.8%
Simplified20.8%
Taylor expanded in x around inf 28.7%
mul-1-neg28.7%
distribute-neg-frac28.7%
Simplified28.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 71.5%
Taylor expanded in F around -inf 58.3%
Taylor expanded in B around 0 28.6%
associate-*r/28.6%
distribute-lft-in28.6%
metadata-eval28.6%
neg-mul-128.6%
Simplified28.6%
Taylor expanded in x around 0 9.9%
Final simplification9.9%
herbie shell --seed 2023263
(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))))))