
(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 31 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 -2.8e+44)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 140000000.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.8e+44) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 140000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.8d+44)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 140000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.8e+44) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 140000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.8e+44: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 140000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.8e+44) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 140000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.8e+44) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 140000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+44], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 140000000.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] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+44}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 140000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.8000000000000001e44Initial program 54.9%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.7%
Applied egg-rr99.7%
if -2.8000000000000001e44 < F < 1.4e8Initial program 99.5%
div-inv99.6%
expm1-log1p-u73.4%
expm1-udef53.9%
Applied egg-rr53.9%
expm1-def73.4%
expm1-log1p99.6%
Simplified99.6%
if 1.4e8 < F Initial program 58.1%
Taylor expanded in F around inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= x -1.0)
(+ t_0 (* F (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) (sin B))))
(+ t_0 (/ (/ F (hypot F (sqrt (fma 2.0 x 2.0)))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (x <= -1.0) {
tmp = t_0 + (F * (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / sin(B)));
} else {
tmp = t_0 + ((F / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (x <= -1.0) tmp = Float64(t_0 + Float64(F * Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / sin(B)))); else tmp = Float64(t_0 + Float64(Float64(F / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.0], N[(t$95$0 + N[(F * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(F / N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;x \leq -1:\\
\;\;\;\;t_0 + F \cdot \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{\frac{F}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}{\sin B}\\
\end{array}
\end{array}
if x < -1Initial program 68.9%
expm1-log1p-u49.8%
expm1-udef49.8%
Applied egg-rr49.8%
expm1-def49.8%
expm1-log1p68.9%
associate-*r/98.7%
associate-*l/98.7%
*-commutative98.7%
Simplified98.7%
if -1 < x Initial program 78.7%
add-sqr-sqrt78.7%
unpow-prod-down78.7%
+-commutative78.7%
fma-def78.7%
fma-def78.7%
metadata-eval78.7%
metadata-eval78.7%
+-commutative78.7%
fma-def78.7%
fma-def78.7%
metadata-eval78.7%
metadata-eval78.7%
Applied egg-rr78.7%
pow-sqr78.7%
metadata-eval78.7%
unpow-178.7%
fma-udef78.7%
fma-udef78.7%
unpow278.7%
associate-+r+78.7%
+-commutative78.7%
associate-+l+78.7%
unpow278.7%
+-commutative78.7%
unpow178.7%
sqr-pow78.7%
hypot-def90.5%
metadata-eval90.5%
unpow1/290.5%
+-commutative90.5%
fma-def90.5%
Simplified90.5%
associate-*l/99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Final simplification99.5%
(FPCore (F B x)
:precision binary64
(if (<= x -1.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(+
(* x (/ -1.0 (tan B)))
(/ (/ F (hypot F (sqrt (fma 2.0 x 2.0)))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (x <= -1.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else {
tmp = (x * (-1.0 / tan(B))) + ((F / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[x, -1.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}{\sin B}\\
\end{array}
\end{array}
if x < -1Initial program 68.9%
Taylor expanded in F around -inf 97.9%
+-commutative97.9%
unsub-neg97.9%
un-div-inv97.9%
Applied egg-rr97.9%
if -1 < x Initial program 78.7%
add-sqr-sqrt78.7%
unpow-prod-down78.7%
+-commutative78.7%
fma-def78.7%
fma-def78.7%
metadata-eval78.7%
metadata-eval78.7%
+-commutative78.7%
fma-def78.7%
fma-def78.7%
metadata-eval78.7%
metadata-eval78.7%
Applied egg-rr78.7%
pow-sqr78.7%
metadata-eval78.7%
unpow-178.7%
fma-udef78.7%
fma-udef78.7%
unpow278.7%
associate-+r+78.7%
+-commutative78.7%
associate-+l+78.7%
unpow278.7%
+-commutative78.7%
unpow178.7%
sqr-pow78.7%
hypot-def90.5%
metadata-eval90.5%
unpow1/290.5%
+-commutative90.5%
fma-def90.5%
Simplified90.5%
associate-*l/99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.4%
Taylor expanded in F around -inf 98.2%
+-commutative98.2%
unsub-neg98.2%
un-div-inv98.2%
Applied egg-rr98.2%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.5%
div-inv99.6%
expm1-log1p-u74.0%
expm1-udef52.3%
Applied egg-rr52.3%
expm1-def74.0%
expm1-log1p99.6%
Simplified99.6%
Taylor expanded in F around 0 98.8%
if 1.4199999999999999 < F Initial program 58.7%
Taylor expanded in F around inf 98.5%
+-commutative98.5%
unsub-neg98.5%
un-div-inv98.6%
Applied egg-rr98.6%
Final simplification98.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.35)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(+ (* x (/ -1.0 (tan B))) (/ (* F (sqrt 0.5)) (sin B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.35) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (x * (-1.0 / tan(B))) + ((F * sqrt(0.5)) / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.35d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f * sqrt(0.5d0)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.35) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F * Math.sqrt(0.5)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.35: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (x * (-1.0 / math.tan(B))) + ((F * math.sqrt(0.5)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.35) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F * sqrt(0.5)) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.35) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (x * (-1.0 / tan(B))) + ((F * sqrt(0.5)) / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / 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.35:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3500000000000001Initial program 61.4%
Taylor expanded in F around -inf 98.2%
+-commutative98.2%
unsub-neg98.2%
un-div-inv98.2%
Applied egg-rr98.2%
if -1.3500000000000001 < F < 1.3999999999999999Initial program 99.5%
expm1-log1p-u90.1%
expm1-udef71.7%
Applied egg-rr71.7%
expm1-def90.1%
expm1-log1p99.5%
associate-*r/99.5%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 98.7%
Taylor expanded in x around 0 98.6%
if 1.3999999999999999 < F Initial program 58.7%
Taylor expanded in F around inf 98.5%
+-commutative98.5%
unsub-neg98.5%
un-div-inv98.6%
Applied egg-rr98.6%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -3e+36)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.6e-94)
t_0
(if (<= F 3e-216)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 42000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -3e+36) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.6e-94) {
tmp = t_0;
} else if (F <= 3e-216) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 42000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-3d+36)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.6d-94)) then
tmp = t_0
else if (f <= 3d-216) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 42000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3e+36) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.6e-94) {
tmp = t_0;
} else if (F <= 3e-216) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 42000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -3e+36: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.6e-94: tmp = t_0 elif F <= 3e-216: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 42000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3e+36) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.6e-94) tmp = t_0; elseif (F <= 3e-216) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 42000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -3e+36) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.6e-94) tmp = t_0; elseif (F <= 3e-216) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 42000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.6e-94], t$95$0, If[LessEqual[F, 3e-216], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 42000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+36}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-94}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-216}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 42000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -3e36Initial program 57.9%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.7%
Applied egg-rr99.7%
if -3e36 < F < -4.5999999999999999e-94 or 3.00000000000000013e-216 < F < 42000Initial program 99.4%
Taylor expanded in B around 0 73.8%
if -4.5999999999999999e-94 < F < 3.00000000000000013e-216Initial program 99.6%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 87.2%
if 42000 < F Initial program 58.1%
Taylor expanded in F around inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification90.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -11000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.1e-6)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F 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 <= -11000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.1e-6) {
tmp = (x * (-1.0 / tan(B))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= (-11000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.1d-6) then
tmp = (x * ((-1.0d0) / tan(b))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / 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 <= -11000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.1e-6) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= -11000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.1e-6: tmp = (x * (-1.0 / math.tan(B))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 <= -11000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.1e-6) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -11000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.1e-6) tmp = (x * (-1.0 / tan(B))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / 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, -11000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.1e-6], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $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 -11000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -11000Initial program 60.4%
Taylor expanded in F around -inf 99.6%
+-commutative99.6%
unsub-neg99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if -11000 < F < 2.0999999999999998e-6Initial program 99.5%
Taylor expanded in B around 0 86.1%
if 2.0999999999999998e-6 < F Initial program 59.4%
Taylor expanded in F around inf 97.1%
+-commutative97.1%
unsub-neg97.1%
un-div-inv97.2%
Applied egg-rr97.2%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (/ F (sqrt (+ 2.0 (* x 2.0)))) (sin B)) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -0.18)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.6e-94)
t_0
(if (<= F 2.6e-218)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 0.0115) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sqrt((2.0 + (x * 2.0)))) / sin(B)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.18) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.6e-94) {
tmp = t_0;
} else if (F <= 2.6e-218) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 0.0115) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sqrt((2.0d0 + (x * 2.0d0)))) / sin(b)) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.18d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.6d-94)) then
tmp = t_0
else if (f <= 2.6d-218) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 0.0115d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sqrt((2.0 + (x * 2.0)))) / Math.sin(B)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.18) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.6e-94) {
tmp = t_0;
} else if (F <= 2.6e-218) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 0.0115) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sqrt((2.0 + (x * 2.0)))) / math.sin(B)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.18: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.6e-94: tmp = t_0 elif F <= 2.6e-218: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 0.0115: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sqrt(Float64(2.0 + Float64(x * 2.0)))) / sin(B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.18) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.6e-94) tmp = t_0; elseif (F <= 2.6e-218) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 0.0115) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sqrt((2.0 + (x * 2.0)))) / sin(B)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.18) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.6e-94) tmp = t_0; elseif (F <= 2.6e-218) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 0.0115) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.6e-94], t$95$0, If[LessEqual[F, 2.6e-218], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 0.0115], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{F}{\sqrt{2 + x \cdot 2}}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.18:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-94}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-218}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 0.0115:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -0.17999999999999999Initial program 61.4%
Taylor expanded in F around -inf 98.2%
+-commutative98.2%
unsub-neg98.2%
un-div-inv98.2%
Applied egg-rr98.2%
if -0.17999999999999999 < F < -4.5999999999999999e-94 or 2.59999999999999983e-218 < F < 0.0115Initial program 99.4%
add-sqr-sqrt99.3%
unpow-prod-down99.3%
+-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
+-commutative99.3%
fma-def99.3%
fma-def99.3%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr99.3%
pow-sqr99.3%
metadata-eval99.3%
unpow-199.3%
fma-udef99.3%
fma-udef99.3%
unpow299.3%
associate-+r+99.3%
+-commutative99.3%
associate-+l+99.3%
unpow299.3%
+-commutative99.3%
unpow199.3%
sqr-pow99.3%
hypot-def99.3%
metadata-eval99.3%
unpow1/299.3%
+-commutative99.3%
fma-def99.3%
Simplified99.3%
associate-*l/99.4%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 70.6%
Taylor expanded in F around 0 69.1%
if -4.5999999999999999e-94 < F < 2.59999999999999983e-218Initial program 99.6%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 87.2%
if 0.0115 < F Initial program 58.7%
Taylor expanded in F around inf 98.5%
+-commutative98.5%
unsub-neg98.5%
un-div-inv98.6%
Applied egg-rr98.6%
Final simplification88.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -0.042)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.6e-94)
(- (* F (/ (sqrt (/ 1.0 t_0)) (sin B))) (/ x B))
(if (<= F 1.7e-218)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 0.019)
(- (/ (/ F (sqrt t_0)) (sin B)) (/ x B))
(- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.042) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.6e-94) {
tmp = (F * (sqrt((1.0 / t_0)) / sin(B))) - (x / B);
} else if (F <= 1.7e-218) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 0.019) {
tmp = ((F / sqrt(t_0)) / sin(B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
t_1 = x / tan(b)
if (f <= (-0.042d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.6d-94)) then
tmp = (f * (sqrt((1.0d0 / t_0)) / sin(b))) - (x / b)
else if (f <= 1.7d-218) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 0.019d0) then
tmp = ((f / sqrt(t_0)) / sin(b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.042) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.6e-94) {
tmp = (F * (Math.sqrt((1.0 / t_0)) / Math.sin(B))) - (x / B);
} else if (F <= 1.7e-218) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 0.019) {
tmp = ((F / Math.sqrt(t_0)) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -0.042: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.6e-94: tmp = (F * (math.sqrt((1.0 / t_0)) / math.sin(B))) - (x / B) elif F <= 1.7e-218: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 0.019: tmp = ((F / math.sqrt(t_0)) / math.sin(B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.042) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.6e-94) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / t_0)) / sin(B))) - Float64(x / B)); elseif (F <= 1.7e-218) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 0.019) tmp = Float64(Float64(Float64(F / sqrt(t_0)) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.042) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.6e-94) tmp = (F * (sqrt((1.0 / t_0)) / sin(B))) - (x / B); elseif (F <= 1.7e-218) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 0.019) tmp = ((F / sqrt(t_0)) / sin(B)) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.042], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.6e-94], N[(N[(F * N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-218], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 0.019], N[(N[(N[(F / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.042:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-94}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{t_0}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-218}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 0.019:\\
\;\;\;\;\frac{\frac{F}{\sqrt{t_0}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -0.0420000000000000026Initial program 61.4%
Taylor expanded in F around -inf 98.2%
+-commutative98.2%
unsub-neg98.2%
un-div-inv98.2%
Applied egg-rr98.2%
if -0.0420000000000000026 < F < -4.5999999999999999e-94Initial program 99.6%
expm1-log1p-u73.3%
expm1-udef52.8%
Applied egg-rr52.8%
expm1-def73.3%
expm1-log1p99.6%
associate-*r/99.5%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in F around 0 95.8%
Taylor expanded in B around 0 71.7%
if -4.5999999999999999e-94 < F < 1.69999999999999993e-218Initial program 99.6%
Taylor expanded in F around -inf 39.6%
Taylor expanded in x around inf 87.2%
if 1.69999999999999993e-218 < F < 0.0189999999999999995Initial program 99.3%
add-sqr-sqrt99.3%
unpow-prod-down99.2%
+-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
+-commutative99.2%
fma-def99.2%
fma-def99.2%
metadata-eval99.2%
metadata-eval99.2%
Applied egg-rr99.2%
pow-sqr99.3%
metadata-eval99.3%
unpow-199.3%
fma-udef99.3%
fma-udef99.3%
unpow299.3%
associate-+r+99.3%
+-commutative99.3%
associate-+l+99.3%
unpow299.3%
+-commutative99.3%
unpow199.3%
sqr-pow99.3%
hypot-def99.3%
metadata-eval99.3%
unpow1/299.3%
+-commutative99.3%
fma-def99.3%
Simplified99.3%
associate-*l/99.4%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 69.0%
Taylor expanded in F around 0 68.3%
if 0.0189999999999999995 < F Initial program 58.7%
Taylor expanded in F around inf 98.5%
+-commutative98.5%
unsub-neg98.5%
un-div-inv98.6%
Applied egg-rr98.6%
Final simplification88.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.2e-75)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.4e-216)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 1.08e-176)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 7e-54)
(/ (- x) (/ (sin B) (cos 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 <= -7.2e-75) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.4e-216) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 1.08e-176) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 7e-54) {
tmp = -x / (sin(B) / cos(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 <= (-7.2d-75)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.4d-216) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 1.08d-176) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 7d-54) then
tmp = -x / (sin(b) / cos(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 <= -7.2e-75) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.4e-216) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.08e-176) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 7e-54) {
tmp = -x / (Math.sin(B) / Math.cos(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 <= -7.2e-75: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.4e-216: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 1.08e-176: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 7e-54: tmp = -x / (math.sin(B) / math.cos(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 <= -7.2e-75) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.4e-216) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.08e-176) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 7e-54) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.2e-75) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.4e-216) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 1.08e-176) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 7e-54) tmp = -x / (sin(B) / cos(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, -7.2e-75], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.4e-216], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 1.08e-176], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-54], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[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 -7.2 \cdot 10^{-75}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-216}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{-176}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-54}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.2000000000000001e-75Initial program 65.5%
Taylor expanded in F around -inf 91.4%
+-commutative91.4%
unsub-neg91.4%
un-div-inv91.5%
Applied egg-rr91.5%
if -7.2000000000000001e-75 < F < 3.3999999999999998e-216Initial program 99.6%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 83.3%
if 3.3999999999999998e-216 < F < 1.0800000000000001e-176Initial program 99.5%
Taylor expanded in B around 0 99.5%
Taylor expanded in B around 0 99.8%
if 1.0800000000000001e-176 < F < 6.99999999999999964e-54Initial program 99.2%
Taylor expanded in F around -inf 39.1%
Taylor expanded in x around inf 54.0%
mul-1-neg54.0%
associate-/l*54.0%
distribute-neg-frac54.0%
Simplified54.0%
if 6.99999999999999964e-54 < F Initial program 64.1%
Taylor expanded in F around inf 89.5%
+-commutative89.5%
unsub-neg89.5%
un-div-inv89.6%
Applied egg-rr89.6%
Final simplification85.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (/ (sin B) (cos B)))) (t_1 (/ (+ 2.0 (* x 2.0)) F)))
(if (<= F -7.4e-51)
(- (/ (/ F (- (* -0.5 t_1) F)) (sin B)) (/ x B))
(if (<= F 5.6e-216)
t_0
(if (<= F 9.2e-177)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.1e-7)
t_0
(if (<= F 8.5e+148)
(- (/ (/ F (+ F (* 0.5 t_1))) (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = -x / (sin(B) / cos(B));
double t_1 = (2.0 + (x * 2.0)) / F;
double tmp;
if (F <= -7.4e-51) {
tmp = ((F / ((-0.5 * t_1) - F)) / sin(B)) - (x / B);
} else if (F <= 5.6e-216) {
tmp = t_0;
} else if (F <= 9.2e-177) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.1e-7) {
tmp = t_0;
} else if (F <= 8.5e+148) {
tmp = ((F / (F + (0.5 * t_1))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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) :: t_1
real(8) :: tmp
t_0 = -x / (sin(b) / cos(b))
t_1 = (2.0d0 + (x * 2.0d0)) / f
if (f <= (-7.4d-51)) then
tmp = ((f / (((-0.5d0) * t_1) - f)) / sin(b)) - (x / b)
else if (f <= 5.6d-216) then
tmp = t_0
else if (f <= 9.2d-177) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.1d-7) then
tmp = t_0
else if (f <= 8.5d+148) then
tmp = ((f / (f + (0.5d0 * t_1))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / (Math.sin(B) / Math.cos(B));
double t_1 = (2.0 + (x * 2.0)) / F;
double tmp;
if (F <= -7.4e-51) {
tmp = ((F / ((-0.5 * t_1) - F)) / Math.sin(B)) - (x / B);
} else if (F <= 5.6e-216) {
tmp = t_0;
} else if (F <= 9.2e-177) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.1e-7) {
tmp = t_0;
} else if (F <= 8.5e+148) {
tmp = ((F / (F + (0.5 * t_1))) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = -x / (math.sin(B) / math.cos(B)) t_1 = (2.0 + (x * 2.0)) / F tmp = 0 if F <= -7.4e-51: tmp = ((F / ((-0.5 * t_1) - F)) / math.sin(B)) - (x / B) elif F <= 5.6e-216: tmp = t_0 elif F <= 9.2e-177: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.1e-7: tmp = t_0 elif F <= 8.5e+148: tmp = ((F / (F + (0.5 * t_1))) / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / Float64(sin(B) / cos(B))) t_1 = Float64(Float64(2.0 + Float64(x * 2.0)) / F) tmp = 0.0 if (F <= -7.4e-51) tmp = Float64(Float64(Float64(F / Float64(Float64(-0.5 * t_1) - F)) / sin(B)) - Float64(x / B)); elseif (F <= 5.6e-216) tmp = t_0; elseif (F <= 9.2e-177) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.1e-7) tmp = t_0; elseif (F <= 8.5e+148) tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * t_1))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / (sin(B) / cos(B)); t_1 = (2.0 + (x * 2.0)) / F; tmp = 0.0; if (F <= -7.4e-51) tmp = ((F / ((-0.5 * t_1) - F)) / sin(B)) - (x / B); elseif (F <= 5.6e-216) tmp = t_0; elseif (F <= 9.2e-177) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.1e-7) tmp = t_0; elseif (F <= 8.5e+148) tmp = ((F / (F + (0.5 * t_1))) / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]}, If[LessEqual[F, -7.4e-51], N[(N[(N[(F / N[(N[(-0.5 * t$95$1), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-216], t$95$0, If[LessEqual[F, 9.2e-177], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.1e-7], t$95$0, If[LessEqual[F, 8.5e+148], N[(N[(N[(F / N[(F + N[(0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\frac{\sin B}{\cos B}}\\
t_1 := \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;F \leq -7.4 \cdot 10^{-51}:\\
\;\;\;\;\frac{\frac{F}{-0.5 \cdot t_1 - F}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-216}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-177}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{-7}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+148}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot t_1}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -7.39999999999999946e-51Initial program 64.0%
add-sqr-sqrt64.0%
unpow-prod-down63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
Applied egg-rr63.9%
pow-sqr63.9%
metadata-eval63.9%
unpow-163.9%
fma-udef63.9%
fma-udef63.9%
unpow263.9%
associate-+r+63.9%
+-commutative63.9%
associate-+l+63.9%
unpow263.9%
+-commutative63.9%
unpow163.9%
sqr-pow52.6%
hypot-def72.1%
metadata-eval72.1%
unpow1/272.1%
+-commutative72.1%
fma-def72.1%
Simplified72.1%
associate-*l/84.9%
un-div-inv84.9%
Applied egg-rr84.9%
Taylor expanded in B around 0 74.2%
Taylor expanded in F around -inf 75.3%
if -7.39999999999999946e-51 < F < 5.6e-216 or 9.20000000000000087e-177 < F < 4.0999999999999999e-7Initial program 99.5%
Taylor expanded in F around -inf 39.1%
Taylor expanded in x around inf 70.5%
mul-1-neg70.5%
associate-/l*70.4%
distribute-neg-frac70.4%
Simplified70.4%
if 5.6e-216 < F < 9.20000000000000087e-177Initial program 99.5%
Taylor expanded in B around 0 99.5%
Taylor expanded in B around 0 99.8%
if 4.0999999999999999e-7 < F < 8.4999999999999996e148Initial program 92.6%
add-sqr-sqrt92.6%
unpow-prod-down92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
Applied egg-rr92.5%
pow-sqr92.7%
metadata-eval92.7%
unpow-192.7%
fma-udef92.7%
fma-udef92.7%
unpow292.7%
associate-+r+92.7%
+-commutative92.7%
associate-+l+92.7%
unpow292.7%
+-commutative92.7%
unpow192.7%
sqr-pow82.3%
hypot-def82.3%
metadata-eval82.3%
unpow1/282.3%
+-commutative82.3%
fma-def82.3%
Simplified82.3%
associate-*l/89.2%
un-div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in B around 0 89.4%
Taylor expanded in F around inf 85.0%
if 8.4999999999999996e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification77.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (+ 2.0 (* x 2.0)) F)))
(if (<= F -1.9e-53)
(- (/ (/ F (- (* -0.5 t_0) F)) (sin B)) (/ x B))
(if (<= F 7.5e-216)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 9.2e-177)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.9e-8)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 7.5e+148)
(- (/ (/ F (+ F (* 0.5 t_0))) (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))))
double code(double F, double B, double x) {
double t_0 = (2.0 + (x * 2.0)) / F;
double tmp;
if (F <= -1.9e-53) {
tmp = ((F / ((-0.5 * t_0) - F)) / sin(B)) - (x / B);
} else if (F <= 7.5e-216) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 9.2e-177) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.9e-8) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 7.5e+148) {
tmp = ((F / (F + (0.5 * t_0))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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 = (2.0d0 + (x * 2.0d0)) / f
if (f <= (-1.9d-53)) then
tmp = ((f / (((-0.5d0) * t_0) - f)) / sin(b)) - (x / b)
else if (f <= 7.5d-216) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 9.2d-177) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.9d-8) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 7.5d+148) then
tmp = ((f / (f + (0.5d0 * t_0))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (2.0 + (x * 2.0)) / F;
double tmp;
if (F <= -1.9e-53) {
tmp = ((F / ((-0.5 * t_0) - F)) / Math.sin(B)) - (x / B);
} else if (F <= 7.5e-216) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 9.2e-177) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.9e-8) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 7.5e+148) {
tmp = ((F / (F + (0.5 * t_0))) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = (2.0 + (x * 2.0)) / F tmp = 0 if F <= -1.9e-53: tmp = ((F / ((-0.5 * t_0) - F)) / math.sin(B)) - (x / B) elif F <= 7.5e-216: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 9.2e-177: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.9e-8: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 7.5e+148: tmp = ((F / (F + (0.5 * t_0))) / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(x * 2.0)) / F) tmp = 0.0 if (F <= -1.9e-53) tmp = Float64(Float64(Float64(F / Float64(Float64(-0.5 * t_0) - F)) / sin(B)) - Float64(x / B)); elseif (F <= 7.5e-216) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 9.2e-177) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.9e-8) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 7.5e+148) tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * t_0))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (2.0 + (x * 2.0)) / F; tmp = 0.0; if (F <= -1.9e-53) tmp = ((F / ((-0.5 * t_0) - F)) / sin(B)) - (x / B); elseif (F <= 7.5e-216) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 9.2e-177) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.9e-8) tmp = -x / (sin(B) / cos(B)); elseif (F <= 7.5e+148) tmp = ((F / (F + (0.5 * t_0))) / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]}, If[LessEqual[F, -1.9e-53], N[(N[(N[(F / N[(N[(-0.5 * t$95$0), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-216], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 9.2e-177], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.9e-8], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e+148], N[(N[(N[(F / N[(F + N[(0.5 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{F}{-0.5 \cdot t_0 - F}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-216}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-177}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.9 \cdot 10^{-8}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+148}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot t_0}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.8999999999999999e-53Initial program 64.0%
add-sqr-sqrt64.0%
unpow-prod-down63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
Applied egg-rr63.9%
pow-sqr63.9%
metadata-eval63.9%
unpow-163.9%
fma-udef63.9%
fma-udef63.9%
unpow263.9%
associate-+r+63.9%
+-commutative63.9%
associate-+l+63.9%
unpow263.9%
+-commutative63.9%
unpow163.9%
sqr-pow52.6%
hypot-def72.1%
metadata-eval72.1%
unpow1/272.1%
+-commutative72.1%
fma-def72.1%
Simplified72.1%
associate-*l/84.9%
un-div-inv84.9%
Applied egg-rr84.9%
Taylor expanded in B around 0 74.2%
Taylor expanded in F around -inf 75.3%
if -1.8999999999999999e-53 < F < 7.50000000000000064e-216Initial program 99.7%
Taylor expanded in F around -inf 40.2%
Taylor expanded in x around inf 82.8%
if 7.50000000000000064e-216 < F < 9.20000000000000087e-177Initial program 99.5%
Taylor expanded in B around 0 99.5%
Taylor expanded in B around 0 99.8%
if 9.20000000000000087e-177 < F < 4.9000000000000002e-8Initial program 99.3%
Taylor expanded in F around -inf 37.2%
Taylor expanded in x around inf 49.6%
mul-1-neg49.6%
associate-/l*49.6%
distribute-neg-frac49.6%
Simplified49.6%
if 4.9000000000000002e-8 < F < 7.50000000000000008e148Initial program 92.6%
add-sqr-sqrt92.6%
unpow-prod-down92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
Applied egg-rr92.5%
pow-sqr92.7%
metadata-eval92.7%
unpow-192.7%
fma-udef92.7%
fma-udef92.7%
unpow292.7%
associate-+r+92.7%
+-commutative92.7%
associate-+l+92.7%
unpow292.7%
+-commutative92.7%
unpow192.7%
sqr-pow82.3%
hypot-def82.3%
metadata-eval82.3%
unpow1/282.3%
+-commutative82.3%
fma-def82.3%
Simplified82.3%
associate-*l/89.2%
un-div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in B around 0 89.4%
Taylor expanded in F around inf 85.0%
if 7.50000000000000008e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification77.2%
(FPCore (F B x)
:precision binary64
(if (<= F -2.6e-74)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 8.8e-221)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 1e-176)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4e-7)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 8.5e+148)
(- (/ (/ F (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))) (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.6e-74) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 8.8e-221) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 1e-176) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4e-7) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 8.5e+148) {
tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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.6d-74)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 8.8d-221) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 1d-176) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4d-7) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 8.5d+148) then
tmp = ((f / (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.6e-74) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 8.8e-221) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1e-176) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4e-7) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 8.5e+148) {
tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.6e-74: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 8.8e-221: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 1e-176: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4e-7: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 8.5e+148: tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.6e-74) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 8.8e-221) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1e-176) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4e-7) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 8.5e+148) tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.6e-74) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 8.8e-221) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 1e-176) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4e-7) tmp = -x / (sin(B) / cos(B)); elseif (F <= 8.5e+148) tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.6e-74], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.8e-221], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 1e-176], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-7], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e+148], N[(N[(N[(F / N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.6 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-221}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 10^{-176}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-7}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+148}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -2.6000000000000001e-74Initial program 65.5%
Taylor expanded in F around -inf 91.4%
+-commutative91.4%
unsub-neg91.4%
un-div-inv91.5%
Applied egg-rr91.5%
if -2.6000000000000001e-74 < F < 8.80000000000000005e-221Initial program 99.6%
Taylor expanded in F around -inf 37.7%
Taylor expanded in x around inf 83.3%
if 8.80000000000000005e-221 < F < 1e-176Initial program 99.5%
Taylor expanded in B around 0 99.5%
Taylor expanded in B around 0 99.8%
if 1e-176 < F < 3.9999999999999998e-7Initial program 99.3%
Taylor expanded in F around -inf 37.2%
Taylor expanded in x around inf 49.6%
mul-1-neg49.6%
associate-/l*49.6%
distribute-neg-frac49.6%
Simplified49.6%
if 3.9999999999999998e-7 < F < 8.4999999999999996e148Initial program 92.6%
add-sqr-sqrt92.6%
unpow-prod-down92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
Applied egg-rr92.5%
pow-sqr92.7%
metadata-eval92.7%
unpow-192.7%
fma-udef92.7%
fma-udef92.7%
unpow292.7%
associate-+r+92.7%
+-commutative92.7%
associate-+l+92.7%
unpow292.7%
+-commutative92.7%
unpow192.7%
sqr-pow82.3%
hypot-def82.3%
metadata-eval82.3%
unpow1/282.3%
+-commutative82.3%
fma-def82.3%
Simplified82.3%
associate-*l/89.2%
un-div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in B around 0 89.4%
Taylor expanded in F around inf 85.0%
if 8.4999999999999996e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification83.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))))
(if (<= F -7.6e-38)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.46e-215)
(+ t_0 (/ -1.0 B))
(if (<= F -4.1e-300)
t_1
(if (<= F 6e-234)
(+ t_0 (* (/ F B) (/ 1.0 F)))
(if (<= F 2.1e-6)
t_1
(if (<= F 8.4e+148)
(-
(/ (/ F (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))) (sin B))
(/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -7.6e-38) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.46e-215) {
tmp = t_0 + (-1.0 / B);
} else if (F <= -4.1e-300) {
tmp = t_1;
} else if (F <= 6e-234) {
tmp = t_0 + ((F / B) * (1.0 / F));
} else if (F <= 2.1e-6) {
tmp = t_1;
} else if (F <= 8.4e+148) {
tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
if (f <= (-7.6d-38)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.46d-215)) then
tmp = t_0 + ((-1.0d0) / b)
else if (f <= (-4.1d-300)) then
tmp = t_1
else if (f <= 6d-234) then
tmp = t_0 + ((f / b) * (1.0d0 / f))
else if (f <= 2.1d-6) then
tmp = t_1
else if (f <= 8.4d+148) then
tmp = ((f / (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(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 t_1 = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -7.6e-38) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.46e-215) {
tmp = t_0 + (-1.0 / B);
} else if (F <= -4.1e-300) {
tmp = t_1;
} else if (F <= 6e-234) {
tmp = t_0 + ((F / B) * (1.0 / F));
} else if (F <= 2.1e-6) {
tmp = t_1;
} else if (F <= 8.4e+148) {
tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) tmp = 0 if F <= -7.6e-38: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.46e-215: tmp = t_0 + (-1.0 / B) elif F <= -4.1e-300: tmp = t_1 elif F <= 6e-234: tmp = t_0 + ((F / B) * (1.0 / F)) elif F <= 2.1e-6: tmp = t_1 elif F <= 8.4e+148: tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) tmp = 0.0 if (F <= -7.6e-38) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.46e-215) tmp = Float64(t_0 + Float64(-1.0 / B)); elseif (F <= -4.1e-300) tmp = t_1; elseif (F <= 6e-234) tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 2.1e-6) tmp = t_1; elseif (F <= 8.4e+148) tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); tmp = 0.0; if (F <= -7.6e-38) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.46e-215) tmp = t_0 + (-1.0 / B); elseif (F <= -4.1e-300) tmp = t_1; elseif (F <= 6e-234) tmp = t_0 + ((F / B) * (1.0 / F)); elseif (F <= 2.1e-6) tmp = t_1; elseif (F <= 8.4e+148) tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(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]}, Block[{t$95$1 = N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.6e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.46e-215], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.1e-300], t$95$1, If[LessEqual[F, 6e-234], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-6], t$95$1, If[LessEqual[F, 8.4e+148], N[(N[(N[(F / N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -7.6 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.46 \cdot 10^{-215}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.1 \cdot 10^{-300}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-234}:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 8.4 \cdot 10^{+148}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -7.5999999999999999e-38Initial program 63.1%
add-sqr-sqrt63.1%
unpow-prod-down63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
Applied egg-rr63.1%
pow-sqr63.1%
metadata-eval63.1%
unpow-163.1%
fma-udef63.1%
fma-udef63.1%
unpow263.1%
associate-+r+63.1%
+-commutative63.1%
associate-+l+63.1%
unpow263.1%
+-commutative63.1%
unpow163.1%
sqr-pow51.5%
hypot-def71.5%
metadata-eval71.5%
unpow1/271.5%
+-commutative71.5%
fma-def71.5%
Simplified71.5%
associate-*l/84.5%
un-div-inv84.6%
Applied egg-rr84.6%
Taylor expanded in B around 0 73.6%
Taylor expanded in F around -inf 76.3%
distribute-lft-in76.3%
mul-1-neg76.3%
unsub-neg76.3%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
if -7.5999999999999999e-38 < F < -1.4600000000000001e-215Initial program 99.7%
Taylor expanded in F around -inf 41.8%
Taylor expanded in B around 0 60.0%
if -1.4600000000000001e-215 < F < -4.1000000000000001e-300 or 5.99999999999999975e-234 < F < 2.0999999999999998e-6Initial program 99.4%
Taylor expanded in B around 0 86.4%
Taylor expanded in B around 0 56.2%
if -4.1000000000000001e-300 < F < 5.99999999999999975e-234Initial program 99.4%
Taylor expanded in B around 0 99.4%
Taylor expanded in F around inf 83.1%
if 2.0999999999999998e-6 < F < 8.39999999999999996e148Initial program 92.4%
add-sqr-sqrt92.4%
unpow-prod-down92.3%
+-commutative92.3%
fma-def92.3%
fma-def92.3%
metadata-eval92.3%
metadata-eval92.3%
+-commutative92.3%
fma-def92.3%
fma-def92.3%
metadata-eval92.3%
metadata-eval92.3%
Applied egg-rr92.3%
pow-sqr92.5%
metadata-eval92.5%
unpow-192.5%
fma-udef92.5%
fma-udef92.5%
unpow292.5%
associate-+r+92.5%
+-commutative92.5%
associate-+l+92.5%
unpow292.5%
+-commutative92.5%
unpow192.5%
sqr-pow81.7%
hypot-def81.7%
metadata-eval81.7%
unpow1/281.7%
+-commutative81.7%
fma-def81.7%
Simplified81.7%
associate-*l/88.8%
un-div-inv88.9%
Applied egg-rr88.9%
Taylor expanded in B around 0 89.1%
Taylor expanded in F around inf 87.7%
if 8.39999999999999996e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification72.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B)))
(t_1 (* x (/ -1.0 (tan B))))
(t_2 (/ (+ 2.0 (* x 2.0)) F)))
(if (<= F -1.2e-45)
(- (/ (/ F (- (* -0.5 t_2) F)) (sin B)) (/ x B))
(if (<= F -9.5e-214)
(+ t_1 (/ -1.0 B))
(if (<= F -2.15e-299)
t_0
(if (<= F 2.8e-234)
(+ t_1 (* (/ F B) (/ 1.0 F)))
(if (<= F 2.1e-6)
t_0
(if (<= F 4.35e+148)
(- (/ (/ F (+ F (* 0.5 t_2))) (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double t_2 = (2.0 + (x * 2.0)) / F;
double tmp;
if (F <= -1.2e-45) {
tmp = ((F / ((-0.5 * t_2) - F)) / sin(B)) - (x / B);
} else if (F <= -9.5e-214) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.15e-299) {
tmp = t_0;
} else if (F <= 2.8e-234) {
tmp = t_1 + ((F / B) * (1.0 / F));
} else if (F <= 2.1e-6) {
tmp = t_0;
} else if (F <= 4.35e+148) {
tmp = ((F / (F + (0.5 * t_2))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
t_2 = (2.0d0 + (x * 2.0d0)) / f
if (f <= (-1.2d-45)) then
tmp = ((f / (((-0.5d0) * t_2) - f)) / sin(b)) - (x / b)
else if (f <= (-9.5d-214)) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= (-2.15d-299)) then
tmp = t_0
else if (f <= 2.8d-234) then
tmp = t_1 + ((f / b) * (1.0d0 / f))
else if (f <= 2.1d-6) then
tmp = t_0
else if (f <= 4.35d+148) then
tmp = ((f / (f + (0.5d0 * t_2))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double t_2 = (2.0 + (x * 2.0)) / F;
double tmp;
if (F <= -1.2e-45) {
tmp = ((F / ((-0.5 * t_2) - F)) / Math.sin(B)) - (x / B);
} else if (F <= -9.5e-214) {
tmp = t_1 + (-1.0 / B);
} else if (F <= -2.15e-299) {
tmp = t_0;
} else if (F <= 2.8e-234) {
tmp = t_1 + ((F / B) * (1.0 / F));
} else if (F <= 2.1e-6) {
tmp = t_0;
} else if (F <= 4.35e+148) {
tmp = ((F / (F + (0.5 * t_2))) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) t_2 = (2.0 + (x * 2.0)) / F tmp = 0 if F <= -1.2e-45: tmp = ((F / ((-0.5 * t_2) - F)) / math.sin(B)) - (x / B) elif F <= -9.5e-214: tmp = t_1 + (-1.0 / B) elif F <= -2.15e-299: tmp = t_0 elif F <= 2.8e-234: tmp = t_1 + ((F / B) * (1.0 / F)) elif F <= 2.1e-6: tmp = t_0 elif F <= 4.35e+148: tmp = ((F / (F + (0.5 * t_2))) / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) t_2 = Float64(Float64(2.0 + Float64(x * 2.0)) / F) tmp = 0.0 if (F <= -1.2e-45) tmp = Float64(Float64(Float64(F / Float64(Float64(-0.5 * t_2) - F)) / sin(B)) - Float64(x / B)); elseif (F <= -9.5e-214) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= -2.15e-299) tmp = t_0; elseif (F <= 2.8e-234) tmp = Float64(t_1 + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 2.1e-6) tmp = t_0; elseif (F <= 4.35e+148) tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * t_2))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); t_1 = x * (-1.0 / tan(B)); t_2 = (2.0 + (x * 2.0)) / F; tmp = 0.0; if (F <= -1.2e-45) tmp = ((F / ((-0.5 * t_2) - F)) / sin(B)) - (x / B); elseif (F <= -9.5e-214) tmp = t_1 + (-1.0 / B); elseif (F <= -2.15e-299) tmp = t_0; elseif (F <= 2.8e-234) tmp = t_1 + ((F / B) * (1.0 / F)); elseif (F <= 2.1e-6) tmp = t_0; elseif (F <= 4.35e+148) tmp = ((F / (F + (0.5 * t_2))) / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]}, If[LessEqual[F, -1.2e-45], N[(N[(N[(F / N[(N[(-0.5 * t$95$2), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-214], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.15e-299], t$95$0, If[LessEqual[F, 2.8e-234], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-6], t$95$0, If[LessEqual[F, 4.35e+148], N[(N[(N[(F / N[(F + N[(0.5 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
t_2 := \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{F}{-0.5 \cdot t_2 - F}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-214}:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-299}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-234}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 4.35 \cdot 10^{+148}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot t_2}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -1.19999999999999995e-45Initial program 63.5%
add-sqr-sqrt63.6%
unpow-prod-down63.5%
+-commutative63.5%
fma-def63.5%
fma-def63.5%
metadata-eval63.5%
metadata-eval63.5%
+-commutative63.5%
fma-def63.5%
fma-def63.5%
metadata-eval63.5%
metadata-eval63.5%
Applied egg-rr63.5%
pow-sqr63.5%
metadata-eval63.5%
unpow-163.5%
fma-udef63.5%
fma-udef63.5%
unpow263.5%
associate-+r+63.5%
+-commutative63.5%
associate-+l+63.5%
unpow263.5%
+-commutative63.5%
unpow163.5%
sqr-pow52.1%
hypot-def71.8%
metadata-eval71.8%
unpow1/271.8%
+-commutative71.8%
fma-def71.8%
Simplified71.8%
associate-*l/84.7%
un-div-inv84.7%
Applied egg-rr84.7%
Taylor expanded in B around 0 73.9%
Taylor expanded in F around -inf 76.2%
if -1.19999999999999995e-45 < F < -9.4999999999999999e-214Initial program 99.8%
Taylor expanded in F around -inf 42.9%
Taylor expanded in B around 0 61.8%
if -9.4999999999999999e-214 < F < -2.1499999999999999e-299 or 2.7999999999999999e-234 < F < 2.0999999999999998e-6Initial program 99.4%
Taylor expanded in B around 0 86.4%
Taylor expanded in B around 0 56.2%
if -2.1499999999999999e-299 < F < 2.7999999999999999e-234Initial program 99.4%
Taylor expanded in B around 0 99.4%
Taylor expanded in F around inf 83.1%
if 2.0999999999999998e-6 < F < 4.34999999999999996e148Initial program 92.4%
add-sqr-sqrt92.4%
unpow-prod-down92.3%
+-commutative92.3%
fma-def92.3%
fma-def92.3%
metadata-eval92.3%
metadata-eval92.3%
+-commutative92.3%
fma-def92.3%
fma-def92.3%
metadata-eval92.3%
metadata-eval92.3%
Applied egg-rr92.3%
pow-sqr92.5%
metadata-eval92.5%
unpow-192.5%
fma-udef92.5%
fma-udef92.5%
unpow292.5%
associate-+r+92.5%
+-commutative92.5%
associate-+l+92.5%
unpow292.5%
+-commutative92.5%
unpow192.5%
sqr-pow81.7%
hypot-def81.7%
metadata-eval81.7%
unpow1/281.7%
+-commutative81.7%
fma-def81.7%
Simplified81.7%
associate-*l/88.8%
un-div-inv88.9%
Applied egg-rr88.9%
Taylor expanded in B around 0 89.1%
Taylor expanded in F around inf 87.7%
if 4.34999999999999996e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification73.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= F -8.8e-38)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 8e-234)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ -1.0 F)))
(if (<= F 2.1e-6)
(+
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(* (sqrt (/ 1.0 t_0)) (/ F B)))
(if (<= F 7.9e+148)
(- (/ (/ F (+ F (* 0.5 (/ t_0 F)))) (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -8.8e-38) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8e-234) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 2.1e-6) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (sqrt((1.0 / t_0)) * (F / B));
} else if (F <= 7.9e+148) {
tmp = ((F / (F + (0.5 * (t_0 / F)))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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 = 2.0d0 + (x * 2.0d0)
if (f <= (-8.8d-38)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8d-234) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * ((-1.0d0) / f))
else if (f <= 2.1d-6) then
tmp = (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))) + (sqrt((1.0d0 / t_0)) * (f / b))
else if (f <= 7.9d+148) then
tmp = ((f / (f + (0.5d0 * (t_0 / f)))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -8.8e-38) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8e-234) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 2.1e-6) {
tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (Math.sqrt((1.0 / t_0)) * (F / B));
} else if (F <= 7.9e+148) {
tmp = ((F / (F + (0.5 * (t_0 / F)))) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) tmp = 0 if F <= -8.8e-38: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8e-234: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (-1.0 / F)) elif F <= 2.1e-6: tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (math.sqrt((1.0 / t_0)) * (F / B)) elif F <= 7.9e+148: tmp = ((F / (F + (0.5 * (t_0 / F)))) / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -8.8e-38) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8e-234) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 2.1e-6) tmp = Float64(Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))) + Float64(sqrt(Float64(1.0 / t_0)) * Float64(F / B))); elseif (F <= 7.9e+148) tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * Float64(t_0 / F)))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -8.8e-38) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8e-234) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F)); elseif (F <= 2.1e-6) tmp = (x * ((-1.0 / B) - (B * -0.3333333333333333))) + (sqrt((1.0 / t_0)) * (F / B)); elseif (F <= 7.9e+148) tmp = ((F / (F + (0.5 * (t_0 / F)))) / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8e-234], 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, 2.1e-6], N[(N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.9e+148], N[(N[(N[(F / N[(F + N[(0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-234}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right) + \sqrt{\frac{1}{t_0}} \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 7.9 \cdot 10^{+148}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{t_0}{F}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -8.80000000000000029e-38Initial program 63.1%
add-sqr-sqrt63.1%
unpow-prod-down63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
Applied egg-rr63.1%
pow-sqr63.1%
metadata-eval63.1%
unpow-163.1%
fma-udef63.1%
fma-udef63.1%
unpow263.1%
associate-+r+63.1%
+-commutative63.1%
associate-+l+63.1%
unpow263.1%
+-commutative63.1%
unpow163.1%
sqr-pow51.5%
hypot-def71.5%
metadata-eval71.5%
unpow1/271.5%
+-commutative71.5%
fma-def71.5%
Simplified71.5%
associate-*l/84.5%
un-div-inv84.6%
Applied egg-rr84.6%
Taylor expanded in B around 0 73.6%
Taylor expanded in F around -inf 76.3%
distribute-lft-in76.3%
mul-1-neg76.3%
unsub-neg76.3%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
if -8.80000000000000029e-38 < F < 7.9999999999999997e-234Initial program 99.6%
Taylor expanded in B around 0 91.8%
Taylor expanded in F around -inf 63.0%
if 7.9999999999999997e-234 < F < 2.0999999999999998e-6Initial program 99.4%
Taylor expanded in B around 0 83.4%
Taylor expanded in B around 0 50.9%
Taylor expanded in F around 0 50.6%
if 2.0999999999999998e-6 < F < 7.8999999999999996e148Initial program 92.4%
add-sqr-sqrt92.4%
unpow-prod-down92.3%
+-commutative92.3%
fma-def92.3%
fma-def92.3%
metadata-eval92.3%
metadata-eval92.3%
+-commutative92.3%
fma-def92.3%
fma-def92.3%
metadata-eval92.3%
metadata-eval92.3%
Applied egg-rr92.3%
pow-sqr92.5%
metadata-eval92.5%
unpow-192.5%
fma-udef92.5%
fma-udef92.5%
unpow292.5%
associate-+r+92.5%
+-commutative92.5%
associate-+l+92.5%
unpow292.5%
+-commutative92.5%
unpow192.5%
sqr-pow81.7%
hypot-def81.7%
metadata-eval81.7%
unpow1/281.7%
+-commutative81.7%
fma-def81.7%
Simplified81.7%
associate-*l/88.8%
un-div-inv88.9%
Applied egg-rr88.9%
Taylor expanded in B around 0 89.1%
Taylor expanded in F around inf 87.7%
if 7.8999999999999996e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification71.1%
(FPCore (F B x)
:precision binary64
(if (<= F -7.4e-51)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 6.5e-7)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ 1.0 F)))
(if (<= F 9.2e+148)
(- (/ (/ F (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))) (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.4e-51) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6.5e-7) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / F));
} else if (F <= 9.2e+148) {
tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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 <= (-7.4d-51)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 6.5d-7) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * (1.0d0 / f))
else if (f <= 9.2d+148) then
tmp = ((f / (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.4e-51) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 6.5e-7) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (1.0 / F));
} else if (F <= 9.2e+148) {
tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.4e-51: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 6.5e-7: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (1.0 / F)) elif F <= 9.2e+148: tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.4e-51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6.5e-7) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 9.2e+148) tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.4e-51) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 6.5e-7) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / F)); elseif (F <= 9.2e+148) tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.4e-51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-7], 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, 9.2e+148], N[(N[(N[(F / N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.4 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{+148}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -7.39999999999999946e-51Initial program 64.0%
add-sqr-sqrt64.0%
unpow-prod-down63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
Applied egg-rr63.9%
pow-sqr63.9%
metadata-eval63.9%
unpow-163.9%
fma-udef63.9%
fma-udef63.9%
unpow263.9%
associate-+r+63.9%
+-commutative63.9%
associate-+l+63.9%
unpow263.9%
+-commutative63.9%
unpow163.9%
sqr-pow52.6%
hypot-def72.1%
metadata-eval72.1%
unpow1/272.1%
+-commutative72.1%
fma-def72.1%
Simplified72.1%
associate-*l/84.9%
un-div-inv84.9%
Applied egg-rr84.9%
Taylor expanded in B around 0 74.2%
Taylor expanded in F around -inf 74.7%
distribute-lft-in74.7%
mul-1-neg74.7%
unsub-neg74.7%
associate-*r/74.7%
metadata-eval74.7%
Simplified74.7%
if -7.39999999999999946e-51 < F < 6.50000000000000024e-7Initial program 99.5%
Taylor expanded in B around 0 87.7%
Taylor expanded in F around inf 53.7%
if 6.50000000000000024e-7 < F < 9.2000000000000002e148Initial program 92.6%
add-sqr-sqrt92.6%
unpow-prod-down92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
Applied egg-rr92.5%
pow-sqr92.7%
metadata-eval92.7%
unpow-192.7%
fma-udef92.7%
fma-udef92.7%
unpow292.7%
associate-+r+92.7%
+-commutative92.7%
associate-+l+92.7%
unpow292.7%
+-commutative92.7%
unpow192.7%
sqr-pow82.3%
hypot-def82.3%
metadata-eval82.3%
unpow1/282.3%
+-commutative82.3%
fma-def82.3%
Simplified82.3%
associate-*l/89.2%
un-div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in B around 0 89.4%
Taylor expanded in F around inf 85.0%
if 9.2000000000000002e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification69.0%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e-38)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.35e-216)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 2e-165)
(/ (- x) B)
(if (or (<= F 6.5e-7) (not (<= F 9.1e+148)))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-38) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.35e-216) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 2e-165) {
tmp = -x / B;
} else if ((F <= 6.5e-7) || !(F <= 9.1e+148)) {
tmp = (1.0 / B) - (x * (1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.8d-38)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.35d-216)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 2d-165) then
tmp = -x / b
else if ((f <= 6.5d-7) .or. (.not. (f <= 9.1d+148))) then
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-38) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.35e-216) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 2e-165) {
tmp = -x / B;
} else if ((F <= 6.5e-7) || !(F <= 9.1e+148)) {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.8e-38: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.35e-216: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 2e-165: tmp = -x / B elif (F <= 6.5e-7) or not (F <= 9.1e+148): tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.8e-38) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.35e-216) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 2e-165) tmp = Float64(Float64(-x) / B); elseif ((F <= 6.5e-7) || !(F <= 9.1e+148)) tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.8e-38) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.35e-216) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 2e-165) tmp = -x / B; elseif ((F <= 6.5e-7) || ~((F <= 9.1e+148))) tmp = (1.0 / B) - (x * (1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.8e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.35e-216], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-165], N[((-x) / B), $MachinePrecision], If[Or[LessEqual[F, 6.5e-7], N[Not[LessEqual[F, 9.1e+148]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.35 \cdot 10^{-216}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-165}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-7} \lor \neg \left(F \leq 9.1 \cdot 10^{+148}\right):\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.80000000000000029e-38Initial program 63.1%
add-sqr-sqrt63.1%
unpow-prod-down63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
Applied egg-rr63.1%
pow-sqr63.1%
metadata-eval63.1%
unpow-163.1%
fma-udef63.1%
fma-udef63.1%
unpow263.1%
associate-+r+63.1%
+-commutative63.1%
associate-+l+63.1%
unpow263.1%
+-commutative63.1%
unpow163.1%
sqr-pow51.5%
hypot-def71.5%
metadata-eval71.5%
unpow1/271.5%
+-commutative71.5%
fma-def71.5%
Simplified71.5%
associate-*l/84.5%
un-div-inv84.6%
Applied egg-rr84.6%
Taylor expanded in B around 0 73.6%
Taylor expanded in F around -inf 76.3%
distribute-lft-in76.3%
mul-1-neg76.3%
unsub-neg76.3%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
if -8.80000000000000029e-38 < F < -2.35e-216Initial program 99.7%
Taylor expanded in F around -inf 41.8%
Taylor expanded in B around 0 60.0%
if -2.35e-216 < F < 2e-165Initial program 99.5%
Taylor expanded in F around -inf 33.8%
Taylor expanded in B around 0 25.4%
associate-*r/25.4%
distribute-lft-in25.4%
metadata-eval25.4%
neg-mul-125.4%
Simplified25.4%
Taylor expanded in x around inf 51.3%
associate-*r/51.3%
mul-1-neg51.3%
Simplified51.3%
if 2e-165 < F < 6.50000000000000024e-7 or 9.0999999999999995e148 < F Initial program 65.4%
expm1-log1p-u60.3%
expm1-udef44.0%
Applied egg-rr44.0%
expm1-def60.3%
expm1-log1p65.4%
associate-*r/74.6%
associate-*l/74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in F around inf 69.7%
Taylor expanded in B around 0 67.3%
if 6.50000000000000024e-7 < F < 9.0999999999999995e148Initial program 92.6%
add-sqr-sqrt92.6%
unpow-prod-down92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
Applied egg-rr92.5%
pow-sqr92.7%
metadata-eval92.7%
unpow-192.7%
fma-udef92.7%
fma-udef92.7%
unpow292.7%
associate-+r+92.7%
+-commutative92.7%
associate-+l+92.7%
unpow292.7%
+-commutative92.7%
unpow192.7%
sqr-pow82.3%
hypot-def82.3%
metadata-eval82.3%
unpow1/282.3%
+-commutative82.3%
fma-def82.3%
Simplified82.3%
associate-*l/89.2%
un-div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in B around 0 89.4%
Taylor expanded in F around inf 84.7%
Final simplification68.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -8.8e-38)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.8e-215)
t_0
(if (<= F 4.3e-165)
(/ (- x) B)
(if (<= F 4.1e-7) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -8.8e-38) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.8e-215) {
tmp = t_0;
} else if (F <= 4.3e-165) {
tmp = -x / B;
} else if (F <= 4.1e-7) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-8.8d-38)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.8d-215)) then
tmp = t_0
else if (f <= 4.3d-165) then
tmp = -x / b
else if (f <= 4.1d-7) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / 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))) + (-1.0 / B);
double tmp;
if (F <= -8.8e-38) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.8e-215) {
tmp = t_0;
} else if (F <= 4.3e-165) {
tmp = -x / B;
} else if (F <= 4.1e-7) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -8.8e-38: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.8e-215: tmp = t_0 elif F <= 4.3e-165: tmp = -x / B elif F <= 4.1e-7: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -8.8e-38) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.8e-215) tmp = t_0; elseif (F <= 4.3e-165) tmp = Float64(Float64(-x) / B); elseif (F <= 4.1e-7) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -8.8e-38) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.8e-215) tmp = t_0; elseif (F <= 4.3e-165) tmp = -x / B; elseif (F <= 4.1e-7) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.8e-215], t$95$0, If[LessEqual[F, 4.3e-165], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 4.1e-7], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-215}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-165}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{-7}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.80000000000000029e-38Initial program 63.1%
add-sqr-sqrt63.1%
unpow-prod-down63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
Applied egg-rr63.1%
pow-sqr63.1%
metadata-eval63.1%
unpow-163.1%
fma-udef63.1%
fma-udef63.1%
unpow263.1%
associate-+r+63.1%
+-commutative63.1%
associate-+l+63.1%
unpow263.1%
+-commutative63.1%
unpow163.1%
sqr-pow51.5%
hypot-def71.5%
metadata-eval71.5%
unpow1/271.5%
+-commutative71.5%
fma-def71.5%
Simplified71.5%
associate-*l/84.5%
un-div-inv84.6%
Applied egg-rr84.6%
Taylor expanded in B around 0 73.6%
Taylor expanded in F around -inf 76.3%
distribute-lft-in76.3%
mul-1-neg76.3%
unsub-neg76.3%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
if -8.80000000000000029e-38 < F < -4.8000000000000002e-215 or 4.30000000000000007e-165 < F < 4.0999999999999999e-7Initial program 99.5%
Taylor expanded in F around -inf 40.1%
Taylor expanded in B around 0 52.6%
if -4.8000000000000002e-215 < F < 4.30000000000000007e-165Initial program 99.5%
Taylor expanded in F around -inf 33.1%
Taylor expanded in B around 0 24.9%
associate-*r/24.9%
distribute-lft-in24.9%
metadata-eval24.9%
neg-mul-124.9%
Simplified24.9%
Taylor expanded in x around inf 50.3%
associate-*r/50.3%
mul-1-neg50.3%
Simplified50.3%
if 4.0999999999999999e-7 < F Initial program 60.0%
add-sqr-sqrt60.0%
unpow-prod-down60.0%
+-commutative60.0%
fma-def60.0%
fma-def60.0%
metadata-eval60.0%
metadata-eval60.0%
+-commutative60.0%
fma-def60.0%
fma-def60.0%
metadata-eval60.0%
metadata-eval60.0%
Applied egg-rr60.0%
pow-sqr60.1%
metadata-eval60.1%
unpow-160.1%
fma-udef60.1%
fma-udef60.1%
unpow260.1%
associate-+r+60.1%
+-commutative60.1%
associate-+l+60.1%
unpow260.1%
+-commutative60.1%
unpow160.1%
sqr-pow47.2%
hypot-def63.4%
metadata-eval63.4%
unpow1/263.4%
+-commutative63.4%
fma-def63.4%
Simplified63.4%
associate-*l/78.7%
un-div-inv78.8%
Applied egg-rr78.8%
Taylor expanded in B around 0 71.1%
Taylor expanded in F around inf 78.8%
Final simplification66.5%
(FPCore (F B x)
:precision binary64
(if (<= F -2.9e-38)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.8e-8)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ -1.0 F)))
(if (<= F 9.2e+148)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-38) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.8e-8) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 9.2e+148) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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.9d-38)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.8d-8) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * ((-1.0d0) / f))
else if (f <= 9.2d+148) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e-38) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.8e-8) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 9.2e+148) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.9e-38: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.8e-8: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (-1.0 / F)) elif F <= 9.2e+148: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.9e-38) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.8e-8) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 9.2e+148) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.9e-38) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.8e-8) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F)); elseif (F <= 9.2e+148) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.9e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-8], 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, 9.2e+148], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.9 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{+148}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -2.89999999999999994e-38Initial program 63.1%
add-sqr-sqrt63.1%
unpow-prod-down63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
+-commutative63.1%
fma-def63.1%
fma-def63.1%
metadata-eval63.1%
metadata-eval63.1%
Applied egg-rr63.1%
pow-sqr63.1%
metadata-eval63.1%
unpow-163.1%
fma-udef63.1%
fma-udef63.1%
unpow263.1%
associate-+r+63.1%
+-commutative63.1%
associate-+l+63.1%
unpow263.1%
+-commutative63.1%
unpow163.1%
sqr-pow51.5%
hypot-def71.5%
metadata-eval71.5%
unpow1/271.5%
+-commutative71.5%
fma-def71.5%
Simplified71.5%
associate-*l/84.5%
un-div-inv84.6%
Applied egg-rr84.6%
Taylor expanded in B around 0 73.6%
Taylor expanded in F around -inf 76.3%
distribute-lft-in76.3%
mul-1-neg76.3%
unsub-neg76.3%
associate-*r/76.3%
metadata-eval76.3%
Simplified76.3%
if -2.89999999999999994e-38 < F < 1.79999999999999991e-8Initial program 99.5%
Taylor expanded in B around 0 87.9%
Taylor expanded in F around -inf 52.4%
if 1.79999999999999991e-8 < F < 9.2000000000000002e148Initial program 92.6%
add-sqr-sqrt92.6%
unpow-prod-down92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
+-commutative92.5%
fma-def92.5%
fma-def92.5%
metadata-eval92.5%
metadata-eval92.5%
Applied egg-rr92.5%
pow-sqr92.7%
metadata-eval92.7%
unpow-192.7%
fma-udef92.7%
fma-udef92.7%
unpow292.7%
associate-+r+92.7%
+-commutative92.7%
associate-+l+92.7%
unpow292.7%
+-commutative92.7%
unpow192.7%
sqr-pow82.3%
hypot-def82.3%
metadata-eval82.3%
unpow1/282.3%
+-commutative82.3%
fma-def82.3%
Simplified82.3%
associate-*l/89.2%
un-div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in B around 0 89.4%
Taylor expanded in F around inf 84.7%
if 9.2000000000000002e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification68.7%
(FPCore (F B x)
:precision binary64
(if (<= F -6e-51)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.1e-6)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ 1.0 F)))
(if (<= F 5.8e+148)
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-51) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.1e-6) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / F));
} else if (F <= 5.8e+148) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / 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 <= (-6d-51)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.1d-6) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * (1.0d0 / f))
else if (f <= 5.8d+148) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6e-51) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.1e-6) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (1.0 / F));
} else if (F <= 5.8e+148) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-51: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.1e-6: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (1.0 / F)) elif F <= 5.8e+148: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-51) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.1e-6) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(1.0 / F))); elseif (F <= 5.8e+148) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6e-51) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.1e-6) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / F)); elseif (F <= 5.8e+148) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-6], 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, 5.8e+148], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{1}{F}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{+148}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -6.00000000000000005e-51Initial program 64.0%
add-sqr-sqrt64.0%
unpow-prod-down63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
Applied egg-rr63.9%
pow-sqr63.9%
metadata-eval63.9%
unpow-163.9%
fma-udef63.9%
fma-udef63.9%
unpow263.9%
associate-+r+63.9%
+-commutative63.9%
associate-+l+63.9%
unpow263.9%
+-commutative63.9%
unpow163.9%
sqr-pow52.6%
hypot-def72.1%
metadata-eval72.1%
unpow1/272.1%
+-commutative72.1%
fma-def72.1%
Simplified72.1%
associate-*l/84.9%
un-div-inv84.9%
Applied egg-rr84.9%
Taylor expanded in B around 0 74.2%
Taylor expanded in F around -inf 74.7%
distribute-lft-in74.7%
mul-1-neg74.7%
unsub-neg74.7%
associate-*r/74.7%
metadata-eval74.7%
Simplified74.7%
if -6.00000000000000005e-51 < F < 2.0999999999999998e-6Initial program 99.5%
Taylor expanded in B around 0 87.8%
Taylor expanded in F around inf 53.3%
if 2.0999999999999998e-6 < F < 5.7999999999999999e148Initial program 92.4%
add-sqr-sqrt92.4%
unpow-prod-down92.3%
+-commutative92.3%
fma-def92.3%
fma-def92.3%
metadata-eval92.3%
metadata-eval92.3%
+-commutative92.3%
fma-def92.3%
fma-def92.3%
metadata-eval92.3%
metadata-eval92.3%
Applied egg-rr92.3%
pow-sqr92.5%
metadata-eval92.5%
unpow-192.5%
fma-udef92.5%
fma-udef92.5%
unpow292.5%
associate-+r+92.5%
+-commutative92.5%
associate-+l+92.5%
unpow292.5%
+-commutative92.5%
unpow192.5%
sqr-pow81.7%
hypot-def81.7%
metadata-eval81.7%
unpow1/281.7%
+-commutative81.7%
fma-def81.7%
Simplified81.7%
associate-*l/88.8%
un-div-inv88.9%
Applied egg-rr88.9%
Taylor expanded in B around 0 89.1%
Taylor expanded in F around inf 87.3%
if 5.7999999999999999e148 < F Initial program 31.4%
expm1-log1p-u28.4%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def28.4%
expm1-log1p31.4%
associate-*r/49.9%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 88.6%
Final simplification69.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.7e-52)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.15e-62)
(+ (* x (/ -1.0 (tan B))) (* B 0.16666666666666666))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.7e-52) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.15e-62) {
tmp = (x * (-1.0 / tan(B))) + (B * 0.16666666666666666);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.7d-52)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.15d-62) then
tmp = (x * ((-1.0d0) / tan(b))) + (b * 0.16666666666666666d0)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.7e-52) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.15e-62) {
tmp = (x * (-1.0 / Math.tan(B))) + (B * 0.16666666666666666);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.7e-52: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.15e-62: tmp = (x * (-1.0 / math.tan(B))) + (B * 0.16666666666666666) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.7e-52) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.15e-62) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(B * 0.16666666666666666)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.7e-52) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.15e-62) tmp = (x * (-1.0 / tan(B))) + (B * 0.16666666666666666); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.7e-52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.15e-62], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.7 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-62}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + B \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.6999999999999997e-52Initial program 64.0%
add-sqr-sqrt64.0%
unpow-prod-down63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
+-commutative63.9%
fma-def63.9%
fma-def63.9%
metadata-eval63.9%
metadata-eval63.9%
Applied egg-rr63.9%
pow-sqr63.9%
metadata-eval63.9%
unpow-163.9%
fma-udef63.9%
fma-udef63.9%
unpow263.9%
associate-+r+63.9%
+-commutative63.9%
associate-+l+63.9%
unpow263.9%
+-commutative63.9%
unpow163.9%
sqr-pow52.6%
hypot-def72.1%
metadata-eval72.1%
unpow1/272.1%
+-commutative72.1%
fma-def72.1%
Simplified72.1%
associate-*l/84.9%
un-div-inv84.9%
Applied egg-rr84.9%
Taylor expanded in B around 0 74.2%
Taylor expanded in F around -inf 74.7%
distribute-lft-in74.7%
mul-1-neg74.7%
unsub-neg74.7%
associate-*r/74.7%
metadata-eval74.7%
Simplified74.7%
if -3.6999999999999997e-52 < F < 1.15e-62Initial program 99.5%
expm1-log1p-u92.4%
expm1-udef77.0%
Applied egg-rr77.0%
expm1-def92.4%
expm1-log1p99.5%
associate-*r/99.5%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around inf 27.0%
Taylor expanded in B around 0 30.4%
Taylor expanded in B around inf 41.5%
*-commutative41.5%
Simplified41.5%
if 1.15e-62 < F Initial program 67.3%
add-sqr-sqrt67.2%
unpow-prod-down67.2%
+-commutative67.2%
fma-def67.2%
fma-def67.2%
metadata-eval67.2%
metadata-eval67.2%
+-commutative67.2%
fma-def67.2%
fma-def67.2%
metadata-eval67.2%
metadata-eval67.2%
Applied egg-rr67.2%
pow-sqr67.3%
metadata-eval67.3%
unpow-167.3%
fma-udef67.3%
fma-udef67.3%
unpow267.3%
associate-+r+67.3%
+-commutative67.3%
associate-+l+67.3%
unpow267.3%
+-commutative67.3%
unpow167.3%
sqr-pow56.8%
hypot-def70.0%
metadata-eval70.0%
unpow1/270.0%
+-commutative70.0%
fma-def70.0%
Simplified70.0%
associate-*l/82.5%
un-div-inv82.6%
Applied egg-rr82.6%
Taylor expanded in B around 0 68.7%
Taylor expanded in F around inf 66.6%
Final simplification60.4%
(FPCore (F B x) :precision binary64 (if (<= F -9.5e-162) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.65e-127) (/ (- x) B) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.65e-127) {
tmp = -x / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.5d-162)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.65d-127) then
tmp = -x / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.65e-127) {
tmp = -x / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-162: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.65e-127: tmp = -x / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-162) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.65e-127) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.5e-162) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.65e-127) tmp = -x / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-162], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.65e-127], N[((-x) / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-127}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.5000000000000004e-162Initial program 70.3%
add-sqr-sqrt70.2%
unpow-prod-down70.2%
+-commutative70.2%
fma-def70.2%
fma-def70.2%
metadata-eval70.2%
metadata-eval70.2%
+-commutative70.2%
fma-def70.2%
fma-def70.2%
metadata-eval70.2%
metadata-eval70.2%
Applied egg-rr70.2%
pow-sqr70.2%
metadata-eval70.2%
unpow-170.2%
fma-udef70.2%
fma-udef70.2%
unpow270.2%
associate-+r+70.2%
+-commutative70.2%
associate-+l+70.2%
unpow270.2%
+-commutative70.2%
unpow170.2%
sqr-pow60.9%
hypot-def77.0%
metadata-eval77.0%
unpow1/277.0%
+-commutative77.0%
fma-def77.0%
Simplified77.0%
associate-*l/87.4%
un-div-inv87.5%
Applied egg-rr87.5%
Taylor expanded in B around 0 70.4%
Taylor expanded in F around -inf 64.7%
distribute-lft-in64.7%
mul-1-neg64.7%
unsub-neg64.7%
associate-*r/64.7%
metadata-eval64.7%
Simplified64.7%
if -9.5000000000000004e-162 < F < 1.6499999999999999e-127Initial program 99.5%
Taylor expanded in F around -inf 38.4%
Taylor expanded in B around 0 23.6%
associate-*r/23.6%
distribute-lft-in23.6%
metadata-eval23.6%
neg-mul-123.6%
Simplified23.6%
Taylor expanded in x around inf 43.3%
associate-*r/43.3%
mul-1-neg43.3%
Simplified43.3%
if 1.6499999999999999e-127 < F Initial program 71.0%
add-sqr-sqrt71.0%
unpow-prod-down71.0%
+-commutative71.0%
fma-def71.0%
fma-def71.0%
metadata-eval71.0%
metadata-eval71.0%
+-commutative71.0%
fma-def71.0%
fma-def71.0%
metadata-eval71.0%
metadata-eval71.0%
Applied egg-rr71.0%
pow-sqr71.0%
metadata-eval71.0%
unpow-171.0%
fma-udef71.0%
fma-udef71.0%
unpow271.0%
associate-+r+71.0%
+-commutative71.0%
associate-+l+71.0%
unpow271.0%
+-commutative71.0%
unpow171.0%
sqr-pow61.8%
hypot-def73.4%
metadata-eval73.4%
unpow1/273.4%
+-commutative73.4%
fma-def73.4%
Simplified73.4%
associate-*l/84.5%
un-div-inv84.6%
Applied egg-rr84.6%
Taylor expanded in B around 0 68.9%
Taylor expanded in F around inf 59.4%
Final simplification57.7%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e-162)
(+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 9.2e-61)
(/ (- x) B)
(if (<= F 8.5e+24)
(/ 1.0 (sin B))
(- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 9.2e-61) {
tmp = -x / B;
} else if (F <= 8.5e+24) {
tmp = 1.0 / sin(B);
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.5d-162)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 9.2d-61) then
tmp = -x / b
else if (f <= 8.5d+24) then
tmp = 1.0d0 / sin(b)
else
tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 9.2e-61) {
tmp = -x / B;
} else if (F <= 8.5e+24) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-162: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 9.2e-61: tmp = -x / B elif F <= 8.5e+24: tmp = 1.0 / math.sin(B) else: tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-162) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 9.2e-61) tmp = Float64(Float64(-x) / B); elseif (F <= 8.5e+24) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.5e-162) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 9.2e-61) tmp = -x / B; elseif (F <= 8.5e+24) tmp = 1.0 / sin(B); else tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-162], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.2e-61], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 8.5e+24], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.5000000000000004e-162Initial program 70.3%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 43.5%
if -9.5000000000000004e-162 < F < 9.19999999999999967e-61Initial program 99.5%
Taylor expanded in F around -inf 38.2%
Taylor expanded in B around 0 21.7%
associate-*r/21.7%
distribute-lft-in21.7%
metadata-eval21.7%
neg-mul-121.7%
Simplified21.7%
Taylor expanded in x around inf 38.7%
associate-*r/38.7%
mul-1-neg38.7%
Simplified38.7%
if 9.19999999999999967e-61 < F < 8.49999999999999959e24Initial program 99.1%
Taylor expanded in F around inf 48.1%
Taylor expanded in x around 0 29.6%
if 8.49999999999999959e24 < F Initial program 54.3%
expm1-log1p-u31.9%
expm1-udef31.9%
Applied egg-rr31.9%
expm1-def31.9%
expm1-log1p54.3%
associate-*r/69.2%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 68.1%
Taylor expanded in B around 0 64.6%
Final simplification45.4%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e-162)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 9.2e-61)
(/ (- x) B)
(if (<= F 1.1e+28)
(/ 1.0 (sin B))
(- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 9.2e-61) {
tmp = -x / B;
} else if (F <= 1.1e+28) {
tmp = 1.0 / sin(B);
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.5d-162)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 9.2d-61) then
tmp = -x / b
else if (f <= 1.1d+28) then
tmp = 1.0d0 / sin(b)
else
tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 9.2e-61) {
tmp = -x / B;
} else if (F <= 1.1e+28) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-162: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 9.2e-61: tmp = -x / B elif F <= 1.1e+28: tmp = 1.0 / math.sin(B) else: tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-162) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 9.2e-61) tmp = Float64(Float64(-x) / B); elseif (F <= 1.1e+28) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.5e-162) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 9.2e-61) tmp = -x / B; elseif (F <= 1.1e+28) tmp = 1.0 / sin(B); else tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-162], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.2e-61], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 1.1e+28], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{+28}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.5000000000000004e-162Initial program 70.3%
add-sqr-sqrt70.2%
unpow-prod-down70.2%
+-commutative70.2%
fma-def70.2%
fma-def70.2%
metadata-eval70.2%
metadata-eval70.2%
+-commutative70.2%
fma-def70.2%
fma-def70.2%
metadata-eval70.2%
metadata-eval70.2%
Applied egg-rr70.2%
pow-sqr70.2%
metadata-eval70.2%
unpow-170.2%
fma-udef70.2%
fma-udef70.2%
unpow270.2%
associate-+r+70.2%
+-commutative70.2%
associate-+l+70.2%
unpow270.2%
+-commutative70.2%
unpow170.2%
sqr-pow60.9%
hypot-def77.0%
metadata-eval77.0%
unpow1/277.0%
+-commutative77.0%
fma-def77.0%
Simplified77.0%
associate-*l/87.4%
un-div-inv87.5%
Applied egg-rr87.5%
Taylor expanded in B around 0 70.4%
Taylor expanded in F around -inf 64.7%
distribute-lft-in64.7%
mul-1-neg64.7%
unsub-neg64.7%
associate-*r/64.7%
metadata-eval64.7%
Simplified64.7%
if -9.5000000000000004e-162 < F < 9.19999999999999967e-61Initial program 99.5%
Taylor expanded in F around -inf 38.2%
Taylor expanded in B around 0 21.7%
associate-*r/21.7%
distribute-lft-in21.7%
metadata-eval21.7%
neg-mul-121.7%
Simplified21.7%
Taylor expanded in x around inf 38.7%
associate-*r/38.7%
mul-1-neg38.7%
Simplified38.7%
if 9.19999999999999967e-61 < F < 1.09999999999999993e28Initial program 99.1%
Taylor expanded in F around inf 48.1%
Taylor expanded in x around 0 29.6%
if 1.09999999999999993e28 < F Initial program 54.3%
expm1-log1p-u31.9%
expm1-udef31.9%
Applied egg-rr31.9%
expm1-def31.9%
expm1-log1p54.3%
associate-*r/69.2%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 68.1%
Taylor expanded in B around 0 64.6%
Final simplification54.3%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e-163)
(/ (- -1.0 x) B)
(if (<= F 1.5e-136)
(/ (- x) B)
(- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-163) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.5e-136) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.8d-163)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.5d-136) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-163) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.5e-136) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.8e-163: tmp = (-1.0 - x) / B elif F <= 1.5e-136: tmp = -x / B else: tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.8e-163) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.5e-136) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.8e-163) tmp = (-1.0 - x) / B; elseif (F <= 1.5e-136) tmp = -x / B; else tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.8e-163], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.5e-136], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{-163}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-136}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.80000000000000044e-163Initial program 70.3%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 42.8%
associate-*r/42.8%
distribute-lft-in42.8%
metadata-eval42.8%
neg-mul-142.8%
Simplified42.8%
if -8.80000000000000044e-163 < F < 1.4999999999999999e-136Initial program 99.6%
Taylor expanded in F around -inf 37.0%
Taylor expanded in B around 0 24.5%
associate-*r/24.5%
distribute-lft-in24.5%
metadata-eval24.5%
neg-mul-124.5%
Simplified24.5%
Taylor expanded in x around inf 45.3%
associate-*r/45.3%
mul-1-neg45.3%
Simplified45.3%
if 1.4999999999999999e-136 < F Initial program 72.0%
expm1-log1p-u53.5%
expm1-udef44.3%
Applied egg-rr44.3%
expm1-def53.5%
expm1-log1p72.0%
associate-*r/81.0%
associate-*l/81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in F around inf 78.9%
Taylor expanded in B around 0 47.2%
Taylor expanded in B around 0 42.9%
Final simplification43.4%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e-162)
(+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 1.5e-136)
(/ (- x) B)
(- (+ (/ 1.0 B) (* B 0.16666666666666666)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.5e-136) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.5d-162)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 1.5d-136) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (b * 0.16666666666666666d0)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.5e-136) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-162: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 1.5e-136: tmp = -x / B else: tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-162) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 1.5e-136) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * 0.16666666666666666)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.5e-162) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 1.5e-136) tmp = -x / B; else tmp = ((1.0 / B) + (B * 0.16666666666666666)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-162], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e-136], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-136}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot 0.16666666666666666\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.5000000000000004e-162Initial program 70.3%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 43.5%
if -9.5000000000000004e-162 < F < 1.4999999999999999e-136Initial program 99.6%
Taylor expanded in F around -inf 37.0%
Taylor expanded in B around 0 24.5%
associate-*r/24.5%
distribute-lft-in24.5%
metadata-eval24.5%
neg-mul-124.5%
Simplified24.5%
Taylor expanded in x around inf 45.3%
associate-*r/45.3%
mul-1-neg45.3%
Simplified45.3%
if 1.4999999999999999e-136 < F Initial program 72.0%
expm1-log1p-u53.5%
expm1-udef44.3%
Applied egg-rr44.3%
expm1-def53.5%
expm1-log1p72.0%
associate-*r/81.0%
associate-*l/81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in F around inf 78.9%
Taylor expanded in B around 0 47.2%
Taylor expanded in B around 0 42.9%
Final simplification43.7%
(FPCore (F B x) :precision binary64 (if (<= F -7e-51) (/ -1.0 B) (if (<= F 2.5e-165) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7e-51) {
tmp = -1.0 / B;
} else if (F <= 2.5e-165) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7d-51)) then
tmp = (-1.0d0) / b
else if (f <= 2.5d-165) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7e-51) {
tmp = -1.0 / B;
} else if (F <= 2.5e-165) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7e-51: tmp = -1.0 / B elif F <= 2.5e-165: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7e-51) tmp = Float64(-1.0 / B); elseif (F <= 2.5e-165) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7e-51) tmp = -1.0 / B; elseif (F <= 2.5e-165) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7e-51], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.5e-165], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-165}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.9999999999999995e-51Initial program 64.0%
Taylor expanded in F around -inf 92.1%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
distribute-lft-in48.1%
metadata-eval48.1%
neg-mul-148.1%
Simplified48.1%
Taylor expanded in x around 0 30.0%
if -6.9999999999999995e-51 < F < 2.4999999999999999e-165Initial program 99.6%
Taylor expanded in F around -inf 37.9%
Taylor expanded in B around 0 23.3%
associate-*r/23.3%
distribute-lft-in23.3%
metadata-eval23.3%
neg-mul-123.3%
Simplified23.3%
Taylor expanded in x around inf 40.0%
associate-*r/40.0%
mul-1-neg40.0%
Simplified40.0%
if 2.4999999999999999e-165 < F Initial program 73.7%
Taylor expanded in F around inf 76.4%
Taylor expanded in B around 0 41.5%
Final simplification37.1%
(FPCore (F B x) :precision binary64 (if (<= F -9.5e-162) (/ (- -1.0 x) B) (if (<= F 2.5e-165) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.5e-165) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.5d-162)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.5d-165) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e-162) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.5e-165) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e-162: tmp = (-1.0 - x) / B elif F <= 2.5e-165: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e-162) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.5e-165) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.5e-162) tmp = (-1.0 - x) / B; elseif (F <= 2.5e-165) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e-162], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.5e-165], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-165}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.5000000000000004e-162Initial program 70.3%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 42.8%
associate-*r/42.8%
distribute-lft-in42.8%
metadata-eval42.8%
neg-mul-142.8%
Simplified42.8%
if -9.5000000000000004e-162 < F < 2.4999999999999999e-165Initial program 99.6%
Taylor expanded in F around -inf 37.2%
Taylor expanded in B around 0 25.0%
associate-*r/25.0%
distribute-lft-in25.0%
metadata-eval25.0%
neg-mul-125.0%
Simplified25.0%
Taylor expanded in x around inf 48.1%
associate-*r/48.1%
mul-1-neg48.1%
Simplified48.1%
if 2.4999999999999999e-165 < F Initial program 73.7%
Taylor expanded in F around inf 76.4%
Taylor expanded in B around 0 41.5%
Final simplification43.4%
(FPCore (F B x) :precision binary64 (if (<= F -6.6e-51) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.6e-51) {
tmp = -1.0 / 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.6d-51)) then
tmp = (-1.0d0) / 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.6e-51) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.6e-51: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.6e-51) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.6e-51) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.6e-51], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.6 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -6.59999999999999946e-51Initial program 64.0%
Taylor expanded in F around -inf 92.1%
Taylor expanded in B around 0 48.1%
associate-*r/48.1%
distribute-lft-in48.1%
metadata-eval48.1%
neg-mul-148.1%
Simplified48.1%
Taylor expanded in x around 0 30.0%
if -6.59999999999999946e-51 < F Initial program 85.0%
Taylor expanded in F around -inf 40.4%
Taylor expanded in B around 0 22.5%
associate-*r/22.5%
distribute-lft-in22.5%
metadata-eval22.5%
neg-mul-122.5%
Simplified22.5%
Taylor expanded in x around inf 30.2%
associate-*r/30.2%
mul-1-neg30.2%
Simplified30.2%
Final simplification30.1%
(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 77.7%
Taylor expanded in F around -inf 58.2%
Taylor expanded in B around 0 31.3%
associate-*r/31.3%
distribute-lft-in31.3%
metadata-eval31.3%
neg-mul-131.3%
Simplified31.3%
Taylor expanded in x around 0 12.5%
Final simplification12.5%
herbie shell --seed 2023319
(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))))))